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-1573
java
For what purpose does this information save ?
to form the left part of a gram
private void save Term Buffer ( ) { buffer . set Length ( NUM ) ; buffer . append ( term Attribute . buffer ( ) , NUM , term Attribute . length ( ) ) ; buffer . append ( SEPARATOR ) ; last Start Offset = offset Attribute . start Offset ( ) ; last Was Common = is Common ( ) ; }
private void saveTermBuffer ( ) { buffer . setLength ( _NUM ) ; buffer . append ( termAttribute . buffer ( ) , _NUM , termAttribute . length ( ) ) ; buffer . append ( SEPARATOR ) ; lastStartOffset = offsetAttribute . startOffset ( ) ; lastWasCommon = isCommon ( ) ; }
66
java-test-1574
java
What does the code add to the bloom filter ?
an ngram , along with an associated value ,
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int q Value = quantize ( value ) ; for ( int i = NUM ; i <= q Value ; i ++ ) { int hash = hash Ngram ( ngram , NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int qValue = quantize ( value ) ; for ( int i = _NUM ; i <= qValue ; i ++ ) { int hash = hashNgram ( ngram , _NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
81
java-test-1575
java
What osbornes on the cheap ?
tera -
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int q Value = quantize ( value ) ; for ( int i = NUM ; i <= q Value ; i ++ ) { int hash = hash Ngram ( ngram , NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int qValue = quantize ( value ) ; for ( int i = _NUM ; i <= qValue ; i ++ ) { int hash = hashNgram ( ngram , _NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
81
java-test-1576
java
What does this correspond ?
to talbot and osborne ' s " tera - scale lms on the cheap "
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int q Value = quantize ( value ) ; for ( int i = NUM ; i <= q Value ; i ++ ) { int hash = hash Ngram ( ngram , NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int qValue = quantize ( value ) ; for ( int i = _NUM ; i <= qValue ; i ++ ) { int hash = hashNgram ( ngram , _NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
81
java-test-1577
java
Where do tera - osborne ?
on the cheap
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int q Value = quantize ( value ) ; for ( int i = NUM ; i <= q Value ; i ++ ) { int hash = hash Ngram ( ngram , NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
private void add ( int [ ] ngram , long value , long [ ] [ ] funcs ) { if ( ngram == null ) return ; int qValue = quantize ( value ) ; for ( int i = _NUM ; i <= qValue ; i ++ ) { int hash = hashNgram ( ngram , _NUM , ngram . length , i ) ; bf . add ( hash , funcs ) ; } }
81
java-test-1578
java
How do we ensure the minimum capacity ?
by consuming the channel
private boolean try To Ensure Number Of Bytes In Buffer ( int min Capacity ) throws IO Exception { while ( buffer . size ( ) <= min Capacity && ! eof ) { eof = in Channel . read ( read Buffer ) == - NUM ; read Buffer . flip ( ) ; buffer = buffer . concat ( Byte String . copy From ( read Buffer ) ) ; read Buffer . clear...
private boolean tryToEnsureNumberOfBytesInBuffer ( int minCapacity ) throws IOException { while ( buffer . size ( ) <= minCapacity && ! eof ) { eof = inChannel . read ( readBuffer ) == - _NUM ; readBuffer . flip ( ) ; buffer = buffer . concat ( ByteString . copyFrom ( readBuffer ) ) ; readBuffer . clear ( ) ; } return ...
91
java-test-1579
java
What do we ensure by consuming the channel ?
the minimum capacity
private boolean try To Ensure Number Of Bytes In Buffer ( int min Capacity ) throws IO Exception { while ( buffer . size ( ) <= min Capacity && ! eof ) { eof = in Channel . read ( read Buffer ) == - NUM ; read Buffer . flip ( ) ; buffer = buffer . concat ( Byte String . copy From ( read Buffer ) ) ; read Buffer . clear...
private boolean tryToEnsureNumberOfBytesInBuffer ( int minCapacity ) throws IOException { while ( buffer . size ( ) <= minCapacity && ! eof ) { eof = inChannel . read ( readBuffer ) == - _NUM ; readBuffer . flip ( ) ; buffer = buffer . concat ( ByteString . copyFrom ( readBuffer ) ) ; readBuffer . clear ( ) ; } return ...
91
java-test-1580
java
What creates a combined list < l > containing all possible k - combinations where each combination contains an entry from each of the k lists combinations maintain order in which terms were parsed ?
< l1 > , < l2 > , < l3 > , . .
private static List < String > cross Catenate ( List < List < String > > all Words List ) { List < String > cross List = new Array List < String > ( all Words List . get ( NUM ) ) ; for ( List < String > word List : all Words List . sub List ( NUM , all Words List . size ( ) ) ) { int prior Cross List Length = cross Li...
private static List < String > crossCatenate ( List < List < String > > allWordsList ) { List < String > crossList = new ArrayList < String > ( allWordsList . get ( _NUM ) ) ; for ( List < String > wordList : allWordsList . subList ( _NUM , allWordsList . size ( ) ) ) { int priorCrossListLength = crossList . size ( ) ;...
186
java-test-1581
java
What contains an entry from each of the k lists combinations where ?
each combination
private static List < String > cross Catenate ( List < List < String > > all Words List ) { List < String > cross List = new Array List < String > ( all Words List . get ( NUM ) ) ; for ( List < String > word List : all Words List . sub List ( NUM , all Words List . size ( ) ) ) { int prior Cross List Length = cross Li...
private static List < String > crossCatenate ( List < List < String > > allWordsList ) { List < String > crossList = new ArrayList < String > ( allWordsList . get ( _NUM ) ) ; for ( List < String > wordList : allWordsList . subList ( _NUM , allWordsList . size ( ) ) ) { int priorCrossListLength = crossList . size ( ) ;...
186
java-test-1582
java
What do an entry from each of the k lists combinations maintain ?
order in which terms were parsed
private static List < String > cross Catenate ( List < List < String > > all Words List ) { List < String > cross List = new Array List < String > ( all Words List . get ( NUM ) ) ; for ( List < String > word List : all Words List . sub List ( NUM , all Words List . size ( ) ) ) { int prior Cross List Length = cross Li...
private static List < String > crossCatenate ( List < List < String > > allWordsList ) { List < String > crossList = new ArrayList < String > ( allWordsList . get ( _NUM ) ) ; for ( List < String > wordList : allWordsList . subList ( _NUM , allWordsList . size ( ) ) ) { int priorCrossListLength = crossList . size ( ) ;...
186
java-test-1583
java
What does < l1 > , < l2 > , < l3 > , . . create ?
a combined list < l > containing all possible k - combinations where each combination contains an entry from each of the k lists combinations maintain order in which terms were parsed
private static List < String > cross Catenate ( List < List < String > > all Words List ) { List < String > cross List = new Array List < String > ( all Words List . get ( NUM ) ) ; for ( List < String > word List : all Words List . sub List ( NUM , all Words List . size ( ) ) ) { int prior Cross List Length = cross Li...
private static List < String > crossCatenate ( List < List < String > > allWordsList ) { List < String > crossList = new ArrayList < String > ( allWordsList . get ( _NUM ) ) ; for ( List < String > wordList : allWordsList . subList ( _NUM , allWordsList . size ( ) ) ) { int priorCrossListLength = crossList . size ( ) ;...
186
java-test-1584
java
Why is this the char [ ] array cast to bytes [ ] effectively ?
as chars in basic strings only use the least significant byte
public static byte [ ] as Bytes ( String basic String ) { final byte [ ] b = new byte [ basic String . length ( ) ] ; for ( int i = NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basic String . char At ( i ) ; } return b ; }
public static byte [ ] asBytes ( String basicString ) { final byte [ ] b = new byte [ basicString . length ( ) ] ; for ( int i = _NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basicString . charAt ( i ) ; } return b ; }
69
java-test-1585
java
What does the code get ?
the corresponding byte array for a basic string
public static byte [ ] as Bytes ( String basic String ) { final byte [ ] b = new byte [ basic String . length ( ) ] ; for ( int i = NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basic String . char At ( i ) ; } return b ; }
public static byte [ ] asBytes ( String basicString ) { final byte [ ] b = new byte [ basicString . length ( ) ] ; for ( int i = _NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basicString . charAt ( i ) ; } return b ; }
69
java-test-1586
java
What use the least significant byte only ?
chars in basic strings
public static byte [ ] as Bytes ( String basic String ) { final byte [ ] b = new byte [ basic String . length ( ) ] ; for ( int i = NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basic String . char At ( i ) ; } return b ; }
public static byte [ ] asBytes ( String basicString ) { final byte [ ] b = new byte [ basicString . length ( ) ] ; for ( int i = _NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basicString . charAt ( i ) ; } return b ; }
69
java-test-1587
java
What do chars in basic strings use only ?
the least significant byte
public static byte [ ] as Bytes ( String basic String ) { final byte [ ] b = new byte [ basic String . length ( ) ] ; for ( int i = NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basic String . char At ( i ) ; } return b ; }
public static byte [ ] asBytes ( String basicString ) { final byte [ ] b = new byte [ basicString . length ( ) ] ; for ( int i = _NUM ; i < b . length ; ++ i ) { b [ i ] = ( byte ) basicString . charAt ( i ) ; } return b ; }
69
java-test-1590
java
What does it want ?
to maintain
@ Override public XY Item Renderer State initialise ( Graphics 2 D g2 , Rectangle 2 D data Area , XY Plot plot , XY Dataset dataset , Plot Rendering Info info ) { Value Axis axis = plot . get Domain Axis ( ) ; double x1 = axis . get Lower Bound ( ) ; double x2 = x1 + this . max Candle Width In Milliseconds ; Rectangle ...
@ Override public XYItemRendererState initialise ( Graphics2D g2 , Rectangle2D dataArea , XYPlot plot , XYDataset dataset , PlotRenderingInfo info ) { ValueAxis axis = plot . getDomainAxis ( ) ; double x1 = axis . getLowerBound ( ) ; double x2 = x1 + this . maxCandleWidthInMilliseconds ; RectangleEdge edge = plot . get...
262
java-test-1591
java
What does the code return through the data that the renderer will require ( usually just one ) then ?
the number of ' passes '
@ Override public XY Item Renderer State initialise ( Graphics 2 D g2 , Rectangle 2 D data Area , XY Plot plot , XY Dataset dataset , Plot Rendering Info info ) { Value Axis axis = plot . get Domain Axis ( ) ; double x1 = axis . get Lower Bound ( ) ; double x2 = x1 + this . max Candle Width In Milliseconds ; Rectangle ...
@ Override public XYItemRendererState initialise ( Graphics2D g2 , Rectangle2D dataArea , XYPlot plot , XYDataset dataset , PlotRenderingInfo info ) { ValueAxis axis = plot . getDomainAxis ( ) ; double x1 = axis . getLowerBound ( ) ; double x2 = x1 + this . maxCandleWidthInMilliseconds ; RectangleEdge edge = plot . get...
262
java-test-1592
java
What do the renderer initialise ?
any state information it wants to maintain
@ Override public XY Item Renderer State initialise ( Graphics 2 D g2 , Rectangle 2 D data Area , XY Plot plot , XY Dataset dataset , Plot Rendering Info info ) { Value Axis axis = plot . get Domain Axis ( ) ; double x1 = axis . get Lower Bound ( ) ; double x2 = x1 + this . max Candle Width In Milliseconds ; Rectangle ...
@ Override public XYItemRendererState initialise ( Graphics2D g2 , Rectangle2D dataArea , XYPlot plot , XYDataset dataset , PlotRenderingInfo info ) { ValueAxis axis = plot . getDomainAxis ( ) ; double x1 = axis . getLowerBound ( ) ; double x2 = x1 + this . maxCandleWidthInMilliseconds ; RectangleEdge edge = plot . get...
262
java-test-1593
java
When will this method be called giving the renderer an opportunity to initialise any state information it wants to maintain ?
before the first item is rendered
@ Override public XY Item Renderer State initialise ( Graphics 2 D g2 , Rectangle 2 D data Area , XY Plot plot , XY Dataset dataset , Plot Rendering Info info ) { Value Axis axis = plot . get Domain Axis ( ) ; double x1 = axis . get Lower Bound ( ) ; double x2 = x1 + this . max Candle Width In Milliseconds ; Rectangle ...
@ Override public XYItemRendererState initialise ( Graphics2D g2 , Rectangle2D dataArea , XYPlot plot , XYDataset dataset , PlotRenderingInfo info ) { ValueAxis axis = plot . getDomainAxis ( ) ; double x1 = axis . getLowerBound ( ) ; double x2 = x1 + this . maxCandleWidthInMilliseconds ; RectangleEdge edge = plot . get...
262
java-test-1594
java
What does the code provide ?
a square region that is centered on the supplied from region , and is a minimal cover for the from region . the provided region is at least ( 1 . 0 , 1 . 0 ) , even if the from region is empty
public static Rectangle 2 D new Ortho Region ( Rectangle 2 D from ) { double width = from . get Width ( ) ; double height = from . get Height ( ) ; if ( ( width < ZERO THRESHOLD ) && ( height < ZERO THRESHOLD ) ) { width = NUM ; height = NUM ; } width = Math . max ( width , height ) ; height = Math . max ( width , heig...
public static Rectangle2D newOrthoRegion ( Rectangle2D from ) { double width = from . getWidth ( ) ; double height = from . getHeight ( ) ; if ( ( width < ZERO_THRESHOLD ) && ( height < ZERO_THRESHOLD ) ) { width = _NUM ; height = _NUM ; } width = Math . max ( width , height ) ; height = Math . max ( width , height ) ;...
147
java-test-1595
java
What does the code write to the log ?
the accumulated time and average time
public void log ( final String id ) { if ( id . contains ( STRING ) ) { throw new Illegal Argument Exception ( id ) ; } final String Builder sb = new String Builder ( ) ; local To String ( sb , id ) ; Diagnostic . developer Log ( sb . to String ( ) ) ; }
public void log ( final String id ) { if ( id . contains ( STRING ) ) { throw new IllegalArgumentException ( id ) ; } final StringBuilder sb = new StringBuilder ( ) ; localToString ( sb , id ) ; Diagnostic . developerLog ( sb . toString ( ) ) ; }
63
java-test-1599
java
What did the code deserializ ?
a component for the given class , input and input format
public static Workspace Component deserialize Workspace Component ( final Class < ? > clazz , final String name , final Input Stream input , final String format ) { try { Method method = clazz . get Method ( STRING , Input Stream . class , String . class , String . class ) ; Workspace Component wc = ( Workspace Compone...
public static WorkspaceComponent deserializeWorkspaceComponent ( final Class < ? > clazz , final String name , final InputStream input , final String format ) { try { Method method = clazz . getMethod ( STRING , InputStream . class , String . class , String . class ) ; WorkspaceComponent wc = ( WorkspaceComponent ) met...
118
java-test-1602
java
What does the code load from nbt ?
a shared storage
public static Shared Storage load ( World Data Base < ? > world Storage , NBT Tag Compound nbt , boolean packet ) { try { Resource Location type = new Resource Location ( nbt . get String ( STRING ) ) ; UUID uuid = nbt . get Unique Id ( STRING ) ; Class < ? extends Shared Storage > storage Class = Shared Storage . get ...
public static SharedStorage load ( WorldDataBase < ? > worldStorage , NBTTagCompound nbt , boolean packet ) { try { ResourceLocation type = new ResourceLocation ( nbt . getString ( STRING ) ) ; UUID uuid = nbt . getUniqueId ( STRING ) ; Class < ? extends SharedStorage > storageClass = SharedStorage . getStorageType ( t...
192
java-test-1605
java
What does it not contain ?
the ' ` ' character or ' $ { ' sequence
@ Override protected void assert Valid Value ( String value ) { super . assert Valid Value ( value ) ; for ( int i = NUM ; i < value . length ( ) ; i ++ ) { char c = value . char At ( i ) ; if ( c == STRING ) { throw invalid Raw Template String ( value ) ; } else if ( c == STRING ) { if ( i + NUM < value . length ( ) &...
@ Override protected void assertValidValue ( String value ) { super . assertValidValue ( value ) ; for ( int i = _NUM ; i < value . length ( ) ; i ++ ) { char c = value . charAt ( i ) ; if ( c == STRING ) { throw invalidRawTemplateString ( value ) ; } else if ( c == STRING ) { if ( i + _NUM < value . length ( ) && valu...
114
java-test-1606
java
Does it contain the ' ` ' character or ' $ { ' sequence ?
No
@ Override protected void assert Valid Value ( String value ) { super . assert Valid Value ( value ) ; for ( int i = NUM ; i < value . length ( ) ; i ++ ) { char c = value . char At ( i ) ; if ( c == STRING ) { throw invalid Raw Template String ( value ) ; } else if ( c == STRING ) { if ( i + NUM < value . length ( ) &...
@ Override protected void assertValidValue ( String value ) { super . assertValidValue ( value ) ; for ( int i = _NUM ; i < value . length ( ) ; i ++ ) { char c = value . charAt ( i ) ; if ( c == STRING ) { throw invalidRawTemplateString ( value ) ; } else if ( c == STRING ) { if ( i + _NUM < value . length ( ) && valu...
114
java-test-1607
java
What does the code create ?
a new history for a saved keystore
public Key Store History ( Key Store key Store , File file , Password password ) { this . file = file ; this . name = file . get Name ( ) ; initial State = new Key Store State ( this , key Store , password ) ; current State = initial State ; saved State = initial State ; }
public KeyStoreHistory ( KeyStore keyStore , File file , Password password ) { this . file = file ; this . name = file . getName ( ) ; initialState = new KeyStoreState ( this , keyStore , password ) ; currentState = initialState ; savedState = initialState ; }
63
java-test-1610
java
What does this function create ?
a string representation of a loconet buffer
public String display Message ( Loco Net Message l ) { force Hex = BOOL ; String s = format ( l ) ; if ( force Hex ) { s += STRING + l . to String ( ) + STRING ; } if ( show Op Code ) { s = Ln Constants . OPC NAME ( l . get Op Code ( ) ) + STRING + s ; } return s ; }
public String displayMessage ( LocoNetMessage l ) { forceHex = _BOOL ; String s = format ( l ) ; if ( forceHex ) { s += STRING + l . toString ( ) + STRING ; } if ( showOpCode ) { s = LnConstants . OPC_NAME ( l . getOpCode ( ) ) + STRING + s ; } return s ; }
77
java-test-1611
java
How do a new calendar event create ?
by prepopulating the add event ui
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1612
java
What do older versions of the system have ?
a bug where the event title will not be filled out
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1613
java
Will the event title be filled a bug ?
No
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1614
java
What will be not filled a bug ?
the event title
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1615
java
What have a bug where the event title will not be filled out ?
older versions of the system
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1616
java
Where will the event title be not filled ?
a bug
private void add Calendar Event ( String summary , Date start , boolean all Day , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION INSERT ) ; intent . set Type ( STRING ) ; long start Milliseconds = start . get Time ( ) ; intent . put Extra ( STRING...
private void addCalendarEvent ( String summary , Date start , boolean allDay , Date end , String location , String description , String [ ] attendees ) { Intent intent = new Intent ( Intent . ACTION_INSERT ) ; intent . setType ( STRING ) ; long startMilliseconds = start . getTime ( ) ; intent . putExtra ( STRING , star...
259
java-test-1617
java
Where does each item log ?
in leftovers
private void error On Left Overs ( String section , Named List < Object > leftovers ) { if ( null == leftovers || NUM == leftovers . size ( ) ) return ; List < String > unknown Elements = new Array List < String > ( leftovers . size ( ) ) ; for ( Map . Entry < String , Object > unknown Element : leftovers ) { log . err...
private void errorOnLeftOvers ( String section , NamedList < Object > leftovers ) { if ( null == leftovers || _NUM == leftovers . size ( ) ) return ; List < String > unknownElements = new ArrayList < String > ( leftovers . size ( ) ) ; for ( Map . Entry < String , Object > unknownElement : leftovers ) { log . error ( S...
163
java-test-1618
java
What do it handle when message is large ?
scenario
public synchronized boolean send Reply For One Result ( DM dm , Partitioned Region pr , long start Time , Object one Result , boolean last Result , boolean send Results In Order ) throws Cache Exception , Force Reattempt Exception , Interrupted Exception { if ( this . reply Last Msg ) { return BOOL ; } if ( Thread . in...
public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return _BOOL ; } if ( Thread . interrupted ( ) ) ...
159
java-test-1619
java
In which direction did message send in that case then ?
across
public synchronized boolean send Reply For One Result ( DM dm , Partitioned Region pr , long start Time , Object one Result , boolean last Result , boolean send Results In Order ) throws Cache Exception , Force Reattempt Exception , Interrupted Exception { if ( this . reply Last Msg ) { return BOOL ; } if ( Thread . in...
public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return _BOOL ; } if ( Thread . interrupted ( ) ) ...
159
java-test-1620
java
What does it get ?
lastmessage
public synchronized boolean send Reply For One Result ( DM dm , Partitioned Region pr , long start Time , Object one Result , boolean last Result , boolean send Results In Order ) throws Cache Exception , Force Reattempt Exception , Interrupted Exception { if ( this . reply Last Msg ) { return BOOL ; } if ( Thread . in...
public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return _BOOL ; } if ( Thread . interrupted ( ) ) ...
159
java-test-1621
java
When do it handle scenario ?
when message is large
public synchronized boolean send Reply For One Result ( DM dm , Partitioned Region pr , long start Time , Object one Result , boolean last Result , boolean send Results In Order ) throws Cache Exception , Force Reattempt Exception , Interrupted Exception { if ( this . reply Last Msg ) { return BOOL ; } if ( Thread . in...
public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return _BOOL ; } if ( Thread . interrupted ( ) ) ...
159
java-test-1622
java
Till when have it sends message one by one ?
until it gets lastmessage
public synchronized boolean send Reply For One Result ( DM dm , Partitioned Region pr , long start Time , Object one Result , boolean last Result , boolean send Results In Order ) throws Cache Exception , Force Reattempt Exception , Interrupted Exception { if ( this . reply Last Msg ) { return BOOL ; } if ( Thread . in...
public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return _BOOL ; } if ( Thread . interrupted ( ) ) ...
159
java-test-1623
java
What does the code create ?
a new dviewprivatekey dialog
public D View Private Key ( J Frame parent , String title , Private Key private Key , Provider provider ) throws Crypto Exception { super ( parent , title , Dialog . Modality Type . DOCUMENT MODAL ) ; this . private Key = private Key ; this . provider = provider ; init Components ( ) ; }
public DViewPrivateKey ( JFrame parent , String title , PrivateKey privateKey , Provider provider ) throws CryptoException { super ( parent , title , Dialog . ModalityType . DOCUMENT_MODAL ) ; this . privateKey = privateKey ; this . provider = provider ; initComponents ( ) ; }
60
java-test-1624
java
What does the code remove ?
all cache entries for the given query
public void clear Query ( Query query ) { lock . lock ( ) ; try { final Query singleton = unique Queries . remove ( query ) ; if ( singleton != null ) { on Eviction ( singleton ) ; } } finally { lock . unlock ( ) ; } }
public void clearQuery ( Query query ) { lock . lock ( ) ; try { final Query singleton = uniqueQueries . remove ( query ) ; if ( singleton != null ) { onEviction ( singleton ) ; } } finally { lock . unlock ( ) ; } }
54
java-test-1625
java
What do an instruction use now ?
the set of heap operands
void replace Uses ( Instruction s , Heap Operand < Object > [ ] H ) { if ( VM . Verify Assertions ) VM . assert ( s . operator ( ) != PHI ) ; uses . put ( s , H ) ; for ( Heap Operand < Object > aH : H ) { aH . set Instruction ( s ) ; } }
void replaceUses ( Instruction s , HeapOperand < Object > [ ] H ) { if ( VM . VerifyAssertions ) VM . _assert ( s . operator ( ) != PHI ) ; uses . put ( s , H ) ; for ( HeapOperand < Object > aH : H ) { aH . setInstruction ( s ) ; } }
68
java-test-1630
java
What does the code update with the quantities of already brought items ?
the status of the player ' s quest
public void update Quantities In Quest Status ( final Player player ) { String Builder sb = new String Builder ( NUM ) ; sb . append ( STRING ) ; for ( Item Collector Data id : item Collector . required Items ( ) ) { sb . append ( STRING ) ; sb . append ( id . get Already Brought ( ) ) ; } player . set Quest ( quest . ...
public void updateQuantitiesInQuestStatus ( final Player player ) { StringBuilder sb = new StringBuilder ( _NUM ) ; sb . append ( STRING ) ; for ( ItemCollectorData id : itemCollector . requiredItems ( ) ) { sb . append ( STRING ) ; sb . append ( id . getAlreadyBrought ( ) ) ; } player . setQuest ( quest . getSlotName ...
90
java-test-1631
java
How does the code update the status of the player ' s quest ?
with the quantities of already brought items
public void update Quantities In Quest Status ( final Player player ) { String Builder sb = new String Builder ( NUM ) ; sb . append ( STRING ) ; for ( Item Collector Data id : item Collector . required Items ( ) ) { sb . append ( STRING ) ; sb . append ( id . get Already Brought ( ) ) ; } player . set Quest ( quest . ...
public void updateQuantitiesInQuestStatus ( final Player player ) { StringBuilder sb = new StringBuilder ( _NUM ) ; sb . append ( STRING ) ; for ( ItemCollectorData id : itemCollector . requiredItems ( ) ) { sb . append ( STRING ) ; sb . append ( id . getAlreadyBrought ( ) ) ; } player . setQuest ( quest . getSlotName ...
90
java-test-1634
java
For what purpose does the code analyze only properties of hadoop configuration ?
in order to prevent expensive call to cluster status
private static void analyze Hadoop Configuration ( ) { Job Conf job = Configuration Manager . get Cached Job Conf ( ) ; remote MR Sort Mem = ( NUM * NUM ) * job . get Long ( MR Configuration Names . MR TASK IO SORT MB , NUM ) ; String java Opts 1 = job . get ( MR Configuration Names . MR CHILD JAVA OPTS ) ; String java...
private static void analyzeHadoopConfiguration ( ) { JobConf job = ConfigurationManager . getCachedJobConf ( ) ; _remoteMRSortMem = ( _NUM * _NUM ) * job . getLong ( MRConfigurationNames . MR_TASK_IO_SORT_MB , _NUM ) ; String javaOpts1 = job . get ( MRConfigurationNames . MR_CHILD_JAVA_OPTS ) ; String javaOpts2 = job ....
265
java-test-1635
java
What does the code analyze in order to prevent expensive call to cluster status ?
only properties of hadoop configuration
private static void analyze Hadoop Configuration ( ) { Job Conf job = Configuration Manager . get Cached Job Conf ( ) ; remote MR Sort Mem = ( NUM * NUM ) * job . get Long ( MR Configuration Names . MR TASK IO SORT MB , NUM ) ; String java Opts 1 = job . get ( MR Configuration Names . MR CHILD JAVA OPTS ) ; String java...
private static void analyzeHadoopConfiguration ( ) { JobConf job = ConfigurationManager . getCachedJobConf ( ) ; _remoteMRSortMem = ( _NUM * _NUM ) * job . getLong ( MRConfigurationNames . MR_TASK_IO_SORT_MB , _NUM ) ; String javaOpts1 = job . get ( MRConfigurationNames . MR_CHILD_JAVA_OPTS ) ; String javaOpts2 = job ....
265
java-test-1638
java
What does the code compute ?
the non - java resources contained in this java project
private Object [ ] compute Non Java Resources ( ) { int length = NUM ; Object [ ] resources = null ; int index = NUM ; if ( index == NUM ) return NO NON JAVA RESOURCES ; if ( index < length ) { System . arraycopy ( resources , NUM , resources = new Object [ index ] , NUM , index ) ; } return resources ; }
private Object [ ] computeNonJavaResources ( ) { int length = _NUM ; Object [ ] resources = null ; int index = _NUM ; if ( index == _NUM ) return NO_NON_JAVA_RESOURCES ; if ( index < length ) { System . arraycopy ( resources , _NUM , resources = new Object [ index ] , _NUM , index ) ; } return resources ; }
73
java-test-1639
java
What will this method use to see if the key / offset combination allows us to skip parts of the file and only load the message we are interested in first ?
selectmessage ( key )
private Mime Message find Message ( String key ) { Mime Message found Message ; found Message = select Message ( key ) ; if ( found Message == null ) { m List = null ; load Keys ( ) ; found Message = select Message ( key ) ; } return found Message ; }
private MimeMessage findMessage ( String key ) { MimeMessage foundMessage ; foundMessage = selectMessage ( key ) ; if ( foundMessage == null ) { mList = null ; loadKeys ( ) ; foundMessage = selectMessage ( key ) ; } return foundMessage ; }
57
java-test-1640
java
What will this method use selectmessage ( key ) first ?
to see if the key / offset combination allows us to skip parts of the file and only load the message we are interested in
private Mime Message find Message ( String key ) { Mime Message found Message ; found Message = select Message ( key ) ; if ( found Message == null ) { m List = null ; load Keys ( ) ; found Message = select Message ( key ) ; } return found Message ; }
private MimeMessage findMessage ( String key ) { MimeMessage foundMessage ; foundMessage = selectMessage ( key ) ; if ( foundMessage == null ) { mList = null ; loadKeys ( ) ; foundMessage = selectMessage ( key ) ; } return foundMessage ; }
57
java-test-1641
java
What does the code create ?
the button shadow shape
private Shape decode Shadow ( int width , int height ) { path . reset ( ) ; path . move To ( width - NUM , NUM ) ; path . line To ( width - NUM , height - NUM ) ; path . line To ( width - NUM , height - NUM ) ; path . line To ( NUM , height - NUM ) ; path . line To ( NUM , height - NUM ) ; return path ; }
private Shape decodeShadow ( int width , int height ) { path . reset ( ) ; path . moveTo ( width - _NUM , _NUM ) ; path . lineTo ( width - _NUM , height - _NUM ) ; path . lineTo ( width - _NUM , height - _NUM ) ; path . lineTo ( _NUM , height - _NUM ) ; path . lineTo ( _NUM , height - _NUM ) ; return path ; }
86
java-test-1642
java
What does the code call ?
the http resource method
public void invoke ( Request request , Pattern Path Router . Routable Destination < Http Resource Model > destination ) throws Exception { Object return Val = method . invoke ( handler , args ) ; return Val = invoke Sub Resource ( request , destination , return Val ) ; responder . set Entity ( return Val ) ; responder ...
public void invoke ( Request request , PatternPathRouter . RoutableDestination < HttpResourceModel > destination ) throws Exception { Object returnVal = method . invoke ( handler , args ) ; returnVal = invokeSubResource ( request , destination , returnVal ) ; responder . setEntity ( returnVal ) ; responder . send ( ) ;...
67
java-test-1647
java
What does the code save into knownhosts file ?
a new ( server_ip , cert ) pair
private void save Trusted Host ( String fingerprint ) throws IO Exception { this . fingerprint = fingerprint ; logger . warn ( STRING , fingerprint , server Id ) ; create Known Cert File If Not Exists ( ) ; assert Known Host File Writable ( ) ; Buffered Writer writer = new Buffered Writer ( new File Writer ( known Host...
private void saveTrustedHost ( String fingerprint ) throws IOException { this . fingerprint = fingerprint ; logger . warn ( STRING , fingerprint , serverId ) ; createKnownCertFileIfNotExists ( ) ; assertKnownHostFileWritable ( ) ; BufferedWriter writer = new BufferedWriter ( new FileWriter ( knownHosts , _BOOL ) ) ; wr...
96
java-test-1648
java
How does the total of the values in one row of the supplied data table return ?
by taking only the column numbers in the array into account
public static double calculate Row Total ( Values 2 D data , int row , int [ ] valid Cols ) { Param Checks . null Not Permitted ( data , STRING ) ; double total = NUM ; int col Count = data . get Column Count ( ) ; for ( int v = NUM ; v < valid Cols . length ; v ++ ) { int col = valid Cols [ v ] ; if ( col < col Count ...
public static double calculateRowTotal ( Values2D data , int row , int [ ] validCols ) { ParamChecks . nullNotPermitted ( data , STRING ) ; double total = _NUM ; int colCount = data . getColumnCount ( ) ; for ( int v = _NUM ; v < validCols . length ; v ++ ) { int col = validCols [ v ] ; if ( col < colCount ) { Number n...
122
java-test-1649
java
How does the code write a string ?
as a fixed - size field
public static void write String Fixed Size ( final Data Output out , String s , int size ) throws IO Exception { byte [ ] b = to Bytes ( s ) ; if ( b . length > size ) { throw new IO Exception ( STRING + b . length + STRING + to String Binary ( b ) + STRING + size ) ; } out . write Bytes ( s ) ; for ( int i = NUM ; i <...
public static void writeStringFixedSize ( final DataOutput out , String s , int size ) throws IOException { byte [ ] b = toBytes ( s ) ; if ( b . length > size ) { throw new IOException ( STRING + b . length + STRING + toStringBinary ( b ) + STRING + size ) ; } out . writeBytes ( s ) ; for ( int i = _NUM ; i < size - s...
106
java-test-1650
java
What do the port types have ?
assignable schema classes
public void build Additional Port Info ( JSON Object oper , JSON Object port Class Hierarchy , JSON Object port Types With Schema Classes ) { try { JSON Array ports = oper . get JSON Array ( Operator Discoverer . PORT TYPE INFO KEY ) ; for ( int i = NUM ; i < ports . length ( ) ; i ++ ) { JSON Object port = ports . get...
public void buildAdditionalPortInfo ( JSONObject oper , JSONObject portClassHierarchy , JSONObject portTypesWithSchemaClasses ) { try { JSONArray ports = oper . getJSONArray ( OperatorDiscoverer . PORT_TYPE_INFO_KEY ) ; for ( int i = _NUM ; i < ports . length ( ) ; i ++ ) { JSONObject port = ports . getJSONObject ( i )...
513
java-test-1651
java
What have assignable schema classes ?
the port types
public void build Additional Port Info ( JSON Object oper , JSON Object port Class Hierarchy , JSON Object port Types With Schema Classes ) { try { JSON Array ports = oper . get JSON Array ( Operator Discoverer . PORT TYPE INFO KEY ) ; for ( int i = NUM ; i < ports . length ( ) ; i ++ ) { JSON Object port = ports . get...
public void buildAdditionalPortInfo ( JSONObject oper , JSONObject portClassHierarchy , JSONObject portTypesWithSchemaClasses ) { try { JSONArray ports = oper . getJSONArray ( OperatorDiscoverer . PORT_TYPE_INFO_KEY ) ; for ( int i = _NUM ; i < ports . length ( ) ; i ++ ) { JSONObject port = ports . getJSONObject ( i )...
513
java-test-1652
java
How does the code write the given text string in the current font ?
centered on ( x , y )
public void text ( double x , double y , String s ) { offscreen . set Font ( font ) ; Font Metrics metrics = offscreen . get Font Metrics ( ) ; double xs = scale X ( x ) ; double ys = scale Y ( y ) ; int ws = metrics . string Width ( s ) ; int hs = metrics . get Descent ( ) ; offscreen . draw String ( s , ( float ) ( x...
public void text ( double x , double y , String s ) { offscreen . setFont ( font ) ; FontMetrics metrics = offscreen . getFontMetrics ( ) ; double xs = scaleX ( x ) ; double ys = scaleY ( y ) ; int ws = metrics . stringWidth ( s ) ; int hs = metrics . getDescent ( ) ; offscreen . drawString ( s , ( float ) ( xs - ws / ...
106
java-test-1653
java
What does the code create ?
a new base type
public static final int create Type ( final Connection connection , final int module Id , final String name , final int size , final Integer child Pointer Type Id , final boolean signed , final Base Type Category category ) throws Couldnt Save Data Exception { try { final String query = String . format ( STRING + STRIN...
public static final int createType ( final Connection connection , final int moduleId , final String name , final int size , final Integer childPointerTypeId , final boolean signed , final BaseTypeCategory category ) throws CouldntSaveDataException { try { final String query = String . format ( STRING + STRING , CTable...
262
java-test-1655
java
How does this method build an xslt " schema " ?
according to http : / / www . w3 . org /
void build ( ) { XSLT Attribute Def href Attr = new XSLT Attribute Def ( null , STRING , XSLT Attribute Def . T URL , BOOL , BOOL , XSLT Attribute Def . ERROR ) ; XSLT Attribute Def elements Attr = new XSLT Attribute Def ( null , STRING , XSLT Attribute Def . T SIMPLEPATTERNLIST , BOOL , BOOL , XSLT Attribute Def . ERR...
void build ( ) { XSLTAttributeDef hrefAttr = new XSLTAttributeDef ( null , STRING , XSLTAttributeDef . T_URL , _BOOL , _BOOL , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef elementsAttr = new XSLTAttributeDef ( null , STRING , XSLTAttributeDef . T_SIMPLEPATTERNLIST , _BOOL , _BOOL , XSLTAttributeDef . ERROR ) ; XSLTAtt...
5,956
java-test-1662
java
What do we add for example ?
more metrics
public void record ( int time sec ) { this . count ++ ; this . total time sec += time sec ; if ( this . min time sec < NUM ) this . min time sec = time sec ; else this . min time sec = Math . min ( this . min time sec , time sec ) ; this . max time sec = Math . max ( this . max time sec , time sec ) ; }
public void record ( int time_sec ) { this . count ++ ; this . total_time_sec += time_sec ; if ( this . min_time_sec < _NUM ) this . min_time_sec = time_sec ; else this . min_time_sec = Math . min ( this . min_time_sec , time_sec ) ; this . max_time_sec = Math . max ( this . max_time_sec , time_sec ) ; }
84
java-test-1663
java
What might we want later ?
to add more metrics for example , rows_read , etc
public void record ( int time sec ) { this . count ++ ; this . total time sec += time sec ; if ( this . min time sec < NUM ) this . min time sec = time sec ; else this . min time sec = Math . min ( this . min time sec , time sec ) ; this . max time sec = Math . max ( this . max time sec , time sec ) ; }
public void record ( int time_sec ) { this . count ++ ; this . total_time_sec += time_sec ; if ( this . min_time_sec < _NUM ) this . min_time_sec = time_sec ; else this . min_time_sec = Math . min ( this . min_time_sec , time_sec ) ; this . max_time_sec = Math . max ( this . max_time_sec , time_sec ) ; }
84
java-test-1664
java
What does this implementation return ?
pairs of from and to way nodes
protected List < Map Node [ ] > subdivide Problem ( List < Map Node > markers , Osm Map map , Map Way Filter way Filter ) { List < Map Node [ ] > result = new Array List < Map Node [ ] > ( ) ; Map Node from Node = map . get Nearest Way Node ( new Position ( markers . get ( NUM ) ) , way Filter ) ; for ( int i = NUM ; i...
protected List < MapNode [ ] > subdivideProblem ( List < MapNode > markers , OsmMap map , MapWayFilter wayFilter ) { List < MapNode [ ] > result = new ArrayList < MapNode [ ] > ( ) ; MapNode fromNode = map . getNearestWayNode ( new Position ( markers . get ( _NUM ) ) , wayFilter ) ; for ( int i = _NUM ; i < markers . s...
152
java-test-1665
java
What will the arrays be used ?
to define problems to be solved one after another
protected List < Map Node [ ] > subdivide Problem ( List < Map Node > markers , Osm Map map , Map Way Filter way Filter ) { List < Map Node [ ] > result = new Array List < Map Node [ ] > ( ) ; Map Node from Node = map . get Nearest Way Node ( new Position ( markers . get ( NUM ) ) , way Filter ) ; for ( int i = NUM ; i...
protected List < MapNode [ ] > subdivideProblem ( List < MapNode > markers , OsmMap map , MapWayFilter wayFilter ) { List < MapNode [ ] > result = new ArrayList < MapNode [ ] > ( ) ; MapNode fromNode = map . getNearestWayNode ( new Position ( markers . get ( _NUM ) ) , wayFilter ) ; for ( int i = _NUM ; i < markers . s...
152
java-test-1666
java
What does it return ?
arrays of way nodes
protected List < Map Node [ ] > subdivide Problem ( List < Map Node > markers , Osm Map map , Map Way Filter way Filter ) { List < Map Node [ ] > result = new Array List < Map Node [ ] > ( ) ; Map Node from Node = map . get Nearest Way Node ( new Position ( markers . get ( NUM ) ) , way Filter ) ; for ( int i = NUM ; i...
protected List < MapNode [ ] > subdivideProblem ( List < MapNode > markers , OsmMap map , MapWayFilter wayFilter ) { List < MapNode [ ] > result = new ArrayList < MapNode [ ] > ( ) ; MapNode fromNode = map . getNearestWayNode ( new Position ( markers . get ( _NUM ) ) , wayFilter ) ; for ( int i = _NUM ; i < markers . s...
152
java-test-1667
java
What does the code create ?
a new api process object
public Process ( final com . google . security . zynamics . binnavi . debug . models . processmanager . Process Manager process Manager ) { this . process Manager = process Manager ; process Manager . add Listener ( listener ) ; memory = new Memory ( process Manager . get Memory ( ) ) ; target Information = process Man...
public Process ( final com . google . security . zynamics . binnavi . debug . models . processmanager . ProcessManager processManager ) { this . processManager = processManager ; processManager . addListener ( listener ) ; memory = new Memory ( processManager . getMemory ( ) ) ; targetInformation = processManager . get...
179
java-test-1670
java
What does the code create ?
a list of keys in the time series
List < Key > subrecord Keys ( long low Time , long high Time ) { List < Key > keys = new Array List < Key > ( ) ; long low Bucket Number = bucket Number ( low Time ) ; long high Bucket Number = bucket Number ( high Time ) ; for ( long index = low Bucket Number ; index <= high Bucket Number ; index += this . bucket Size...
List < Key > subrecordKeys ( long lowTime , long highTime ) { List < Key > keys = new ArrayList < Key > ( ) ; long lowBucketNumber = bucketNumber ( lowTime ) ; long highBucketNumber = bucketNumber ( highTime ) ; for ( long index = lowBucketNumber ; index <= highBucketNumber ; index += this . bucketSize ) { keys . add (...
95
java-test-1671
java
What shown in the help menu ?
the about text
public static synchronized void log Start ( ) { I Product product = Platform . get Product ( ) ; String about Text = product . get Property ( STRING ) ; String application = STRING ; if ( about Text != null ) { String lines [ ] = about Text . split ( STRING ) ; if ( lines != null && lines . length > NUM ) { application...
public static synchronized void logStart ( ) { IProduct product = Platform . getProduct ( ) ; String aboutText = product . getProperty ( STRING ) ; String application = STRING ; if ( aboutText != null ) { String lines [ ] = aboutText . split ( STRING ) ; if ( lines != null && lines . length > _NUM ) { application = lin...
105
java-test-1672
java
Where did the about text show ?
in the help menu
public static synchronized void log Start ( ) { I Product product = Platform . get Product ( ) ; String about Text = product . get Property ( STRING ) ; String application = STRING ; if ( about Text != null ) { String lines [ ] = about Text . split ( STRING ) ; if ( lines != null && lines . length > NUM ) { application...
public static synchronized void logStart ( ) { IProduct product = Platform . getProduct ( ) ; String aboutText = product . getProperty ( STRING ) ; String application = STRING ; if ( aboutText != null ) { String lines [ ] = aboutText . split ( STRING ) ; if ( lines != null && lines . length > _NUM ) { application = lin...
105
java-test-1673
java
How does the code find the position of a substring within a string ignoring case ?
with the option to skip text delimited by given markers or within comments
public static int index Of Ignore Case ( int starting Position , String search In , String search For , String opening Markers , String closing Markers , Set < Search Mode > search Mode ) { if ( search In == null || search For == null ) { return - NUM ; } int search In Length = search In . length ( ) ; int search For L...
public static int indexOfIgnoreCase ( int startingPosition , String searchIn , String searchFor , String openingMarkers , String closingMarkers , Set < SearchMode > searchMode ) { if ( searchIn == null || searchFor == null ) { return - _NUM ; } int searchInLength = searchIn . length ( ) ; int searchForLength = searchFo...
406
java-test-1674
java
What does the code do ?
the magic of locking the touch gesture into the spacebar when switching input languages
boolean is Inside ( Latin Key key , int x , int y ) { final int code = key . codes [ NUM ] ; if ( code == KEYCODE SHIFT || code == KEYCODE DELETE ) { y -= key . height / NUM ; if ( code == KEYCODE SHIFT ) { if ( key . x == NUM ) { x += key . width / NUM ; } else { x -= key . width / NUM ; } } if ( code == KEYCODE DELET...
boolean isInside ( LatinKey key , int x , int y ) { final int code = key . codes [ _NUM ] ; if ( code == KEYCODE_SHIFT || code == KEYCODE_DELETE ) { y -= key . height / _NUM ; if ( code == KEYCODE_SHIFT ) { if ( key . x == _NUM ) { x += key . width / _NUM ; } else { x -= key . width / _NUM ; } } if ( code == KEYCODE_DE...
762
java-test-1675
java
When do the touch gesture lock into the spacebar ?
when switching input languages
boolean is Inside ( Latin Key key , int x , int y ) { final int code = key . codes [ NUM ] ; if ( code == KEYCODE SHIFT || code == KEYCODE DELETE ) { y -= key . height / NUM ; if ( code == KEYCODE SHIFT ) { if ( key . x == NUM ) { x += key . width / NUM ; } else { x -= key . width / NUM ; } } if ( code == KEYCODE DELET...
boolean isInside ( LatinKey key , int x , int y ) { final int code = key . codes [ _NUM ] ; if ( code == KEYCODE_SHIFT || code == KEYCODE_DELETE ) { y -= key . height / _NUM ; if ( code == KEYCODE_SHIFT ) { if ( key . x == _NUM ) { x += key . width / _NUM ; } else { x -= key . width / _NUM ; } } if ( code == KEYCODE_DE...
762
java-test-1681
java
What does the code calculate ?
the euclidean distance
public static float euclidean Distance ( float x1 , float y1 , float x2 , float y2 ) { float dx = x1 - x2 ; float dy = y1 - y2 ; return ( float ) Math . sqrt ( dx * dx + dy * dy ) ; }
public static float euclideanDistance ( float x1 , float y1 , float x2 , float y2 ) { float dx = x1 - x2 ; float dy = y1 - y2 ; return ( float ) Math . sqrt ( dx * dx + dy * dy ) ; }
51
java-test-1682
java
What does the code add to string i d map ?
ad new numeric
public void add New Number To String Entry ( String str Id ) { if ( m Number To ID Map == null ) return ; int base Id = NUM ; java . util . Random random = new java . util . Random ( ) ; int id = base Id | random . next Int ( NUM ) ; Integer int Id = Integer . value Of ( id ) ; while ( m Number To ID Map . contains Key...
public void addNewNumberToStringEntry ( String strId ) { if ( mNumberToIDMap == null ) return ; int baseId = _NUM ; java . util . Random random = new java . util . Random ( ) ; int id = baseId | random . nextInt ( _NUM ) ; Integer intId = Integer . valueOf ( id ) ; while ( mNumberToIDMap . containsKey ( intId ) ) { id ...
131
java-test-1683
java
What do we add ?
new mapping for unnamed and duplicate entries in xml
public void add New Number To String Entry ( String str Id ) { if ( m Number To ID Map == null ) return ; int base Id = NUM ; java . util . Random random = new java . util . Random ( ) ; int id = base Id | random . next Int ( NUM ) ; Integer int Id = Integer . value Of ( id ) ; while ( m Number To ID Map . contains Key...
public void addNewNumberToStringEntry ( String strId ) { if ( mNumberToIDMap == null ) return ; int baseId = _NUM ; java . util . Random random = new java . util . Random ( ) ; int id = baseId | random . nextInt ( _NUM ) ; Integer intId = Integer . valueOf ( id ) ; while ( mNumberToIDMap . containsKey ( intId ) ) { id ...
131
java-test-1684
java
What do we use this method ?
to add new mapping for unnamed and duplicate entries in xml
public void add New Number To String Entry ( String str Id ) { if ( m Number To ID Map == null ) return ; int base Id = NUM ; java . util . Random random = new java . util . Random ( ) ; int id = base Id | random . next Int ( NUM ) ; Integer int Id = Integer . value Of ( id ) ; while ( m Number To ID Map . contains Key...
public void addNewNumberToStringEntry ( String strId ) { if ( mNumberToIDMap == null ) return ; int baseId = _NUM ; java . util . Random random = new java . util . Random ( ) ; int id = baseId | random . nextInt ( _NUM ) ; Integer intId = Integer . valueOf ( id ) ; while ( mNumberToIDMap . containsKey ( intId ) ) { id ...
131
java-test-1686
java
Where can it fit ?
within the container limits
public static boolean is Valid Instance ( Resource instance Resources , long min Instance Ram , Resource max Container Resources , int padding Percentage ) { if ( instance Resources . get Ram ( ) < min Instance Ram ) { LOG . severe ( String . format ( STRING , instance Resources . get Ram ( ) , min Instance Ram / Const...
public static boolean isValidInstance ( Resource instanceResources , long minInstanceRam , Resource maxContainerResources , int paddingPercentage ) { if ( instanceResources . getRam ( ) < minInstanceRam ) { LOG . severe ( String . format ( STRING , instanceResources . getRam ( ) , minInstanceRam / Constants . MB ) ) ; ...
292
java-test-1687
java
What do the instance have ?
enough ram
public static boolean is Valid Instance ( Resource instance Resources , long min Instance Ram , Resource max Container Resources , int padding Percentage ) { if ( instance Resources . get Ram ( ) < min Instance Ram ) { LOG . severe ( String . format ( STRING , instance Resources . get Ram ( ) , min Instance Ram / Const...
public static boolean isValidInstance ( Resource instanceResources , long minInstanceRam , Resource maxContainerResources , int paddingPercentage ) { if ( instanceResources . getRam ( ) < minInstanceRam ) { LOG . severe ( String . format ( STRING , instanceResources . getRam ( ) , minInstanceRam / Constants . MB ) ) ; ...
292
java-test-1690
java
Where do ypos be past the track ?
at the top or the bottom
public int value For Y Position ( int y Pos ) { int value ; int min Value = slider . get Minimum ( ) ; int max Value = slider . get Maximum ( ) ; int track Top = track Rect . y + thumb Rect . height / NUM + track Border ; int track Bottom = track Rect . y + track Rect . height - thumb Rect . height / NUM - track Border...
public int valueForYPosition ( int yPos ) { int value ; int minValue = slider . getMinimum ( ) ; int maxValue = slider . getMaximum ( ) ; int trackTop = trackRect . y + thumbRect . height / _NUM + trackBorder ; int trackBottom = trackRect . y + trackRect . height - thumbRect . height / _NUM - trackBorder ; int trackLen...
232
java-test-1691
java
What is a value give ?
a y position
public int value For Y Position ( int y Pos ) { int value ; int min Value = slider . get Minimum ( ) ; int max Value = slider . get Maximum ( ) ; int track Top = track Rect . y + thumb Rect . height / NUM + track Border ; int track Bottom = track Rect . y + track Rect . height - thumb Rect . height / NUM - track Border...
public int valueForYPosition ( int yPos ) { int value ; int minValue = slider . getMinimum ( ) ; int maxValue = slider . getMaximum ( ) ; int trackTop = trackRect . y + thumbRect . height / _NUM + trackBorder ; int trackBottom = trackRect . y + trackRect . height - thumbRect . height / _NUM - trackBorder ; int trackLen...
232
java-test-1692
java
What is past the track at the top or the bottom ?
ypos
public int value For Y Position ( int y Pos ) { int value ; int min Value = slider . get Minimum ( ) ; int max Value = slider . get Maximum ( ) ; int track Top = track Rect . y + thumb Rect . height / NUM + track Border ; int track Bottom = track Rect . y + track Rect . height - thumb Rect . height / NUM - track Border...
public int valueForYPosition ( int yPos ) { int value ; int minValue = slider . getMinimum ( ) ; int maxValue = slider . getMaximum ( ) ; int trackTop = trackRect . y + thumbRect . height / _NUM + trackBorder ; int trackBottom = trackRect . y + trackRect . height - thumbRect . height / _NUM - trackBorder ; int trackLen...
232
java-test-1693
java
What does the code draw to mark a value or range of values ?
a line on the chart perpendicular to the x - axis
@ Override public void draw Domain Marker ( Graphics 2 D g2 , XY Plot plot , Value Axis domain Axis , Marker marker , Rectangle 2 D data Area ) { if ( marker instanceof Value Marker ) { Value Marker vm = ( Value Marker ) marker ; double value = vm . get Value ( ) ; Range range = domain Axis . get Range ( ) ; if ( ! ran...
@ Override public void drawDomainMarker ( Graphics2D g2 , XYPlot plot , ValueAxis domainAxis , Marker marker , Rectangle2D dataArea ) { if ( marker instanceof ValueMarker ) { ValueMarker vm = ( ValueMarker ) marker ; double value = vm . getValue ( ) ; Range range = domainAxis . getRange ( ) ; if ( ! range . contains ( ...
1,536
java-test-1695
java
Will those strings be understood everywhere ?
No
@ Override public String to String ( ) { String s = string Form ; if ( s == null ) { int length = encoding . length ; String Buffer sb = new String Buffer ( length * NUM ) ; int from Pos = NUM ; for ( int i = NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & NUM ) == NUM ) { if ( from Pos != NUM ) { sb . append ( STR...
@ Override public String toString ( ) { String s = stringForm ; if ( s == null ) { int length = encoding . length ; StringBuffer sb = new StringBuffer ( length * _NUM ) ; int fromPos = _NUM ; for ( int i = _NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & _NUM ) == _NUM ) { if ( fromPos != _NUM ) { sb . append ( STR...
323
java-test-1696
java
What will be not understood everywhere ?
those strings
@ Override public String to String ( ) { String s = string Form ; if ( s == null ) { int length = encoding . length ; String Buffer sb = new String Buffer ( length * NUM ) ; int from Pos = NUM ; for ( int i = NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & NUM ) == NUM ) { if ( from Pos != NUM ) { sb . append ( STR...
@ Override public String toString ( ) { String s = stringForm ; if ( s == null ) { int length = encoding . length ; StringBuffer sb = new StringBuffer ( length * _NUM ) ; int fromPos = _NUM ; for ( int i = _NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & _NUM ) == _NUM ) { if ( fromPos != _NUM ) { sb . append ( STR...
323
java-test-1697
java
Where will those strings be not understood ?
everywhere
@ Override public String to String ( ) { String s = string Form ; if ( s == null ) { int length = encoding . length ; String Buffer sb = new String Buffer ( length * NUM ) ; int from Pos = NUM ; for ( int i = NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & NUM ) == NUM ) { if ( from Pos != NUM ) { sb . append ( STR...
@ Override public String toString ( ) { String s = stringForm ; if ( s == null ) { int length = encoding . length ; StringBuffer sb = new StringBuffer ( length * _NUM ) ; int fromPos = _NUM ; for ( int i = _NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & _NUM ) == _NUM ) { if ( fromPos != _NUM ) { sb . append ( STR...
323
java-test-1698
java
Why is the format the conventional " dot " notation for such ids , without any user - friendly descriptive strings ?
since those strings will not be understood everywhere
@ Override public String to String ( ) { String s = string Form ; if ( s == null ) { int length = encoding . length ; String Buffer sb = new String Buffer ( length * NUM ) ; int from Pos = NUM ; for ( int i = NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & NUM ) == NUM ) { if ( from Pos != NUM ) { sb . append ( STR...
@ Override public String toString ( ) { String s = stringForm ; if ( s == null ) { int length = encoding . length ; StringBuffer sb = new StringBuffer ( length * _NUM ) ; int fromPos = _NUM ; for ( int i = _NUM ; i < length ; i ++ ) { if ( ( encoding [ i ] & _NUM ) == _NUM ) { if ( fromPos != _NUM ) { sb . append ( STR...
323
java-test-1699
java
What does the code contain ?
a piece other than a pawn
protected void add Explosion Info ( int rank , int file , int from Square , List < Atomic Explosion Info > explosion Info ) { if ( Game Utils . is In Bounds ( rank , file ) ) { int square = Game Utils . get Square ( rank , file ) ; if ( square != from Square && board [ square ] != EMPTY && board [ square ] != PAWN ) { ...
protected void addExplosionInfo ( int rank , int file , int fromSquare , List < AtomicExplosionInfo > explosionInfo ) { if ( GameUtils . isInBounds ( rank , file ) ) { int square = GameUtils . getSquare ( rank , file ) ; if ( square != fromSquare && board [ square ] != EMPTY && board [ square ] != PAWN ) { AtomicExplos...
140
java-test-1700
java
What does the code add if its a valid square ?
the explosion info for a candidate square
protected void add Explosion Info ( int rank , int file , int from Square , List < Atomic Explosion Info > explosion Info ) { if ( Game Utils . is In Bounds ( rank , file ) ) { int square = Game Utils . get Square ( rank , file ) ; if ( square != from Square && board [ square ] != EMPTY && board [ square ] != PAWN ) { ...
protected void addExplosionInfo ( int rank , int file , int fromSquare , List < AtomicExplosionInfo > explosionInfo ) { if ( GameUtils . isInBounds ( rank , file ) ) { int square = GameUtils . getSquare ( rank , file ) ; if ( square != fromSquare && board [ square ] != EMPTY && board [ square ] != PAWN ) { AtomicExplos...
140
java-test-1701
java
What runs the actual receiving process ?
the code run method
@ Override public void run ( ) { logger . debug ( STRING ) ; Serial Message recv Message ; while ( ! interrupted ( ) ) { try { if ( recv Queue . size ( ) == NUM ) { send Allowed . release ( ) ; } recv Message = recv Queue . take ( ) ; logger . debug ( STRING , recv Queue . size ( ) ) ; logger . debug ( STRING , Serial ...
@ Override public void run ( ) { logger . debug ( STRING ) ; SerialMessage recvMessage ; while ( ! interrupted ( ) ) { try { if ( recvQueue . size ( ) == _NUM ) { sendAllowed . release ( ) ; } recvMessage = recvQueue . take ( ) ; logger . debug ( STRING , recvQueue . size ( ) ) ; logger . debug ( STRING , SerialMessage...
159
java-test-1702
java
What does the code run method run ?
the actual receiving process
@ Override public void run ( ) { logger . debug ( STRING ) ; Serial Message recv Message ; while ( ! interrupted ( ) ) { try { if ( recv Queue . size ( ) == NUM ) { send Allowed . release ( ) ; } recv Message = recv Queue . take ( ) ; logger . debug ( STRING , recv Queue . size ( ) ) ; logger . debug ( STRING , Serial ...
@ Override public void run ( ) { logger . debug ( STRING ) ; SerialMessage recvMessage ; while ( ! interrupted ( ) ) { try { if ( recvQueue . size ( ) == _NUM ) { sendAllowed . release ( ) ; } recvMessage = recvQueue . take ( ) ; logger . debug ( STRING , recvQueue . size ( ) ) ; logger . debug ( STRING , SerialMessage...
159
java-test-1703
java
What supports compression operations ?
the smi - s provider
public Boolean check If Provider Supports Compression Operations ( Storage System storage System ) { String version Substring = null ; if ( storage System . check If Vmax 3 ( ) && storage System . get Using Smis 80 ( ) ) { try { Storage Provider storage Provider = db Client . query Object ( Storage Provider . class , s...
public Boolean checkIfProviderSupportsCompressionOperations ( StorageSystem storageSystem ) { String versionSubstring = null ; if ( storageSystem . checkIfVmax3 ( ) && storageSystem . getUsingSmis80 ( ) ) { try { StorageProvider storageProvider = _dbClient . queryObject ( StorageProvider . class , storageSystem . getAc...
201
java-test-1704
java
What do the smi - s provider support ?
compression operations
public Boolean check If Provider Supports Compression Operations ( Storage System storage System ) { String version Substring = null ; if ( storage System . check If Vmax 3 ( ) && storage System . get Using Smis 80 ( ) ) { try { Storage Provider storage Provider = db Client . query Object ( Storage Provider . class , s...
public Boolean checkIfProviderSupportsCompressionOperations ( StorageSystem storageSystem ) { String versionSubstring = null ; if ( storageSystem . checkIfVmax3 ( ) && storageSystem . getUsingSmis80 ( ) ) { try { StorageProvider storageProvider = _dbClient . queryObject ( StorageProvider . class , storageSystem . getAc...
201
java-test-1710
java
What does the code append until we find a break flag or there is no more expression ?
a sequence of expressions
public int append Until Break ( final Iterator < Expression > it ) { int count = NUM ; while ( it . has Next ( ) ) { final Expression expr = it . next ( ) ; append ( expr . get Normalized ( ) ) ; ++ count ; if ( expr . get Break Flag ( ) ) { break ; } } return count ; }
public int appendUntilBreak ( final Iterator < Expression > it ) { int count = _NUM ; while ( it . hasNext ( ) ) { final Expression expr = it . next ( ) ; append ( expr . getNormalized ( ) ) ; ++ count ; if ( expr . getBreakFlag ( ) ) { break ; } } return count ; }
71
java-test-1711
java
Till when does the code append a sequence of expressions ?
until we find a break flag or there is no more expression
public int append Until Break ( final Iterator < Expression > it ) { int count = NUM ; while ( it . has Next ( ) ) { final Expression expr = it . next ( ) ; append ( expr . get Normalized ( ) ) ; ++ count ; if ( expr . get Break Flag ( ) ) { break ; } } return count ; }
public int appendUntilBreak ( final Iterator < Expression > it ) { int count = _NUM ; while ( it . hasNext ( ) ) { final Expression expr = it . next ( ) ; append ( expr . getNormalized ( ) ) ; ++ count ; if ( expr . getBreakFlag ( ) ) { break ; } } return count ; }
71
java-test-1712
java
What is we find ?
a break flag
public int append Until Break ( final Iterator < Expression > it ) { int count = NUM ; while ( it . has Next ( ) ) { final Expression expr = it . next ( ) ; append ( expr . get Normalized ( ) ) ; ++ count ; if ( expr . get Break Flag ( ) ) { break ; } } return count ; }
public int appendUntilBreak ( final Iterator < Expression > it ) { int count = _NUM ; while ( it . hasNext ( ) ) { final Expression expr = it . next ( ) ; append ( expr . getNormalized ( ) ) ; ++ count ; if ( expr . getBreakFlag ( ) ) { break ; } } return count ; }
71
java-test-1713
java
What does settings load if it exists ?
from the settingspath filename
public void load ( Path settings Path ) { m Loading Settings = BOOL ; if ( Files . exists ( settings Path ) ) { m Log . info ( STRING + settings Path . to String ( ) + STRING ) ; JAXB Context context = null ; Input Stream in = null ; try { in = new File Input Stream ( settings Path . to String ( ) ) ; try { context = J...
public void load ( Path settingsPath ) { mLoadingSettings = _BOOL ; if ( Files . exists ( settingsPath ) ) { mLog . info ( STRING + settingsPath . toString ( ) + STRING ) ; JAXBContext context = null ; InputStream in = null ; try { in = new FileInputStream ( settingsPath . toString ( ) ) ; try { context = JAXBContext ....
256
java-test-1714
java
What loads from the settingspath filename if it exists ?
settings
public void load ( Path settings Path ) { m Loading Settings = BOOL ; if ( Files . exists ( settings Path ) ) { m Log . info ( STRING + settings Path . to String ( ) + STRING ) ; JAXB Context context = null ; Input Stream in = null ; try { in = new File Input Stream ( settings Path . to String ( ) ) ; try { context = J...
public void load ( Path settingsPath ) { mLoadingSettings = _BOOL ; if ( Files . exists ( settingsPath ) ) { mLog . info ( STRING + settingsPath . toString ( ) + STRING ) ; JAXBContext context = null ; InputStream in = null ; try { in = new FileInputStream ( settingsPath . toString ( ) ) ; try { context = JAXBContext ....
256
java-test-1715
java
What does the code remove if the specified word is not a channel ?
the ics channel wrapping around a specified channel word returning only the channel number . returns - 1
public static boolean is Likely Channel ( String word ) { boolean result = BOOL ; if ( word != null ) { Raptor String Tokenizer tok = new Raptor String Tokenizer ( word , CHANNEL STRIP CHARS , BOOL ) ; if ( tok . has More Tokens ( ) ) { String current = tok . next Token ( ) ; try { int channel = Integer . parse Int ( c...
public static boolean isLikelyChannel ( String word ) { boolean result = _BOOL ; if ( word != null ) { RaptorStringTokenizer tok = new RaptorStringTokenizer ( word , CHANNEL_STRIP_CHARS , _BOOL ) ; if ( tok . hasMoreTokens ( ) ) { String current = tok . nextToken ( ) ; try { int channel = Integer . parseInt ( current )...
263
java-test-1716
java
What represents a primitive type ?
the scanned class
public boolean is Primitive ( Class type ) throws Exception { if ( type == String . class ) { return BOOL ; } if ( type == Float . class ) { return BOOL ; } if ( type == Double . class ) { return BOOL ; } if ( type == Long . class ) { return BOOL ; } if ( type == Integer . class ) { return BOOL ; } if ( type == Boolean...
public boolean isPrimitive ( Class type ) throws Exception { if ( type == String . class ) { return _BOOL ; } if ( type == Float . class ) { return _BOOL ; } if ( type == Double . class ) { return _BOOL ; } if ( type == Long . class ) { return _BOOL ; } if ( type == Integer . class ) { return _BOOL ; } if ( type == Boo...
126
java-test-1717
java
What is this used ?
to determine whether the scanned class represents a primitive type
public boolean is Primitive ( Class type ) throws Exception { if ( type == String . class ) { return BOOL ; } if ( type == Float . class ) { return BOOL ; } if ( type == Double . class ) { return BOOL ; } if ( type == Long . class ) { return BOOL ; } if ( type == Integer . class ) { return BOOL ; } if ( type == Boolean...
public boolean isPrimitive ( Class type ) throws Exception { if ( type == String . class ) { return _BOOL ; } if ( type == Float . class ) { return _BOOL ; } if ( type == Double . class ) { return _BOOL ; } if ( type == Long . class ) { return _BOOL ; } if ( type == Integer . class ) { return _BOOL ; } if ( type == Boo...
126
java-test-1718
java
How do the cmdlinesyntax print to the specified writer ?
using the specified width
public void print Usage ( Print Writer pw , int width , String cmd Line Syntax ) { int arg Pos = cmd Line Syntax . index Of ( STRING ) + NUM ; print Wrapped ( pw , width , default Syntax Prefix . length ( ) + arg Pos , default Syntax Prefix + cmd Line Syntax ) ; }
public void printUsage ( PrintWriter pw , int width , String cmdLineSyntax ) { int argPos = cmdLineSyntax . indexOf ( STRING ) + _NUM ; printWrapped ( pw , width , defaultSyntaxPrefix . length ( ) + argPos , defaultSyntaxPrefix + cmdLineSyntax ) ; }
62