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-11146
java
What does a phrase convey ?
the exactness of the time
private static String time Approx ( int hour , int min ) { int mm ; mm = min % NUM ; if ( ( mm == NUM ) || ( mm == NUM ) ) { return STRING ; } else if ( mm == NUM ) { return STRING ; } else if ( mm == NUM ) { return STRING ; } else { return STRING ; } }
private static String timeApprox ( int hour , int min ) { int mm ; mm = min % _NUM ; if ( ( mm == _NUM ) || ( mm == _NUM ) ) { return STRING ; } else if ( mm == _NUM ) { return STRING ; } else if ( mm == _NUM ) { return STRING ; } else { return STRING ; } }
72
java-test-11150
java
What does the code get ?
the set of matches active for the given read
public static void compute ( double min Score , double top Percent , double max Expected , float min Percent Identity , I Read Block read Block , String classification Name , Bit Set active Matches For Classification ) { active Matches For Classification . clear ( ) ; for ( int i = NUM ; i < read Block . get Number Of ...
public static void compute ( double minScore , double topPercent , double maxExpected , float minPercentIdentity , IReadBlock readBlock , String classificationName , BitSet activeMatchesForClassification ) { activeMatchesForClassification . clear ( ) ; for ( int i = _NUM ; i < readBlock . getNumberOfAvailableMatchBlock...
277
java-test-11151
java
What does this data need ?
to be validated and processed
Sparse Array ( Class < L > linear Array Type , int [ ] row Indices , int [ ] col Indices , L real Values , L imag Values , int num Rows , int num Cols ) { validate User Supplied Parameters ( linear Array Type , row Indices , col Indices , real Values , imag Values ) ; base Component Type = linear Array Type . get Compo...
SparseArray ( Class < L > linearArrayType , int [ ] rowIndices , int [ ] colIndices , L realValues , L imagValues , int numRows , int numCols ) { validateUserSuppliedParameters ( linearArrayType , rowIndices , colIndices , realValues , imagValues ) ; _baseComponentType = linearArrayType . getComponentType ( ) ; _output...
372
java-test-11153
java
What does the code create ?
a new instance of maplequestrequirement
protected Maple Quest Requirement ( Maple Quest quest , Read Bin data ) throws IO Exception { this . quest = quest ; this . day By Day = data . read Byte ( ) > NUM ; this . normal Auto Start = data . read Byte ( ) > NUM ; this . lvmin = data . read Short ( ) ; this . lvmax = data . read Short ( ) ; this . mbmin = data ...
protected MapleQuestRequirement ( MapleQuest quest , ReadBin data ) throws IOException { this . quest = quest ; this . dayByDay = data . readByte ( ) > _NUM ; this . normalAutoStart = data . readByte ( ) > _NUM ; this . lvmin = data . readShort ( ) ; this . lvmax = data . readShort ( ) ; this . mbmin = data . readShort...
615
java-test-11154
java
What will this not accept ?
{ field . reference } expressions
public Boolean consume Boolean Constant Attribute ( String name ) throws Unable To Complete Exception { String value = consume Raw Attribute ( name ) ; if ( value == null ) { return null ; } if ( value . equals ( STRING ) || value . equals ( STRING ) ) { return Boolean . value Of ( value ) ; } logger . die ( this , STR...
public Boolean consumeBooleanConstantAttribute ( String name ) throws UnableToCompleteException { String value = consumeRawAttribute ( name ) ; if ( value == null ) { return null ; } if ( value . equals ( STRING ) || value . equals ( STRING ) ) { return Boolean . valueOf ( value ) ; } logger . die ( this , STRING , nam...
79
java-test-11155
java
When do the path take how long ?
at every possible departure minute
private void compute Statistics ( Profile Request req , int access Time , int egress Time ) { int count = NUM ; int sum = NUM ; this . min = Integer . MAX VALUE ; this . max = NUM ; for ( int start = req . from Time ; start < req . to Time ; start += NUM ) { int time At Origin Stop = start + access Time + Raptor Worker...
private void computeStatistics ( ProfileRequest req , int accessTime , int egressTime ) { int count = _NUM ; int sum = _NUM ; this . min = Integer . MAX_VALUE ; this . max = _NUM ; for ( int start = req . fromTime ; start < req . toTime ; start += _NUM ) { int timeAtOriginStop = start + accessTime + RaptorWorker . BOAR...
257
java-test-11156
java
What do i prefer ?
pragmatism over theory
private void compute Statistics ( Profile Request req , int access Time , int egress Time ) { int count = NUM ; int sum = NUM ; this . min = Integer . MAX VALUE ; this . max = NUM ; for ( int start = req . from Time ; start < req . to Time ; start += NUM ) { int time At Origin Stop = start + access Time + Raptor Worker...
private void computeStatistics ( ProfileRequest req , int accessTime , int egressTime ) { int count = _NUM ; int sum = _NUM ; this . min = Integer . MAX_VALUE ; this . max = _NUM ; for ( int start = req . fromTime ; start < req . toTime ; start += _NUM ) { int timeAtOriginStop = start + accessTime + RaptorWorker . BOAR...
257
java-test-11157
java
How do this do ?
an elegant theoretical way
private void compute Statistics ( Profile Request req , int access Time , int egress Time ) { int count = NUM ; int sum = NUM ; this . min = Integer . MAX VALUE ; this . max = NUM ; for ( int start = req . from Time ; start < req . to Time ; start += NUM ) { int time At Origin Stop = start + access Time + Raptor Worker...
private void computeStatistics ( ProfileRequest req , int accessTime , int egressTime ) { int count = _NUM ; int sum = _NUM ; this . min = Integer . MAX_VALUE ; this . max = _NUM ; for ( int start = req . fromTime ; start < req . toTime ; start += _NUM ) { int timeAtOriginStop = start + accessTime + RaptorWorker . BOAR...
257
java-test-11158
java
What do we compute just ?
how long the path takes at every possible departure minute
private void compute Statistics ( Profile Request req , int access Time , int egress Time ) { int count = NUM ; int sum = NUM ; this . min = Integer . MAX VALUE ; this . max = NUM ; for ( int start = req . from Time ; start < req . to Time ; start += NUM ) { int time At Origin Stop = start + access Time + Raptor Worker...
private void computeStatistics ( ProfileRequest req , int accessTime , int egressTime ) { int count = _NUM ; int sum = _NUM ; this . min = Integer . MAX_VALUE ; this . max = _NUM ; for ( int start = req . fromTime ; start < req . toTime ; start += _NUM ) { int timeAtOriginStop = start + accessTime + RaptorWorker . BOAR...
257
java-test-11160
java
What does the code create ?
the cache instance for the test
private Cache create Cache ( ) throws Cache Exception { final Properties props = new Properties ( ) ; props . set Property ( LOCATORS , STRING ) ; props . set Property ( MCAST PORT , STRING ) ; return Cache Factory . create ( Distributed System . connect ( props ) ) ; }
private Cache createCache ( ) throws CacheException { final Properties props = new Properties ( ) ; props . setProperty ( LOCATORS , STRING ) ; props . setProperty ( MCAST_PORT , STRING ) ; return CacheFactory . create ( DistributedSystem . connect ( props ) ) ; }
56
java-test-11161
java
What does the code update ?
the platform - specific settings
public void update Platform ( final String a Os , final String a Arch , final Byte Order a Byte Order ) { os = a Os . to Lower Case ( ) ; arch = a Arch . to Lower Case ( ) ; String [ ] chmod = { STRING , STRING , null } ; if ( arch . equals ( STRING ) || arch . equals ( STRING ) || arch . equals ( STRING ) || arch . eq...
public void updatePlatform ( final String aOs , final String aArch , final ByteOrder aByteOrder ) { _os = aOs . toLowerCase ( ) ; _arch = aArch . toLowerCase ( ) ; String [ ] chmod = { STRING , STRING , null } ; if ( _arch . equals ( STRING ) || _arch . equals ( STRING ) || _arch . equals ( STRING ) || _arch . equals (...
226
java-test-11164
java
What does the polyline need for the text to be drawn with the specified orientation ?
to be reverted
protected boolean need To Reverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = BOOL ; switch ( get Orientation ( ) & ~ FOLLOW POLY ) { case FORWARD : break ; case BACKWARD : reverse = BOOL ; break ; case LEFT TO RIGHT : reverse = x1 > x2 ; break ; case RIGHT TO LEFT : reverse = x1 < x2 ; break ; case TOP T...
protected boolean needToReverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = _BOOL ; switch ( getOrientation ( ) & ~ FOLLOW_POLY ) { case FORWARD : break ; case BACKWARD : reverse = _BOOL ; break ; case LEFT_TO_RIGHT : reverse = x1 > x2 ; break ; case RIGHT_TO_LEFT : reverse = x1 < x2 ; break ; case TOP_TO...
123
java-test-11165
java
For what purpose does the polyline need to be reverted ?
for the text to be drawn with the specified orientation
protected boolean need To Reverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = BOOL ; switch ( get Orientation ( ) & ~ FOLLOW POLY ) { case FORWARD : break ; case BACKWARD : reverse = BOOL ; break ; case LEFT TO RIGHT : reverse = x1 > x2 ; break ; case RIGHT TO LEFT : reverse = x1 < x2 ; break ; case TOP T...
protected boolean needToReverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = _BOOL ; switch ( getOrientation ( ) & ~ FOLLOW_POLY ) { case FORWARD : break ; case BACKWARD : reverse = _BOOL ; break ; case LEFT_TO_RIGHT : reverse = x1 > x2 ; break ; case RIGHT_TO_LEFT : reverse = x1 < x2 ; break ; case TOP_TO...
123
java-test-11166
java
How be the text drawn ?
with the specified orientation
protected boolean need To Reverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = BOOL ; switch ( get Orientation ( ) & ~ FOLLOW POLY ) { case FORWARD : break ; case BACKWARD : reverse = BOOL ; break ; case LEFT TO RIGHT : reverse = x1 > x2 ; break ; case RIGHT TO LEFT : reverse = x1 < x2 ; break ; case TOP T...
protected boolean needToReverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = _BOOL ; switch ( getOrientation ( ) & ~ FOLLOW_POLY ) { case FORWARD : break ; case BACKWARD : reverse = _BOOL ; break ; case LEFT_TO_RIGHT : reverse = x1 > x2 ; break ; case RIGHT_TO_LEFT : reverse = x1 < x2 ; break ; case TOP_TO...
123
java-test-11167
java
What need to be reverted for the text to be drawn with the specified orientation ?
the polyline
protected boolean need To Reverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = BOOL ; switch ( get Orientation ( ) & ~ FOLLOW POLY ) { case FORWARD : break ; case BACKWARD : reverse = BOOL ; break ; case LEFT TO RIGHT : reverse = x1 > x2 ; break ; case RIGHT TO LEFT : reverse = x1 < x2 ; break ; case TOP T...
protected boolean needToReverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = _BOOL ; switch ( getOrientation ( ) & ~ FOLLOW_POLY ) { case FORWARD : break ; case BACKWARD : reverse = _BOOL ; break ; case LEFT_TO_RIGHT : reverse = x1 > x2 ; break ; case RIGHT_TO_LEFT : reverse = x1 < x2 ; break ; case TOP_TO...
123
java-test-11168
java
What does the code send to zookeeper server ?
letter command
private String send 4 Letter Word ( String cmd ) throws IO Exception { Socket sock = new Socket ( host , port ) ; Buffered Reader reader = null ; try { Output Stream outstream = sock . get Output Stream ( ) ; outstream . write ( cmd . get Bytes ( ) ) ; outstream . flush ( ) ; sock . shutdown Output ( ) ; reader = new B...
private String send4LetterWord ( String cmd ) throws IOException { Socket sock = new Socket ( host , port ) ; BufferedReader reader = null ; try { OutputStream outstream = sock . getOutputStream ( ) ; outstream . write ( cmd . getBytes ( ) ) ; outstream . flush ( ) ; sock . shutdownOutput ( ) ; reader = new BufferedRea...
163
java-test-11174
java
When did the code fire ?
before the movement of a file is processed
@ Override public void before File Movement ( @ Not Null Virtual File Move Event event ) { Mason Settings mason Settings = Mason Settings . get Instance ( get Project ( ) ) ; List < Virtual File > components Roots = mason Settings . get Components Roots Virtual Files ( ) ; if ( components Roots . is Empty ( ) ) { retur...
@ Override public void beforeFileMovement ( @ NotNull VirtualFileMoveEvent event ) { MasonSettings masonSettings = MasonSettings . getInstance ( getProject ( ) ) ; List < VirtualFile > componentsRoots = masonSettings . getComponentsRootsVirtualFiles ( ) ; if ( componentsRoots . isEmpty ( ) ) { return ; } VirtualFile mo...
205
java-test-11175
java
How does a 2 - dimensional array return ?
with the prepared data
protected String [ ] [ ] to Array ( ) { int i ; int n ; int ii ; int nn ; int x ; int y ; String [ ] [ ] result ; String [ ] [ ] tmp Result ; int cols ; int rows ; boolean value Exists ; rows = get Visible Row Count ( ) ; if ( get Show Average ( ) ) { rows ++ ; } cols = get Visible Col Count ( ) ; if ( get Show Std Dev...
protected String [ ] [ ] toArray ( ) { int i ; int n ; int ii ; int nn ; int x ; int y ; String [ ] [ ] result ; String [ ] [ ] tmpResult ; int cols ; int rows ; boolean valueExists ; rows = getVisibleRowCount ( ) ; if ( getShowAverage ( ) ) { rows ++ ; } cols = getVisibleColCount ( ) ; if ( getShowStdDev ( ) ) { cols ...
1,131
java-test-11176
java
What did the code read ?
a number of apps with download information from the xml parser
private void read Download Apps ( Xml Pull Parser parser , Set < Download App Info > apps ) throws Xml Pull Parser Exception , IO Exception { while ( parser . next ( ) != Xml Pull Parser . END TAG ) { if ( parser . get Event Type ( ) != Xml Pull Parser . START TAG ) { continue ; } String name = parser . get Name ( ) ; ...
private void readDownloadApps ( XmlPullParser parser , Set < DownloadAppInfo > apps ) throws XmlPullParserException , IOException { while ( parser . next ( ) != XmlPullParser . END_TAG ) { if ( parser . getEventType ( ) != XmlPullParser . START_TAG ) { continue ; } String name = parser . getName ( ) ; if ( TAG_APP . eq...
161
java-test-11177
java
What does a string have only ?
one space between simple selectors , which may be the passed in string
String clean Selector String ( String selector ) { boolean last Was Space = BOOL ; for ( int counter = NUM , max Counter = selector . length ( ) ; counter < max Counter ; counter ++ ) { switch ( selector . char At ( counter ) ) { case STRING : if ( last Was Space ) { return clean Selector String ( selector ) ; } last W...
String cleanSelectorString ( String selector ) { boolean lastWasSpace = _BOOL ; for ( int counter = _NUM , maxCounter = selector . length ( ) ; counter < maxCounter ; counter ++ ) { switch ( selector . charAt ( counter ) ) { case STRING : if ( lastWasSpace ) { return _cleanSelectorString ( selector ) ; } lastWasSpace =...
126
java-test-11179
java
Where does the code start ?
up the window
public Interaction Tab ( Dialogue System system ) { this . system = system ; set Layout ( new Border Layout ( ) ) ; lines = new J Text Pane ( ) ; lines . set Size ( NUM , NUM ) ; lines . set Content Type ( STRING ) ; lines . set Margin ( new Insets ( NUM , NUM , NUM , NUM ) ) ; lines . set Editable ( BOOL ) ; J Scroll ...
public InteractionTab ( DialogueSystem system ) { this . system = system ; setLayout ( new BorderLayout ( ) ) ; lines = new JTextPane ( ) ; lines . setSize ( _NUM , _NUM ) ; lines . setContentType ( STRING ) ; lines . setMargin ( new Insets ( _NUM , _NUM , _NUM , _NUM ) ) ; lines . setEditable ( _BOOL ) ; JScrollPane u...
365
java-test-11182
java
What does the code translate to a string in hypen notation example : helloworld - > hello - world ?
a string in camel notation
public static String camel To Hypen Notation ( String str ) { if ( is Empty ( str ) ) return str ; String Builder sb = new String Builder ( ) ; char c ; sb . append ( Character . to Lower Case ( str . char At ( NUM ) ) ) ; for ( int i = NUM ; i < str . length ( ) ; i ++ ) { c = str . char At ( i ) ; if ( Character . is...
public static String camelToHypenNotation ( String str ) { if ( isEmpty ( str ) ) return str ; StringBuilder sb = new StringBuilder ( ) ; char c ; sb . append ( Character . toLowerCase ( str . charAt ( _NUM ) ) ) ; for ( int i = _NUM ; i < str . length ( ) ; i ++ ) { c = str . charAt ( i ) ; if ( Character . isUpperCas...
137
java-test-11186
java
How are distributions updated ?
as above
public void add Arc ( String s Parent , Array List < Integer > nodes ) throws Exception { int n Parent = get Node ( s Parent ) ; if ( m b Needs Undo Action ) { add Undo Action ( new Add Arc Action ( n Parent , nodes ) ) ; } boolean b Needs Undo Action = m b Needs Undo Action ; m b Needs Undo Action = BOOL ; for ( int i...
public void addArc ( String sParent , ArrayList < Integer > nodes ) throws Exception { int nParent = getNode ( sParent ) ; if ( m_bNeedsUndoAction ) { addUndoAction ( new AddArcAction ( nParent , nodes ) ) ; } boolean bNeedsUndoAction = m_bNeedsUndoAction ; m_bNeedsUndoAction = _BOOL ; for ( int iNode = _NUM ; iNode < ...
133
java-test-11187
java
What does the code add ?
arc between parent node and each of the nodes in a given list
public void add Arc ( String s Parent , Array List < Integer > nodes ) throws Exception { int n Parent = get Node ( s Parent ) ; if ( m b Needs Undo Action ) { add Undo Action ( new Add Arc Action ( n Parent , nodes ) ) ; } boolean b Needs Undo Action = m b Needs Undo Action ; m b Needs Undo Action = BOOL ; for ( int i...
public void addArc ( String sParent , ArrayList < Integer > nodes ) throws Exception { int nParent = getNode ( sParent ) ; if ( m_bNeedsUndoAction ) { addUndoAction ( new AddArcAction ( nParent , nodes ) ) ; } boolean bNeedsUndoAction = m_bNeedsUndoAction ; m_bNeedsUndoAction = _BOOL ; for ( int iNode = _NUM ; iNode < ...
133
java-test-11188
java
How does instance construct ?
with the specified observed points
public Parameter Guesser ( Collection < Weighted Observed Point > observations ) { Math Utils . check Not Null ( observations ) ; if ( observations . size ( ) < NUM ) { throw new Math Illegal Argument Exception ( Localized Core Formats . NUMBER TOO SMALL , observations . size ( ) , NUM ) ; } final List < Weighted Obser...
public ParameterGuesser ( Collection < WeightedObservedPoint > observations ) { MathUtils . checkNotNull ( observations ) ; if ( observations . size ( ) < _NUM ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . NUMBER_TOO_SMALL , observations . size ( ) , _NUM ) ; } final List < WeightedObservedPoint >...
120
java-test-11189
java
What does the code return ?
the return type of a method , where the " raw " return type of that method is given ( i . e . , the return type might still contain unsubstituted type variables ) , given the receiver of the method call
public static Type Mirror substitute Method Return Type ( Type Mirror method Type , Type Mirror substituted Receiver Type ) { if ( method Type . get Kind ( ) != Type Kind . TYPEVAR ) { return method Type ; } String t = method Type . to String ( ) ; Type final Receiver Type = ( Type ) substituted Receiver Type ; int i =...
public static TypeMirror substituteMethodReturnType ( TypeMirror methodType , TypeMirror substitutedReceiverType ) { if ( methodType . getKind ( ) != TypeKind . TYPEVAR ) { return methodType ; } String t = methodType . toString ( ) ; Type finalReceiverType = ( Type ) substitutedReceiverType ; int i = _NUM ; for ( TypeS...
134
java-test-11190
java
What might the return type contain still ?
unsubstituted type variables
public static Type Mirror substitute Method Return Type ( Type Mirror method Type , Type Mirror substituted Receiver Type ) { if ( method Type . get Kind ( ) != Type Kind . TYPEVAR ) { return method Type ; } String t = method Type . to String ( ) ; Type final Receiver Type = ( Type ) substituted Receiver Type ; int i =...
public static TypeMirror substituteMethodReturnType ( TypeMirror methodType , TypeMirror substitutedReceiverType ) { if ( methodType . getKind ( ) != TypeKind . TYPEVAR ) { return methodType ; } String t = methodType . toString ( ) ; Type finalReceiverType = ( Type ) substitutedReceiverType ; int i = _NUM ; for ( TypeS...
134
java-test-11192
java
How does the code append a word ?
without breaking it
public Wrapping String Builder wrap Word ( final String s ) { if ( m Wrap Width - m Prefix . length ( ) < NUM ) { append ( s ) ; return this ; } final int available = m Wrap Width - line Length ( ) ; if ( s . length ( ) >= available ) { if ( line Length ( ) != m Prefix . length ( ) ) { wrap ( ) ; } append Trimmed ( s )...
public WrappingStringBuilder wrapWord ( final String s ) { if ( mWrapWidth - mPrefix . length ( ) < _NUM ) { append ( s ) ; return this ; } final int available = mWrapWidth - lineLength ( ) ; if ( s . length ( ) >= available ) { if ( lineLength ( ) != mPrefix . length ( ) ) { wrap ( ) ; } appendTrimmed ( s ) ; } else {...
100
java-test-11196
java
What can we call with any first argument between c + 1 and c + ( length of original token ) ?
adjustmappingpairvector
private static void adjust Mapping Pair Vector ( int col , int incr , Vector < Mapping Pair > vec ) { int i ; for ( i = NUM ; ( i < vec . size ( ) ) && ( vec . element At ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new Mapping Pair ( col , incr ) ) ; } else if ( vec . element At ( i ) . co...
private static void adjustMappingPairVector ( int col , int incr , Vector < MappingPair > vec ) { int i ; for ( i = _NUM ; ( i < vec . size ( ) ) && ( vec . elementAt ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new MappingPair ( col , incr ) ) ; } else if ( vec . elementAt ( i ) . col == c...
147
java-test-11197
java
Where do one never modify anything ?
inside the expression
private static void adjust Mapping Pair Vector ( int col , int incr , Vector < Mapping Pair > vec ) { int i ; for ( i = NUM ; ( i < vec . size ( ) ) && ( vec . element At ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new Mapping Pair ( col , incr ) ) ; } else if ( vec . element At ( i ) . co...
private static void adjustMappingPairVector ( int col , int incr , Vector < MappingPair > vec ) { int i ; for ( i = _NUM ; ( i < vec . size ( ) ) && ( vec . elementAt ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new MappingPair ( col , incr ) ) ; } else if ( vec . elementAt ( i ) . col == c...
147
java-test-11198
java
How do a token of length blen replace by an expression of length nlen ?
at column c
private static void adjust Mapping Pair Vector ( int col , int incr , Vector < Mapping Pair > vec ) { int i ; for ( i = NUM ; ( i < vec . size ( ) ) && ( vec . element At ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new Mapping Pair ( col , incr ) ) ; } else if ( vec . element At ( i ) . co...
private static void adjustMappingPairVector ( int col , int incr , Vector < MappingPair > vec ) { int i ; for ( i = _NUM ; ( i < vec . size ( ) ) && ( vec . elementAt ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new MappingPair ( col , incr ) ) ; } else if ( vec . elementAt ( i ) . col == c...
147
java-test-11199
java
Why do adjustmappingpairvector ( c + 1 , nlen - olen , . . . call if replacing a token of length blen at column c by an expression of length nlen if replacing a token of length blen at column c by an expression of length nlen ?
because : ( a ) the beginning position of the expression is the same as that of the token , and ( b ) one should never be looking at or modifying anything inside the expression
private static void adjust Mapping Pair Vector ( int col , int incr , Vector < Mapping Pair > vec ) { int i ; for ( i = NUM ; ( i < vec . size ( ) ) && ( vec . element At ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new Mapping Pair ( col , incr ) ) ; } else if ( vec . element At ( i ) . co...
private static void adjustMappingPairVector ( int col , int incr , Vector < MappingPair > vec ) { int i ; for ( i = _NUM ; ( i < vec . size ( ) ) && ( vec . elementAt ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new MappingPair ( col , incr ) ) ; } else if ( vec . elementAt ( i ) . col == c...
147
java-test-11200
java
What does the code open ?
the git repository
public static Local Git Repo from Current Dir ( String remote Url ) throws Validation Exception { Git git ; File git Dir = new File ( STRING ) ; try { git = Git . open ( git Dir ) ; } catch ( Repository Not Found Exception rnfe ) { String full Path Of Current Dir = path Of ( git Dir ) ; File git Root = get Git Root If ...
public static LocalGitRepo fromCurrentDir ( String remoteUrl ) throws ValidationException { Git git ; File gitDir = new File ( STRING ) ; try { git = Git . open ( gitDir ) ; } catch ( RepositoryNotFoundException rnfe ) { String fullPathOfCurrentDir = pathOf ( gitDir ) ; File gitRoot = getGitRootIfItExistsInOneOfThePare...
249
java-test-11201
java
What does the code use the current working dir ?
to open the git repository
public static Local Git Repo from Current Dir ( String remote Url ) throws Validation Exception { Git git ; File git Dir = new File ( STRING ) ; try { git = Git . open ( git Dir ) ; } catch ( Repository Not Found Exception rnfe ) { String full Path Of Current Dir = path Of ( git Dir ) ; File git Root = get Git Root If ...
public static LocalGitRepo fromCurrentDir ( String remoteUrl ) throws ValidationException { Git git ; File gitDir = new File ( STRING ) ; try { git = Git . open ( gitDir ) ; } catch ( RepositoryNotFoundException rnfe ) { String fullPathOfCurrentDir = pathOf ( gitDir ) ; File gitRoot = getGitRootIfItExistsInOneOfThePare...
249
java-test-11202
java
What does the code use to open the git repository ?
the current working dir
public static Local Git Repo from Current Dir ( String remote Url ) throws Validation Exception { Git git ; File git Dir = new File ( STRING ) ; try { git = Git . open ( git Dir ) ; } catch ( Repository Not Found Exception rnfe ) { String full Path Of Current Dir = path Of ( git Dir ) ; File git Root = get Git Root If ...
public static LocalGitRepo fromCurrentDir ( String remoteUrl ) throws ValidationException { Git git ; File gitDir = new File ( STRING ) ; try { git = Git . open ( gitDir ) ; } catch ( RepositoryNotFoundException rnfe ) { String fullPathOfCurrentDir = pathOf ( gitDir ) ; File gitRoot = getGitRootIfItExistsInOneOfThePare...
249
java-test-11203
java
What do implements the pythagorean theorem just to do the number of pixels between two screen points ?
little math utility that both tools use
public static int num Pixels Between ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , NUM ) ) ; }
public static int numPixelsBetween ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , _NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , _NUM ) ) ; }
62
java-test-11204
java
For what purpose do little math utility that both tools use implements the pythagorean theorem just ?
to do the number of pixels between two screen points
public static int num Pixels Between ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , NUM ) ) ; }
public static int numPixelsBetween ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , _NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , _NUM ) ) ; }
62
java-test-11205
java
What does the pythagorean theorem do ?
the number of pixels between two screen points
public static int num Pixels Between ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , NUM ) ) ; }
public static int numPixelsBetween ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , _NUM ) + Math . pow ( ( double ) ( y1 - y2 ) , _NUM ) ) ; }
62
java-test-11206
java
When are no other connections or messages tried ?
once an accepting connection is found
protected Connection try Messages To Connections ( List < Message > messages , List < Connection > connections ) { for ( int i = NUM , n = connections . size ( ) ; i < n ; i ++ ) { Connection con = connections . get ( i ) ; Message started = try All Messages ( con , messages ) ; if ( started != null ) { return con ; } ...
protected Connection tryMessagesToConnections ( List < Message > messages , List < Connection > connections ) { for ( int i = _NUM , n = connections . size ( ) ; i < n ; i ++ ) { Connection con = connections . get ( i ) ; Message started = tryAllMessages ( con , messages ) ; if ( started != null ) { return con ; } } re...
81
java-test-11207
java
What should have a popup ?
formobject
static boolean allows Popup ( Form Object form Object ) { switch ( form Object . get Parameter Constant ( Pdf Dictionary . Subtype ) ) { case Pdf Dictionary . Text : case Pdf Dictionary . Square : case Pdf Dictionary . Highlight : case Pdf Dictionary . Underline : case Pdf Dictionary . Strick Out : case Pdf Dictionary ...
static boolean allowsPopup ( FormObject formObject ) { switch ( formObject . getParameterConstant ( PdfDictionary . Subtype ) ) { case PdfDictionary . Text : case PdfDictionary . Square : case PdfDictionary . Highlight : case PdfDictionary . Underline : case PdfDictionary . StrickOut : case PdfDictionary . Stamp : retu...
74
java-test-11208
java
What does the code parse ?
a rule line
private void parse Month Day Time ( Scanner s , TZDB Month Day Time mdt ) { mdt . month = parse Month ( s ) ; if ( s . has Next ( ) ) { String day Rule = s . next ( ) ; if ( day Rule . starts With ( STRING ) ) { mdt . day Of Month = - NUM ; mdt . day Of Week = parse Day Of Week ( day Rule . substring ( NUM ) ) ; mdt . ...
private void parseMonthDayTime ( Scanner s , TZDBMonthDayTime mdt ) { mdt . month = parseMonth ( s ) ; if ( s . hasNext ( ) ) { String dayRule = s . next ( ) ; if ( dayRule . startsWith ( STRING ) ) { mdt . dayOfMonth = - _NUM ; mdt . dayOfWeek = parseDayOfWeek ( dayRule . substring ( _NUM ) ) ; mdt . adjustForwards = ...
341
java-test-11209
java
What can the finddependencieswith method be used then ?
to find all top - level threads that are blocked by the culprit
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11210
java
What can be used to find all top - level threads that are blocked by the culprit then ?
the finddependencieswith method
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11211
java
For what purpose are all subgraphs traversed ?
to find the one that has the most depth
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11212
java
What does the one have ?
the most depth
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11213
java
What do this indicate usually ?
the thread that is blocking the most other threads
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11214
java
What is the thread blocking ?
the most other threads
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11215
java
What will this find if a cycle is ?
the longest call chain in the graph
public Dependency Graph find Longest Call Chain ( ) { int depth = NUM ; Dependency Graph deepest = null ; for ( Object dep : vertices . key Set ( ) ) { int its Depth = get Depth ( dep ) ; if ( its Depth > depth ) { deepest = get Sub Graph ( dep ) ; depth = its Depth ; } } return deepest ; }
public DependencyGraph findLongestCallChain ( ) { int depth = _NUM ; DependencyGraph deepest = null ; for ( Object dep : vertices . keySet ( ) ) { int itsDepth = getDepth ( dep ) ; if ( itsDepth > depth ) { deepest = getSubGraph ( dep ) ; depth = itsDepth ; } } return deepest ; }
72
java-test-11216
java
What will this return instead of throwing mergefailed due to a bug in bridgesupport ?
a ( the first arg )
public String merge Name ( String a , String b ) throws Merge Failed { if ( QA . both Null Or Equals ( a , b ) ) return a ; if ( empty Names . contains ( a ) && ! empty Names . contains ( b ) ) return b ; if ( empty Names . contains ( b ) && ! empty Names . contains ( a ) ) return a ; return a ; }
public String mergeName ( String a , String b ) throws MergeFailed { if ( QA . bothNullOrEquals ( a , b ) ) return a ; if ( emptyNames . contains ( a ) && ! emptyNames . contains ( b ) ) return b ; if ( emptyNames . contains ( b ) && ! emptyNames . contains ( a ) ) return a ; return a ; }
80
java-test-11217
java
Why will this return a ( the first arg ) instead of throwing mergefailed ?
due to a bug in bridgesupport
public String merge Name ( String a , String b ) throws Merge Failed { if ( QA . both Null Or Equals ( a , b ) ) return a ; if ( empty Names . contains ( a ) && ! empty Names . contains ( b ) ) return b ; if ( empty Names . contains ( b ) && ! empty Names . contains ( a ) ) return a ; return a ; }
public String mergeName ( String a , String b ) throws MergeFailed { if ( QA . bothNullOrEquals ( a , b ) ) return a ; if ( emptyNames . contains ( a ) && ! emptyNames . contains ( b ) ) return b ; if ( emptyNames . contains ( b ) && ! emptyNames . contains ( a ) ) return a ; return a ; }
80
java-test-11218
java
How is the code write the properties ?
as several strings
public void write ( Data Output Stream dos ) throws IO Exception { dos . write Int ( ( size ( ) + NUM ) * NUM ) ; dos . write Int ( LPC PROPERY MANAGEMENT POLICY . length ( ) ) ; dos . write Chars ( LPC PROPERY MANAGEMENT POLICY ) ; if ( reuse Properties == Boolean . TRUE ) { dos . write Int ( LPC REUSE PROPERTIES . le...
public void write ( DataOutputStream dos ) throws IOException { dos . writeInt ( ( size ( ) + _NUM ) * _NUM ) ; dos . writeInt ( LPC_PROPERY_MANAGEMENT_POLICY . length ( ) ) ; dos . writeChars ( LPC_PROPERY_MANAGEMENT_POLICY ) ; if ( reuseProperties == Boolean . TRUE ) { dos . writeInt ( LPC_REUSE_PROPERTIES . length (...
201
java-test-11219
java
What does the code show ?
the filter dialog
private void show Filter Dialog ( Filter filter ) { int sort Order = m Adapter . get Count ( ) - NUM ; if ( filter == null ) { Edit Filter Activity . create New Filter ( get Activity ( ) , sort Order ) ; } else { Edit Filter Activity . edit Filter ( get Activity ( ) , filter , sort Order ) ; } }
private void showFilterDialog ( Filter filter ) { int sortOrder = mAdapter . getCount ( ) - _NUM ; if ( filter == null ) { EditFilterActivity . createNewFilter ( getActivity ( ) , sortOrder ) ; } else { EditFilterActivity . editFilter ( getActivity ( ) , filter , sortOrder ) ; } }
71
java-test-11223
java
What does the code create ?
a set of virtual dice with the given number of faces that start with the given value , where only a subset of the highest will be kept
public MM Roll ( MM Random rng , int count , int start , int keep ) { super ( count , start ) ; this . total = rng . random Int ( this . faces ) + this . min ; all . add Element ( this . total ) ; this . keep = keep ; }
public MMRoll ( MMRandom rng , int count , int start , int keep ) { super ( count , start ) ; this . total = rng . randomInt ( this . faces ) + this . min ; all . addElement ( this . total ) ; this . keep = keep ; }
60
java-test-11224
java
Where does the managed tree end ?
where the next entity ' s managed tree starts
public int sync ( String entity Id , Collection < Statement > statements , Collection < String > value List ) { long start = System . current Time Millis ( ) ; int modified = execute ( STRING , UPDATE COUNT RESPONSE , get Sync Query ( entity Id , statements , value List ) ) ; log . debug ( STRING , entity Id , System ....
public int sync ( String entityId , Collection < Statement > statements , Collection < String > valueList ) { long start = System . currentTimeMillis ( ) ; int modified = execute ( STRING , UPDATE_COUNT_RESPONSE , getSyncQuery ( entityId , statements , valueList ) ) ; log . debug ( STRING , entityId , System . currentT...
84
java-test-11225
java
What ends where the next entity ' s managed tree starts ?
the managed tree
public int sync ( String entity Id , Collection < Statement > statements , Collection < String > value List ) { long start = System . current Time Millis ( ) ; int modified = execute ( STRING , UPDATE COUNT RESPONSE , get Sync Query ( entity Id , statements , value List ) ) ; log . debug ( STRING , entity Id , System ....
public int sync ( String entityId , Collection < Statement > statements , Collection < String > valueList ) { long start = System . currentTimeMillis ( ) ; int modified = execute ( STRING , UPDATE_COUNT_RESPONSE , getSyncQuery ( entityId , statements , valueList ) ) ; log . debug ( STRING , entityId , System . currentT...
84
java-test-11226
java
What managed tree starts ?
the next entity ' s
public int sync ( String entity Id , Collection < Statement > statements , Collection < String > value List ) { long start = System . current Time Millis ( ) ; int modified = execute ( STRING , UPDATE COUNT RESPONSE , get Sync Query ( entity Id , statements , value List ) ) ; log . debug ( STRING , entity Id , System ....
public int sync ( String entityId , Collection < Statement > statements , Collection < String > valueList ) { long start = System . currentTimeMillis ( ) ; int modified = execute ( STRING , UPDATE_COUNT_RESPONSE , getSyncQuery ( entityId , statements , valueList ) ) ; log . debug ( STRING , entityId , System . currentT...
84
java-test-11227
java
What does the next entity ' s manage ?
tree starts
public int sync ( String entity Id , Collection < Statement > statements , Collection < String > value List ) { long start = System . current Time Millis ( ) ; int modified = execute ( STRING , UPDATE COUNT RESPONSE , get Sync Query ( entity Id , statements , value List ) ) ; log . debug ( STRING , entity Id , System ....
public int sync ( String entityId , Collection < Statement > statements , Collection < String > valueList ) { long start = System . currentTimeMillis ( ) ; int modified = execute ( STRING , UPDATE_COUNT_RESPONSE , getSyncQuery ( entityId , statements , valueList ) ) ; log . debug ( STRING , entityId , System . currentT...
84
java-test-11228
java
When did the code invoke ?
when component has been hidden
public void component Hidden ( Component Event e ) { if ( logger . is Loggable ( Level . FINE ) ) { logger . fine ( STRING + layer . get Name ( ) + STRING ) ; } Component comp = e . get Component ( ) ; if ( comp == layer ) { if ( is Layer On ( ) != BOOL ) { set Layer On ( BOOL ) ; if ( logger . is Loggable ( Level . FI...
public void componentHidden ( ComponentEvent e ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( STRING + layer . getName ( ) + STRING ) ; } Component comp = e . getComponent ( ) ; if ( comp == layer ) { if ( isLayerOn ( ) != _BOOL ) { setLayerOn ( _BOOL ) ; if ( logger . isLoggable ( Level . FINE ) ) {...
168
java-test-11231
java
What does the code add to a certain room ?
a meeting member
public Long add Meeting Member Remind To Room ( String SID , Long room id , String firstname , String lastname , String email , String base Url , Long language id ) throws Axis Fault { try { Long users id = session Management . check Session ( SID ) ; Long user level = user Management . get User Level By ID ( users id ...
public Long addMeetingMemberRemindToRoom ( String SID , Long room_id , String firstname , String lastname , String email , String baseUrl , Long language_id ) throws AxisFault { try { Long users_id = sessionManagement . checkSession ( SID ) ; Long user_level = userManagement . getUserLevelByID ( users_id ) ; if ( authL...
212
java-test-11233
java
How do the given location pattern match all resources in the file system ?
via the ant - style pathmatcher
protected Set < Resource > do Find Matching File System Resources ( File root Dir , String sub Pattern ) throws IO Exception { if ( logger . is Debug Enabled ( ) ) { logger . debug ( STRING + root Dir . get Path ( ) + STRING ) ; } Set < File > matching Files = retrieve Matching Files ( root Dir , sub Pattern ) ; Set < ...
protected Set < Resource > doFindMatchingFileSystemResources ( File rootDir , String subPattern ) throws IOException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( STRING + rootDir . getPath ( ) + STRING ) ; } Set < File > matchingFiles = retrieveMatchingFiles ( rootDir , subPattern ) ; Set < Resource > result...
120
java-test-11234
java
What does the code find ?
all resources in the file system that match the given location pattern via the ant - style pathmatcher
protected Set < Resource > do Find Matching File System Resources ( File root Dir , String sub Pattern ) throws IO Exception { if ( logger . is Debug Enabled ( ) ) { logger . debug ( STRING + root Dir . get Path ( ) + STRING ) ; } Set < File > matching Files = retrieve Matching Files ( root Dir , sub Pattern ) ; Set < ...
protected Set < Resource > doFindMatchingFileSystemResources ( File rootDir , String subPattern ) throws IOException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( STRING + rootDir . getPath ( ) + STRING ) ; } Set < File > matchingFiles = retrieveMatchingFiles ( rootDir , subPattern ) ; Set < Resource > result...
120
java-test-11235
java
What does the code extract ?
the revision string
public static String extract ( String s ) { String result ; result = s ; result = result . replace All ( STRING , STRING ) ; result = result . replace All ( STRING , STRING ) ; result = result . replace All ( STRING , STRING ) ; return result ; }
public static String extract ( String s ) { String result ; result = s ; result = result . replaceAll ( STRING , STRING ) ; result = result . replaceAll ( STRING , STRING ) ; result = result . replaceAll ( STRING , STRING ) ; return result ; }
56
java-test-11236
java
What do the signaturetimestamp element contain ?
the base64 encoded timestamp der
public void add Signature Timestamp ( byte [ ] timestamp Der ) throws Exception { Element unsigned Properties = get First Element By Tag Name ( document , xades Element ( UNSIGNED SIGNATURE PROPS TAG ) ) ; Element signature Time Stamp Element = document . create Element ( xades Element ( SIGNATURE TIMESTAMP TAG ) ) ; S...
public void addSignatureTimestamp ( byte [ ] timestampDer ) throws Exception { Element unsignedProperties = getFirstElementByTagName ( document , xadesElement ( UNSIGNED_SIGNATURE_PROPS_TAG ) ) ; Element signatureTimeStampElement = document . createElement ( xadesElement ( SIGNATURE_TIMESTAMP_TAG ) ) ; String timestamp...
109
java-test-11237
java
What does the code add ?
the signaturetimestamp element containing the base64 encoded timestamp der
public void add Signature Timestamp ( byte [ ] timestamp Der ) throws Exception { Element unsigned Properties = get First Element By Tag Name ( document , xades Element ( UNSIGNED SIGNATURE PROPS TAG ) ) ; Element signature Time Stamp Element = document . create Element ( xades Element ( SIGNATURE TIMESTAMP TAG ) ) ; S...
public void addSignatureTimestamp ( byte [ ] timestampDer ) throws Exception { Element unsignedProperties = getFirstElementByTagName ( document , xadesElement ( UNSIGNED_SIGNATURE_PROPS_TAG ) ) ; Element signatureTimeStampElement = document . createElement ( xadesElement ( SIGNATURE_TIMESTAMP_TAG ) ) ; String timestamp...
109
java-test-11238
java
What is containing the base64 encoded timestamp der ?
the signaturetimestamp element
public void add Signature Timestamp ( byte [ ] timestamp Der ) throws Exception { Element unsigned Properties = get First Element By Tag Name ( document , xades Element ( UNSIGNED SIGNATURE PROPS TAG ) ) ; Element signature Time Stamp Element = document . create Element ( xades Element ( SIGNATURE TIMESTAMP TAG ) ) ; S...
public void addSignatureTimestamp ( byte [ ] timestampDer ) throws Exception { Element unsignedProperties = getFirstElementByTagName ( document , xadesElement ( UNSIGNED_SIGNATURE_PROPS_TAG ) ) ; Element signatureTimeStampElement = document . createElement ( xadesElement ( SIGNATURE_TIMESTAMP_TAG ) ) ; String timestamp...
109
java-test-11239
java
What does the code create ?
a loader that loads from an apk file ( could contain multiple dex files ) , optionally loading instructions
public Smali Class Detail Loader ( Zip File apk File , boolean translate Instructions ) { Array List < Zip Entry > dex Entries = new Array List < Zip Entry > ( ) ; dex Entries . add ( apk File . get Entry ( STRING ) ) ; for ( int i = NUM ; i < NUM ; ++ i ) { final Zip Entry e = apk File . get Entry ( STRING + i + STRIN...
public SmaliClassDetailLoader ( ZipFile apkFile , boolean translateInstructions ) { ArrayList < ZipEntry > dexEntries = new ArrayList < ZipEntry > ( ) ; dexEntries . add ( apkFile . getEntry ( STRING ) ) ; for ( int i = _NUM ; i < _NUM ; ++ i ) { final ZipEntry e = apkFile . getEntry ( STRING + i + STRING ) ; if ( e !=...
261
java-test-11240
java
What do it assume ?
that color is hex string w / o #
public static String convert Color ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != NUM ) return color ; if ( ! color . starts With ( STRING ) ) return STRING + color ; return color ; }
public static String convertColor ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != _NUM ) return color ; if ( ! color . startsWith ( STRING ) ) return STRING + color ; return color ; }
52
java-test-11241
java
What do this method append to the beginning if it isn ' t already there ?
a #
public static String convert Color ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != NUM ) return color ; if ( ! color . starts With ( STRING ) ) return STRING + color ; return color ; }
public static String convertColor ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != _NUM ) return color ; if ( ! color . startsWith ( STRING ) ) return STRING + color ; return color ; }
52
java-test-11242
java
What will this method take ?
a string of hex values
public static String convert Color ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != NUM ) return color ; if ( ! color . starts With ( STRING ) ) return STRING + color ; return color ; }
public static String convertColor ( String color ) { if ( color == null ) return BLACK ; if ( color . length ( ) != _NUM ) return color ; if ( ! color . startsWith ( STRING ) ) return STRING + color ; return color ; }
52
java-test-11243
java
What is driving the media flow ?
main process loop
public void run ( ) { while ( ! interrupted ) { boolean EOM = BOOL ; boolean was Running = running ; is Pumping = ! interrupted && running ; while ( ! EOM && ! interrupted && running ) { EOM = data Pump . pump ( ) ; try { Thread . sleep ( NUM ) ; } catch ( Interrupted Exception ie ) { } } if ( Printer . debug ) { Print...
public void run ( ) { while ( ! interrupted ) { boolean EOM = _BOOL ; boolean wasRunning = running ; isPumping = ! interrupted && running ; while ( ! EOM && ! interrupted && running ) { EOM = dataPump . pump ( ) ; try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) { } } if ( Printer . debug ) { Printer...
276
java-test-11244
java
What do main process loop drive ?
the media flow
public void run ( ) { while ( ! interrupted ) { boolean EOM = BOOL ; boolean was Running = running ; is Pumping = ! interrupted && running ; while ( ! EOM && ! interrupted && running ) { EOM = data Pump . pump ( ) ; try { Thread . sleep ( NUM ) ; } catch ( Interrupted Exception ie ) { } } if ( Printer . debug ) { Print...
public void run ( ) { while ( ! interrupted ) { boolean EOM = _BOOL ; boolean wasRunning = running ; isPumping = ! interrupted && running ; while ( ! EOM && ! interrupted && running ) { EOM = dataPump . pump ( ) ; try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) { } } if ( Printer . debug ) { Printer...
276
java-test-11245
java
What does this return ?
the ids of any that are in the given collection
protected void filter Members ( Collection < Internal Distributed Member > mbrs , Set < Internal Distributed Member > matching Members , short request Type ) { Set < Internal Distributed Member > requests = get Pending Request I Ds ( request Type ) ; if ( ! requests . is Empty ( ) ) { logger . debug ( STRING + requests...
protected void filterMembers ( Collection < InternalDistributedMember > mbrs , Set < InternalDistributedMember > matchingMembers , short requestType ) { Set < InternalDistributedMember > requests = getPendingRequestIDs ( requestType ) ; if ( ! requests . isEmpty ( ) ) { logger . debug ( STRING + requests . size ( ) + S...
142
java-test-11246
java
What does this get ?
pending requests
protected void filter Members ( Collection < Internal Distributed Member > mbrs , Set < Internal Distributed Member > matching Members , short request Type ) { Set < Internal Distributed Member > requests = get Pending Request I Ds ( request Type ) ; if ( ! requests . is Empty ( ) ) { logger . debug ( STRING + requests...
protected void filterMembers ( Collection < InternalDistributedMember > mbrs , Set < InternalDistributedMember > matchingMembers , short requestType ) { Set < InternalDistributedMember > requests = getPendingRequestIDs ( requestType ) ; if ( ! requests . isEmpty ( ) ) { logger . debug ( STRING + requests . size ( ) + S...
142
java-test-11247
java
What does the code take ?
an array a representing a negative 2 ' s - complement number
private static int [ ] make Positive ( byte a [ ] ) { int keep , k ; int byte Length = a . length ; for ( keep = NUM ; keep < byte Length && a [ keep ] == - NUM ; keep ++ ) ; for ( k = keep ; k < byte Length && a [ k ] == NUM ; k ++ ) ; int extra Byte = ( k == byte Length ) ? NUM : NUM ; int int Length = ( ( byte Lengt...
private static int [ ] makePositive ( byte a [ ] ) { int keep , k ; int byteLength = a . length ; for ( keep = _NUM ; keep < byteLength && a [ keep ] == - _NUM ; keep ++ ) ; for ( k = keep ; k < byteLength && a [ k ] == _NUM ; k ++ ) ; int extraByte = ( k == byteLength ) ? _NUM : _NUM ; int intLength = ( ( byteLength -...
326
java-test-11248
java
What does the code return ?
the minimal ( no leading zero bytes ) unsigned whose value is - a
private static int [ ] make Positive ( byte a [ ] ) { int keep , k ; int byte Length = a . length ; for ( keep = NUM ; keep < byte Length && a [ keep ] == - NUM ; keep ++ ) ; for ( k = keep ; k < byte Length && a [ k ] == NUM ; k ++ ) ; int extra Byte = ( k == byte Length ) ? NUM : NUM ; int int Length = ( ( byte Lengt...
private static int [ ] makePositive ( byte a [ ] ) { int keep , k ; int byteLength = a . length ; for ( keep = _NUM ; keep < byteLength && a [ keep ] == - _NUM ; keep ++ ) ; for ( k = keep ; k < byteLength && a [ k ] == _NUM ; k ++ ) ; int extraByte = ( k == byteLength ) ? _NUM : _NUM ; int intLength = ( ( byteLength -...
326
java-test-11251
java
What is testing the behavior of readall ( ) and writeall ( ) ?
a single trial
public void test one Trial read All write All ( ) throws IO Exception { final File file = File . create Temp File ( STRING , get Name ( ) ) ; file . delete On Exit ( ) ; final Random Access File raf = new Random Access File ( file , STRING ) ; try { final byte [ ] expected = new byte [ FILE SIZE ] ; { r . next Bytes ( ...
public void test_oneTrial_readAll_writeAll ( ) throws IOException { final File file = File . createTempFile ( STRING , getName ( ) ) ; file . deleteOnExit ( ) ; final RandomAccessFile raf = new RandomAccessFile ( file , STRING ) ; try { final byte [ ] expected = new byte [ FILE_SIZE ] ; { r . nextBytes ( expected ) ; }...
202
java-test-11252
java
What do a single trial test ?
the behavior of readall ( ) and writeall ( )
public void test one Trial read All write All ( ) throws IO Exception { final File file = File . create Temp File ( STRING , get Name ( ) ) ; file . delete On Exit ( ) ; final Random Access File raf = new Random Access File ( file , STRING ) ; try { final byte [ ] expected = new byte [ FILE SIZE ] ; { r . next Bytes ( ...
public void test_oneTrial_readAll_writeAll ( ) throws IOException { final File file = File . createTempFile ( STRING , getName ( ) ) ; file . deleteOnExit ( ) ; final RandomAccessFile raf = new RandomAccessFile ( file , STRING ) ; try { final byte [ ] expected = new byte [ FILE_SIZE ] ; { r . nextBytes ( expected ) ; }...
202
java-test-11253
java
What does utility method write to a file called " cluster_centroids . bin ?
cluster centroids
public static void write Centroids To File ( Clusters clusters , Flag Config flag Config ) { Vector Store RAM centroids Output = new Vector Store RAM ( flag Config ) ; for ( int i = NUM ; i < clusters . centroids . length ; ++ i ) { centroids Output . put Vector ( Integer . to String ( i ) , clusters . centroids [ i ] ...
public static void writeCentroidsToFile ( Clusters clusters , FlagConfig flagConfig ) { VectorStoreRAM centroidsOutput = new VectorStoreRAM ( flagConfig ) ; for ( int i = _NUM ; i < clusters . centroids . length ; ++ i ) { centroidsOutput . putVector ( Integer . toString ( i ) , clusters . centroids [ i ] ) ; } try { V...
110
java-test-11255
java
What does the code calculate ?
the size of the " sphere of influence " defined as : sphere = sum ( p ) ^ 2 / sum ( p ^ 2 ) where p ( i ) = root * exp ( - 2 * i * root ) . since there are n different training instances we multiply p ( i ) by 1 / n
private void calculate Sphere Size ( double scale , K Star Wrapper params ) { int i ; double sphere Size , minprob = NUM ; double pstar ; double pstar Sum = NUM ; double pstar Square Sum = NUM ; double inc ; for ( i = NUM ; i < m Num Instances ; i ++ ) { if ( m Distances [ i ] < NUM ) { continue ; } else { pstar = P St...
private void calculateSphereSize ( double scale , KStarWrapper params ) { int i ; double sphereSize , minprob = _NUM ; double pstar ; double pstarSum = _NUM ; double pstarSquareSum = _NUM ; double inc ; for ( i = _NUM ; i < m_NumInstances ; i ++ ) { if ( m_Distances [ i ] < _NUM ) { continue ; } else { pstar = PStar ( ...
172
java-test-11256
java
What does the code build ?
the name line of a function node
private static void build Name Line ( final I Navi Function Node node , final Zy Label Content content , final boolean show Function Information ) { final I Navi Function function = node . get Function ( ) ; String information String = STRING ; if ( function . get Basic Block Count ( ) > NUM ) { final String Builder bu...
private static void buildNameLine ( final INaviFunctionNode node , final ZyLabelContent content , final boolean showFunctionInformation ) { final INaviFunction function = node . getFunction ( ) ; String informationString = STRING ; if ( function . getBasicBlockCount ( ) > _NUM ) { final StringBuilder builder = new Stri...
240
java-test-11257
java
What designed to be called from action ?
each tile on the builder
public void grab Tiles ( Action builder ) { if ( bounds List == null ) { bounds List = new Array List < double [ ] > ( ) ; bounds List . add ( new double [ ] { NUM , - NUM , - NUM , NUM } ) ; } for ( int i = NUM ; i < ZOOM LEVELS ; i ++ ) { if ( zoom Levels == null ) { if ( i > NUM ) continue ; } else { if ( ! zoom Lev...
public void grabTiles ( Action builder ) { if ( boundsList == null ) { boundsList = new ArrayList < double [ ] > ( ) ; boundsList . add ( new double [ ] { _NUM , - _NUM , - _NUM , _NUM } ) ; } for ( int i = _NUM ; i < ZOOM_LEVELS ; i ++ ) { if ( zoomLevels == null ) { if ( i > _NUM ) continue ; } else { if ( ! zoomLeve...
320
java-test-11258
java
What did each tile on the builder design ?
to be called from action
public void grab Tiles ( Action builder ) { if ( bounds List == null ) { bounds List = new Array List < double [ ] > ( ) ; bounds List . add ( new double [ ] { NUM , - NUM , - NUM , NUM } ) ; } for ( int i = NUM ; i < ZOOM LEVELS ; i ++ ) { if ( zoom Levels == null ) { if ( i > NUM ) continue ; } else { if ( ! zoom Lev...
public void grabTiles ( Action builder ) { if ( boundsList == null ) { boundsList = new ArrayList < double [ ] > ( ) ; boundsList . add ( new double [ ] { _NUM , - _NUM , - _NUM , _NUM } ) ; } for ( int i = _NUM ; i < ZOOM_LEVELS ; i ++ ) { if ( zoomLevels == null ) { if ( i > _NUM ) continue ; } else { if ( ! zoomLeve...
320
java-test-11259
java
What need action ?
which tiles
public void grab Tiles ( Action builder ) { if ( bounds List == null ) { bounds List = new Array List < double [ ] > ( ) ; bounds List . add ( new double [ ] { NUM , - NUM , - NUM , NUM } ) ; } for ( int i = NUM ; i < ZOOM LEVELS ; i ++ ) { if ( zoom Levels == null ) { if ( i > NUM ) continue ; } else { if ( ! zoom Lev...
public void grabTiles ( Action builder ) { if ( boundsList == null ) { boundsList = new ArrayList < double [ ] > ( ) ; boundsList . add ( new double [ ] { _NUM , - _NUM , - _NUM , _NUM } ) ; } for ( int i = _NUM ; i < ZOOM_LEVELS ; i ++ ) { if ( zoomLevels == null ) { if ( i > _NUM ) continue ; } else { if ( ! zoomLeve...
320
java-test-11260
java
What does the code create ?
a pretty string
public String to String ( ) { String Buffer buf = new String Buffer ( ) ; String indent = STRING ; buf . append ( indent + STRING + Integer . to Hex String ( get Version ( ) ) + STRING ) ; buf . append ( indent + STRING + get Ascent ( ) + STRING ) ; buf . append ( indent + STRING + get Descent ( ) + STRING ) ; buf . ap...
public String toString ( ) { StringBuffer buf = new StringBuffer ( ) ; String indent = STRING ; buf . append ( indent + STRING + Integer . toHexString ( getVersion ( ) ) + STRING ) ; buf . append ( indent + STRING + getAscent ( ) + STRING ) ; buf . append ( indent + STRING + getDescent ( ) + STRING ) ; buf . append ( i...
268
java-test-11261
java
What unloads it ?
owns an entity whose i d is in the passed array
public Unload Stranded Turn ( int [ ] ids ) { super ( I Player . PLAYER NONE ) ; if ( null == ids ) { throw new Illegal Argument Exception ( STRING ) ; } if ( NUM == ids . length ) { throw new Illegal Argument Exception ( STRING ) ; } entity Ids = new int [ ids . length ] ; System . arraycopy ( ids , NUM , entity Ids ,...
public UnloadStrandedTurn ( int [ ] ids ) { super ( IPlayer . PLAYER_NONE ) ; if ( null == ids ) { throw new IllegalArgumentException ( STRING ) ; } if ( _NUM == ids . length ) { throw new IllegalArgumentException ( STRING ) ; } entityIds = new int [ ids . length ] ; System . arraycopy ( ids , _NUM , entityIds , _NUM ,...
86
java-test-11262
java
What owns an entity whose i d is in the passed array ?
any player
public Unload Stranded Turn ( int [ ] ids ) { super ( I Player . PLAYER NONE ) ; if ( null == ids ) { throw new Illegal Argument Exception ( STRING ) ; } if ( NUM == ids . length ) { throw new Illegal Argument Exception ( STRING ) ; } entity Ids = new int [ ids . length ] ; System . arraycopy ( ids , NUM , entity Ids ,...
public UnloadStrandedTurn ( int [ ] ids ) { super ( IPlayer . PLAYER_NONE ) ; if ( null == ids ) { throw new IllegalArgumentException ( STRING ) ; } if ( _NUM == ids . length ) { throw new IllegalArgumentException ( STRING ) ; } entityIds = new int [ ids . length ] ; System . arraycopy ( ids , _NUM , entityIds , _NUM ,...
86
java-test-11263
java
What does any player own ?
an entity whose i d is in the passed array
public Unload Stranded Turn ( int [ ] ids ) { super ( I Player . PLAYER NONE ) ; if ( null == ids ) { throw new Illegal Argument Exception ( STRING ) ; } if ( NUM == ids . length ) { throw new Illegal Argument Exception ( STRING ) ; } entity Ids = new int [ ids . length ] ; System . arraycopy ( ids , NUM , entity Ids ,...
public UnloadStrandedTurn ( int [ ] ids ) { super ( IPlayer . PLAYER_NONE ) ; if ( null == ids ) { throw new IllegalArgumentException ( STRING ) ; } if ( _NUM == ids . length ) { throw new IllegalArgumentException ( STRING ) ; } entityIds = new int [ ids . length ] ; System . arraycopy ( ids , _NUM , entityIds , _NUM ,...
86
java-test-11264
java
What does random generator use always ?
the same seed
double [ ] create Real Data ( final int n ) { final Random random = new Random ( SEED ) ; final double [ ] data = new double [ n ] ; for ( int i = NUM ; i < n ; i ++ ) { data [ i ] = NUM * random . next Double ( ) - NUM ; } return data ; }
double [ ] createRealData ( final int n ) { final Random random = new Random ( SEED ) ; final double [ ] data = new double [ n ] ; for ( int i = _NUM ; i < n ; i ++ ) { data [ i ] = _NUM * random . nextDouble ( ) - _NUM ; } return data ; }
70
java-test-11265
java
What uses the same seed always ?
random generator
double [ ] create Real Data ( final int n ) { final Random random = new Random ( SEED ) ; final double [ ] data = new double [ n ] ; for ( int i = NUM ; i < n ; i ++ ) { data [ i ] = NUM * random . next Double ( ) - NUM ; } return data ; }
double [ ] createRealData ( final int n ) { final Random random = new Random ( SEED ) ; final double [ ] data = new double [ n ] ; for ( int i = _NUM ; i < n ; i ++ ) { data [ i ] = _NUM * random . nextDouble ( ) - _NUM ; } return data ; }
70
java-test-11267
java
How does the code write the given image in the given file ?
using the ppm data format
public static void write Image To Ppm ( int [ ] [ ] image , String ppm File Name ) throws IO Exception { try ( Buffered Writer ppm Out = new Buffered Writer ( new File Writer ( ppm File Name ) ) ) { int rows = image . length ; int cols = image [ NUM ] . length ; ppm Out . write ( STRING ) ; ppm Out . write ( STRING + r...
public static void writeImageToPpm ( int [ ] [ ] image , String ppmFileName ) throws IOException { try ( BufferedWriter ppmOut = new BufferedWriter ( new FileWriter ( ppmFileName ) ) ) { int rows = image . length ; int cols = image [ _NUM ] . length ; ppmOut . write ( STRING ) ; ppmOut . write ( STRING + rows + STRING ...
169
java-test-11268
java
For what purpose do the fragment pane switch when in two - pane mode ?
to show the given preference fragment
public void switch To Header ( String fragment Name , Bundle args ) { Header selected Header = null ; for ( int i = NUM ; i < m Headers . size ( ) ; i ++ ) { if ( fragment Name . equals ( m Headers . get ( i ) . fragment ) ) { selected Header = m Headers . get ( i ) ; break ; } } set Selected Header ( selected Header )...
public void switchToHeader ( String fragmentName , Bundle args ) { Header selectedHeader = null ; for ( int i = _NUM ; i < mHeaders . size ( ) ; i ++ ) { if ( fragmentName . equals ( mHeaders . get ( i ) . fragment ) ) { selectedHeader = mHeaders . get ( i ) ; break ; } } setSelectedHeader ( selectedHeader ) ; switchTo...
94
java-test-11269
java
When do the fragment pane switch to show the given preference fragment ?
when in two - pane mode
public void switch To Header ( String fragment Name , Bundle args ) { Header selected Header = null ; for ( int i = NUM ; i < m Headers . size ( ) ; i ++ ) { if ( fragment Name . equals ( m Headers . get ( i ) . fragment ) ) { selected Header = m Headers . get ( i ) ; break ; } } set Selected Header ( selected Header )...
public void switchToHeader ( String fragmentName , Bundle args ) { Header selectedHeader = null ; for ( int i = _NUM ; i < mHeaders . size ( ) ; i ++ ) { if ( fragmentName . equals ( mHeaders . get ( i ) . fragment ) ) { selectedHeader = mHeaders . get ( i ) ; break ; } } setSelectedHeader ( selectedHeader ) ; switchTo...
94
java-test-11277
java
What does the code create ?
a new id3v1 datatype
public ID 3 v 1 Tag ( Random Access File file , String logging Filename ) throws Tag Not Found Exception , IO Exception { set Logging Filename ( logging Filename ) ; File Channel fc ; Byte Buffer byte Buffer ; fc = file . get Channel ( ) ; fc . position ( file . length ( ) - TAG LENGTH ) ; byte Buffer = Byte Buffer . a...
public ID3v1Tag ( RandomAccessFile file , String loggingFilename ) throws TagNotFoundException , IOException { setLoggingFilename ( loggingFilename ) ; FileChannel fc ; ByteBuffer byteBuffer ; fc = file . getChannel ( ) ; fc . position ( file . length ( ) - TAG_LENGTH ) ; byteBuffer = ByteBuffer . allocate ( TAG_LENGTH...
99
java-test-11278
java
What does the code open ?
a certificate input stream
protected X509 Certificate [ ] open Certificate ( Input Stream is , String name ) { try { X509 Certificate [ ] certs = X509 Cert Util . load Certificates ( is ) ; if ( certs . length == NUM ) { J Option Pane . show Message Dialog ( frame , Message Format . format ( res . get String ( STRING ) , name ) , res . get Strin...
protected X509Certificate [ ] openCertificate ( InputStream is , String name ) { try { X509Certificate [ ] certs = X509CertUtil . loadCertificates ( is ) ; if ( certs . length == _NUM ) { JOptionPane . showMessageDialog ( frame , MessageFormat . format ( res . getString ( STRING ) , name ) , res . getString ( STRING ) ...
204
java-test-11279
java
Where do the event occur ?
on a vertex
@ Suppress Warnings ( STRING ) public void mouse Pressed ( Mouse Event e ) { if ( e . get Modifiers ( ) == modifiers ) { Visualization Viewer < V , E > vv = ( Visualization Viewer < V , E > ) e . get Source ( ) ; Graph Element Accessor < V , E > pick Support = vv . get Pick Support ( ) ; Picked State < V > picked Verte...
@ SuppressWarnings ( STRING ) public void mousePressed ( MouseEvent e ) { if ( e . getModifiers ( ) == modifiers ) { VisualizationViewer < V , E > vv = ( VisualizationViewer < V , E > ) e . getSource ( ) ; GraphElementAccessor < V , E > pickSupport = vv . getPickSupport ( ) ; PickedState < V > pickedVertexState = vv . ...
209
java-test-11281
java
What does the code reduce ?
size of hitlist
private List < Search Hit > limit List ( int limit , List < Search Hit > hit List ) { if ( LOG . is Debug Enabled ( ) ) { LOG . debug ( STRING + hit List . size ( ) + STRING + limit + STRING ) ; } Search Hit [ ] limited Hits = new Search Hit [ limit ] ; System . arraycopy ( hit List . to Array ( new Search Hit [ hit Li...
private List < SearchHit > limitList ( int limit , List < SearchHit > hitList ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( STRING + hitList . size ( ) + STRING + limit + STRING ) ; } SearchHit [ ] limitedHits = new SearchHit [ limit ] ; System . arraycopy ( hitList . toArray ( new SearchHit [ hitList . size ( ) ...
111
java-test-11282
java
What does the code append to a file ?
the contents string
public static void append To File ( final File file , final String contents ) throws IO Exception { try ( File Output Stream fos = new File Output Stream ( file , BOOL ) ) { fos . write ( contents . get Bytes ( ) ) ; } }
public static void appendToFile ( final File file , final String contents ) throws IOException { try ( FileOutputStream fos = new FileOutputStream ( file , _BOOL ) ) { fos . write ( contents . getBytes ( ) ) ; } }
51
java-test-11283
java
What does the code add to the map of object permissions provided ?
the object permissions from the given objectpermissionset
private void add Object Permissions ( Map < String , Set < Object Permission . Type > > permissions , Object Permission Set perm Set ) throws Guacamole Exception { for ( Object Permission permission : perm Set . get Permissions ( ) ) { String identifier = permission . get Object Identifier ( ) ; Set < Object Permission...
private void addObjectPermissions ( Map < String , Set < ObjectPermission . Type > > permissions , ObjectPermissionSet permSet ) throws GuacamoleException { for ( ObjectPermission permission : permSet . getPermissions ( ) ) { String identifier = permission . getObjectIdentifier ( ) ; Set < ObjectPermission . Type > obj...
116
java-test-11285
java
When should this method be called only ?
after the source has been prepared
public void select Track ( int index ) { selected Track Index = index ; Exposed Track selected Track = tracks . get ( selected Track Index ) ; selected Variant Index = selected Track . default Variant Index ; variants = selected Track . variants ; variant Playlists = new Hls Media Playlist [ variants . length ] ; varia...
public void selectTrack ( int index ) { selectedTrackIndex = index ; ExposedTrack selectedTrack = tracks . get ( selectedTrackIndex ) ; selectedVariantIndex = selectedTrack . defaultVariantIndex ; variants = selectedTrack . variants ; variantPlaylists = new HlsMediaPlaylist [ variants . length ] ; variantLastPlaylistLo...
88
java-test-11286
java
When did the code invoke ?
when a client has connected to this process or when this process has connected to a cacheserver
public void member Joined ( Client Membership Event event ) { Notification notification = new Notification ( JMX Notification Type . CLIENT JOINED , server Source , Sequence Number . next ( ) , System . current Time Millis ( ) , Management Constants . CLIENT JOINED PREFIX + event . get Member Id ( ) ) ; server Level No...
public void memberJoined ( ClientMembershipEvent event ) { Notification notification = new Notification ( JMXNotificationType . CLIENT_JOINED , serverSource , SequenceNumber . next ( ) , System . currentTimeMillis ( ) , ManagementConstants . CLIENT_JOINED_PREFIX + event . getMemberId ( ) ) ; serverLevelNotifEmitter . s...
81