id
stringlengths
11
15
language
stringclasses
1 value
question
stringlengths
13
844
answer
stringlengths
1
900
code
stringlengths
162
27.4k
code_original
stringlengths
162
26k
code_word_count
int64
51
5.96k
java-test-11876
java
What do it get from the system ?
an open file pointer
protected Random Access File init ( File f ) throws IO Exception { Random Access File input File = null ; try { input File = new Random Access File ( f , STRING ) ; } catch ( IO Exception i ) { if ( i instanceof File Not Found Exception ) { throw i ; } if ( f . can Read ( ) ) { Binary File . close Closable ( ) ; input ...
protected RandomAccessFile init ( File f ) throws IOException { RandomAccessFile inputFile = null ; try { inputFile = new RandomAccessFile ( f , STRING ) ; } catch ( IOException i ) { if ( i instanceof FileNotFoundException ) { throw i ; } if ( f . canRead ( ) ) { BinaryFile . closeClosable ( ) ; inputFile = new Random...
102
java-test-11877
java
What are the code initialize if it ' s found , but there are too many files open ?
the underlying randomaccessfile
protected Random Access File init ( File f ) throws IO Exception { Random Access File input File = null ; try { input File = new Random Access File ( f , STRING ) ; } catch ( IO Exception i ) { if ( i instanceof File Not Found Exception ) { throw i ; } if ( f . can Read ( ) ) { Binary File . close Closable ( ) ; input ...
protected RandomAccessFile init ( File f ) throws IOException { RandomAccessFile inputFile = null ; try { inputFile = new RandomAccessFile ( f , STRING ) ; } catch ( IOException i ) { if ( i instanceof FileNotFoundException ) { throw i ; } if ( f . canRead ( ) ) { BinaryFile . closeClosable ( ) ; inputFile = new Random...
102
java-test-11878
java
For what purpose do it call binaryfile closeclosable if it ' s found , but there are too many files open ?
to try to get an open file pointer from the system
protected Random Access File init ( File f ) throws IO Exception { Random Access File input File = null ; try { input File = new Random Access File ( f , STRING ) ; } catch ( IO Exception i ) { if ( i instanceof File Not Found Exception ) { throw i ; } if ( f . can Read ( ) ) { Binary File . close Closable ( ) ; input ...
protected RandomAccessFile init ( File f ) throws IOException { RandomAccessFile inputFile = null ; try { inputFile = new RandomAccessFile ( f , STRING ) ; } catch ( IOException i ) { if ( i instanceof FileNotFoundException ) { throw i ; } if ( f . canRead ( ) ) { BinaryFile . closeClosable ( ) ; inputFile = new Random...
102
java-test-11879
java
For what purpose are words separated with eight words ( 32 bytes ) per line ?
for readability
public static String to Hex String ( Big Integer b ) { String hex Value = b . to String ( NUM ) ; String Buffer buf = new String Buffer ( hex Value . length ( ) * NUM ) ; if ( hex Value . starts With ( STRING ) ) { buf . append ( STRING ) ; hex Value = hex Value . substring ( NUM ) ; } else { buf . append ( STRING ) ; ...
public static String toHexString ( BigInteger b ) { String hexValue = b . toString ( _NUM ) ; StringBuffer buf = new StringBuffer ( hexValue . length ( ) * _NUM ) ; if ( hexValue . startsWith ( STRING ) ) { buf . append ( STRING ) ; hexValue = hexValue . substring ( _NUM ) ; } else { buf . append ( STRING ) ; } if ( ( ...
206
java-test-11880
java
Where did the value fit ?
on lines of at least 75 characters
public static String to Hex String ( Big Integer b ) { String hex Value = b . to String ( NUM ) ; String Buffer buf = new String Buffer ( hex Value . length ( ) * NUM ) ; if ( hex Value . starts With ( STRING ) ) { buf . append ( STRING ) ; hex Value = hex Value . substring ( NUM ) ; } else { buf . append ( STRING ) ; ...
public static String toHexString ( BigInteger b ) { String hexValue = b . toString ( _NUM ) ; StringBuffer buf = new StringBuffer ( hexValue . length ( ) * _NUM ) ; if ( hexValue . startsWith ( STRING ) ) { buf . append ( STRING ) ; hexValue = hexValue . substring ( _NUM ) ; } else { buf . append ( STRING ) ; } if ( ( ...
206
java-test-11881
java
How are words separated for readability ?
with eight words ( 32 bytes ) per line
public static String to Hex String ( Big Integer b ) { String hex Value = b . to String ( NUM ) ; String Buffer buf = new String Buffer ( hex Value . length ( ) * NUM ) ; if ( hex Value . starts With ( STRING ) ) { buf . append ( STRING ) ; hex Value = hex Value . substring ( NUM ) ; } else { buf . append ( STRING ) ; ...
public static String toHexString ( BigInteger b ) { String hexValue = b . toString ( _NUM ) ; StringBuffer buf = new StringBuffer ( hexValue . length ( ) * _NUM ) ; if ( hexValue . startsWith ( STRING ) ) { buf . append ( STRING ) ; hexValue = hexValue . substring ( _NUM ) ; } else { buf . append ( STRING ) ; } if ( ( ...
206
java-test-11882
java
What is the value formatted ?
to fit on lines of at least 75 characters , with embedded newlines
public static String to Hex String ( Big Integer b ) { String hex Value = b . to String ( NUM ) ; String Buffer buf = new String Buffer ( hex Value . length ( ) * NUM ) ; if ( hex Value . starts With ( STRING ) ) { buf . append ( STRING ) ; hex Value = hex Value . substring ( NUM ) ; } else { buf . append ( STRING ) ; ...
public static String toHexString ( BigInteger b ) { String hexValue = b . toString ( _NUM ) ; StringBuffer buf = new StringBuffer ( hexValue . length ( ) * _NUM ) ; if ( hexValue . startsWith ( STRING ) ) { buf . append ( STRING ) ; hexValue = hexValue . substring ( _NUM ) ; } else { buf . append ( STRING ) ; } if ( ( ...
206
java-test-11883
java
How do the appropriate context menu open ?
on right - click on an emote
private void open Context Menu ( Mouse Event e ) { if ( e . is Popup Trigger ( ) ) { Emoticon Image emote = ( ( Emote ) e . get Source ( ) ) . emote ; J Popup Menu m = new Emote Context Menu ( emote , context Menu Listener ) ; m . show ( e . get Component ( ) , e . get X ( ) , e . get Y ( ) ) ; } }
private void openContextMenu ( MouseEvent e ) { if ( e . isPopupTrigger ( ) ) { EmoticonImage emote = ( ( Emote ) e . getSource ( ) ) . emote ; JPopupMenu m = new EmoteContextMenu ( emote , contextMenuListener ) ; m . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } }
85
java-test-11884
java
What does the code create ?
a storage policy create request
public Storage Policy Create Request create Storage Policy Create Request ( Storage Policy Key storage Policy Key , String storage Policy Rule Type , Integer storage Policy Rule Value , String business Object Definition Namespace , String business Object Definition Name , String business Object Format Usage , String bu...
public StoragePolicyCreateRequest createStoragePolicyCreateRequest ( StoragePolicyKey storagePolicyKey , String storagePolicyRuleType , Integer storagePolicyRuleValue , String businessObjectDefinitionNamespace , String businessObjectDefinitionName , String businessObjectFormatUsage , String businessObjectFormatFileType...
305
java-test-11885
java
What does the code add to this fragment ?
all parent comments
private void add Parent Comments ( List < ? extends I Endless Adaptable > loaded Items , Comment comment In Context , List < I Endless Adaptable > displayed Comments ) { int depth = comment In Context . get Depth ( ) ; if ( depth == NUM ) return ; -- depth ; int comment Position = loaded Items . index Of ( comment In C...
private void addParentComments ( List < ? extends IEndlessAdaptable > loadedItems , Comment commentInContext , List < IEndlessAdaptable > displayedComments ) { int depth = commentInContext . getDepth ( ) ; if ( depth == _NUM ) return ; -- depth ; int commentPosition = loadedItems . indexOf ( commentInContext ) ; for ( ...
151
java-test-11890
java
When should the twitlonger callback be done ?
after successfully using the ' post ' method
public void callback ( final long status id , final String twitlonger message id ) throws Exception { final Array List < Name Value Pair > args = new Array List < > ( NUM ) ; args . add ( new Basic Name Value Pair ( STRING , app name ) ) ; args . add ( new Basic Name Value Pair ( STRING , api key ) ) ; args . add ( new...
public void callback ( final long status_id , final String twitlonger_message_id ) throws Exception { final ArrayList < NameValuePair > args = new ArrayList < > ( _NUM ) ; args . add ( new BasicNameValuePair ( STRING , app_name ) ) ; args . add ( new BasicNameValuePair ( STRING , api_key ) ) ; args . add ( new BasicNam...
611
java-test-11895
java
What is produced this same format in the crowdflower . com task1 ?
by the js
private String build Task 1 Gold Elem ( String Builder text Builder , List < String > gold Elems ) { String str Gold ; text Builder . set Length ( NUM ) ; text Builder . append ( STRING ) ; text Builder . append ( concat With Separator ( gold Elems , STRING ) ) ; text Builder . append ( STRING ) ; str Gold = new String...
private String buildTask1GoldElem ( StringBuilder textBuilder , List < String > goldElems ) { String strGold ; textBuilder . setLength ( _NUM ) ; textBuilder . append ( STRING ) ; textBuilder . append ( concatWithSeparator ( goldElems , STRING ) ) ; textBuilder . append ( STRING ) ; strGold = new String ( textBuilder )...
81
java-test-11896
java
Where is by the js produced this same format ?
in the crowdflower . com task1
private String build Task 1 Gold Elem ( String Builder text Builder , List < String > gold Elems ) { String str Gold ; text Builder . set Length ( NUM ) ; text Builder . append ( STRING ) ; text Builder . append ( concat With Separator ( gold Elems , STRING ) ) ; text Builder . append ( STRING ) ; str Gold = new String...
private String buildTask1GoldElem ( StringBuilder textBuilder , List < String > goldElems ) { String strGold ; textBuilder . setLength ( _NUM ) ; textBuilder . append ( STRING ) ; textBuilder . append ( concatWithSeparator ( goldElems , STRING ) ) ; textBuilder . append ( STRING ) ; strGold = new String ( textBuilder )...
81
java-test-11897
java
What does helper method for generatetask1data concatenate ?
all json formatted tokens ( sorted by position ) which is then the gold solution
private String build Task 1 Gold Elem ( String Builder text Builder , List < String > gold Elems ) { String str Gold ; text Builder . set Length ( NUM ) ; text Builder . append ( STRING ) ; text Builder . append ( concat With Separator ( gold Elems , STRING ) ) ; text Builder . append ( STRING ) ; str Gold = new String...
private String buildTask1GoldElem ( StringBuilder textBuilder , List < String > goldElems ) { String strGold ; textBuilder . setLength ( _NUM ) ; textBuilder . append ( STRING ) ; textBuilder . append ( concatWithSeparator ( goldElems , STRING ) ) ; textBuilder . append ( STRING ) ; strGold = new String ( textBuilder )...
81
java-test-11898
java
What does the code create with no initial experiment ?
the run panel
public Run Panel ( ) { m Start But . add Action Listener ( this ) ; m Stop But . add Action Listener ( this ) ; m Start But . set Enabled ( BOOL ) ; m Stop But . set Enabled ( BOOL ) ; m Start But . set Mnemonic ( STRING ) ; m Stop But . set Mnemonic ( STRING ) ; m Log . status Message ( NOT RUNNING ) ; J Panel control...
public RunPanel ( ) { m_StartBut . addActionListener ( this ) ; m_StopBut . addActionListener ( this ) ; m_StartBut . setEnabled ( _BOOL ) ; m_StopBut . setEnabled ( _BOOL ) ; m_StartBut . setMnemonic ( STRING ) ; m_StopBut . setMnemonic ( STRING ) ; m_Log . statusMessage ( NOT_RUNNING ) ; JPanel controls = new JPanel ...
282
java-test-11899
java
How does the code create the run panel ?
with no initial experiment
public Run Panel ( ) { m Start But . add Action Listener ( this ) ; m Stop But . add Action Listener ( this ) ; m Start But . set Enabled ( BOOL ) ; m Stop But . set Enabled ( BOOL ) ; m Start But . set Mnemonic ( STRING ) ; m Stop But . set Mnemonic ( STRING ) ; m Log . status Message ( NOT RUNNING ) ; J Panel control...
public RunPanel ( ) { m_StartBut . addActionListener ( this ) ; m_StopBut . addActionListener ( this ) ; m_StartBut . setEnabled ( _BOOL ) ; m_StopBut . setEnabled ( _BOOL ) ; m_StartBut . setMnemonic ( STRING ) ; m_StopBut . setMnemonic ( STRING ) ; m_Log . statusMessage ( NOT_RUNNING ) ; JPanel controls = new JPanel ...
282
java-test-11902
java
What does the code find ?
the index of the start of the argument name
private int extract Arg Name ( int index , String working ) { for ( int i = index ; i < working . length ( ) ; i ++ ) { char c = working . char At ( i ) ; if ( c == STRING ) return i ; if ( c == STRING ) return i ; } return - NUM ; }
private int extractArgName ( int index , String working ) { for ( int i = index ; i < working . length ( ) ; i ++ ) { char c = working . charAt ( i ) ; if ( c == STRING ) return i ; if ( c == STRING ) return i ; } return - _NUM ; }
67
java-test-11903
java
For what purpose was no compression method specified ?
for the entry
public void put Next Entry ( Zip Entry e ) throws IO Exception { ensure Open ( ) ; if ( current != null ) { close Entry ( ) ; } if ( e . xdostime == - NUM ) { e . set Time ( System . current Time Millis ( ) ) ; } if ( e . method == - NUM ) { e . method = method ; } e . flag = NUM ; switch ( e . method ) { case DEFLATED...
public void putNextEntry ( ZipEntry e ) throws IOException { ensureOpen ( ) ; if ( current != null ) { closeEntry ( ) ; } if ( e . xdostime == - _NUM ) { e . setTime ( System . currentTimeMillis ( ) ) ; } if ( e . method == - _NUM ) { e . method = method ; } e . flag = _NUM ; switch ( e . method ) { case DEFLATED : if ...
290
java-test-11904
java
What does the code create ?
a new node containing a path specified by a character - array fragment
public Node ( final char [ ] a , final int offset , final int length , final boolean is Word , final int num Nodes ) { path = new char [ length ] ; System . arraycopy ( a , offset , path , NUM , length ) ; this . is Word = is Word ; this . num Nodes = num Nodes ; }
public Node ( final char [ ] a , final int offset , final int length , final boolean isWord , final int numNodes ) { path = new char [ length ] ; System . arraycopy ( a , offset , path , _NUM , length ) ; this . isWord = isWord ; this . numNodes = numNodes ; }
68
java-test-11905
java
What do a new node contain ?
a path specified by a character - array fragment
public Node ( final char [ ] a , final int offset , final int length , final boolean is Word , final int num Nodes ) { path = new char [ length ] ; System . arraycopy ( a , offset , path , NUM , length ) ; this . is Word = is Word ; this . num Nodes = num Nodes ; }
public Node ( final char [ ] a , final int offset , final int length , final boolean isWord , final int numNodes ) { path = new char [ length ] ; System . arraycopy ( a , offset , path , _NUM , length ) ; this . isWord = isWord ; this . numNodes = numNodes ; }
68
java-test-11906
java
What contains a stringified form of a namecomponent a vector ?
each element of the vector
private static Vector < String > ins String To Stringified Comps ( String str ) throws Invalid Name Exception { int len = str . length ( ) ; Vector < String > components = new Vector < > ( NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int id Count , kind Count ; boolean id Mode ; for ( int...
private static Vector < String > insStringToStringifiedComps ( String str ) throws InvalidNameException { int len = str . length ( ) ; Vector < String > components = new Vector < > ( _NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int idCount , kindCount ; boolean idMode ; for ( int i = _NU...
367
java-test-11907
java
What does an ins - syntax string name convert ?
into a vector in which each element of the vector contains a stringified form of a namecomponent
private static Vector < String > ins String To Stringified Comps ( String str ) throws Invalid Name Exception { int len = str . length ( ) ; Vector < String > components = new Vector < > ( NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int id Count , kind Count ; boolean id Mode ; for ( int...
private static Vector < String > insStringToStringifiedComps ( String str ) throws InvalidNameException { int len = str . length ( ) ; Vector < String > components = new Vector < > ( _NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int idCount , kindCount ; boolean idMode ; for ( int i = _NU...
367
java-test-11908
java
What converts into a vector in which each element of the vector contains a stringified form of a namecomponent ?
an ins - syntax string name
private static Vector < String > ins String To Stringified Comps ( String str ) throws Invalid Name Exception { int len = str . length ( ) ; Vector < String > components = new Vector < > ( NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int id Count , kind Count ; boolean id Mode ; for ( int...
private static Vector < String > insStringToStringifiedComps ( String str ) throws InvalidNameException { int len = str . length ( ) ; Vector < String > components = new Vector < > ( _NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int idCount , kindCount ; boolean idMode ; for ( int i = _NU...
367
java-test-11909
java
What does each element of the vector contain a vector ?
a stringified form of a namecomponent
private static Vector < String > ins String To Stringified Comps ( String str ) throws Invalid Name Exception { int len = str . length ( ) ; Vector < String > components = new Vector < > ( NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int id Count , kind Count ; boolean id Mode ; for ( int...
private static Vector < String > insStringToStringifiedComps ( String str ) throws InvalidNameException { int len = str . length ( ) ; Vector < String > components = new Vector < > ( _NUM ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int idCount , kindCount ; boolean idMode ; for ( int i = _NU...
367
java-test-11910
java
What does the code remove from the previous selection ?
the option fields
private void remove Option Fields ( Box box , Graphic Panel Field Manager field Config Manager ) { if ( option Panel != null ) { box . remove ( option Panel ) ; for ( Field Config Base field : option Field List ) { field Config Manager . remove Field ( field ) ; } option Field List . clear ( ) ; option Panel = null ; b...
private void removeOptionFields ( Box box , GraphicPanelFieldManager fieldConfigManager ) { if ( optionPanel != null ) { box . remove ( optionPanel ) ; for ( FieldConfigBase field : optionFieldList ) { fieldConfigManager . removeField ( field ) ; } optionFieldList . clear ( ) ; optionPanel = null ; box . revalidate ( )...
78
java-test-11911
java
What does the code simulate ?
the store instruction
private void simulate Store ( final Store Instruction instruction ) { final int index = instruction . get Number ( ) ; final Element element To Store = runtime Stack . pop ( ) ; if ( element To Store instanceof Method Handle ) merge Method Handle Store ( index , ( Method Handle ) element To Store ) ; else merge Element...
private void simulateStore ( final StoreInstruction instruction ) { final int index = instruction . getNumber ( ) ; final Element elementToStore = runtimeStack . pop ( ) ; if ( elementToStore instanceof MethodHandle ) mergeMethodHandleStore ( index , ( MethodHandle ) elementToStore ) ; else mergeElementStore ( index , ...
81
java-test-11915
java
What does the code remove ?
the selected entry
protected void remove Selected ( ) { if ( table . get Row Count ( ) == NUM ) { return ; } int view Index = table . get Selected Row ( ) ; int model Index = index To Model ( view Index ) ; if ( model Index == - NUM ) { return ; } T removed Item = data . remove ( model Index ) ; if ( table . get Row Count ( ) > view Inde...
protected void removeSelected ( ) { if ( table . getRowCount ( ) == _NUM ) { return ; } int viewIndex = table . getSelectedRow ( ) ; int modelIndex = indexToModel ( viewIndex ) ; if ( modelIndex == - _NUM ) { return ; } T removedItem = data . remove ( modelIndex ) ; if ( table . getRowCount ( ) > viewIndex ) { setRowSe...
152
java-test-11916
java
What does the code ensure ?
the stream is flushed and closed after the closure returns
public static < T > T with Writer ( Path self , String charset , @ Closure Params ( value = Simple Type . class , options = STRING ) Closure < T > closure ) throws IO Exception { return with Writer ( self , charset , BOOL , closure ) ; }
public static < T > T withWriter ( Path self , String charset , @ ClosureParams ( value = SimpleType . class , options = STRING ) Closure < T > closure ) throws IOException { return withWriter ( self , charset , _BOOL , closure ) ; }
54
java-test-11917
java
What does the code create ?
a new bufferedwriter for this file
public static < T > T with Writer ( Path self , String charset , @ Closure Params ( value = Simple Type . class , options = STRING ) Closure < T > closure ) throws IO Exception { return with Writer ( self , charset , BOOL , closure ) ; }
public static < T > T withWriter ( Path self , String charset , @ ClosureParams ( value = SimpleType . class , options = STRING ) Closure < T > closure ) throws IOException { return withWriter ( self , charset , _BOOL , closure ) ; }
54
java-test-11918
java
What will the writer use ?
the given charset encoding
public static < T > T with Writer ( Path self , String charset , @ Closure Params ( value = Simple Type . class , options = STRING ) Closure < T > closure ) throws IO Exception { return with Writer ( self , charset , BOOL , closure ) ; }
public static < T > T withWriter ( Path self , String charset , @ ClosureParams ( value = SimpleType . class , options = STRING ) Closure < T > closure ) throws IOException { return withWriter ( self , charset , _BOOL , closure ) ; }
54
java-test-11919
java
What will the writer not write ?
a bom
public static < T > T with Writer ( Path self , String charset , @ Closure Params ( value = Simple Type . class , options = STRING ) Closure < T > closure ) throws IO Exception { return with Writer ( self , charset , BOOL , closure ) ; }
public static < T > T withWriter ( Path self , String charset , @ ClosureParams ( value = SimpleType . class , options = STRING ) Closure < T > closure ) throws IOException { return withWriter ( self , charset , _BOOL , closure ) ; }
54
java-test-11921
java
When does all hosts move in the world ?
for a given amount of time
private void move Hosts ( double time Increment ) { for ( int i = NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTN Host host = hosts . get ( i ) ; host . move ( time Increment ) ; } }
private void moveHosts ( double timeIncrement ) { for ( int i = _NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTNHost host = hosts . get ( i ) ; host . move ( timeIncrement ) ; } }
54
java-test-11922
java
Where does all hosts move for a given amount of time ?
in the world
private void move Hosts ( double time Increment ) { for ( int i = NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTN Host host = hosts . get ( i ) ; host . move ( time Increment ) ; } }
private void moveHosts ( double timeIncrement ) { for ( int i = _NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTNHost host = hosts . get ( i ) ; host . move ( timeIncrement ) ; } }
54
java-test-11923
java
What moves in the world ?
all hosts
private void move Hosts ( double time Increment ) { for ( int i = NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTN Host host = hosts . get ( i ) ; host . move ( time Increment ) ; } }
private void moveHosts ( double timeIncrement ) { for ( int i = _NUM , n = hosts . size ( ) ; i < n ; i ++ ) { DTNHost host = hosts . get ( i ) ; host . move ( timeIncrement ) ; } }
54
java-test-11924
java
In which direction does the public values ( name , firstname , email ) and keys copy ?
into a contact
public boolean export My Identity ( Abstract Identity id , File file ) { File Output Stream fos ; try { fos = new File Output Stream ( file ) ; } catch ( File Not Found Exception e ) { logger . error ( STRING + file . get Absolute Path ( ) , e ) ; return BOOL ; } return export My Identity ( id , fos ) ; }
public boolean exportMyIdentity ( AbstractIdentity id , File file ) { FileOutputStream fos ; try { fos = new FileOutputStream ( file ) ; } catch ( FileNotFoundException e ) { logger . error ( STRING + file . getAbsolutePath ( ) , e ) ; return _BOOL ; } return exportMyIdentity ( id , fos ) ; }
73
java-test-11925
java
What will throw an ioexception if 2 . happens ?
safecount
public synchronized boolean safe Count ( int partition , long offset ) throws IO Exception { Atomic Long counter = null ; if ( partition >= this . counters . length ) { this . counters = Arrays . copy Of ( this . counters , this . counters . length + GROWBY ) ; } counter = counters [ partition ] ; if ( null == counter ...
public synchronized boolean safeCount ( int partition , long offset ) throws IOException { AtomicLong counter = null ; if ( partition >= this . counters . length ) { this . counters = Arrays . copyOf ( this . counters , this . counters . length + GROWBY ) ; } counter = counters [ partition ] ; if ( null == counter ) { ...
460
java-test-11929
java
What does the code add ?
the rdns of a name - - in order -
public Name add All ( int posn , List < Rdn > suffix Rdns ) { unparsed = null ; for ( int i = NUM ; i < suffix Rdns . size ( ) ; i ++ ) { Object obj = suffix Rdns . get ( i ) ; if ( ! ( obj instanceof Rdn ) ) { throw new Illegal Argument Exception ( STRING + obj + STRING ) ; } rdns . add ( i + posn , ( Rdn ) obj ) ; } ...
public Name addAll ( int posn , List < Rdn > suffixRdns ) { unparsed = null ; for ( int i = _NUM ; i < suffixRdns . size ( ) ; i ++ ) { Object obj = suffixRdns . get ( i ) ; if ( ! ( obj instanceof Rdn ) ) { throw new IllegalArgumentException ( STRING + obj + STRING ) ; } rdns . add ( i + posn , ( Rdn ) obj ) ; } retur...
94
java-test-11930
java
For what purpose are rdns of this ldap name at or after the index ( if any ) of the first new rdn shifted up up ?
to accommodate the new rdns
public Name add All ( int posn , List < Rdn > suffix Rdns ) { unparsed = null ; for ( int i = NUM ; i < suffix Rdns . size ( ) ; i ++ ) { Object obj = suffix Rdns . get ( i ) ; if ( ! ( obj instanceof Rdn ) ) { throw new Illegal Argument Exception ( STRING + obj + STRING ) ; } rdns . add ( i + posn , ( Rdn ) obj ) ; } ...
public Name addAll ( int posn , List < Rdn > suffixRdns ) { unparsed = null ; for ( int i = _NUM ; i < suffixRdns . size ( ) ; i ++ ) { Object obj = suffixRdns . get ( i ) ; if ( ! ( obj instanceof Rdn ) ) { throw new IllegalArgumentException ( STRING + obj + STRING ) ; } rdns . add ( i + posn , ( Rdn ) obj ) ; } retur...
94
java-test-11932
java
What does the code find ?
a specific storage center
public Storage Center find Storage Center ( String ssn ) throws Storage Center API Exception { Storage Center [ ] scs = get Storage Center Info ( ) ; for ( Storage Center sc : scs ) { if ( ssn . equals ( sc . sc Serial Number ) ) { return sc ; } } throw new Storage Center API Exception ( String . format ( STRING , ssn ...
public StorageCenter findStorageCenter ( String ssn ) throws StorageCenterAPIException { StorageCenter [ ] scs = getStorageCenterInfo ( ) ; for ( StorageCenter sc : scs ) { if ( ssn . equals ( sc . scSerialNumber ) ) { return sc ; } } throw new StorageCenterAPIException ( String . format ( STRING , ssn ) ) ; }
75
java-test-11934
java
For what purpose does an array of indices to vector of comparable objects sort ?
into increasing order
public static void sort ( Abstract List array , int [ ] indices ) { for ( int i = NUM ; i < indices . length ; i ++ ) { indices [ i ] = i ; } int temp ; int j , n = array . size ( ) ; for ( j = n / NUM ; j > NUM ; j -- ) { adjust ( array , indices , j , n ) ; } for ( j = n - NUM ; j > NUM ; j -- ) { temp = indices [ NU...
public static void sort ( AbstractList array , int [ ] indices ) { for ( int i = _NUM ; i < indices . length ; i ++ ) { indices [ i ] = i ; } int temp ; int j , n = array . size ( ) ; for ( j = n / _NUM ; j > _NUM ; j -- ) { adjust ( array , indices , j , n ) ; } for ( j = n - _NUM ; j > _NUM ; j -- ) { temp = indices ...
135
java-test-11935
java
What does the old chain associated with the key entry replace ?
the newly generated chain
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11936
java
What does the code process from a certificate authority ?
a certificate reply
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11937
java
Where is the self - signed certificate stored ?
at the end of the chain
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11938
java
Where does a certificate chain build using trusted certificates from the keystore ?
on top of the certificate reply
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11939
java
When is the chain complete ?
after a self - signed certificate has been encountered
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11940
java
What replaces the newly generated chain ?
the old chain associated with the key entry
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11941
java
How does a certificate chain build on top of the certificate reply ?
using trusted certificates from the keystore
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11942
java
What is stored at the end of the chain ?
the self - signed certificate
private boolean install Reply ( String alias , Input Stream in ) throws Exception { if ( alias == null ) { alias = key Alias ; } Pair < Key , char [ ] > objs = recover Key ( alias , store Pass , key Pass ) ; Private Key priv Key = ( Private Key ) objs . fst ; if ( key Pass == null ) { key Pass = objs . snd ; } Certific...
private boolean installReply ( String alias , InputStream in ) throws Exception { if ( alias == null ) { alias = keyAlias ; } Pair < Key , char [ ] > objs = recoverKey ( alias , storePass , keyPass ) ; PrivateKey privKey = ( PrivateKey ) objs . fst ; if ( keyPass == null ) { keyPass = objs . snd ; } Certificate userCer...
301
java-test-11943
java
How does it refresh cpu usage only right now ?
in terms of percentage
private void refresh Stats ( ) { if ( process CPU Time Available ) { Number process Cpu Time = stats Map . get ( Stats Key . VM PROCESS CPU TIME ) ; if ( process Cpu Time == null ) { cpu Usage = M Bean JMX Adapter . VALUE NOT AVAILABLE ; return ; } if ( last System Time == NUM ) { last System Time = System . current Ti...
private void refreshStats ( ) { if ( processCPUTimeAvailable ) { Number processCpuTime = statsMap . get ( StatsKey . VM_PROCESS_CPU_TIME ) ; if ( processCpuTime == null ) { cpuUsage = MBeanJMXAdapter . VALUE_NOT_AVAILABLE ; return ; } if ( lastSystemTime == _NUM ) { lastSystemTime = System . currentTimeMillis ( ) ; ret...
186
java-test-11944
java
What does this return if process time between two sample time t1 & t2 is p1 and p2 cpuusage = ( ( p2 - p1 ) * 100 ) / ( ( t2 - t1 ) ?
the time ( as a percentage ) that this member ' s process time with respect to statistics sample time interval
private void refresh Stats ( ) { if ( process CPU Time Available ) { Number process Cpu Time = stats Map . get ( Stats Key . VM PROCESS CPU TIME ) ; if ( process Cpu Time == null ) { cpu Usage = M Bean JMX Adapter . VALUE NOT AVAILABLE ; return ; } if ( last System Time == NUM ) { last System Time = System . current Ti...
private void refreshStats ( ) { if ( processCPUTimeAvailable ) { Number processCpuTime = statsMap . get ( StatsKey . VM_PROCESS_CPU_TIME ) ; if ( processCpuTime == null ) { cpuUsage = MBeanJMXAdapter . VALUE_NOT_AVAILABLE ; return ; } if ( lastSystemTime == _NUM ) { lastSystemTime = System . currentTimeMillis ( ) ; ret...
186
java-test-11945
java
What does it refresh only in terms of percentage right now ?
cpu usage
private void refresh Stats ( ) { if ( process CPU Time Available ) { Number process Cpu Time = stats Map . get ( Stats Key . VM PROCESS CPU TIME ) ; if ( process Cpu Time == null ) { cpu Usage = M Bean JMX Adapter . VALUE NOT AVAILABLE ; return ; } if ( last System Time == NUM ) { last System Time = System . current Ti...
private void refreshStats ( ) { if ( processCPUTimeAvailable ) { Number processCpuTime = statsMap . get ( StatsKey . VM_PROCESS_CPU_TIME ) ; if ( processCpuTime == null ) { cpuUsage = MBeanJMXAdapter . VALUE_NOT_AVAILABLE ; return ; } if ( lastSystemTime == _NUM ) { lastSystemTime = System . currentTimeMillis ( ) ; ret...
186
java-test-11946
java
For what purpose do error check ?
to make sure the json file passed in is valid
private void validate File ( File json File ) throws Ade Usage Exception { if ( ! json File . is File ( ) ) { throw new Ade Usage Exception ( STRING + json File . get Path ( ) ) ; } else if ( ! json File . can Read ( ) ) { throw new Ade Usage Exception ( STRING + json File . get Path ( ) ) ; } }
private void validateFile ( File jsonFile ) throws AdeUsageException { if ( ! jsonFile . isFile ( ) ) { throw new AdeUsageException ( STRING + jsonFile . getPath ( ) ) ; } else if ( ! jsonFile . canRead ( ) ) { throw new AdeUsageException ( STRING + jsonFile . getPath ( ) ) ; } }
76
java-test-11947
java
What does the code write to the file system ?
the formdef
public void serialize Form Def ( Form Def fd , String filepath ) { String hash = File Utils . get Md 5 Hash ( new File ( filepath ) ) ; File form Def = new File ( Collect . CACHE PATH + File . separator + hash + STRING ) ; if ( ! form Def . exists ( ) ) { File Output Stream fos ; try { fos = new File Output Stream ( fo...
public void serializeFormDef ( FormDef fd , String filepath ) { String hash = FileUtils . getMd5Hash ( new File ( filepath ) ) ; File formDef = new File ( Collect . CACHE_PATH + File . separator + hash + STRING ) ; if ( ! formDef . exists ( ) ) { FileOutputStream fos ; try { fos = new FileOutputStream ( formDef ) ; Dat...
152
java-test-11950
java
What is holding the given branch ?
this instructions basicblock
public boolean is Directly Control Dependent On ( Basic Block ins Block , Branch b ) { Set < Control Flow Edge > incomming = incoming Edges Of ( ins Block ) ; if ( incomming . size ( ) == NUM ) { for ( Control Flow Edge e : incomming ) { if ( ! e . has Control Dependency ( ) && ! e . is Exception Edge ( ) ) { return is...
public boolean isDirectlyControlDependentOn ( BasicBlock insBlock , Branch b ) { Set < ControlFlowEdge > incomming = incomingEdgesOf ( insBlock ) ; if ( incomming . size ( ) == _NUM ) { for ( ControlFlowEdge e : incomming ) { if ( ! e . hasControlDependency ( ) && ! e . isExceptionEdge ( ) ) { return isDirectlyControlD...
208
java-test-11951
java
Where does an incoming controlflowedge to this instructions basicblock holding the given branch as it ' s branchinstruction be ?
within this cdg
public boolean is Directly Control Dependent On ( Basic Block ins Block , Branch b ) { Set < Control Flow Edge > incomming = incoming Edges Of ( ins Block ) ; if ( incomming . size ( ) == NUM ) { for ( Control Flow Edge e : incomming ) { if ( ! e . has Control Dependency ( ) && ! e . is Exception Edge ( ) ) { return is...
public boolean isDirectlyControlDependentOn ( BasicBlock insBlock , Branch b ) { Set < ControlFlowEdge > incomming = incomingEdgesOf ( insBlock ) ; if ( incomming . size ( ) == _NUM ) { for ( ControlFlowEdge e : incomming ) { if ( ! e . hasControlDependency ( ) && ! e . isExceptionEdge ( ) ) { return isDirectlyControlD...
208
java-test-11952
java
What is within this cdg ?
an incoming controlflowedge to this instructions basicblock holding the given branch as it ' s branchinstruction
public boolean is Directly Control Dependent On ( Basic Block ins Block , Branch b ) { Set < Control Flow Edge > incomming = incoming Edges Of ( ins Block ) ; if ( incomming . size ( ) == NUM ) { for ( Control Flow Edge e : incomming ) { if ( ! e . has Control Dependency ( ) && ! e . is Exception Edge ( ) ) { return is...
public boolean isDirectlyControlDependentOn ( BasicBlock insBlock , Branch b ) { Set < ControlFlowEdge > incomming = incomingEdgesOf ( insBlock ) ; if ( incomming . size ( ) == _NUM ) { for ( ControlFlowEdge e : incomming ) { if ( ! e . hasControlDependency ( ) && ! e . isExceptionEdge ( ) ) { return isDirectlyControlD...
208
java-test-11953
java
What do this instructions basicblock hold ?
the given branch
public boolean is Directly Control Dependent On ( Basic Block ins Block , Branch b ) { Set < Control Flow Edge > incomming = incoming Edges Of ( ins Block ) ; if ( incomming . size ( ) == NUM ) { for ( Control Flow Edge e : incomming ) { if ( ! e . has Control Dependency ( ) && ! e . is Exception Edge ( ) ) { return is...
public boolean isDirectlyControlDependentOn ( BasicBlock insBlock , Branch b ) { Set < ControlFlowEdge > incomming = incomingEdgesOf ( insBlock ) ; if ( incomming . size ( ) == _NUM ) { for ( ControlFlowEdge e : incomming ) { if ( ! e . hasControlDependency ( ) && ! e . isExceptionEdge ( ) ) { return isDirectlyControlD...
208
java-test-11955
java
When does the mbean perform any operations it needs ?
before being unregistered by the mbean server
public void pre Deregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . try Acquire ( ) ) throw new Illegal State Exception ( STRING ) ; try { unregister Scanners ( ) ; unregister Configs ( ) ; unregister Result Log Manager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log...
public void preDeregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . tryAcquire ( ) ) throw new IllegalStateException ( STRING ) ; try { unregisterScanners ( ) ; unregisterConfigs ( ) ; unregisterResultLogManager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log ( Level ...
90
java-test-11956
java
What does this implementation unregister also ?
all the mxbeans that were created by this object
public void pre Deregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . try Acquire ( ) ) throw new Illegal State Exception ( STRING ) ; try { unregister Scanners ( ) ; unregister Configs ( ) ; unregister Result Log Manager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log...
public void preDeregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . tryAcquire ( ) ) throw new IllegalStateException ( STRING ) ; try { unregisterScanners ( ) ; unregisterConfigs ( ) ; unregisterResultLogManager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log ( Level ...
90
java-test-11957
java
What does the code allow ?
the mbean to perform any operations it needs before being unregistered by the mbean server
public void pre Deregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . try Acquire ( ) ) throw new Illegal State Exception ( STRING ) ; try { unregister Scanners ( ) ; unregister Configs ( ) ; unregister Result Log Manager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log...
public void preDeregister ( ) throws Exception { try { close ( ) ; if ( ! sequencer . tryAcquire ( ) ) throw new IllegalStateException ( STRING ) ; try { unregisterScanners ( ) ; unregisterConfigs ( ) ; unregisterResultLogManager ( ) ; } finally { sequencer . release ( ) ; } } catch ( Exception x ) { LOG . log ( Level ...
90
java-test-11958
java
What d the code finds by i d ?
a resource reference within a collection
public static < T extends Related Resource Rep > T find Ref ( Collection < T > resources , URI id ) { if ( ( resources != null ) && ( id != null ) ) { for ( T resource : resources ) { if ( id . equals ( id ( resource ) ) ) { return resource ; } } } return null ; }
public static < T extends RelatedResourceRep > T findRef ( Collection < T > resources , URI id ) { if ( ( resources != null ) && ( id != null ) ) { for ( T resource : resources ) { if ( id . equals ( id ( resource ) ) ) { return resource ; } } } return null ; }
69
java-test-11959
java
What does the code initialize ?
the style of this view
private void init Style ( Attribute Set attribute Set , int def Style Attribute ) { Typed Array typed Array = m Context . obtain Styled Attributes ( attribute Set , R . styleable . Material Search View , def Style Attribute , NUM ) ; if ( typed Array != null ) { if ( typed Array . has Value ( R . styleable . Material S...
private void initStyle ( AttributeSet attributeSet , int defStyleAttribute ) { TypedArray typedArray = mContext . obtainStyledAttributes ( attributeSet , R . styleable . MaterialSearchView , defStyleAttribute , _NUM ) ; if ( typedArray != null ) { if ( typedArray . hasValue ( R . styleable . MaterialSearchView_searchBa...
621
java-test-11960
java
What does the code generate ?
a sample from the distribution given the conditional assignment
@ Override public Value sample ( Assignment condition ) { double prob = get Prob ( condition ) ; if ( sampler . next Double ( ) < prob ) { return Value Factory . create ( BOOL ) ; } else { return Value Factory . create ( BOOL ) ; } }
@ Override public Value sample ( Assignment condition ) { double prob = getProb ( condition ) ; if ( sampler . nextDouble ( ) < prob ) { return ValueFactory . create ( _BOOL ) ; } else { return ValueFactory . create ( _BOOL ) ; } }
54
java-test-11961
java
What does the code split into partitions given by the partitionsize ?
the given biginteger
public static List < Big Integer > partition Bits ( Big Integer value , int partition Size , Big Integer mask ) throws PIR Exception { if ( mask . bit Length ( ) != partition Size ) { throw new PIR Exception ( STRING + mask . bit Length ( ) + STRING + partition Size ) ; } List < Big Integer > partitions = new Array Lis...
public static List < BigInteger > partitionBits ( BigInteger value , int partitionSize , BigInteger mask ) throws PIRException { if ( mask . bitLength ( ) != partitionSize ) { throw new PIRException ( STRING + mask . bitLength ( ) + STRING + partitionSize ) ; } List < BigInteger > partitions = new ArrayList < > ( ) ; i...
228
java-test-11962
java
What is this performs if it is top of idle worker stack if it is top of idle worker stack ?
a one - shot version of signalwork
private boolean try Release ( long c , Work Queue v , long inc ) { int sp = ( int ) c , ns = sp & ~ UNSIGNALLED ; if ( v != null ) { int vs = v . scan State ; long nc = ( v . stack Pred & SP MASK ) | ( UC MASK & ( c + inc ) ) ; if ( sp == vs && U . compare And Swap Long ( this , CTL , c , nc ) ) { v . scan State = ns ;...
private boolean tryRelease ( long c , WorkQueue v , long inc ) { int sp = ( int ) c , ns = sp & ~ UNSIGNALLED ; if ( v != null ) { int vs = v . scanState ; long nc = ( v . stackPred & SP_MASK ) | ( UC_MASK & ( c + inc ) ) ; if ( sp == vs && U . compareAndSwapLong ( this , CTL , c , nc ) ) { v . scanState = ns ; LockSup...
119
java-test-11963
java
What does the code calculate ?
the attribute vectors
public void calculate Attribute Vectors ( ) { attribute Vector X = new double [ values . size ( ) ] ; attribute Vector Y = new double [ values . size ( ) ] ; double angle ; double radius = NUM ; int angle Int ; double x = NUM , y = NUM ; for ( int dimindex = NUM ; dimindex < values . size ( ) ; dimindex ++ ) { angle In...
public void calculateAttributeVectors ( ) { attributeVectorX = new double [ values . size ( ) ] ; attributeVectorY = new double [ values . size ( ) ] ; double angle ; double radius = _NUM ; int angleInt ; double x = _NUM , y = _NUM ; for ( int dimindex = _NUM ; dimindex < values . size ( ) ; dimindex ++ ) { angleInt = ...
279
java-test-11969
java
How can you get details ?
via getconversionerror ( ) or getexception
public boolean execute ( String sql Statements , Connection conn ) { if ( conn == null ) throw new Illegal State Exception ( STRING ) ; String [ ] sql = convert ( sql Statements ) ; m exception = null ; if ( m conversion Error != null || sql == null ) return BOOL ; boolean ok = BOOL ; int i = NUM ; String statement = n...
public boolean execute ( String sqlStatements , Connection conn ) { if ( conn == null ) throw new IllegalStateException ( STRING ) ; String [ ] sql = convert ( sqlStatements ) ; m_exception = null ; if ( m_conversionError != null || sql == null ) return _BOOL ; boolean ok = _BOOL ; int i = _NUM ; String statement = nul...
408
java-test-11970
java
What does the main program print ?
the db it finds
public static void main ( String [ ] args ) throws Format Exception { Debug . init ( ) ; if ( args . length == NUM ) { Debug . output ( STRING ) ; System . exit ( NUM ) ; } for ( int argsi = NUM ; argsi < args . length ; argsi ++ ) { rootpath = args [ argsi ] ; Library Selection Table lst = new Library Selection Table ...
public static void main ( String [ ] args ) throws FormatException { Debug . init ( ) ; if ( args . length == _NUM ) { Debug . output ( STRING ) ; System . exit ( _NUM ) ; } for ( int argsi = _NUM ; argsi < args . length ; argsi ++ ) { rootpath = args [ argsi ] ; LibrarySelectionTable lst = new LibrarySelectionTable ( ...
251
java-test-11971
java
What does the main program take ?
path arguments
public static void main ( String [ ] args ) throws Format Exception { Debug . init ( ) ; if ( args . length == NUM ) { Debug . output ( STRING ) ; System . exit ( NUM ) ; } for ( int argsi = NUM ; argsi < args . length ; argsi ++ ) { rootpath = args [ argsi ] ; Library Selection Table lst = new Library Selection Table ...
public static void main ( String [ ] args ) throws FormatException { Debug . init ( ) ; if ( args . length == _NUM ) { Debug . output ( STRING ) ; System . exit ( _NUM ) ; } for ( int argsi = _NUM ; argsi < args . length ; argsi ++ ) { rootpath = args [ argsi ] ; LibrarySelectionTable lst = new LibrarySelectionTable ( ...
251
java-test-11973
java
What does the code preconcatenat with the current transform ?
the rotation at the supplied point
public void rotate ( double theta , Point 2 D from ) { Affine Transform rotate = Affine Transform . get Rotate Instance ( theta , from . get X ( ) , from . get Y ( ) ) ; inverse = null ; transform . pre Concatenate ( rotate ) ; fire State Changed ( ) ; }
public void rotate ( double theta , Point2D from ) { AffineTransform rotate = AffineTransform . getRotateInstance ( theta , from . getX ( ) , from . getY ( ) ) ; inverse = null ; transform . preConcatenate ( rotate ) ; fireStateChanged ( ) ; }
60
java-test-11974
java
What does the code extract from current cursor ?
a list of videodto
protected List < Video DTO > extract Videos From Cursor ( Cursor cursor , int offset , int limit ) { List < Video DTO > videos = new Array List < > ( ) ; int count = NUM ; int begin = offset > NUM ? offset : NUM ; if ( cursor . move To Position ( begin ) ) { do { Video DTO video = extract One Video From Cursor ( cursor...
protected List < VideoDTO > extractVideosFromCursor ( Cursor cursor , int offset , int limit ) { List < VideoDTO > videos = new ArrayList < > ( ) ; int count = _NUM ; int begin = offset > _NUM ? offset : _NUM ; if ( cursor . moveToPosition ( begin ) ) { do { VideoDTO video = extractOneVideoFromCursor ( cursor ) ; video...
126
java-test-11975
java
For what purpose do this domain content populate ?
for both dimensions and metrics
public Domain Content load Static Content ( Space space ) { Universe univ = space . get Universe ( ) ; Domain domain = space . get Domain ( ) ; List < Dimension > dimensions = dimension DAO . find By Domain ( univ . get Context ( ) , domain . get Id ( ) ) ; List < Metric > metrics = metric DAO . find By Domain ( univ ....
public DomainContent loadStaticContent ( Space space ) { Universe univ = space . getUniverse ( ) ; Domain domain = space . getDomain ( ) ; List < Dimension > dimensions = dimensionDAO . findByDomain ( univ . getContext ( ) , domain . getId ( ) ) ; List < Metric > metrics = metricDAO . findByDomain ( univ . getContext (...
106
java-test-11976
java
What does this algorithm have ?
the effect of converting maximal edgerings into minimal edgerings
private static void compute Next CCW Edges ( Node node , long label ) { Directed Edge Star de Star = node . get Out Edges ( ) ; Polygonize Directed Edge first Out DE = null ; Polygonize Directed Edge prev In DE = null ; List edges = de Star . get Edges ( ) ; for ( int i = edges . size ( ) - NUM ; i >= NUM ; i -- ) { Po...
private static void computeNextCCWEdges ( Node node , long label ) { DirectedEdgeStar deStar = node . getOutEdges ( ) ; PolygonizeDirectedEdge firstOutDE = null ; PolygonizeDirectedEdge prevInDE = null ; List edges = deStar . getEdges ( ) ; for ( int i = edges . size ( ) - _NUM ; i >= _NUM ; i -- ) { PolygonizeDirected...
278
java-test-11977
java
What has the code computes ?
the next edge pointers going ccw around the given node , for the given edgering label
private static void compute Next CCW Edges ( Node node , long label ) { Directed Edge Star de Star = node . get Out Edges ( ) ; Polygonize Directed Edge first Out DE = null ; Polygonize Directed Edge prev In DE = null ; List edges = de Star . get Edges ( ) ; for ( int i = edges . size ( ) - NUM ; i >= NUM ; i -- ) { Po...
private static void computeNextCCWEdges ( Node node , long label ) { DirectedEdgeStar deStar = node . getOutEdges ( ) ; PolygonizeDirectedEdge firstOutDE = null ; PolygonizeDirectedEdge prevInDE = null ; List edges = deStar . getEdges ( ) ; for ( int i = edges . size ( ) - _NUM ; i >= _NUM ; i -- ) { PolygonizeDirected...
278
java-test-11978
java
What do maximal edgerings convert ?
into minimal edgerings
private static void compute Next CCW Edges ( Node node , long label ) { Directed Edge Star de Star = node . get Out Edges ( ) ; Polygonize Directed Edge first Out DE = null ; Polygonize Directed Edge prev In DE = null ; List edges = de Star . get Edges ( ) ; for ( int i = edges . size ( ) - NUM ; i >= NUM ; i -- ) { Po...
private static void computeNextCCWEdges ( Node node , long label ) { DirectedEdgeStar deStar = node . getOutEdges ( ) ; PolygonizeDirectedEdge firstOutDE = null ; PolygonizeDirectedEdge prevInDE = null ; List edges = deStar . getEdges ( ) ; for ( int i = edges . size ( ) - _NUM ; i >= _NUM ; i -- ) { PolygonizeDirected...
278
java-test-11979
java
What is converting into minimal edgerings ?
maximal edgerings
private static void compute Next CCW Edges ( Node node , long label ) { Directed Edge Star de Star = node . get Out Edges ( ) ; Polygonize Directed Edge first Out DE = null ; Polygonize Directed Edge prev In DE = null ; List edges = de Star . get Edges ( ) ; for ( int i = edges . size ( ) - NUM ; i >= NUM ; i -- ) { Po...
private static void computeNextCCWEdges ( Node node , long label ) { DirectedEdgeStar deStar = node . getOutEdges ( ) ; PolygonizeDirectedEdge firstOutDE = null ; PolygonizeDirectedEdge prevInDE = null ; List edges = deStar . getEdges ( ) ; for ( int i = edges . size ( ) - _NUM ; i >= _NUM ; i -- ) { PolygonizeDirected...
278
java-test-11980
java
What are the code given a list of checks ensures ?
that the checks are in the bin
private static int add To Bin ( Live Expr Node check , Vect bin ) { if ( check == null ) { return - NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = NUM ; idx < len ; idx ++ ) { Live Expr Node ln = ( Live Expr Node ) bin . element At ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin ....
private static int addToBin ( LiveExprNode check , Vect bin ) { if ( check == null ) { return - _NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = _NUM ; idx < len ; idx ++ ) { LiveExprNode ln = ( LiveExprNode ) bin . elementAt ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin . addEle...
106
java-test-11981
java
What are ensures that the checks are in the bin ?
the code given a list of checks
private static int add To Bin ( Live Expr Node check , Vect bin ) { if ( check == null ) { return - NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = NUM ; idx < len ; idx ++ ) { Live Expr Node ln = ( Live Expr Node ) bin . element At ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin ....
private static int addToBin ( LiveExprNode check , Vect bin ) { if ( check == null ) { return - _NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = _NUM ; idx < len ; idx ++ ) { LiveExprNode ln = ( LiveExprNode ) bin . elementAt ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin . addEle...
106
java-test-11982
java
What does it return ?
an array of index of the checks in the bin
private static int add To Bin ( Live Expr Node check , Vect bin ) { if ( check == null ) { return - NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = NUM ; idx < len ; idx ++ ) { Live Expr Node ln = ( Live Expr Node ) bin . element At ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin ....
private static int addToBin ( LiveExprNode check , Vect bin ) { if ( check == null ) { return - _NUM ; } int len = bin . size ( ) ; int idx ; for ( idx = _NUM ; idx < len ; idx ++ ) { LiveExprNode ln = ( LiveExprNode ) bin . elementAt ( idx ) ; if ( check . equals ( ln ) ) { break ; } } if ( idx >= len ) { bin . addEle...
106
java-test-11983
java
How does the code work ?
with any imultipoint
public double distance ( I Multi Point imp ) { if ( imp . dimensionality ( ) != dimensionality ) { throw new Illegal Argument Exception ( STRING ) ; } double sum = NUM ; if ( imp instanceof Hyperpoint ) { Hyperpoint other = ( Hyperpoint ) imp ; for ( int i = NUM ; i <= dimensionality ; i ++ ) { double d = other . value...
public double distance ( IMultiPoint imp ) { if ( imp . dimensionality ( ) != dimensionality ) { throw new IllegalArgumentException ( STRING ) ; } double sum = _NUM ; if ( imp instanceof Hyperpoint ) { Hyperpoint other = ( Hyperpoint ) imp ; for ( int i = _NUM ; i <= dimensionality ; i ++ ) { double d = other . values ...
156
java-test-11984
java
What does the code get ?
the name of the references , null safe
public static List < String > ref Names ( Collection < ? extends Named Related Resource Rep > refs ) { List < String > names = new Array List < String > ( ) ; if ( refs != null ) { for ( Named Related Resource Rep ref : refs ) { names . add ( ref . get Name ( ) ) ; } } return names ; }
public static List < String > refNames ( Collection < ? extends NamedRelatedResourceRep > refs ) { List < String > names = new ArrayList < String > ( ) ; if ( refs != null ) { for ( NamedRelatedResourceRep ref : refs ) { names . add ( ref . getName ( ) ) ; } } return names ; }
72
java-test-11985
java
What will is deliver the event to a handler methods responsible for its processing ?
state machine
public void fire Event ( Object event ) { if ( event == null ) { throw new Illegal Argument Exception ( STRING ) ; } m Task Queue . offer ( Task . obtain Task ( Task . CODE FIRE EVENT , event , - NUM ) ) ; if ( ! m Queue Processed ) process Task Queue ( ) ; }
public void fireEvent ( Object event ) { if ( event == null ) { throw new IllegalArgumentException ( STRING ) ; } mTaskQueue . offer ( Task . obtainTask ( Task . CODE_FIRE_EVENT , event , - _NUM ) ) ; if ( ! mQueueProcessed ) processTaskQueue ( ) ; }
64
java-test-11986
java
What does the code load into the adapter ?
the video data
private void load Rows Standard ( ) { adapter = new Array Object Adapter ( new List Row Presenter ( ) ) ; for ( Video [ ] category Videos : video List ) { Array Object Adapter video Category Adapter = new Array Object Adapter ( new Video Presenter ( ) ) ; video Category Adapter . add All ( NUM , Arrays . as List ( cate...
private void loadRowsStandard ( ) { adapter = new ArrayObjectAdapter ( new ListRowPresenter ( ) ) ; for ( Video [ ] categoryVideos : videoList ) { ArrayObjectAdapter videoCategoryAdapter = new ArrayObjectAdapter ( new VideoPresenter ( ) ) ; videoCategoryAdapter . addAll ( _NUM , Arrays . asList ( categoryVideos ) ) ; L...
346
java-test-11987
java
How are videos loaded regardless of what type of browsefragment component is being used ( more specifically , the original leanback one or the custom one provided by this library ) ?
using the standard browsefragment behavior
private void load Rows Standard ( ) { adapter = new Array Object Adapter ( new List Row Presenter ( ) ) ; for ( Video [ ] category Videos : video List ) { Array Object Adapter video Category Adapter = new Array Object Adapter ( new Video Presenter ( ) ) ; video Category Adapter . add All ( NUM , Arrays . as List ( cate...
private void loadRowsStandard ( ) { adapter = new ArrayObjectAdapter ( new ListRowPresenter ( ) ) ; for ( Video [ ] categoryVideos : videoList ) { ArrayObjectAdapter videoCategoryAdapter = new ArrayObjectAdapter ( new VideoPresenter ( ) ) ; videoCategoryAdapter . addAll ( _NUM , Arrays . asList ( categoryVideos ) ) ; L...
346
java-test-11990
java
What will this build ?
a ' snapshot ' h2 . jar file
@ Description ( summary = STRING ) public void maven Install Local ( ) { jar MV Store ( ) ; String pom = new String ( read File ( new File ( STRING ) ) ) ; pom = replace All ( pom , STRING , STRING ) ; write File ( new File ( STRING ) , pom . get Bytes ( ) ) ; exec Script ( STRING , args ( STRING , STRING , STRING + ge...
@ Description ( summary = STRING ) public void mavenInstallLocal ( ) { jarMVStore ( ) ; String pom = new String ( readFile ( new File ( STRING ) ) ) ; pom = replaceAll ( pom , STRING , STRING ) ; writeFile ( new File ( STRING ) , pom . getBytes ( ) ) ; execScript ( STRING , args ( STRING , STRING , STRING + getJarSuffi...
175
java-test-11992
java
What does the code add to the current dialogue state ?
the content ( expressed as a multivariate distribution over variables )
public Set < String > add Content ( Multivariate Distribution distrib ) { if ( ! paused ) { cur State . add To State ( distrib ) ; return update ( ) ; } else { log . info ( STRING + distrib ) ; return Collections . empty Set ( ) ; } }
public Set < String > addContent ( MultivariateDistribution distrib ) { if ( ! paused ) { curState . addToState ( distrib ) ; return update ( ) ; } else { log . info ( STRING + distrib ) ; return Collections . emptySet ( ) ; } }
56
java-test-11993
java
What does the code produce ?
static stop trees
private void handle Static Stop Trees ( Static Metadata . Stop Tree Request request , Transport Network transport Network , Task Statistics ts ) { Static Metadata static Metadata = new Static Metadata ( request . request , transport Network ) ; if ( request . request . bucket != null ) { try { Output Stream os = Static...
private void handleStaticStopTrees ( StaticMetadata . StopTreeRequest request , TransportNetwork transportNetwork , TaskStatistics ts ) { StaticMetadata staticMetadata = new StaticMetadata ( request . request , transportNetwork ) ; if ( request . request . bucket != null ) { try { OutputStream os = StaticDataStore . ge...
191
java-test-11995
java
What are remove / update processes let ?
to liquibase scripts
@ Override public void execute ( Database database ) throws Custom Change Exception { Prepared Statement products = null ; Result Set products res = null ; Jdbc Connection db connection = ( Jdbc Connection ) database . get Connection ( ) ; try { products = db connection . prepare Statement ( STRING + STRING + STRING + ...
@ Override public void execute ( Database database ) throws CustomChangeException { PreparedStatement products = null ; ResultSet products_res = null ; JdbcConnection db_connection = ( JdbcConnection ) database . getConnection ( ) ; try { products = db_connection . prepareStatement ( STRING + STRING + STRING + STRING +...
605
java-test-11996
java
What are let to liquibase scripts ?
remove / update processes
@ Override public void execute ( Database database ) throws Custom Change Exception { Prepared Statement products = null ; Result Set products res = null ; Jdbc Connection db connection = ( Jdbc Connection ) database . get Connection ( ) ; try { products = db connection . prepare Statement ( STRING + STRING + STRING + ...
@ Override public void execute ( Database database ) throws CustomChangeException { PreparedStatement products = null ; ResultSet products_res = null ; JdbcConnection db_connection = ( JdbcConnection ) database . getConnection ( ) ; try { products = db_connection . prepareStatement ( STRING + STRING + STRING + STRING +...
605
java-test-11997
java
What does the code initialize ?
the streamtokenizer used for reading the arff file
protected void init Tokenizer ( ) { m Tokenizer . reset Syntax ( ) ; m Tokenizer . whitespace Chars ( NUM , STRING ) ; m Tokenizer . word Chars ( STRING + NUM , STRING ) ; if ( m field Separator != null ) { m Tokenizer . whitespace Chars ( m field Separator . char At ( NUM ) , m field Separator . char At ( NUM ) ) ; } ...
protected void initTokenizer ( ) { m_Tokenizer . resetSyntax ( ) ; m_Tokenizer . whitespaceChars ( _NUM , STRING ) ; m_Tokenizer . wordChars ( STRING + _NUM , STRING ) ; if ( m_fieldSeparator != null ) { m_Tokenizer . whitespaceChars ( m_fieldSeparator . charAt ( _NUM ) , m_fieldSeparator . charAt ( _NUM ) ) ; } else {...
192
java-test-11998
java
What does the code create ?
a new load panel object
public C Load Panel ( final I Navi Module module ) { Preconditions . check Not Null ( module , STRING ) ; m store Button = new J Button ( C Action Proxy . proxy ( new C Store Action ( module ) ) ) ; set Layout ( new Border Layout ( ) ) ; final J Panel inner Panel Left = new J Panel ( new Border Layout ( ) ) ; inner Pan...
public CLoadPanel ( final INaviModule module ) { Preconditions . checkNotNull ( module , STRING ) ; m_storeButton = new JButton ( CActionProxy . proxy ( new CStoreAction ( module ) ) ) ; setLayout ( new BorderLayout ( ) ) ; final JPanel innerPanelLeft = new JPanel ( new BorderLayout ( ) ) ; innerPanelLeft . add ( new J...
261
java-test-11999
java
What does the code draw if same values or same label ?
a threshold line or band on the labels or values axis
private void draw Threshold ( Canvas canvas , float left , float top , float right , float bottom ) { if ( left == right || top == bottom ) canvas . draw Line ( left , top , right , bottom , style . threshold Paint ) ; else canvas . draw Rect ( left , top , right , bottom , style . threshold Paint ) ; }
private void drawThreshold ( Canvas canvas , float left , float top , float right , float bottom ) { if ( left == right || top == bottom ) canvas . drawLine ( left , top , right , bottom , style . thresholdPaint ) ; else canvas . drawRect ( left , top , right , bottom , style . thresholdPaint ) ; }
71