id
stringlengths
11
16
language
stringclasses
2 values
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-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
java-test-6190
java
What do it mean ?
the last tick of the clock is smaller than tickms
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-6191
java
Till when will by tickms be has incremented the clock amount repeatedly ?
until it has 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-6192
java
What does the code put into the repository for future analysis ?
a specific parworker statistic
public static void put PW Stat ( long id , Stat type , double s ) { if ( disabled ) return ; if ( ! pwstats . contains Key ( id ) ) pwstats . put ( id , new Hash Map < Stat , Linked List < Double > > ( ) ) ; Hash Map < Stat , Linked List < Double > > allstats = pwstats . get ( id ) ; if ( ! allstats . contains Key ( ty...
public static void putPWStat ( long id , Stat type , double s ) { if ( _disabled ) return ; if ( ! _pwstats . containsKey ( id ) ) _pwstats . put ( id , new HashMap < Stat , LinkedList < Double > > ( ) ) ; HashMap < Stat , LinkedList < Double > > allstats = _pwstats . get ( id ) ; if ( ! allstats . containsKey ( type )...
126
java-test-6195
java
Where will this method divide the blocks as per the data locality ?
among the nodes
public static Map < String , List < Distributable > > node Block Mapping ( List < Distributable > block Infos , int no Of Nodes Input , List < String > active Nodes ) { Map < String , List < Distributable > > node Blocks Map = new Hash Map < String , List < Distributable > > ( Carbon Common Constants . DEFAULT COLLECTI...
public static Map < String , List < Distributable > > nodeBlockMapping ( List < Distributable > blockInfos , int noOfNodesInput , List < String > activeNodes ) { Map < String , List < Distributable > > nodeBlocksMap = new HashMap < String , List < Distributable > > ( CarbonCommonConstants . DEFAULT_COLLECTION_SIZE ) ; ...
344
java-test-6196
java
When does the code build a wikibasedate ?
from seconds since epoch
public static Wikibase Date from Seconds Since Epoch ( long seconds Since Epoch ) { long year = year From Seconds Since Epoch ( seconds Since Epoch ) ; int second = ( int ) ( seconds Since Epoch - calculate First Day Of Year ( year ) * SECONDS PER DAY ) ; int month = NUM ; long [ ] seconds Per Month Cumulative = second...
public static WikibaseDate fromSecondsSinceEpoch ( long secondsSinceEpoch ) { long year = yearFromSecondsSinceEpoch ( secondsSinceEpoch ) ; int second = ( int ) ( secondsSinceEpoch - calculateFirstDayOfYear ( year ) * SECONDS_PER_DAY ) ; int month = _NUM ; long [ ] secondsPerMonthCumulative = secondsPerMonthCumulative ...
174
java-test-6197
java
What does the code build from seconds since epoch ?
a wikibasedate
public static Wikibase Date from Seconds Since Epoch ( long seconds Since Epoch ) { long year = year From Seconds Since Epoch ( seconds Since Epoch ) ; int second = ( int ) ( seconds Since Epoch - calculate First Day Of Year ( year ) * SECONDS PER DAY ) ; int month = NUM ; long [ ] seconds Per Month Cumulative = second...
public static WikibaseDate fromSecondsSinceEpoch ( long secondsSinceEpoch ) { long year = yearFromSecondsSinceEpoch ( secondsSinceEpoch ) ; int second = ( int ) ( secondsSinceEpoch - calculateFirstDayOfYear ( year ) * SECONDS_PER_DAY ) ; int month = _NUM ; long [ ] secondsPerMonthCumulative = secondsPerMonthCumulative ...
174
java-test-6198
java
What does this execute ?
the commands in each line
public void parse ( ) { for ( String line : commands ) { String [ ] args = line . split ( STRING ) ; switch ( args [ NUM ] ) { case STRING : handle Response ( args ) ; break ; case STRING : switch ( args [ NUM ] ) { case STRING : sub . await Terminal Event ( ) ; break ; case STRING : try { sub . await At Least ( Long ....
public void parse ( ) { for ( String line : commands ) { String [ ] args = line . split ( STRING ) ; switch ( args [ _NUM ] ) { case STRING : handleResponse ( args ) ; break ; case STRING : switch ( args [ _NUM ] ) { case STRING : sub . awaitTerminalEvent ( ) ; break ; case STRING : try { sub . awaitAtLeast ( Long . pa...
432
java-test-6199
java
What does this method assume ?
that the arguments are either the fits header keywords as strings , and some other type ( or null ) for comment style keywords
@ Override public int compare ( String c1 , String c2 ) { if ( c1 . equals ( c2 ) ) { return NUM ; } if ( c1 . equals ( SIMPLE . key ( ) ) || c1 . equals ( XTENSION . key ( ) ) ) { return - NUM ; } else if ( c2 . equals ( SIMPLE . key ( ) ) || c2 . equals ( XTENSION . key ( ) ) ) { return NUM ; } else if ( c1 . equals ...
@ Override public int compare ( String c1 , String c2 ) { if ( c1 . equals ( c2 ) ) { return _NUM ; } if ( c1 . equals ( SIMPLE . key ( ) ) || c1 . equals ( XTENSION . key ( ) ) ) { return - _NUM ; } else if ( c2 . equals ( SIMPLE . key ( ) ) || c2 . equals ( XTENSION . key ( ) ) ) { return _NUM ; } else if ( c1 . equa...
523
java-test-6201
java
How does the code create a spatialindex object ?
with just a shape file name
public static Spatial Index locate And Set Shape Data ( String shape File Name ) { Spatial Index spi = null ; if ( shape File Name == null ) { return null ; } int appendix Index = shape File Name . index Of ( STRING ) ; if ( logger . is Loggable ( Level . FINE ) ) { logger . fine ( STRING + shape File Name ) ; } if ( a...
public static SpatialIndex locateAndSetShapeData ( String shapeFileName ) { SpatialIndex spi = null ; if ( shapeFileName == null ) { return null ; } int appendixIndex = shapeFileName . indexOf ( STRING ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( STRING + shapeFileName ) ; } if ( appendixIndex != -...
235
java-test-6202
java
What will this method attempt if the shape file is local ?
to build the spatial index file and place it next to the shape file
public static Spatial Index locate And Set Shape Data ( String shape File Name ) { Spatial Index spi = null ; if ( shape File Name == null ) { return null ; } int appendix Index = shape File Name . index Of ( STRING ) ; if ( logger . is Loggable ( Level . FINE ) ) { logger . fine ( STRING + shape File Name ) ; } if ( a...
public static SpatialIndex locateAndSetShapeData ( String shapeFileName ) { SpatialIndex spi = null ; if ( shapeFileName == null ) { return null ; } int appendixIndex = shapeFileName . indexOf ( STRING ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( STRING + shapeFileName ) ; } if ( appendixIndex != -...
235
java-test-6203
java
What does the code create with just a shape file name ?
a spatialindex object
public static Spatial Index locate And Set Shape Data ( String shape File Name ) { Spatial Index spi = null ; if ( shape File Name == null ) { return null ; } int appendix Index = shape File Name . index Of ( STRING ) ; if ( logger . is Loggable ( Level . FINE ) ) { logger . fine ( STRING + shape File Name ) ; } if ( a...
public static SpatialIndex locateAndSetShapeData ( String shapeFileName ) { SpatialIndex spi = null ; if ( shapeFileName == null ) { return null ; } int appendixIndex = shapeFileName . indexOf ( STRING ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( STRING + shapeFileName ) ; } if ( appendixIndex != -...
235
java-test-6207
java
For what purpose does this method perform an asynchronous thrift call ?
to reserve space for a resource on a host
@ Rpc Method public void reserve ( Resource resource , Integer generation , Async Method Callback < Host . Async Client . reserve call > handler ) throws Rpc Exception { ensure Client ( ) ; Reserve Request reserve Request = new Reserve Request ( ) ; reserve Request . set Resource ( resource ) ; if ( null != generation ...
@ RpcMethod public void reserve ( Resource resource , Integer generation , AsyncMethodCallback < Host . AsyncClient . reserve_call > handler ) throws RpcException { ensureClient ( ) ; ReserveRequest reserveRequest = new ReserveRequest ( ) ; reserveRequest . setResource ( resource ) ; if ( null != generation ) { reserve...
140
java-test-6208
java
What does this method update so people can navigate between all the tool results ?
the menus of all the scorecards previously generated
private static void update Menus ( Set < Report > tool Results , Set < String > cat Set ) { String Buffer sb = new String Buffer ( ) ; for ( Report tool Report : tool Results ) { if ( ! ( show Ave Only Mode && tool Report . is Commercial ( ) ) ) { sb . append ( STRING ) ; sb . append ( tool Report . get Filename ( ) ) ...
private static void updateMenus ( Set < Report > toolResults , Set < String > catSet ) { StringBuffer sb = new StringBuffer ( ) ; for ( Report toolReport : toolResults ) { if ( ! ( showAveOnlyMode && toolReport . isCommercial ( ) ) ) { sb . append ( STRING ) ; sb . append ( toolReport . getFilename ( ) ) ; sb . append ...
299
java-test-6209
java
For what purpose does this method update the menus of all the scorecards previously generated ?
so people can navigate between all the tool results
private static void update Menus ( Set < Report > tool Results , Set < String > cat Set ) { String Buffer sb = new String Buffer ( ) ; for ( Report tool Report : tool Results ) { if ( ! ( show Ave Only Mode && tool Report . is Commercial ( ) ) ) { sb . append ( STRING ) ; sb . append ( tool Report . get Filename ( ) ) ...
private static void updateMenus ( Set < Report > toolResults , Set < String > catSet ) { StringBuffer sb = new StringBuffer ( ) ; for ( Report toolReport : toolResults ) { if ( ! ( showAveOnlyMode && toolReport . isCommercial ( ) ) ) { sb . append ( STRING ) ; sb . append ( toolReport . getFilename ( ) ) ; sb . append ...
299
java-test-6212
java
What are the current number of child views used ?
to produce the new array
int [ ] update Layout Array ( int [ ] old Array , int offset , int n Inserted ) { int n = get View Count ( ) ; int [ ] new Array = new int [ n ] ; System . arraycopy ( old Array , NUM , new Array , NUM , offset ) ; System . arraycopy ( old Array , offset , new Array , offset + n Inserted , n - n Inserted - offset ) ; r...
int [ ] updateLayoutArray ( int [ ] oldArray , int offset , int nInserted ) { int n = getViewCount ( ) ; int [ ] newArray = new int [ n ] ; System . arraycopy ( oldArray , _NUM , newArray , _NUM , offset ) ; System . arraycopy ( oldArray , offset , newArray , offset + nInserted , n - nInserted - offset ) ; return newAr...
89
java-test-6213
java
Where are the contents of the old array inserted into the new array so that the old layout information is transferred to the new array ?
at the appropriate places
int [ ] update Layout Array ( int [ ] old Array , int offset , int n Inserted ) { int n = get View Count ( ) ; int [ ] new Array = new int [ n ] ; System . arraycopy ( old Array , NUM , new Array , NUM , offset ) ; System . arraycopy ( old Array , offset , new Array , offset + n Inserted , n - n Inserted - offset ) ; r...
int [ ] updateLayoutArray ( int [ ] oldArray , int offset , int nInserted ) { int n = getViewCount ( ) ; int [ ] newArray = new int [ n ] ; System . arraycopy ( oldArray , _NUM , newArray , _NUM , offset ) ; System . arraycopy ( oldArray , offset , newArray , offset + nInserted , n - nInserted - offset ) ; return newAr...
89
java-test-6214
java
What are used to produce the new array ?
the current number of child views
int [ ] update Layout Array ( int [ ] old Array , int offset , int n Inserted ) { int n = get View Count ( ) ; int [ ] new Array = new int [ n ] ; System . arraycopy ( old Array , NUM , new Array , NUM , offset ) ; System . arraycopy ( old Array , offset , new Array , offset + n Inserted , n - n Inserted - offset ) ; r...
int [ ] updateLayoutArray ( int [ ] oldArray , int offset , int nInserted ) { int n = getViewCount ( ) ; int [ ] newArray = new int [ n ] ; System . arraycopy ( oldArray , _NUM , newArray , _NUM , offset ) ; System . arraycopy ( oldArray , offset , newArray , offset + nInserted , n - nInserted - offset ) ; return newAr...
89
java-test-6215
java
For what purpose are the contents of the old array inserted into the new array at the appropriate places ?
so that the old layout information is transferred to the new array
int [ ] update Layout Array ( int [ ] old Array , int offset , int n Inserted ) { int n = get View Count ( ) ; int [ ] new Array = new int [ n ] ; System . arraycopy ( old Array , NUM , new Array , NUM , offset ) ; System . arraycopy ( old Array , offset , new Array , offset + n Inserted , n - n Inserted - offset ) ; r...
int [ ] updateLayoutArray ( int [ ] oldArray , int offset , int nInserted ) { int n = getViewCount ( ) ; int [ ] newArray = new int [ n ] ; System . arraycopy ( oldArray , _NUM , newArray , _NUM , offset ) ; System . arraycopy ( oldArray , offset , newArray , offset + nInserted , n - nInserted - offset ) ; return newAr...
89