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-6046
java
What does the code make ?
a copy of the given unrooted tree
public Re Rooted Tree ( Rooted Tree source , Node ingroup Node , Node outgroup Node , double ingroup Branch Length ) throws No Edge Exception { this . source = source ; List < Node > children = new Array List < Node > ( ) ; Node node 1 = create Nodes ( source , outgroup Node , ingroup Node ) ; set Length ( node 1 , ing...
public ReRootedTree ( RootedTree source , Node ingroupNode , Node outgroupNode , double ingroupBranchLength ) throws NoEdgeException { this . source = source ; List < Node > children = new ArrayList < Node > ( ) ; Node node1 = createNodes ( source , outgroupNode , ingroupNode ) ; setLength ( node1 , ingroupBranchLength...
207
java-test-6047
java
How do header pack ?
by fastdht transfer protocol
public static void pack Header ( Pkg Header header , byte [ ] bs ) throws Unsupported Encoding Exception { Arrays . fill ( bs , NUM , FDHT PROTO PKG HEADER SIZE , ( byte ) NUM ) ; Proto Common . int 2 buff ( header . body len , bs , PROTO HEADER BODY LEN INDEX ) ; Proto Common . int 2 buff ( header . key hash code , bs...
public static void packHeader ( PkgHeader header , byte [ ] bs ) throws UnsupportedEncodingException { Arrays . fill ( bs , _NUM , FDHT_PROTO_PKG_HEADER_SIZE , ( byte ) _NUM ) ; ProtoCommon . int2buff ( header . body_len , bs , PROTO_HEADER_BODY_LEN_INDEX ) ; ProtoCommon . int2buff ( header . key_hash_code , bs , PROTO...
163
java-test-6048
java
What does the code generate ?
a statistics object based on the given measurements for all files monitored by this reporter
private Named List < Number > create Statistics ( long total Bytes , long local Bytes , int total Count , int local Count ) { Named List < Number > statistics = new Simple Ordered Map < Number > ( ) ; statistics . add ( LOCALITY BYTES TOTAL , total Bytes ) ; statistics . add ( LOCALITY BYTES LOCAL , local Bytes ) ; if ...
private NamedList < Number > createStatistics ( long totalBytes , long localBytes , int totalCount , int localCount ) { NamedList < Number > statistics = new SimpleOrderedMap < Number > ( ) ; statistics . add ( LOCALITY_BYTES_TOTAL , totalBytes ) ; statistics . add ( LOCALITY_BYTES_LOCAL , localBytes ) ; if ( localByte...
177
java-test-6049
java
What does the code wake ?
a connection from a select / poll close
@ Override public void request Close Read ( ) { state = state . to Close Read ( ) ; try { request Loop ( ) ; } catch ( Exception e ) { log . log ( Level . WARNING , e . to String ( ) , e ) ; } }
@ Override public void requestCloseRead ( ) { _state = _state . toCloseRead ( ) ; try { requestLoop ( ) ; } catch ( Exception e ) { log . log ( Level . WARNING , e . toString ( ) , e ) ; } }
54
java-test-6050
java
What does the code read ?
a single row from the stream
public void read Row ( final Data Input Stream in , final double [ ] data , final Column Type [ ] column Types , final boolean sparse , final double [ ] sparse Defaults ) throws IO Exception { if ( sparse ) { System . arraycopy ( sparse Defaults , NUM , data , NUM , sparse Defaults . length ) ; while ( BOOL ) { int ind...
public void readRow ( final DataInputStream in , final double [ ] data , final ColumnType [ ] columnTypes , final boolean sparse , final double [ ] sparseDefaults ) throws IOException { if ( sparse ) { System . arraycopy ( sparseDefaults , _NUM , data , _NUM , sparseDefaults . length ) ; while ( _BOOL ) { int index = i...
157
java-test-6051
java
What constructs from taxonkeyword ' s scientific name and common name properties ?
display name
private String create Keyword Display Name ( Taxon Keyword keyword ) { String combined = null ; if ( keyword != null ) { String scientific Name = String Utils . trim To Null ( keyword . get Scientific Name ( ) ) ; String common Name = String Utils . trim To Null ( keyword . get Common Name ( ) ) ; if ( scientific Name ...
private String createKeywordDisplayName ( TaxonKeyword keyword ) { String combined = null ; if ( keyword != null ) { String scientificName = StringUtils . trimToNull ( keyword . getScientificName ( ) ) ; String commonName = StringUtils . trimToNull ( keyword . getCommonName ( ) ) ; if ( scientificName != null && common...
125
java-test-6052
java
What do display name construct ?
from taxonkeyword ' s scientific name and common name properties
private String create Keyword Display Name ( Taxon Keyword keyword ) { String combined = null ; if ( keyword != null ) { String scientific Name = String Utils . trim To Null ( keyword . get Scientific Name ( ) ) ; String common Name = String Utils . trim To Null ( keyword . get Common Name ( ) ) ; if ( scientific Name ...
private String createKeywordDisplayName ( TaxonKeyword keyword ) { String combined = null ; if ( keyword != null ) { String scientificName = StringUtils . trimToNull ( keyword . getScientificName ( ) ) ; String commonName = StringUtils . trimToNull ( keyword . getCommonName ( ) ) ; if ( scientificName != null && common...
125
java-test-6053
java
What does the code pause ?
the current track
private void pause Current Track ( ) { if ( ! is Recording ( ) || is Paused ( ) ) { Log . d ( TAG , STRING ) ; return ; } recording Track Paused = BOOL ; Preferences Utils . set Boolean ( this , R . string . recording track paused key , BOOL ) ; Track track = my Tracks Provider Utils . get Track ( recording Track Id ) ...
private void pauseCurrentTrack ( ) { if ( ! isRecording ( ) || isPaused ( ) ) { Log . d ( TAG , STRING ) ; return ; } recordingTrackPaused = _BOOL ; PreferencesUtils . setBoolean ( this , R . string . recording_track_paused_key , _BOOL ) ; Track track = myTracksProviderUtils . getTrack ( recordingTrackId ) ; if ( track...
175
java-test-6054
java
When does the next representable floating point number return ?
after the first argument in the direction of the second argument
public static double next After ( final double start , final double direction ) { if ( Double . is Na N ( start ) || Double . is Na N ( direction ) ) { return Double . Na N ; } if ( start == direction ) { return direction ; } final double abs Start = Math . abs ( start ) ; final double abs Dir = Math . abs ( direction ...
public static double nextAfter ( final double start , final double direction ) { if ( Double . isNaN ( start ) || Double . isNaN ( direction ) ) { return Double . NaN ; } if ( start == direction ) { return direction ; } final double absStart = Math . abs ( start ) ; final double absDir = Math . abs ( direction ) ; fina...
256
java-test-6055
java
How does attributes value related to a specific service remove ?
by setting it to empty
public void remove Service Attributes ( String service Name , Set attr Names ) throws Id Repo Exception , SSO Exception { Map attr Map = new Hash Map ( attr Names . size ( ) * NUM ) ; Iterator it = attr Names . iterator ( ) ; while ( it . has Next ( ) ) { String attr Name = ( String ) it . next ( ) ; attr Map . put ( a...
public void removeServiceAttributes ( String serviceName , Set attrNames ) throws IdRepoException , SSOException { Map attrMap = new HashMap ( attrNames . size ( ) * _NUM ) ; Iterator it = attrNames . iterator ( ) ; while ( it . hasNext ( ) ) { String attrName = ( String ) it . next ( ) ; attrMap . put ( attrName , Col...
99
java-test-6056
java
How are the attributes for the service validated ?
against the service schema
public void remove Service Attributes ( String service Name , Set attr Names ) throws Id Repo Exception , SSO Exception { Map attr Map = new Hash Map ( attr Names . size ( ) * NUM ) ; Iterator it = attr Names . iterator ( ) ; while ( it . has Next ( ) ) { String attr Name = ( String ) it . next ( ) ; attr Map . put ( a...
public void removeServiceAttributes ( String serviceName , Set attrNames ) throws IdRepoException , SSOException { Map attrMap = new HashMap ( attrNames . size ( ) * _NUM ) ; Iterator it = attrNames . iterator ( ) ; while ( it . hasNext ( ) ) { String attrName = ( String ) it . next ( ) ; attrMap . put ( attrName , Col...
99
java-test-6057
java
What does the assumption be ?
that the service is already assigned to the identity . the attributes for the service are validated against the service schema
public void remove Service Attributes ( String service Name , Set attr Names ) throws Id Repo Exception , SSO Exception { Map attr Map = new Hash Map ( attr Names . size ( ) * NUM ) ; Iterator it = attr Names . iterator ( ) ; while ( it . has Next ( ) ) { String attr Name = ( String ) it . next ( ) ; attr Map . put ( a...
public void removeServiceAttributes ( String serviceName , Set attrNames ) throws IdRepoException , SSOException { Map attrMap = new HashMap ( attrNames . size ( ) * _NUM ) ; Iterator it = attrNames . iterator ( ) ; while ( it . hasNext ( ) ) { String attrName = ( String ) it . next ( ) ; attrMap . put ( attrName , Col...
99
java-test-6058
java
What does the code compare to another long buffer ' s remaining longs ?
the remaining longs of this buffer
public int compare To ( Long Buffer other Buffer ) { int compare Remaining = ( remaining ( ) < other Buffer . remaining ( ) ) ? remaining ( ) : other Buffer . remaining ( ) ; int this Pos = position ; int other Pos = other Buffer . position ; long this Long , other Long ; while ( compare Remaining > NUM ) { this Long =...
public int compareTo ( LongBuffer otherBuffer ) { int compareRemaining = ( remaining ( ) < otherBuffer . remaining ( ) ) ? remaining ( ) : otherBuffer . remaining ( ) ; int thisPos = position ; int otherPos = otherBuffer . position ; long thisLong , otherLong ; while ( compareRemaining > _NUM ) { thisLong = get ( thisP...
138
java-test-6059
java
What does the code create ?
a new configurablejtaplatform instance with the given jta transactionmanager and optionally a given usertransaction
public Configurable Jta Platform ( Transaction Manager tm , User Transaction ut ) { Assert . not Null ( tm , STRING ) ; this . transaction Manager = tm ; this . user Transaction = ( ut != null ? ut : new User Transaction Adapter ( tm ) ) ; }
public ConfigurableJtaPlatform ( TransactionManager tm , UserTransaction ut ) { Assert . notNull ( tm , STRING ) ; this . transactionManager = tm ; this . userTransaction = ( ut != null ? ut : new UserTransactionAdapter ( tm ) ) ; }
53
java-test-6060
java
What did the object use ?
to buffer persistent fields
public Object Output Stream . Put Field put Fields ( ) throws IO Exception { if ( cur Put == null ) { Serial Callback Context ctx = cur Context ; if ( ctx == null ) { throw new Not Active Exception ( STRING ) ; } Object cur Obj = ctx . get Obj ( ) ; Object Stream Class cur Desc = ctx . get Desc ( ) ; cur Put = new Put ...
public ObjectOutputStream . PutField putFields ( ) throws IOException { if ( curPut == null ) { SerialCallbackContext ctx = curContext ; if ( ctx == null ) { throw new NotActiveException ( STRING ) ; } Object curObj = ctx . getObj ( ) ; ObjectStreamClass curDesc = ctx . getDesc ( ) ; curPut = new PutFieldImpl ( curDesc...
90
java-test-6061
java
When will the fields be written to the stream ?
when writefields method is called
public Object Output Stream . Put Field put Fields ( ) throws IO Exception { if ( cur Put == null ) { Serial Callback Context ctx = cur Context ; if ( ctx == null ) { throw new Not Active Exception ( STRING ) ; } Object cur Obj = ctx . get Obj ( ) ; Object Stream Class cur Desc = ctx . get Desc ( ) ; cur Put = new Put ...
public ObjectOutputStream . PutField putFields ( ) throws IOException { if ( curPut == null ) { SerialCallbackContext ctx = curContext ; if ( ctx == null ) { throw new NotActiveException ( STRING ) ; } Object curObj = ctx . getObj ( ) ; ObjectStreamClass curDesc = ctx . getDesc ( ) ; curPut = new PutFieldImpl ( curDesc...
90
java-test-6062
java
What does the code retrieve ?
the object used to buffer persistent fields to be written to the stream
public Object Output Stream . Put Field put Fields ( ) throws IO Exception { if ( cur Put == null ) { Serial Callback Context ctx = cur Context ; if ( ctx == null ) { throw new Not Active Exception ( STRING ) ; } Object cur Obj = ctx . get Obj ( ) ; Object Stream Class cur Desc = ctx . get Desc ( ) ; cur Put = new Put ...
public ObjectOutputStream . PutField putFields ( ) throws IOException { if ( curPut == null ) { SerialCallbackContext ctx = curContext ; if ( ctx == null ) { throw new NotActiveException ( STRING ) ; } Object curObj = ctx . getObj ( ) ; ObjectStreamClass curDesc = ctx . getDesc ( ) ; curPut = new PutFieldImpl ( curDesc...
90
java-test-6067
java
What will this push on to the stack ?
the created input node
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6068
java
What can it be used ?
to read child elements and values
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6069
java
What contains a reference to this reader so that it can be used to read child elements and values ?
the input node created
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6070
java
What did the input node created contain so that it can be used to read child elements and values ?
a reference to this reader
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6071
java
For what purpose did the input node created contain a reference to this reader ?
so that it can be used to read child elements and values
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6072
java
What is this used ?
to convert the start element to an input node
private Input Node read Start ( Input Node from , Event Node event ) throws Exception { Input Element input = new Input Element ( from , this , event ) ; if ( text . length ( ) > NUM ) { text . set Length ( NUM ) ; } if ( event . is Start ( ) ) { return stack . push ( input ) ; } return input ; }
private InputNode readStart ( InputNode from , EventNode event ) throws Exception { InputElement input = new InputElement ( from , this , event ) ; if ( text . length ( ) > _NUM ) { text . setLength ( _NUM ) ; } if ( event . isStart ( ) ) { return stack . push ( input ) ; } return input ; }
75
java-test-6073
java
What can a hash join hit since it sees all spos at once ?
a very large cardinality for the default graph distinct filter
static private B Op Filter Base new Distinct Filter ( final AST 2 B Op Context ctx , final Predicate < ? > pred , final Data Set Summary summary , final boolean hash Join ) { boolean native Distinct = hash Join && ctx . native Distinct SPO ; if ( native Distinct ) { final Long range Count = ( Long ) pred . get Property...
static private BOpFilterBase newDistinctFilter ( final AST2BOpContext ctx , final Predicate < ? > pred , final DataSetSummary summary , final boolean hashJoin ) { boolean nativeDistinct = hashJoin && ctx . nativeDistinctSPO ; if ( nativeDistinct ) { final Long rangeCount = ( Long ) pred . getProperty ( Annotations . ES...
222
java-test-6074
java
What can hit a very large cardinality for the default graph distinct filter since it sees all spos at once ?
a hash join
static private B Op Filter Base new Distinct Filter ( final AST 2 B Op Context ctx , final Predicate < ? > pred , final Data Set Summary summary , final boolean hash Join ) { boolean native Distinct = hash Join && ctx . native Distinct SPO ; if ( native Distinct ) { final Long range Count = ( Long ) pred . get Property...
static private BOpFilterBase newDistinctFilter ( final AST2BOpContext ctx , final Predicate < ? > pred , final DataSetSummary summary , final boolean hashJoin ) { boolean nativeDistinct = hashJoin && ctx . nativeDistinctSPO ; if ( nativeDistinct ) { final Long rangeCount = ( Long ) pred . getProperty ( Annotations . ES...
222
java-test-6075
java
What do it see at once ?
all spos
static private B Op Filter Base new Distinct Filter ( final AST 2 B Op Context ctx , final Predicate < ? > pred , final Data Set Summary summary , final boolean hash Join ) { boolean native Distinct = hash Join && ctx . native Distinct SPO ; if ( native Distinct ) { final Long range Count = ( Long ) pred . get Property...
static private BOpFilterBase newDistinctFilter ( final AST2BOpContext ctx , final Predicate < ? > pred , final DataSetSummary summary , final boolean hashJoin ) { boolean nativeDistinct = hashJoin && ctx . nativeDistinctSPO ; if ( nativeDistinct ) { final Long rangeCount = ( Long ) pred . getProperty ( Annotations . ES...
222
java-test-6076
java
Why can a hash join hit a very large cardinality for the default graph distinct filter ?
since it sees all spos at once
static private B Op Filter Base new Distinct Filter ( final AST 2 B Op Context ctx , final Predicate < ? > pred , final Data Set Summary summary , final boolean hash Join ) { boolean native Distinct = hash Join && ctx . native Distinct SPO ; if ( native Distinct ) { final Long range Count = ( Long ) pred . get Property...
static private BOpFilterBase newDistinctFilter ( final AST2BOpContext ctx , final Predicate < ? > pred , final DataSetSummary summary , final boolean hashJoin ) { boolean nativeDistinct = hashJoin && ctx . nativeDistinctSPO ; if ( nativeDistinct ) { final Long rangeCount = ( Long ) pred . getProperty ( Annotations . ES...
222
java-test-6079
java
What do any of the accumulated status have ?
a severity of error
protected boolean errors Occurred ( ) { for ( Iterator iter = errors . iterator ( ) ; iter . has Next ( ) ; ) { I Status status = ( I Status ) iter . next ( ) ; if ( status . get Severity ( ) == I Status . ERROR ) return BOOL ; } return BOOL ; }
protected boolean errorsOccurred ( ) { for ( Iterator iter = errors . iterator ( ) ; iter . hasNext ( ) ; ) { IStatus status = ( IStatus ) iter . next ( ) ; if ( status . getSeverity ( ) == IStatus . ERROR ) return _BOOL ; } return _BOOL ; }
63
java-test-6080
java
What haves a severity of error ?
any of the accumulated status
protected boolean errors Occurred ( ) { for ( Iterator iter = errors . iterator ( ) ; iter . has Next ( ) ; ) { I Status status = ( I Status ) iter . next ( ) ; if ( status . get Severity ( ) == I Status . ERROR ) return BOOL ; } return BOOL ; }
protected boolean errorsOccurred ( ) { for ( Iterator iter = errors . iterator ( ) ; iter . hasNext ( ) ; ) { IStatus status = ( IStatus ) iter . next ( ) ; if ( status . getSeverity ( ) == IStatus . ERROR ) return _BOOL ; } return _BOOL ; }
63
java-test-6082
java
When does triggger send if all blocks for given file are received ?
when all blocks are received
private void emit Trigger If All Blocks Received ( File Metadata file Metadata , Map < Long , Block Metadata . File Block Metadata > received Blocks Metadata ) { String file Path = file Metadata . get File Path ( ) ; if ( received Blocks Metadata . size ( ) != file Metadata . get Number Of Blocks ( ) ) { file Metadata ...
private void emitTriggerIfAllBlocksReceived ( FileMetadata fileMetadata , Map < Long , BlockMetadata . FileBlockMetadata > receivedBlocksMetadata ) { String filePath = fileMetadata . getFilePath ( ) ; if ( receivedBlocksMetadata . size ( ) != fileMetadata . getNumberOfBlocks ( ) ) { fileMetadataMap . put ( filePath , f...
259
java-test-6083
java
What does the code weave here ?
some advice
int weave ( Advice advice , List < String > to Observe ) throws PT Agent Exception { int [ ] observed Variable Indices = new int [ to Observe . size ( ) ] ; for ( int i = NUM ; i < observed Variable Indices . length ; i ++ ) { int export Index = exported Variables . index Of ( to Observe . get ( i ) ) ; if ( export Ind...
int weave ( Advice advice , List < String > toObserve ) throws PTAgentException { int [ ] observedVariableIndices = new int [ toObserve . size ( ) ] ; for ( int i = _NUM ; i < observedVariableIndices . length ; i ++ ) { int exportIndex = exportedVariables . indexOf ( toObserve . get ( i ) ) ; if ( exportIndex == - _NUM...
258
java-test-6084
java
What does the code add to future map ?
future
boolean add Future ( Grid Dht Force Keys Future < ? , ? > fut ) { force Key Futs . put ( fut . future Id ( ) , fut ) ; if ( stopping ) { fut . on Done ( stop Error ( ) ) ; return BOOL ; } return BOOL ; }
boolean addFuture ( GridDhtForceKeysFuture < ? , ? > fut ) { forceKeyFuts . put ( fut . futureId ( ) , fut ) ; if ( stopping ) { fut . onDone ( stopError ( ) ) ; return _BOOL ; } return _BOOL ; }
57
java-test-6086
java
What does the code create ?
a hash for two currencies
public int hash ( final Currency c1 , final Currency c2 ) { return Math . min ( c1 . numeric Code ( ) , c2 . numeric Code ( ) ) * NUM + Math . max ( c1 . numeric Code ( ) , c2 . numeric Code ( ) ) ; }
public int hash ( final Currency c1 , final Currency c2 ) { return Math . min ( c1 . numericCode ( ) , c2 . numericCode ( ) ) * _NUM + Math . max ( c1 . numericCode ( ) , c2 . numericCode ( ) ) ; }
55
java-test-6088
java
When does the timerratecombobox update the realtimehandler ?
when a choice is made
public void action Performed ( Action Event ae ) { Object obj = ae . get Source ( ) ; if ( obj == this ) { Timer Rate Holder trh = ( Timer Rate Holder ) get Selected Item ( ) ; trh . modify Timer ( get Time Handler ( ) ) ; } }
public void actionPerformed ( ActionEvent ae ) { Object obj = ae . getSource ( ) ; if ( obj == this ) { TimerRateHolder trh = ( TimerRateHolder ) getSelectedItem ( ) ; trh . modifyTimer ( getTimeHandler ( ) ) ; } }
57
java-test-6089
java
What does the timerratecombobox update when a choice is made ?
the realtimehandler
public void action Performed ( Action Event ae ) { Object obj = ae . get Source ( ) ; if ( obj == this ) { Timer Rate Holder trh = ( Timer Rate Holder ) get Selected Item ( ) ; trh . modify Timer ( get Time Handler ( ) ) ; } }
public void actionPerformed ( ActionEvent ae ) { Object obj = ae . getSource ( ) ; if ( obj == this ) { TimerRateHolder trh = ( TimerRateHolder ) getSelectedItem ( ) ; trh . modifyTimer ( getTimeHandler ( ) ) ; } }
57
java-test-6090
java
What updates the realtimehandler when a choice is made ?
the timerratecombobox
public void action Performed ( Action Event ae ) { Object obj = ae . get Source ( ) ; if ( obj == this ) { Timer Rate Holder trh = ( Timer Rate Holder ) get Selected Item ( ) ; trh . modify Timer ( get Time Handler ( ) ) ; } }
public void actionPerformed ( ActionEvent ae ) { Object obj = ae . getSource ( ) ; if ( obj == this ) { TimerRateHolder trh = ( TimerRateHolder ) getSelectedItem ( ) ; trh . modifyTimer ( getTimeHandler ( ) ) ; } }
57
java-test-6092
java
What does a sequence of unicode code points convert ?
to a sequence of java characters
public static int to Chars ( int [ ] src , int src Off , int src Len , char [ ] dest , int dest Off ) { if ( src Len < NUM ) { throw new Illegal Argument Exception ( STRING ) ; } int written = NUM ; for ( int i = NUM ; i < src Len ; ++ i ) { written += Character . to Chars ( src [ src Off + i ] , dest , dest Off + writ...
public static int toChars ( int [ ] src , int srcOff , int srcLen , char [ ] dest , int destOff ) { if ( srcLen < _NUM ) { throw new IllegalArgumentException ( STRING ) ; } int written = _NUM ; for ( int i = _NUM ; i < srcLen ; ++ i ) { written += Character . toChars ( src [ srcOff + i ] , dest , destOff + written ) ; ...
96
java-test-6093
java
What converts to a sequence of java characters ?
a sequence of unicode code points
public static int to Chars ( int [ ] src , int src Off , int src Len , char [ ] dest , int dest Off ) { if ( src Len < NUM ) { throw new Illegal Argument Exception ( STRING ) ; } int written = NUM ; for ( int i = NUM ; i < src Len ; ++ i ) { written += Character . to Chars ( src [ src Off + i ] , dest , dest Off + writ...
public static int toChars ( int [ ] src , int srcOff , int srcLen , char [ ] dest , int destOff ) { if ( srcLen < _NUM ) { throw new IllegalArgumentException ( STRING ) ; } int written = _NUM ; for ( int i = _NUM ; i < srcLen ; ++ i ) { written += Character . toChars ( src [ srcOff + i ] , dest , destOff + written ) ; ...
96
java-test-6094
java
What implements the supplied listener class ?
any of the inputs to this group
public boolean can Accept Connection ( Class < ? > listener Class ) { for ( int i = NUM ; i < m inputs . size ( ) ; i ++ ) { Bean Instance input = ( Bean Instance ) m inputs . element At ( i ) ; if ( listener Class . is Instance ( input . get Bean ( ) ) ) { return BOOL ; } } return BOOL ; }
public boolean canAcceptConnection ( Class < ? > listenerClass ) { for ( int i = _NUM ; i < m_inputs . size ( ) ; i ++ ) { BeanInstance input = ( BeanInstance ) m_inputs . elementAt ( i ) ; if ( listenerClass . isInstance ( input . getBean ( ) ) ) { return _BOOL ; } } return _BOOL ; }
77
java-test-6095
java
What do any of the inputs to this group implement ?
the supplied listener class
public boolean can Accept Connection ( Class < ? > listener Class ) { for ( int i = NUM ; i < m inputs . size ( ) ; i ++ ) { Bean Instance input = ( Bean Instance ) m inputs . element At ( i ) ; if ( listener Class . is Instance ( input . get Bean ( ) ) ) { return BOOL ; } } return BOOL ; }
public boolean canAcceptConnection ( Class < ? > listenerClass ) { for ( int i = _NUM ; i < m_inputs . size ( ) ; i ++ ) { BeanInstance input = ( BeanInstance ) m_inputs . elementAt ( i ) ; if ( listenerClass . isInstance ( input . getBean ( ) ) ) { return _BOOL ; } } return _BOOL ; }
77
java-test-6096
java
What does the code add ?
this channel
public void add ( final Socket Channel channel , final Quarantine Conversation conversation ) { if ( channel . is Blocking ( ) ) { throw new Illegal Argument Exception ( STRING ) ; } m decoder . add ( channel , conversation ) ; m reader . add ( channel ) ; }
public void add ( final SocketChannel channel , final QuarantineConversation conversation ) { if ( channel . isBlocking ( ) ) { throw new IllegalArgumentException ( STRING ) ; } m_decoder . add ( channel , conversation ) ; m_reader . add ( channel ) ; }
54
java-test-6097
java
Where is the notification ` notifname ' found ?
in ` info '
private static final boolean has Notification ( final Model M Bean Info info , final String notif Name ) { try { if ( info == null ) return BOOL ; else return ( info . get Notification ( notif Name ) != null ) ; } catch ( M Bean Exception x ) { return BOOL ; } catch ( Runtime Operations Exception r ) { return BOOL ; } ...
private static final boolean hasNotification ( final ModelMBeanInfo info , final String notifName ) { try { if ( info == null ) return _BOOL ; else return ( info . getNotification ( notifName ) != null ) ; } catch ( MBeanException x ) { return _BOOL ; } catch ( RuntimeOperationsException r ) { return _BOOL ; } }
72
java-test-6098
java
What is found in ` info ' ?
the notification ` notifname '
private static final boolean has Notification ( final Model M Bean Info info , final String notif Name ) { try { if ( info == null ) return BOOL ; else return ( info . get Notification ( notif Name ) != null ) ; } catch ( M Bean Exception x ) { return BOOL ; } catch ( Runtime Operations Exception r ) { return BOOL ; } ...
private static final boolean hasNotification ( final ModelMBeanInfo info , final String notifName ) { try { if ( info == null ) return _BOOL ; else return ( info . getNotification ( notifName ) != null ) ; } catch ( MBeanException x ) { return _BOOL ; } catch ( RuntimeOperationsException r ) { return _BOOL ; } }
72
java-test-6099
java
How must by the caller be called it ?
with the data already decoded correctly
private void add Field ( String fieldname , String fieldvalue ) { String decodedfieldname = fieldname ; String decodedfieldvalue = fieldvalue ; if ( magnify Search Logger . is Loggable ( Level . FINER ) ) magnify Search Logger . finer ( STRING + decodedfieldname + STRING + decodedfieldvalue ) ; fieldnames . add ( field...
private void addField ( String fieldname , String fieldvalue ) { String decodedfieldname = fieldname ; String decodedfieldvalue = fieldvalue ; if ( magnifySearchLogger . isLoggable ( Level . FINER ) ) magnifySearchLogger . finer ( STRING + decodedfieldname + STRING + decodedfieldvalue ) ; fieldnames . add ( fieldname )...
66
java-test-6100
java
What does the code get ?
the first enclosing tree in path , of the specified class
public static < T extends Tree > T enclosing Of Class ( final Tree Path path , final Class < T > tree Class ) { Tree Path p = path ; while ( p != null ) { Tree leaf = p . get Leaf ( ) ; if ( tree Class . is Instance ( leaf ) ) { return tree Class . cast ( leaf ) ; } p = p . get Parent Path ( ) ; } return null ; }
public static < T extends Tree > T enclosingOfClass ( final TreePath path , final Class < T > treeClass ) { TreePath p = path ; while ( p != null ) { Tree leaf = p . getLeaf ( ) ; if ( treeClass . isInstance ( leaf ) ) { return treeClass . cast ( leaf ) ; } p = p . getParentPath ( ) ; } return null ; }
86
java-test-6101
java
What does the code initialize from a uri string spec ?
the authority ( either server or registry based ) for this uri
private boolean initialize Authority ( String p uri Spec ) { int index = NUM ; int start = NUM ; int end = p uri Spec . length ( ) ; char test Char = STRING ; String userinfo = null ; if ( p uri Spec . index Of ( STRING , start ) != - NUM ) { while ( index < end ) { test Char = p uri Spec . char At ( index ) ; if ( tes...
private boolean initializeAuthority ( String p_uriSpec ) { int index = _NUM ; int start = _NUM ; int end = p_uriSpec . length ( ) ; char testChar = STRING ; String userinfo = null ; if ( p_uriSpec . indexOf ( STRING , start ) != - _NUM ) { while ( index < end ) { testChar = p_uriSpec . charAt ( index ) ; if ( testChar ...
453
java-test-6102
java
How does a utility method compute a rectangle ?
using relative radius values
public static Rectangle 2 D rectangle By Radius ( Rectangle 2 D rect , double radius W , double radius H ) { Param Checks . null Not Permitted ( rect , STRING ) ; double x = rect . get Center X ( ) ; double y = rect . get Center Y ( ) ; double w = rect . get Width ( ) * radius W ; double h = rect . get Height ( ) * rad...
public static Rectangle2D rectangleByRadius ( Rectangle2D rect , double radiusW , double radiusH ) { ParamChecks . nullNotPermitted ( rect , STRING ) ; double x = rect . getCenterX ( ) ; double y = rect . getCenterY ( ) ; double w = rect . getWidth ( ) * radiusW ; double h = rect . getHeight ( ) * radiusH ; return new ...
109
java-test-6103
java
What does a rectangle use ?
relative radius values
public static Rectangle 2 D rectangle By Radius ( Rectangle 2 D rect , double radius W , double radius H ) { Param Checks . null Not Permitted ( rect , STRING ) ; double x = rect . get Center X ( ) ; double y = rect . get Center Y ( ) ; double w = rect . get Width ( ) * radius W ; double h = rect . get Height ( ) * rad...
public static Rectangle2D rectangleByRadius ( Rectangle2D rect , double radiusW , double radiusH ) { ParamChecks . nullNotPermitted ( rect , STRING ) ; double x = rect . getCenterX ( ) ; double y = rect . getCenterY ( ) ; double w = rect . getWidth ( ) * radiusW ; double h = rect . getHeight ( ) * radiusH ; return new ...
109
java-test-6104
java
What does the code find ?
rowindexmax for lessthanequals operator
private static int uarimax Le ( double value , double [ ] bv , int [ ] bvi , Binary Operator b Op ) throws DML Runtime Exception { int ix Max = bv . length ; if ( value <= bv [ NUM ] || value > bv [ bv . length - NUM ] ) return ix Max ; int ix = Arrays . binary Search ( bv , value ) ; if ( ix < NUM ) ix = Math . abs ( ...
private static int uarimaxLe ( double value , double [ ] bv , int [ ] bvi , BinaryOperator bOp ) throws DMLRuntimeException { int ixMax = bv . length ; if ( value <= bv [ _NUM ] || value > bv [ bv . length - _NUM ] ) return ixMax ; int ix = Arrays . binarySearch ( bv , value ) ; if ( ix < _NUM ) ix = Math . abs ( ix ) ...
106
java-test-6105
java
How does a type color convert to a hex string ?
in the format " # rrggbb
static String color To Hex ( Color color ) { String colorstr = STRING ; String str = Integer . to Hex String ( color . get Red ( ) ) ; if ( str . length ( ) > NUM ) str = str . substring ( NUM , NUM ) ; else if ( str . length ( ) < NUM ) colorstr += STRING + str ; else colorstr += str ; str = Integer . to Hex String ( ...
static String colorToHex ( Color color ) { String colorstr = STRING ; String str = Integer . toHexString ( color . getRed ( ) ) ; if ( str . length ( ) > _NUM ) str = str . substring ( _NUM , _NUM ) ; else if ( str . length ( ) < _NUM ) colorstr += STRING + str ; else colorstr += str ; str = Integer . toHexString ( col...
197
java-test-6107
java
For what purpose does the code enable it ?
for the given project
public static Plugin load Custom Plugin ( URL url String , @ Check For Null Project project ) throws Plugin Exception { Plugin plugin = add Custom Plugin ( url String ) ; if ( project != null ) { project . set Plugin Status Trinary ( plugin . get Plugin Id ( ) , BOOL ) ; } return plugin ; }
public static Plugin loadCustomPlugin ( URL urlString , @ CheckForNull Project project ) throws PluginException { Plugin plugin = addCustomPlugin ( urlString ) ; if ( project != null ) { project . setPluginStatusTrinary ( plugin . getPluginId ( ) , _BOOL ) ; } return plugin ; }
63
java-test-6108
java
What does the code load ?
the given plugin
public static Plugin load Custom Plugin ( URL url String , @ Check For Null Project project ) throws Plugin Exception { Plugin plugin = add Custom Plugin ( url String ) ; if ( project != null ) { project . set Plugin Status Trinary ( plugin . get Plugin Id ( ) , BOOL ) ; } return plugin ; }
public static Plugin loadCustomPlugin ( URL urlString , @ CheckForNull Project project ) throws PluginException { Plugin plugin = addCustomPlugin ( urlString ) ; if ( project != null ) { project . setPluginStatusTrinary ( plugin . getPluginId ( ) , _BOOL ) ; } return plugin ; }
63
java-test-6111
java
What does the code create ?
a video thumbnail for a video
public static Bitmap create Video Thumbnail ( String file Path , int kind , long time Us ) { Log . i ( TAG , STRING ) ; Bitmap bitmap = null ; Media Metadata Retriever retriever = new Media Metadata Retriever ( ) ; try { Log . i ( TAG , STRING ) ; retriever . set Data Source ( file Path ) ; bitmap = retriever . get Fra...
public static Bitmap createVideoThumbnail ( String filePath , int kind , long timeUs ) { Log . i ( TAG , STRING ) ; Bitmap bitmap = null ; MediaMetadataRetriever retriever = new MediaMetadataRetriever ( ) ; try { Log . i ( TAG , STRING ) ; retriever . setDataSource ( filePath ) ; bitmap = retriever . getFrameAtTime ( t...
303
java-test-6112
java
How do the path offset the code returning true on success ?
by ( dx , dy )
public void offset ( float dx , float dy , Path Delegate dst ) { General Path new Path = new General Path ( ) ; Path Iterator iterator = m Path . get Path Iterator ( new Affine Transform ( NUM , NUM , dx , NUM , NUM , dy ) ) ; new Path . append ( iterator , BOOL ) ; if ( dst != null ) { dst . m Path = new Path ; } else...
public void offset ( float dx , float dy , Path_Delegate dst ) { GeneralPath newPath = new GeneralPath ( ) ; PathIterator iterator = mPath . getPathIterator ( new AffineTransform ( _NUM , _NUM , dx , _NUM , _NUM , dy ) ) ; newPath . append ( iterator , _BOOL ) ; if ( dst != null ) { dst . mPath = newPath ; } else { mPa...
91
java-test-6116
java
What does the code retrieve ?
a database entry identified by a dbgroupname and hostname
public DB Instance Info retrieve DB Info ( String db Group Name , String host Name ) { Connection conn = null ; try { conn = create Connection ( BOOL ) ; return retrieve DB Info ( conn , db Group Name , host Name ) ; } catch ( Exception ex ) { logger . log ( Level . SEVERE , STRING , ex ) ; } finally { DB Utils . close...
public DBInstanceInfo retrieveDBInfo ( String dbGroupName , String hostName ) { Connection conn = null ; try { conn = createConnection ( _BOOL ) ; return retrieveDBInfo ( conn , dbGroupName , hostName ) ; } catch ( Exception ex ) { logger . log ( Level . SEVERE , STRING , ex ) ; } finally { DBUtils . close ( conn ) ; }...
84
java-test-6117
java
When will these event from tmp queue be cleared if there are any cache operation on queue then that event will be stored in temp queue ?
during sender is getting stopped
public void clear Temp Events After Sender Stopped ( ) { Tmp Queue Event next Event = null ; while ( ( next Event = tmp Queued Events . poll ( ) ) != null ) { next Event . release ( ) ; } synchronized ( this . queued Events Sync ) { while ( ( next Event = tmp Queued Events . poll ( ) ) != null ) { next Event . release ...
public void clearTempEventsAfterSenderStopped ( ) { TmpQueueEvent nextEvent = null ; while ( ( nextEvent = tmpQueuedEvents . poll ( ) ) != null ) { nextEvent . release ( ) ; } synchronized ( this . queuedEventsSync ) { while ( ( nextEvent = tmpQueuedEvents . poll ( ) ) != null ) { nextEvent . release ( ) ; } this . enq...
111
java-test-6118
java
What does each table have within their volatile intervals ?
how much data
@ Override public int compare ( Physical Table left , Physical Table right ) { long left Volatile Data Duration = get Available Volatile Data Duration ( left ) ; long right Volatile Data Duration = get Available Volatile Data Duration ( right ) ; long most Complete Volatile = right Volatile Data Duration - left Volatil...
@ Override public int compare ( PhysicalTable left , PhysicalTable right ) { long leftVolatileDataDuration = getAvailableVolatileDataDuration ( left ) ; long rightVolatileDataDuration = getAvailableVolatileDataDuration ( right ) ; long mostCompleteVolatile = rightVolatileDataDuration - leftVolatileDataDuration ; return...
89
java-test-6119
java
Where does each table have how much data ?
within their volatile intervals
@ Override public int compare ( Physical Table left , Physical Table right ) { long left Volatile Data Duration = get Available Volatile Data Duration ( left ) ; long right Volatile Data Duration = get Available Volatile Data Duration ( right ) ; long most Complete Volatile = right Volatile Data Duration - left Volatil...
@ Override public int compare ( PhysicalTable left , PhysicalTable right ) { long leftVolatileDataDuration = getAvailableVolatileDataDuration ( left ) ; long rightVolatileDataDuration = getAvailableVolatileDataDuration ( right ) ; long mostCompleteVolatile = rightVolatileDataDuration - leftVolatileDataDuration ; return...
89
java-test-6120
java
What did the path cause ?
the crossings
protected void add Crossing ( Collection c , Geo Segment segment , Geo Region region ) { Geo start = segment . get Seg ( ) [ NUM ] ; if ( last Segment Crossing List != null && last Segment Starting Point . distance ( start ) > NUM ) { crossings . add All ( last Segment Crossing List ) ; last Segment Crossing List . cle...
protected void addCrossing ( Collection c , GeoSegment segment , GeoRegion region ) { Geo start = segment . getSeg ( ) [ _NUM ] ; if ( lastSegmentCrossingList != null && lastSegmentStartingPoint . distance ( start ) > _NUM ) { crossings . addAll ( lastSegmentCrossingList ) ; lastSegmentCrossingList . clear ( ) ; } else...
418
java-test-6121
java
How does this method organize bordercrossings ?
according to the segment order of the path that caused the crossings
protected void add Crossing ( Collection c , Geo Segment segment , Geo Region region ) { Geo start = segment . get Seg ( ) [ NUM ] ; if ( last Segment Crossing List != null && last Segment Starting Point . distance ( start ) > NUM ) { crossings . add All ( last Segment Crossing List ) ; last Segment Crossing List . cle...
protected void addCrossing ( Collection c , GeoSegment segment , GeoRegion region ) { Geo start = segment . getSeg ( ) [ _NUM ] ; if ( lastSegmentCrossingList != null && lastSegmentStartingPoint . distance ( start ) > _NUM ) { crossings . addAll ( lastSegmentCrossingList ) ; lastSegmentCrossingList . clear ( ) ; } else...
418
java-test-6122
java
What does the code add ?
a boundarycrossing associated with a segment and region
protected void add Crossing ( Collection c , Geo Segment segment , Geo Region region ) { Geo start = segment . get Seg ( ) [ NUM ] ; if ( last Segment Crossing List != null && last Segment Starting Point . distance ( start ) > NUM ) { crossings . add All ( last Segment Crossing List ) ; last Segment Crossing List . cle...
protected void addCrossing ( Collection c , GeoSegment segment , GeoRegion region ) { Geo start = segment . getSeg ( ) [ _NUM ] ; if ( lastSegmentCrossingList != null && lastSegmentStartingPoint . distance ( start ) > _NUM ) { crossings . addAll ( lastSegmentCrossingList ) ; lastSegmentCrossingList . clear ( ) ; } else...
418
java-test-6123
java
What does the code create ?
a user info with the given data
public static User Info create ( String address , String alias , int gender , int age , int height , int weight , int type ) throws Illegal Argument Exception { if ( address == null || address . length ( ) == NUM || alias == null || alias . length ( ) == NUM || gender < NUM || age <= NUM || weight <= NUM || type < NUM ...
public static UserInfo create ( String address , String alias , int gender , int age , int height , int weight , int type ) throws IllegalArgumentException { if ( address == null || address . length ( ) == _NUM || alias == null || alias . length ( ) == _NUM || gender < _NUM || age <= _NUM || weight <= _NUM || type < _N...
127
java-test-6128
java
What titlecase to titlebuffer ?
variant of word
private void case Fold Title ( char word [ ] , int length ) { title Buffer = Array Util . grow ( title Buffer , length ) ; System . arraycopy ( word , NUM , title Buffer , NUM , length ) ; for ( int i = NUM ; i < length ; i ++ ) { title Buffer [ i ] = dictionary . case Fold ( title Buffer [ i ] ) ; } }
private void caseFoldTitle ( char word [ ] , int length ) { titleBuffer = ArrayUtil . grow ( titleBuffer , length ) ; System . arraycopy ( word , _NUM , titleBuffer , _NUM , length ) ; for ( int i = _NUM ; i < length ; i ++ ) { titleBuffer [ i ] = dictionary . caseFold ( titleBuffer [ i ] ) ; } }
80
java-test-6129
java
What do variant of word titlecase ?
to titlebuffer
private void case Fold Title ( char word [ ] , int length ) { title Buffer = Array Util . grow ( title Buffer , length ) ; System . arraycopy ( word , NUM , title Buffer , NUM , length ) ; for ( int i = NUM ; i < length ; i ++ ) { title Buffer [ i ] = dictionary . case Fold ( title Buffer [ i ] ) ; } }
private void caseFoldTitle ( char word [ ] , int length ) { titleBuffer = ArrayUtil . grow ( titleBuffer , length ) ; System . arraycopy ( word , _NUM , titleBuffer , _NUM , length ) ; for ( int i = _NUM ; i < length ; i ++ ) { titleBuffer [ i ] = dictionary . caseFold ( titleBuffer [ i ] ) ; } }
80
java-test-6132
java
What have equivalent starting characters ?
qnames and boolean values
protected Value parse Q Name Or Boolean ( ) throws IO Exception , RDF Parse Exception { int c = read Code Point ( ) ; if ( c == - NUM ) { throw EOF Exception ( ) ; } if ( c != STRING && ! Turtle Util . is Prefix Start Char ( c ) ) { report Error ( STRING + new String ( Character . to Chars ( c ) ) + STRING , Basic Pars...
protected Value parseQNameOrBoolean ( ) throws IOException , RDFParseException { int c = readCodePoint ( ) ; if ( c == - _NUM ) { throwEOFException ( ) ; } if ( c != STRING && ! TurtleUtil . isPrefixStartChar ( c ) ) { reportError ( STRING + new String ( Character . toChars ( c ) ) + STRING , BasicParserSettings . VERI...
604
java-test-6133
java
What do qnames and boolean values have ?
equivalent starting characters
protected Value parse Q Name Or Boolean ( ) throws IO Exception , RDF Parse Exception { int c = read Code Point ( ) ; if ( c == - NUM ) { throw EOF Exception ( ) ; } if ( c != STRING && ! Turtle Util . is Prefix Start Char ( c ) ) { report Error ( STRING + new String ( Character . to Chars ( c ) ) + STRING , Basic Pars...
protected Value parseQNameOrBoolean ( ) throws IOException , RDFParseException { int c = readCodePoint ( ) ; if ( c == - _NUM ) { throwEOFException ( ) ; } if ( c != STRING && ! TurtleUtil . isPrefixStartChar ( c ) ) { reportError ( STRING + new String ( Character . toChars ( c ) ) + STRING , BasicParserSettings . VERI...
604
java-test-6134
java
What does the code update ?
the artwork for a given movie set
public static void update Artwork ( Movie Set movie Set ) { find Artwork In Artwork Folder ( movie Set ) ; for ( Movie movie : new Array List < > ( movie Set . get Movies ( ) ) ) { find Artwork In Movie Folder ( movie Set , movie ) ; } }
public static void updateArtwork ( MovieSet movieSet ) { findArtworkInArtworkFolder ( movieSet ) ; for ( Movie movie : new ArrayList < > ( movieSet . getMovies ( ) ) ) { findArtworkInMovieFolder ( movieSet , movie ) ; } }
57
java-test-6135
java
When should this be triggered ?
after every movie set change
public static void update Artwork ( Movie Set movie Set ) { find Artwork In Artwork Folder ( movie Set ) ; for ( Movie movie : new Array List < > ( movie Set . get Movies ( ) ) ) { find Artwork In Movie Folder ( movie Set , movie ) ; } }
public static void updateArtwork ( MovieSet movieSet ) { findArtworkInArtworkFolder ( movieSet ) ; for ( Movie movie : new ArrayList < > ( movieSet . getMovies ( ) ) ) { findArtworkInMovieFolder ( movieSet , movie ) ; } }
57
java-test-6136
java
What does this method generate ?
a challan for the given receipt
public String generate Challan ( final Receipt Header receipt , final boolean flag ) { final List < Bill Receipt Info > receipt List = new Array List < Bill Receipt Info > ( NUM ) ; receipt List . add ( new Bill Receipt Info Impl ( receipt , egov Common , new Receipt Header ( ) , chart Of Accounts Hibernate DAO , persi...
public String generateChallan ( final ReceiptHeader receipt , final boolean flag ) { final List < BillReceiptInfo > receiptList = new ArrayList < BillReceiptInfo > ( _NUM ) ; receiptList . add ( new BillReceiptInfoImpl ( receipt , egovCommon , new ReceiptHeader ( ) , chartOfAccountsHibernateDAO , persistenceService ) )...
171
java-test-6139
java
What does the code allow to the underlying rocker template ?
matching compilation errors from the generate java source
static public Source Position find Source Position ( File java File , int line Number , int column Number ) throws IO Exception { String [ ] lines = new String [ NUM ] ; int current Line Number = NUM ; try ( Buffered Reader br = new Buffered Reader ( new File Reader ( java File ) ) ) { for ( String line ; ( line = br ....
static public SourcePosition findSourcePosition ( File javaFile , int lineNumber , int columnNumber ) throws IOException { String [ ] lines = new String [ _NUM ] ; int currentLineNumber = _NUM ; try ( BufferedReader br = new BufferedReader ( new FileReader ( javaFile ) ) ) { for ( String line ; ( line = br . readLine (...
195
java-test-6144
java
When do solutions survive ?
to the next generation
protected Population truncate ( Population offspring , int size ) { Population survivors = new Population ( ) ; Iterator < Solution > iterator = offspring . iterator ( ) ; while ( iterator . has Next ( ) ) { Solution solution = iterator . next ( ) ; double fitness = ( Double ) solution . get Attribute ( Fitness Evaluat...
protected Population truncate ( Population offspring , int size ) { Population survivors = new Population ( ) ; Iterator < Solution > iterator = offspring . iterator ( ) ; while ( iterator . hasNext ( ) ) { Solution solution = iterator . next ( ) ; double fitness = ( Double ) solution . getAttribute ( FitnessEvaluator ...
215
java-test-6146
java
What do both parties support a cross - version openflow handshake ?
openflow versions > = 1 .
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6147
java
What is used as input where ?
1 . type set
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6148
java
What support openflow versions > = 1 . a cross - version openflow handshake ?
both parties
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6149
java
What creates a list of bitmaps for use in version negotiation during a cross - version openflow handshake where both parties support openflow versions > = 1 . 3 . 1 . type set is used as input to guarantee all unique versions ?
the code based on the list of ofversions provided as input ( or from loxi )
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6150
java
For what purpose is 1 . type set used as input where ?
to guarantee all unique versions
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6151
java
What does the code based on the list of ofversions provided as input ( or from loxi ) create ?
a list of bitmaps for use in version negotiation during a cross - version openflow handshake where both parties support openflow versions > = 1 . 3 . 1 . type set is used as input to guarantee all unique versions
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6152
java
Where do both parties support openflow versions > = 1 . ?
a cross - version openflow handshake
private List < U32 > compute Our Version Bitmaps ( Set < OF Version > of Versions ) { if ( of Versions == null || of Versions . is Empty ( ) ) { throw new Illegal State Exception ( STRING ) ; } int pos = NUM ; int size = NUM ; int temp Bitmap = NUM ; List < U32 > bitmaps = new Array List < U32 > ( ) ; Array List < OF V...
private List < U32 > computeOurVersionBitmaps ( Set < OFVersion > ofVersions ) { if ( ofVersions == null || ofVersions . isEmpty ( ) ) { throw new IllegalStateException ( STRING ) ; } int pos = _NUM ; int size = _NUM ; int tempBitmap = _NUM ; List < U32 > bitmaps = new ArrayList < U32 > ( ) ; ArrayList < OFVersion > so...
221
java-test-6153
java
What does the code create ?
an instance with a custom imaginary character , a custom number format for the real part , and a custom number format for the imaginary part
public Complex Format ( String imaginary Character , Number Format real Format , Number Format imaginary Format ) throws Math Illegal Argument Exception , Null Argument Exception { if ( imaginary Character == null ) { throw new Null Argument Exception ( ) ; } if ( imaginary Character . length ( ) == NUM ) { throw new M...
public ComplexFormat ( String imaginaryCharacter , NumberFormat realFormat , NumberFormat imaginaryFormat ) throws MathIllegalArgumentException , NullArgumentException { if ( imaginaryCharacter == null ) { throw new NullArgumentException ( ) ; } if ( imaginaryCharacter . length ( ) == _NUM ) { throw new MathIllegalArgu...
134
java-test-6154
java
What does an option list object contain ?
options for a given collection of string
public static Option List create Option List ( Collection collection , Locale locale , boolean b Sort ) { Option List option List = new Option List ( ) ; if ( ( collection != null ) && ! collection . is Empty ( ) ) { if ( b Sort ) { collection = AM Format Utils . sort Items ( collection , locale ) ; } for ( Iterator it...
public static OptionList createOptionList ( Collection collection , Locale locale , boolean bSort ) { OptionList optionList = new OptionList ( ) ; if ( ( collection != null ) && ! collection . isEmpty ( ) ) { if ( bSort ) { collection = AMFormatUtils . sortItems ( collection , locale ) ; } for ( Iterator iter = collect...
117
java-test-6155
java
What contains options for a given collection of string ?
an option list object
public static Option List create Option List ( Collection collection , Locale locale , boolean b Sort ) { Option List option List = new Option List ( ) ; if ( ( collection != null ) && ! collection . is Empty ( ) ) { if ( b Sort ) { collection = AM Format Utils . sort Items ( collection , locale ) ; } for ( Iterator it...
public static OptionList createOptionList ( Collection collection , Locale locale , boolean bSort ) { OptionList optionList = new OptionList ( ) ; if ( ( collection != null ) && ! collection . isEmpty ( ) ) { if ( bSort ) { collection = AMFormatUtils . sortItems ( collection , locale ) ; } for ( Iterator iter = collect...
117
java-test-6156
java
How does a failed instance recover ?
by looping through all listeners and calling their instancefailed method
private boolean recover Failed Instance ( String instance Id , Instance State state ) { try { if ( state . get State ( ) == Instance State . STATE RUNNING ) { state . update Detected Down ( ) ; state . clear Recovery Attempts ( ) ; } state . set State ( Instance State . STATE PROCESSING DOWN ) ; state . set Recovering ...
private boolean recoverFailedInstance ( String instanceId , InstanceState state ) { try { if ( state . getState ( ) == InstanceState . STATE_RUNNING ) { state . updateDetectedDown ( ) ; state . clearRecoveryAttempts ( ) ; } state . setState ( InstanceState . STATE_PROCESSING_DOWN ) ; state . setRecoveringInstanceId ( t...
290
java-test-6157
java
What does the code initialize ?
the list of endpoints
public Auth Svc Base Client Iterator ( End Point Locator end Point Locator ) { List < URI > endpoints = end Point Locator . get Service Endpoint List ( ) ; size = endpoints . size ( ) ; auth Svc Endpoints = endpoints . to Array ( new URI [ size ] ) ; }
public AuthSvcBaseClientIterator ( EndPointLocator endPointLocator ) { List < URI > endpoints = endPointLocator . getServiceEndpointList ( ) ; _size = endpoints . size ( ) ; _authSvcEndpoints = endpoints . toArray ( new URI [ _size ] ) ; }
57
java-test-6158
java
What do dead states reach ?
an accept state
public static boolean has Dead States To Accept ( Automaton a ) { Bit Set reachable From Initial = get Live States From Initial ( a ) ; Bit Set reachable From Accept = get Live States To Accept ( a ) ; reachable From Accept . and Not ( reachable From Initial ) ; return reachable From Accept . is Empty ( ) == BOOL ; }
public static boolean hasDeadStatesToAccept ( Automaton a ) { BitSet reachableFromInitial = getLiveStatesFromInitial ( a ) ; BitSet reachableFromAccept = getLiveStatesToAccept ( a ) ; reachableFromAccept . andNot ( reachableFromInitial ) ; return reachableFromAccept . isEmpty ( ) == _BOOL ; }
68
java-test-6159
java
What reach an accept state ?
dead states
public static boolean has Dead States To Accept ( Automaton a ) { Bit Set reachable From Initial = get Live States From Initial ( a ) ; Bit Set reachable From Accept = get Live States To Accept ( a ) ; reachable From Accept . and Not ( reachable From Initial ) ; return reachable From Accept . is Empty ( ) == BOOL ; }
public static boolean hasDeadStatesToAccept ( Automaton a ) { BitSet reachableFromInitial = getLiveStatesFromInitial ( a ) ; BitSet reachableFromAccept = getLiveStatesToAccept ( a ) ; reachableFromAccept . andNot ( reachableFromInitial ) ; return reachableFromAccept . isEmpty ( ) == _BOOL ; }
68
java-test-6162
java
When do a stream of initial contents purge ?
while opening the connection
@ edu . umd . cs . findbugs . annotations . Suppress FB Warnings ( value = STRING , justification = STRING ) protected void purge Stream ( @ Nonnull java . io . Input Stream serial Stream ) throws java . io . IO Exception { int count = serial Stream . available ( ) ; log . debug ( STRING + count + STRING ) ; while ( co...
@ edu . umd . cs . findbugs . annotations . SuppressFBWarnings ( value = STRING , justification = STRING ) protected void purgeStream ( @ Nonnull java . io . InputStream serialStream ) throws java . io . IOException { int count = serialStream . available ( ) ; log . debug ( STRING + count + STRING ) ; while ( count > _...
94
java-test-6163
java
What does the code perform if possible ?
curve simplification
public void add And Simplify ( double x , double y ) { final int len = data . size ( ) ; if ( len >= NUM ) { final double l1 x = data . get ( len - NUM ) ; final double l1 y = data . get ( len - NUM ) ; final double l2 x = data . get ( len - NUM ) ; final double l2 y = data . get ( len - NUM ) ; final double ldx = l2 x...
public void addAndSimplify ( double x , double y ) { final int len = data . size ( ) ; if ( len >= _NUM ) { final double l1x = data . get ( len - _NUM ) ; final double l1y = data . get ( len - _NUM ) ; final double l2x = data . get ( len - _NUM ) ; final double l2y = data . get ( len - _NUM ) ; final double ldx = l2x -...
235
java-test-6168
java
What does the code calculate ?
the current section attributes
public Attribute Set current Section Attributes ( ) { Mutable Attribute Set attributes = new Simple Attribute Set ( section Attributes ) ; Style section Style = ( Style ) parser State . get ( STRING ) ; if ( section Style != null ) attributes . set Resolve Parent ( section Style ) ; return attributes ; }
public AttributeSet currentSectionAttributes ( ) { MutableAttributeSet attributes = new SimpleAttributeSet ( sectionAttributes ) ; Style sectionStyle = ( Style ) parserState . get ( STRING ) ; if ( sectionStyle != null ) attributes . setResolveParent ( sectionStyle ) ; return attributes ; }
59
java-test-6171
java
How do utility methods read from the stream ?
according to the data type we need
private static Date read Date ( Data Input data Input ) throws IO Exception { if ( data Input . read Int ( ) != NUM ) { throw new Illegal State Exception ( STRING ) ; } byte [ ] buffer = new byte [ NUM ] ; data Input . read Fully ( buffer ) ; return unpack Date ( buffer ) ; }
private static Date readDate ( DataInput dataInput ) throws IOException { if ( dataInput . readInt ( ) != _NUM ) { throw new IllegalStateException ( STRING ) ; } byte [ ] buffer = new byte [ _NUM ] ; dataInput . readFully ( buffer ) ; return unpackDate ( buffer ) ; }
66
java-test-6178
java
In which direction did the point pass ?
in result
private void calcoffset ( int index , boolean do Extend , Point 2 D result ) { double bx = data [ index - NUM ] ; double by = data [ index - NUM ] ; double px = result . get X ( ) - bx ; double py = result . get Y ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + NUM ] - by ; double l = data [ ind...
private void calcoffset ( int index , boolean doExtend , Point2D result ) { double bx = data [ index - _NUM ] ; double by = data [ index - _NUM ] ; double px = result . getX ( ) - bx ; double py = result . getY ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + _NUM ] - by ; double l = data [ index...
180
java-test-6179
java
How did the x value extend if doextend is true ?
without pinning to the ends of the line
private void calcoffset ( int index , boolean do Extend , Point 2 D result ) { double bx = data [ index - NUM ] ; double by = data [ index - NUM ] ; double px = result . get X ( ) - bx ; double py = result . get Y ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + NUM ] - by ; double l = data [ ind...
private void calcoffset ( int index , boolean doExtend , Point2D result ) { double bx = data [ index - _NUM ] ; double by = data [ index - _NUM ] ; double px = result . getX ( ) - bx ; double py = result . getY ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + _NUM ] - by ; double l = data [ index...
180
java-test-6180
java
What do this assume ?
that index is valid and references a line that has non - zero length
private void calcoffset ( int index , boolean do Extend , Point 2 D result ) { double bx = data [ index - NUM ] ; double by = data [ index - NUM ] ; double px = result . get X ( ) - bx ; double py = result . get Y ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + NUM ] - by ; double l = data [ ind...
private void calcoffset ( int index , boolean doExtend , Point2D result ) { double bx = data [ index - _NUM ] ; double by = data [ index - _NUM ] ; double px = result . getX ( ) - bx ; double py = result . getY ( ) - by ; double dx = data [ index ] - bx ; double dy = data [ index + _NUM ] - by ; double l = data [ index...
180
java-test-6181
java
What did the code check ?
it ' s really a plog file and the version is supported
private void read Header ( ) throws IO Exception { byte [ ] signature Bytes = new byte [ NUM ] ; for ( int i = NUM ; i < NUM ; i ++ ) signature Bytes [ i ] = plog Stream . read Byte ( ) ; String stringified Header = new String ( signature Bytes , STRING ) ; if ( ! stringified Header . equals ( STRING ) ) { throw new IO...
private void readHeader ( ) throws IOException { byte [ ] signatureBytes = new byte [ _NUM ] ; for ( int i = _NUM ; i < _NUM ; i ++ ) signatureBytes [ i ] = plogStream . readByte ( ) ; String stringifiedHeader = new String ( signatureBytes , STRING ) ; if ( ! stringifiedHeader . equals ( STRING ) ) { throw new IOExcept...
156
java-test-6182
java
What did the code read ?
the plog file header
private void read Header ( ) throws IO Exception { byte [ ] signature Bytes = new byte [ NUM ] ; for ( int i = NUM ; i < NUM ; i ++ ) signature Bytes [ i ] = plog Stream . read Byte ( ) ; String stringified Header = new String ( signature Bytes , STRING ) ; if ( ! stringified Header . equals ( STRING ) ) { throw new IO...
private void readHeader ( ) throws IOException { byte [ ] signatureBytes = new byte [ _NUM ] ; for ( int i = _NUM ; i < _NUM ; i ++ ) signatureBytes [ i ] = plogStream . readByte ( ) ; String stringifiedHeader = new String ( signatureBytes , STRING ) ; if ( ! stringifiedHeader . equals ( STRING ) ) { throw new IOExcept...
156
java-test-6184
java
What does it check first ?
to see if the unassigned group is already in the database
@ Override public int insert Unassigned Group ( int analysis Group ) throws Ade Exception { if ( analysis Group != UNASSIGNED ANALYSIS GROUP ID ) { throw new Ade Internal Exception ( STRING ) ; } int analysis Group Internal Id ; analysis Group Internal Id = get Unassigned Group Internal Id ( ) ; if ( analysis Group Int...
@ Override public int insertUnassignedGroup ( int analysisGroup ) throws AdeException { if ( analysisGroup != UNASSIGNED_ANALYSIS_GROUP_ID ) { throw new AdeInternalException ( STRING ) ; } int analysisGroupInternalId ; analysisGroupInternalId = getUnassignedGroupInternalId ( ) ; if ( analysisGroupInternalId != _NUM ) r...
387
java-test-6185
java
What does the code update ?
the source folders on the target project
public static void update ( I Java Project project , List < Omni Eclipse Source Directory > source Folders , I Progress Monitor monitor ) throws Core Exception { Source Folder Updater updater = new Source Folder Updater ( project , source Folders ) ; updater . update Classpath ( monitor ) ; }
public static void update ( IJavaProject project , List < OmniEclipseSourceDirectory > sourceFolders , IProgressMonitor monitor ) throws CoreException { SourceFolderUpdater updater = new SourceFolderUpdater ( project , sourceFolders ) ; updater . updateClasspath ( monitor ) ; }
54
java-test-6186
java
What did it have ?
progress by totalms from the given time when this call was made
public void increment In Steps ( long tick Ms , long total Ms ) { long start = now ; long end = start + total Ms ; while ( now < end ) { increment By ( Math . min ( tick Ms , end - now ) ) ; } }
public void incrementInSteps ( long tickMs , long totalMs ) { long start = now ; long end = start + totalMs ; while ( now < end ) { incrementBy ( Math . min ( tickMs , end - now ) ) ; } }
53
java-test-6187
java
How do time s ?
gradually
public void increment In Steps ( long tick Ms , long total Ms ) { long start = now ; long end = start + total Ms ; while ( now < end ) { increment By ( Math . min ( tick Ms , end - now ) ) ; } }
public void incrementInSteps ( long tickMs , long totalMs ) { long start = now ; long end = start + totalMs ; while ( now < end ) { incrementBy ( Math . min ( tickMs , end - now ) ) ; } }
53
java-test-6188
java
When will the call progress by exactly totalms even if it means the last tick of the clock is smaller than tickms ?
in the end of this call
public void increment In Steps ( long tick Ms , long total Ms ) { long start = now ; long end = start + total Ms ; while ( now < end ) { increment By ( Math . min ( tick Ms , end - now ) ) ; } }
public void incrementInSteps ( long tickMs , long totalMs ) { long start = now ; long end = start + totalMs ; while ( now < end ) { incrementBy ( Math . min ( tickMs , end - now ) ) ; } }
53
java-test-6189
java
What will the call progress even if it means the last tick of the clock is smaller than tickms in the end of this call ?
by exactly totalms
public void increment In Steps ( long tick Ms , long total Ms ) { long start = now ; long end = start + total Ms ; while ( now < end ) { increment By ( Math . min ( tick Ms , end - now ) ) ; } }
public void incrementInSteps ( long tickMs , long totalMs ) { long start = now ; long end = start + totalMs ; while ( now < end ) { incrementBy ( Math . min ( tickMs , end - now ) ) ; } }
53