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-5493
java
How did parameters define ?
by ade
protected final void parse Args ( String [ ] args ) throws Ade Exception { final Array List < String > ade Args = parse Ade Ext Args ( args ) ; super . parse Args ( ade Args . to Array ( new String [ ade Args . size ( ) ] ) ) ; }
protected final void parseArgs ( String [ ] args ) throws AdeException { final ArrayList < String > adeArgs = parseAdeExtArgs ( args ) ; super . parseArgs ( adeArgs . toArray ( new String [ adeArgs . size ( ) ] ) ) ; }
57
java-test-5495
java
How do the data load from the rdbms table ?
by the where
public final static < T extends Bean > List < T > load ( String table , String [ ] cols , String where , Object [ ] args , Class < T > clazz ) { return load ( table , cols , where , args , null , - NUM , - NUM , clazz ) ; }
public final static < T extends Bean > List < T > load ( String table , String [ ] cols , String where , Object [ ] args , Class < T > clazz ) { return load ( table , cols , where , args , null , - _NUM , - _NUM , clazz ) ; }
60
java-test-5496
java
What does a helper function check ?
whether the specified error could have been caused by the specified app
private static boolean package Matches ( Resolve Info app , Process Error err ) { final String app Pkg = app . activity Info . package Name ; final String err Pkg = err . info . process Name ; Log . d ( TAG , String . format ( STRING , app Pkg , err Pkg ) ) ; return app Pkg . equals ( err Pkg ) ; }
private static boolean packageMatches ( ResolveInfo app , ProcessError err ) { final String appPkg = app . activityInfo . packageName ; final String errPkg = err . info . processName ; Log . d ( TAG , String . format ( STRING , appPkg , errPkg ) ) ; return appPkg . equals ( errPkg ) ; }
71
java-test-5497
java
How does the code append a newline to the given buffer ?
via the given writer
private static void append Newline If Necessary ( String Buffer buf , Writer out ) throws IO Exception { int len = buf . length ( ) ; if ( ( len != NUM ) && ( buf . char At ( len - NUM ) != STRING ) ) { out . write ( STRING ) ; } }
private static void appendNewlineIfNecessary ( StringBuffer buf , Writer out ) throws IOException { int len = buf . length ( ) ; if ( ( len != _NUM ) && ( buf . charAt ( len - _NUM ) != STRING ) ) { out . write ( STRING ) ; } }
60
java-test-5498
java
What does we handle only ?
changes to the deployed services
@ Override public void object Changed ( String dn , int type ) { Matcher matcher = schema Dn Pattern . matcher ( dn ) ; if ( ! matcher . matches ( ) ) { return ; } refresh Service Route ( type , matcher . group ( NUM ) , matcher . group ( NUM ) ) ; }
@ Override public void objectChanged ( String dn , int type ) { Matcher matcher = schemaDnPattern . matcher ( dn ) ; if ( ! matcher . matches ( ) ) { return ; } refreshServiceRoute ( type , matcher . group ( _NUM ) , matcher . group ( _NUM ) ) ; }
61
java-test-5500
java
What does the code zip ?
the given resourcenode
private void zip Entry ( Zip Output Stream zip Output Stream , Resource Node resource Node ) { try ( Byte Array Input Stream input Stream = new Byte Array Input Stream ( ( byte [ ] ) resource Node . get Object ( ) ) ) { Zip Entry zip Entry = new Zip Entry ( create New Zip Entry Name ( resource Node . get Path ( ) ) ) ;...
private void zipEntry ( ZipOutputStream zipOutputStream , ResourceNode resourceNode ) { try ( ByteArrayInputStream inputStream = new ByteArrayInputStream ( ( byte [ ] ) resourceNode . getObject ( ) ) ) { ZipEntry zipEntry = new ZipEntry ( createNewZipEntryName ( resourceNode . getPath ( ) ) ) ; zipOutputStream . putNex...
187
java-test-5503
java
Why is this a problem ?
because there is no way to work around this with a cast
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5504
java
What will this set on the method as necessary ?
the accessibilty flag
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5505
java
What did this method utilize ?
cached methods
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5506
java
What will it throw if , when directed to find a static method , this method locates a more specific matching instance method ?
a descriptive exception analogous to the error that the java compiler would produce
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5507
java
What does this method perform ?
caching ( caches discovered methods through the class manager
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5508
java
What does this method locate ?
a more specific matching instance method
protected static Method resolve Java Method ( Bsh Class Manager bcm , Class clas , String name , Class [ ] types , boolean static Only ) throws Util Eval Error { if ( clas == null ) throw new Interpreter Error ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . ge...
protected static Method resolveJavaMethod ( BshClassManager bcm , Class clas , String name , Class [ ] types , boolean staticOnly ) throws UtilEvalError { if ( clas == null ) throw new InterpreterError ( STRING ) ; Method method = null ; if ( bcm == null ) Interpreter . debug ( STRING ) ; else method = bcm . getResolve...
217
java-test-5509
java
What does the code retrieve from the attribute list if no match is found ?
the named parameter
@ Not Null public static String attr Or Default ( @ Not Null Attributes attributes , @ Not Null String name , @ Not Null String default Value ) { String value = attributes . get Value ( name ) ; return ( value != null ) ? value : default Value ; }
@ NotNull public static String attrOrDefault ( @ NotNull Attributes attributes , @ NotNull String name , @ NotNull String defaultValue ) { String value = attributes . getValue ( name ) ; return ( value != null ) ? value : defaultValue ; }
54
java-test-5514
java
What does the code handle ?
the hover events
protected void handle Hover Event ( Event evt ) { if ( evt . get Target ( ) instanceof Element ) { Element e = ( Element ) evt . get Target ( ) ; Node next = e . get Next Sibling ( ) ; if ( next instanceof Element ) { toggle Tooltip ( ( Element ) next , evt . get Type ( ) ) ; } else { Logging Util . warning ( STRING ) ...
protected void handleHoverEvent ( Event evt ) { if ( evt . getTarget ( ) instanceof Element ) { Element e = ( Element ) evt . getTarget ( ) ; Node next = e . getNextSibling ( ) ; if ( next instanceof Element ) { toggleTooltip ( ( Element ) next , evt . getType ( ) ) ; } else { LoggingUtil . warning ( STRING ) ; } } els...
94
java-test-5515
java
What does the code create ?
a samlv2 provider
public void create SAM Lv 2 Provider ( String realm , String entity Id , Map values ) throws AM Console Exception { try { List < String > meta Aliases = get Federation Alias ( values , Meta Template Parameters . P SAML ALIASES ) ; Set < String > duplicate Check = new Hash Set < String > ( meta Aliases ) ; if ( duplicat...
public void createSAMLv2Provider ( String realm , String entityId , Map values ) throws AMConsoleException { try { List < String > metaAliases = getFederationAlias ( values , MetaTemplateParameters . P_SAML_ALIASES ) ; Set < String > duplicateCheck = new HashSet < String > ( metaAliases ) ; if ( duplicateCheck . size (...
240
java-test-5517
java
What does the code create ?
a stream for every delayed image that is not written yet
public void process All ( ) throws IO Exception { for ( Iterator < Entry > i = image List . iterator ( ) ; i . has Next ( ) ; ) { Entry entry = ( Entry ) i . next ( ) ; if ( ! entry . written ) { entry . written = BOOL ; PDF Stream img = pdf . open Stream ( entry . name ) ; img . entry ( STRING , pdf . name ( STRING ) ...
public void processAll ( ) throws IOException { for ( Iterator < Entry > i = imageList . iterator ( ) ; i . hasNext ( ) ; ) { Entry entry = ( Entry ) i . next ( ) ; if ( ! entry . written ) { entry . written = _BOOL ; PDFStream img = pdf . openStream ( entry . name ) ; img . entry ( STRING , pdf . name ( STRING ) ) ; i...
204
java-test-5518
java
What does the code initialize ?
the report criteria map with default values
private void init Criteria Map ( ) { crit Params . clear ( ) ; crit Params . put ( EGOV COUNTER OPERATOR ID , Long . value Of ( - NUM ) ) ; crit Params . put ( EGOV COUNTER ID , Long . value Of ( - NUM ) ) ; crit Params . put ( EGOV FROM DATE , new Date ( ) ) ; crit Params . put ( EGOV TO DATE , new Date ( ) ) ; crit P...
private void initCriteriaMap ( ) { critParams . clear ( ) ; critParams . put ( EGOV_COUNTER_OPERATOR_ID , Long . valueOf ( - _NUM ) ) ; critParams . put ( EGOV_COUNTER_ID , Long . valueOf ( - _NUM ) ) ; critParams . put ( EGOV_FROM_DATE , new Date ( ) ) ; critParams . put ( EGOV_TO_DATE , new Date ( ) ) ; critParams . ...
144
java-test-5519
java
What does the code create ?
a new emr master group object
private Emr Master Security Group create Emr Cluster Master Group From Request ( String namespace Cd , String cluster Definition Name , String cluster Name , List < String > group Ids ) { Emr Master Security Group emr Master Security Group = new Emr Master Security Group ( ) ; emr Master Security Group . set Namespace ...
private EmrMasterSecurityGroup createEmrClusterMasterGroupFromRequest ( String namespaceCd , String clusterDefinitionName , String clusterName , List < String > groupIds ) { EmrMasterSecurityGroup emrMasterSecurityGroup = new EmrMasterSecurityGroup ( ) ; emrMasterSecurityGroup . setNamespace ( namespaceCd ) ; emrMaster...
114
java-test-5520
java
For what purpose do they return simply ?
for success
static void rdf RDF ( XMP Meta Impl xmp , Node rdf Rdf Node ) throws XMP Exception { if ( rdf Rdf Node . has Attributes ( ) ) { rdf Node Element List ( xmp , xmp . get Root ( ) , rdf Rdf Node ) ; } else { throw new XMP Exception ( STRING , BADRDF ) ; } }
static void rdf_RDF ( XMPMetaImpl xmp , Node rdfRdfNode ) throws XMPException { if ( rdfRdfNode . hasAttributes ( ) ) { rdf_NodeElementList ( xmp , xmp . getRoot ( ) , rdfRdfNode ) ; } else { throw new XMPException ( STRING , BADRDF ) ; } }
65
java-test-5521
java
For what purpose do the adapted directory change ?
for a new one
public void swap Directory ( OC File directory , File Data Storage Manager updated Storage Manager , boolean only On Device ) { if ( updated Storage Manager != null && updated Storage Manager != m Storage Manager ) { m Storage Manager = updated Storage Manager ; m Account = Account Utils . get Current Own Cloud Account...
public void swapDirectory ( OCFile directory , FileDataStorageManager updatedStorageManager , boolean onlyOnDevice ) { if ( updatedStorageManager != null && updatedStorageManager != mStorageManager ) { mStorageManager = updatedStorageManager ; mAccount = AccountUtils . getCurrentOwnCloudAccount ( mContext ) ; } if ( mS...
182
java-test-5522
java
How did name pattern give ?
matching
public static void add Files ( final Project find Bugs Project , File clz Dir , final Pattern pat ) { if ( clz Dir . is Directory ( ) ) { clz Dir . list Files ( new File Collector ( pat , find Bugs Project ) ) ; } }
public static void addFiles ( final Project findBugsProject , File clzDir , final Pattern pat ) { if ( clzDir . isDirectory ( ) ) { clzDir . listFiles ( new FileCollector ( pat , findBugsProject ) ) ; } }
52
java-test-5523
java
What adds inside the given directory and all subdirectories ?
all the files matching given name pattern
public static void add Files ( final Project find Bugs Project , File clz Dir , final Pattern pat ) { if ( clz Dir . is Directory ( ) ) { clz Dir . list Files ( new File Collector ( pat , find Bugs Project ) ) ; } }
public static void addFiles ( final Project findBugsProject , File clzDir , final Pattern pat ) { if ( clzDir . isDirectory ( ) ) { clzDir . listFiles ( new FileCollector ( pat , findBugsProject ) ) ; } }
52
java-test-5524
java
Where do all the files matching given name pattern add ?
inside the given directory and all subdirectories
public static void add Files ( final Project find Bugs Project , File clz Dir , final Pattern pat ) { if ( clz Dir . is Directory ( ) ) { clz Dir . list Files ( new File Collector ( pat , find Bugs Project ) ) ; } }
public static void addFiles ( final Project findBugsProject , File clzDir , final Pattern pat ) { if ( clzDir . isDirectory ( ) ) { clzDir . listFiles ( new FileCollector ( pat , findBugsProject ) ) ; } }
52
java-test-5528
java
What does the code contain ?
the sub entity the given field
default boolean contains Sub Entity Attribute ( final String property Field ) { final List < String > sub Entity Attributes = get Sub Entity Attributes ( ) ; if ( sub Entity Attributes . contains ( property Field ) ) { return BOOL ; } for ( final String attribute : sub Entity Attributes ) { final String [ ] graph = att...
default boolean containsSubEntityAttribute ( final String propertyField ) { final List < String > subEntityAttributes = getSubEntityAttributes ( ) ; if ( subEntityAttributes . contains ( propertyField ) ) { return _BOOL ; } for ( final String attribute : subEntityAttributes ) { final String [ ] graph = attribute . spli...
108
java-test-5529
java
What does the code add to a dictionary named " fontlist " ?
all fonts
public int add Font Dictionary ( ) throws IO Exception { Collection < Entry > fonts = get Entries ( ) ; if ( fonts . size ( ) > NUM ) { PDF Dictionary font List = pdf . open Dictionary ( STRING ) ; for ( Iterator < Entry > i = fonts . iterator ( ) ; i . has Next ( ) ; ) { Entry e = ( Entry ) i . next ( ) ; font List . ...
public int addFontDictionary ( ) throws IOException { Collection < Entry > fonts = getEntries ( ) ; if ( fonts . size ( ) > _NUM ) { PDFDictionary fontList = pdf . openDictionary ( STRING ) ; for ( Iterator < Entry > i = fonts . iterator ( ) ; i . hasNext ( ) ; ) { Entry e = ( Entry ) i . next ( ) ; fontList . entry ( ...
124
java-test-5530
java
What do the processor surround with blockfocuseventscmd - unbockfocuseventscmd ?
the commands
public final void execute ( @ Not Null List < Finalizable Command > command List , @ Not Null Condition expired ) { synchronized ( my Lock ) { final boolean is Busy = my Command Count > NUM ; final Command Group command Group = new Command Group ( command List , expired ) ; my Command Group List . add ( command Group )...
public final void execute ( @ NotNull List < FinalizableCommand > commandList , @ NotNull Condition expired ) { synchronized ( myLock ) { final boolean isBusy = myCommandCount > _NUM ; final CommandGroup commandGroup = new CommandGroup ( commandList , expired ) ; myCommandGroupList . add ( commandGroup ) ; myCommandCou...
92
java-test-5531
java
For what purpose did it require ?
to prevent focus handling of events which is caused by the commands to be executed
public final void execute ( @ Not Null List < Finalizable Command > command List , @ Not Null Condition expired ) { synchronized ( my Lock ) { final boolean is Busy = my Command Count > NUM ; final Command Group command Group = new Command Group ( command List , expired ) ; my Command Group List . add ( command Group )...
public final void execute ( @ NotNull List < FinalizableCommand > commandList , @ NotNull Condition expired ) { synchronized ( myLock ) { final boolean isBusy = myCommandCount > _NUM ; final CommandGroup commandGroup = new CommandGroup ( commandList , expired ) ; myCommandGroupList . add ( commandGroup ) ; myCommandCou...
92
java-test-5532
java
How do the processor surround the commands ?
with blockfocuseventscmd - unbockfocuseventscmd
public final void execute ( @ Not Null List < Finalizable Command > command List , @ Not Null Condition expired ) { synchronized ( my Lock ) { final boolean is Busy = my Command Count > NUM ; final Command Group command Group = new Command Group ( command List , expired ) ; my Command Group List . add ( command Group )...
public final void execute ( @ NotNull List < FinalizableCommand > commandList , @ NotNull Condition expired ) { synchronized ( myLock ) { final boolean isBusy = myCommandCount > _NUM ; final CommandGroup commandGroup = new CommandGroup ( commandList , expired ) ; myCommandGroupList . add ( commandGroup ) ; myCommandCou...
92
java-test-5533
java
What does the code create on a freshly opened urlconnection ?
a new multipart post http request
public Client Http Request ( URL Connection connection ) throws IO Exception { this . connection = connection ; connection . set Do Output ( BOOL ) ; connection . set Do Input ( BOOL ) ; connection . set Request Property ( STRING , STRING + boundary ) ; }
public ClientHttpRequest ( URLConnection connection ) throws IOException { this . connection = connection ; connection . setDoOutput ( _BOOL ) ; connection . setDoInput ( _BOOL ) ; connection . setRequestProperty ( STRING , STRING + boundary ) ; }
51
java-test-5535
java
What does the code caculate ?
the bitmap samplesize
public final static int caculate In Sample Size ( Bitmap Factory . Options options , int rqs W , int rqs H ) { final int height = options . out Height ; final int width = options . out Width ; int in Sample Size = NUM ; if ( rqs W == NUM || rqs H == NUM ) return NUM ; if ( height > rqs H || width > rqs W ) { final int ...
public final static int caculateInSampleSize ( BitmapFactory . Options options , int rqsW , int rqsH ) { final int height = options . outHeight ; final int width = options . outWidth ; int inSampleSize = _NUM ; if ( rqsW == _NUM || rqsH == _NUM ) return _NUM ; if ( height > rqsH || width > rqsW ) { final int heightRati...
142
java-test-5538
java
What do local note which also invokes parent ?
that we remove the components ( removeall ) before taking those apart
public void dispose ( ) { if ( log . is Debug Enabled ( ) ) { log . debug ( STRING ) ; } read Changes Button . remove Item Listener ( l1 ) ; write Changes Button . remove Item Listener ( l2 ) ; read All Button . remove Item Listener ( l3 ) ; write All Button . remove Item Listener ( l4 ) ; if ( programming Pane != null...
public void dispose ( ) { if ( log . isDebugEnabled ( ) ) { log . debug ( STRING ) ; } readChangesButton . removeItemListener ( l1 ) ; writeChangesButton . removeItemListener ( l2 ) ; readAllButton . removeItemListener ( l3 ) ; writeAllButton . removeItemListener ( l4 ) ; if ( _programmingPane != null ) { _programmingP...
320
java-test-5539
java
What do we remove before taking those apart ?
the components ( removeall )
public void dispose ( ) { if ( log . is Debug Enabled ( ) ) { log . debug ( STRING ) ; } read Changes Button . remove Item Listener ( l1 ) ; write Changes Button . remove Item Listener ( l2 ) ; read All Button . remove Item Listener ( l3 ) ; write All Button . remove Item Listener ( l4 ) ; if ( programming Pane != null...
public void dispose ( ) { if ( log . isDebugEnabled ( ) ) { log . debug ( STRING ) ; } readChangesButton . removeItemListener ( l1 ) ; writeChangesButton . removeItemListener ( l2 ) ; readAllButton . removeItemListener ( l3 ) ; writeAllButton . removeItemListener ( l4 ) ; if ( _programmingPane != null ) { _programmingP...
320
java-test-5540
java
What does local invoke also ?
parent
public void dispose ( ) { if ( log . is Debug Enabled ( ) ) { log . debug ( STRING ) ; } read Changes Button . remove Item Listener ( l1 ) ; write Changes Button . remove Item Listener ( l2 ) ; read All Button . remove Item Listener ( l3 ) ; write All Button . remove Item Listener ( l4 ) ; if ( programming Pane != null...
public void dispose ( ) { if ( log . isDebugEnabled ( ) ) { log . debug ( STRING ) ; } readChangesButton . removeItemListener ( l1 ) ; writeChangesButton . removeItemListener ( l2 ) ; readAllButton . removeItemListener ( l3 ) ; writeAllButton . removeItemListener ( l4 ) ; if ( _programmingPane != null ) { _programmingP...
320
java-test-5541
java
When do we remove the components ( removeall ) ?
before taking those apart
public void dispose ( ) { if ( log . is Debug Enabled ( ) ) { log . debug ( STRING ) ; } read Changes Button . remove Item Listener ( l1 ) ; write Changes Button . remove Item Listener ( l2 ) ; read All Button . remove Item Listener ( l3 ) ; write All Button . remove Item Listener ( l4 ) ; if ( programming Pane != null...
public void dispose ( ) { if ( log . isDebugEnabled ( ) ) { log . debug ( STRING ) ; } readChangesButton . removeItemListener ( l1 ) ; writeChangesButton . removeItemListener ( l2 ) ; readAllButton . removeItemListener ( l3 ) ; writeAllButton . removeItemListener ( l4 ) ; if ( _programmingPane != null ) { _programmingP...
320
java-test-5542
java
What does the code write to the stream ?
a chunk of bytes
@ Override public void write ( byte [ ] buffer , int offset , int length ) { if ( is Closed ( ) || is Head ( ) ) { return ; } int byte Length = offset ; while ( BOOL ) { int sublen = Math . min ( length , SIZE - byte Length ) ; System . arraycopy ( buffer , offset , buffer , byte Length , sublen ) ; offset += sublen ; ...
@ Override public void write ( byte [ ] buffer , int offset , int length ) { if ( isClosed ( ) || isHead ( ) ) { return ; } int byteLength = _offset ; while ( _BOOL ) { int sublen = Math . min ( length , SIZE - byteLength ) ; System . arraycopy ( buffer , offset , _buffer , byteLength , sublen ) ; offset += sublen ; le...
122
java-test-5543
java
What does the code add to the sqlitedatabase ?
a json string representing an event with properties or a person record
public int add JSON ( JSON Object j , Table table ) { if ( ! m Db . below Mem Threshold ( ) ) { Log . e ( LOGTAG , STRING ) ; return DB OUT OF MEMORY ERROR ; } final String table Name = table . get Name ( ) ; Cursor c = null ; int count = DB UPDATE ERROR ; synchronized ( m Db ) { try { final SQ Lite Database db = m Db ...
public int addJSON ( JSONObject j , Table table ) { if ( ! mDb . belowMemThreshold ( ) ) { Log . e ( LOGTAG , STRING ) ; return DB_OUT_OF_MEMORY_ERROR ; } final String tableName = table . getName ( ) ; Cursor c = null ; int count = DB_UPDATE_ERROR ; synchronized ( mDb ) { try { final SQLiteDatabase db = mDb . getWritab...
306
java-test-5544
java
What do a json string represent ?
an event with properties or a person record
public int add JSON ( JSON Object j , Table table ) { if ( ! m Db . below Mem Threshold ( ) ) { Log . e ( LOGTAG , STRING ) ; return DB OUT OF MEMORY ERROR ; } final String table Name = table . get Name ( ) ; Cursor c = null ; int count = DB UPDATE ERROR ; synchronized ( m Db ) { try { final SQ Lite Database db = m Db ...
public int addJSON ( JSONObject j , Table table ) { if ( ! mDb . belowMemThreshold ( ) ) { Log . e ( LOGTAG , STRING ) ; return DB_OUT_OF_MEMORY_ERROR ; } final String tableName = table . getName ( ) ; Cursor c = null ; int count = DB_UPDATE_ERROR ; synchronized ( mDb ) { try { final SQLiteDatabase db = mDb . getWritab...
306
java-test-5545
java
What does this method transform into html ?
the given tool tip text
public static String transform Tool Tip Text ( final String description , final boolean add HTML Tags , final int line Length , final boolean escape Slashes , final boolean escape HTML ) { String complete Text = description . trim ( ) ; if ( escape HTML ) { complete Text = Tools . escape HTML ( complete Text ) ; } if (...
public static String transformToolTipText ( final String description , final boolean addHTMLTags , final int lineLength , final boolean escapeSlashes , final boolean escapeHTML ) { String completeText = description . trim ( ) ; if ( escapeHTML ) { completeText = Tools . escapeHTML ( completeText ) ; } if ( escapeSlashe...
306
java-test-5546
java
When are additional line breaks added ?
after ca . linelength characters
public static String transform Tool Tip Text ( final String description , final boolean add HTML Tags , final int line Length , final boolean escape Slashes , final boolean escape HTML ) { String complete Text = description . trim ( ) ; if ( escape HTML ) { complete Text = Tools . escape HTML ( complete Text ) ; } if (...
public static String transformToolTipText ( final String description , final boolean addHTMLTags , final int lineLength , final boolean escapeSlashes , final boolean escapeHTML ) { String completeText = description . trim ( ) ; if ( escapeHTML ) { completeText = Tools . escapeHTML ( completeText ) ; } if ( escapeSlashe...
306
java-test-5547
java
Where are lines splitted ?
at linebreaks
public static String transform Tool Tip Text ( final String description , final boolean add HTML Tags , final int line Length , final boolean escape Slashes , final boolean escape HTML ) { String complete Text = description . trim ( ) ; if ( escape HTML ) { complete Text = Tools . escape HTML ( complete Text ) ; } if (...
public static String transformToolTipText ( final String description , final boolean addHTMLTags , final int lineLength , final boolean escapeSlashes , final boolean escapeHTML ) { String completeText = description . trim ( ) ; if ( escapeHTML ) { completeText = Tools . escapeHTML ( completeText ) ; } if ( escapeSlashe...
306
java-test-5550
java
What should they have also ?
a child pilot tag
private void parse Entity ( Element entity Node , Vector < Entity > list ) { Entity entity = null ; String chassis = entity Node . get Attribute ( CHASSIS ) ; String model = entity Node . get Attribute ( MODEL ) ; entity = get Entity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; }...
private void parseEntity ( Element entityNode , Vector < Entity > list ) { Entity entity = null ; String chassis = entityNode . getAttribute ( CHASSIS ) ; String model = entityNode . getAttribute ( MODEL ) ; entity = getEntity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; } parseE...
601
java-test-5551
java
What will have a number of attributes such as model , chassis , type , etc ?
entity tags
private void parse Entity ( Element entity Node , Vector < Entity > list ) { Entity entity = null ; String chassis = entity Node . get Attribute ( CHASSIS ) ; String model = entity Node . get Attribute ( MODEL ) ; entity = get Entity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; }...
private void parseEntity ( Element entityNode , Vector < Entity > list ) { Entity entity = null ; String chassis = entityNode . getAttribute ( CHASSIS ) ; String model = entityNode . getAttribute ( MODEL ) ; entity = getEntity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; } parseE...
601
java-test-5552
java
What may they contain also ?
some number of location tags
private void parse Entity ( Element entity Node , Vector < Entity > list ) { Entity entity = null ; String chassis = entity Node . get Attribute ( CHASSIS ) ; String model = entity Node . get Attribute ( MODEL ) ; entity = get Entity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; }...
private void parseEntity ( Element entityNode , Vector < Entity > list ) { Entity entity = null ; String chassis = entityNode . getAttribute ( CHASSIS ) ; String model = entityNode . getAttribute ( MODEL ) ; entity = getEntity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; } parseE...
601
java-test-5553
java
What will entity tags have ?
a number of attributes such as model , chassis , type , etc
private void parse Entity ( Element entity Node , Vector < Entity > list ) { Entity entity = null ; String chassis = entity Node . get Attribute ( CHASSIS ) ; String model = entity Node . get Attribute ( MODEL ) ; entity = get Entity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; }...
private void parseEntity ( Element entityNode , Vector < Entity > list ) { Entity entity = null ; String chassis = entityNode . getAttribute ( CHASSIS ) ; String model = entityNode . getAttribute ( MODEL ) ; entity = getEntity ( chassis , model ) ; if ( entity == null ) { warning . append ( STRING ) ; return ; } parseE...
601
java-test-5554
java
What does the code bind into the given field ?
a list value
private static void bind List ( Class < ? > item Type , Object target , Field field , Parameter Access parameters ) { String field Name = field . get Name ( ) ; Class < ? > field Type = field . get Type ( ) ; List < Parameter Access > item Parameters = create Item Parameters ( item Type , parameters ) ; Object array = ...
private static void bindList ( Class < ? > itemType , Object target , Field field , ParameterAccess parameters ) { String fieldName = field . getName ( ) ; Class < ? > fieldType = field . getType ( ) ; List < ParameterAccess > itemParameters = createItemParameters ( itemType , parameters ) ; Object array = Array . newI...
208
java-test-5555
java
What do this method require ?
a pushbackinputstream with a buffer at least as big as the marker it is seeking for
static long advance Past Next Sync Marker ( Pushback Input Stream stream , byte [ ] sync Marker ) throws IO Exception { Seeker seeker = new Seeker ( sync Marker ) ; byte [ ] sync Buffer = new byte [ sync Marker . length ] ; long total Bytes Consumed = NUM ; int mark = - NUM ; int read ; do { read = stream . read ( sync...
static long advancePastNextSyncMarker ( PushbackInputStream stream , byte [ ] syncMarker ) throws IOException { Seeker seeker = new Seeker ( syncMarker ) ; byte [ ] syncBuffer = new byte [ syncMarker . length ] ; long totalBytesConsumed = _NUM ; int mark = - _NUM ; int read ; do { read = stream . read ( syncBuffer ) ; ...
166
java-test-5556
java
What does a thrift audit log entry represent ?
renaming a table
public static void insert Thrift Rename Table Log Entry ( org . apache . hadoop . hive . metastore . api . Table old Table , org . apache . hadoop . hive . metastore . api . Table new Table , Hive Conf hive Conf ) throws Exception { final Metastore Audit Log Listener metastore Audit Log Listener = new Metastore Audit L...
public static void insertThriftRenameTableLogEntry ( org . apache . hadoop . hive . metastore . api . Table oldTable , org . apache . hadoop . hive . metastore . api . Table newTable , HiveConf hiveConf ) throws Exception { final MetastoreAuditLogListener metastoreAuditLogListener = new MetastoreAuditLogListener ( hive...
104
java-test-5557
java
What does the code insert ?
a thrift audit log entry that represents renaming a table
public static void insert Thrift Rename Table Log Entry ( org . apache . hadoop . hive . metastore . api . Table old Table , org . apache . hadoop . hive . metastore . api . Table new Table , Hive Conf hive Conf ) throws Exception { final Metastore Audit Log Listener metastore Audit Log Listener = new Metastore Audit L...
public static void insertThriftRenameTableLogEntry ( org . apache . hadoop . hive . metastore . api . Table oldTable , org . apache . hadoop . hive . metastore . api . Table newTable , HiveConf hiveConf ) throws Exception { final MetastoreAuditLogListener metastoreAuditLogListener = new MetastoreAuditLogListener ( hive...
104
java-test-5558
java
What represents renaming a table ?
a thrift audit log entry
public static void insert Thrift Rename Table Log Entry ( org . apache . hadoop . hive . metastore . api . Table old Table , org . apache . hadoop . hive . metastore . api . Table new Table , Hive Conf hive Conf ) throws Exception { final Metastore Audit Log Listener metastore Audit Log Listener = new Metastore Audit L...
public static void insertThriftRenameTableLogEntry ( org . apache . hadoop . hive . metastore . api . Table oldTable , org . apache . hadoop . hive . metastore . api . Table newTable , HiveConf hiveConf ) throws Exception { final MetastoreAuditLogListener metastoreAuditLogListener = new MetastoreAuditLogListener ( hive...
104
java-test-5560
java
What does the code grab ?
the last token of the last line that contains the given key
public static String grab Last In Line Passed Score ( String text , String key ) throws IO Exception { int score Pos = text . index Of ( STRING ) ; if ( score Pos == - NUM ) throw new IO Exception ( STRING ) ; int end = text . last Index Of ( key ) ; if ( end == - NUM ) throw new IO Exception ( STRING + key + STRING ) ...
public static String grabLastInLinePassedScore ( String text , String key ) throws IOException { int scorePos = text . indexOf ( STRING ) ; if ( scorePos == - _NUM ) throw new IOException ( STRING ) ; int end = text . lastIndexOf ( key ) ; if ( end == - _NUM ) throw new IOException ( STRING + key + STRING ) ; if ( end ...
196
java-test-5561
java
When did the implication rules list ?
in sec . 18 . 3 . 1
private Type Constraint combine ( Type Bound bound I , Type Bound bound J ) { switch ( bound I . variance ) { case INV : switch ( bound J . variance ) { case INV : return combine Inv Inv ( bound I , bound J ) ; case CO : case CONTRA : return combine Inv Var ( bound I , bound J ) ; } break ; case CO : switch ( bound J ....
private TypeConstraint combine ( TypeBound boundI , TypeBound boundJ ) { switch ( boundI . variance ) { case INV : switch ( boundJ . variance ) { case INV : return combineInvInv ( boundI , boundJ ) ; case CO : case CONTRA : return combineInvVar ( boundI , boundJ ) ; } break ; case CO : switch ( boundJ . variance ) { ca...
204
java-test-5562
java
How does this method embody the implication rules listed in sec . 18 . 3 . 1 ( the other implication rules in jls8 take as input capture conversion constraints ) ?
in terms of jls8
private Type Constraint combine ( Type Bound bound I , Type Bound bound J ) { switch ( bound I . variance ) { case INV : switch ( bound J . variance ) { case INV : return combine Inv Inv ( bound I , bound J ) ; case CO : case CONTRA : return combine Inv Var ( bound I , bound J ) ; } break ; case CO : switch ( bound J ....
private TypeConstraint combine ( TypeBound boundI , TypeBound boundJ ) { switch ( boundI . variance ) { case INV : switch ( boundJ . variance ) { case INV : return combineInvInv ( boundI , boundJ ) ; case CO : case CONTRA : return combineInvVar ( boundI , boundJ ) ; } break ; case CO : switch ( boundJ . variance ) { ca...
204
java-test-5563
java
What does this method embody in terms of jls8 ?
the implication rules listed in sec . 18 . 3 . 1 ( the other implication rules in jls8 take as input capture conversion constraints )
private Type Constraint combine ( Type Bound bound I , Type Bound bound J ) { switch ( bound I . variance ) { case INV : switch ( bound J . variance ) { case INV : return combine Inv Inv ( bound I , bound J ) ; case CO : case CONTRA : return combine Inv Var ( bound I , bound J ) ; } break ; case CO : switch ( bound J ....
private TypeConstraint combine ( TypeBound boundI , TypeBound boundJ ) { switch ( boundI . variance ) { case INV : switch ( boundJ . variance ) { case INV : return combineInvInv ( boundI , boundJ ) ; case CO : case CONTRA : return combineInvVar ( boundI , boundJ ) ; } break ; case CO : switch ( boundJ . variance ) { ca...
204
java-test-5564
java
What does the code divide into sentences in a vector ?
the example text of a voice
public static Vector < String > process Voice Example Text ( String text ) { String Tokenizer st = new String Tokenizer ( text , STRING ) ; Vector < String > sentences = null ; while ( st . has More Tokens ( ) ) { if ( sentences == null ) sentences = new Vector < String > ( ) ; sentences . add ( st . next Token ( ) ) ;...
public static Vector < String > processVoiceExampleText ( String text ) { StringTokenizer st = new StringTokenizer ( text , STRING ) ; Vector < String > sentences = null ; while ( st . hasMoreTokens ( ) ) { if ( sentences == null ) sentences = new Vector < String > ( ) ; sentences . add ( st . nextToken ( ) ) ; } retur...
80
java-test-5565
java
What does the code generate ?
a delegate method - static or instance
static void generate Method ( String class Name , String fq Class Name , String method Name , String return Type , String [ ] param Types , int modifiers , Class Writer cw ) { String [ ] exceptions = null ; boolean is Static = ( modifiers & ACC STATIC ) != NUM ; if ( return Type == null ) return Type = OBJECT ; String ...
static void generateMethod ( String className , String fqClassName , String methodName , String returnType , String [ ] paramTypes , int modifiers , ClassWriter cw ) { String [ ] exceptions = null ; boolean isStatic = ( modifiers & ACC_STATIC ) != _NUM ; if ( returnType == null ) returnType = OBJECT ; String methodDesc...
365
java-test-5566
java
What do the generated code invoke ?
the static or instance namespace invokemethod ( ) method
static void generate Method ( String class Name , String fq Class Name , String method Name , String return Type , String [ ] param Types , int modifiers , Class Writer cw ) { String [ ] exceptions = null ; boolean is Static = ( modifiers & ACC STATIC ) != NUM ; if ( return Type == null ) return Type = OBJECT ; String ...
static void generateMethod ( String className , String fqClassName , String methodName , String returnType , String [ ] paramTypes , int modifiers , ClassWriter cw ) { String [ ] exceptions = null ; boolean isStatic = ( modifiers & ACC_STATIC ) != _NUM ; if ( returnType == null ) returnType = OBJECT ; String methodDesc...
365
java-test-5567
java
What does the generated code pack into an object array ?
the method arguments
static void generate Method ( String class Name , String fq Class Name , String method Name , String return Type , String [ ] param Types , int modifiers , Class Writer cw ) { String [ ] exceptions = null ; boolean is Static = ( modifiers & ACC STATIC ) != NUM ; if ( return Type == null ) return Type = OBJECT ; String ...
static void generateMethod ( String className , String fqClassName , String methodName , String returnType , String [ ] paramTypes , int modifiers , ClassWriter cw ) { String [ ] exceptions = null ; boolean isStatic = ( modifiers & ACC_STATIC ) != _NUM ; if ( returnType == null ) returnType = OBJECT ; String methodDesc...
365
java-test-5568
java
How do primitive types wrap ?
in bsh . primitive
static void generate Method ( String class Name , String fq Class Name , String method Name , String return Type , String [ ] param Types , int modifiers , Class Writer cw ) { String [ ] exceptions = null ; boolean is Static = ( modifiers & ACC STATIC ) != NUM ; if ( return Type == null ) return Type = OBJECT ; String ...
static void generateMethod ( String className , String fqClassName , String methodName , String returnType , String [ ] paramTypes , int modifiers , ClassWriter cw ) { String [ ] exceptions = null ; boolean isStatic = ( modifiers & ACC_STATIC ) != _NUM ; if ( returnType == null ) returnType = OBJECT ; String methodDesc...
365
java-test-5569
java
In which direction can we move ?
across this way
@ Override public byte [ ] serialize To Byte Array ( final Set < String > fonts Already On Client ) throws IO Exception { final Byte Array Output Stream bos = new Byte Array Output Stream ( ) ; bos . write ( NUM ) ; bos . write ( NUM ) ; bos . write ( raw Page Number ) ; text color . trim ( ) ; stroke color . trim ( ) ...
@ Override public byte [ ] serializeToByteArray ( final Set < String > fontsAlreadyOnClient ) throws IOException { final ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; bos . write ( _NUM ) ; bos . write ( _NUM ) ; bos . write ( rawPageNumber ) ; text_color . trim ( ) ; stroke_color . trim ( ) ; fill_color ...
805
java-test-5570
java
What does the code create ?
a string containing the encoded form of the projectfiltersettings
public String to Encoded String ( ) { String Builder buf = new String Builder ( ) ; buf . append ( get Min Priority ( ) ) ; buf . append ( FIELD DELIMITER ) ; for ( Iterator < String > i = active Bug Category Set . iterator ( ) ; i . has Next ( ) ; ) { buf . append ( i . next ( ) ) ; if ( i . has Next ( ) ) { buf . app...
public String toEncodedString ( ) { StringBuilder buf = new StringBuilder ( ) ; buf . append ( getMinPriority ( ) ) ; buf . append ( FIELD_DELIMITER ) ; for ( Iterator < String > i = activeBugCategorySet . iterator ( ) ; i . hasNext ( ) ; ) { buf . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) { buf . append ( LISTI...
143
java-test-5571
java
What do a string contain ?
the encoded form of the projectfiltersettings
public String to Encoded String ( ) { String Builder buf = new String Builder ( ) ; buf . append ( get Min Priority ( ) ) ; buf . append ( FIELD DELIMITER ) ; for ( Iterator < String > i = active Bug Category Set . iterator ( ) ; i . has Next ( ) ; ) { buf . append ( i . next ( ) ) ; if ( i . has Next ( ) ) { buf . app...
public String toEncodedString ( ) { StringBuilder buf = new StringBuilder ( ) ; buf . append ( getMinPriority ( ) ) ; buf . append ( FIELD_DELIMITER ) ; for ( Iterator < String > i = activeBugCategorySet . iterator ( ) ; i . hasNext ( ) ; ) { buf . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) { buf . append ( LISTI...
143
java-test-5574
java
What do we hunt if that fails if that fails ?
the swd
Input Stream locate Script File ( String path , String pkg , String name ) throws File Not Found Exception { if ( m source Locator != null ) { m source Locator Change Count = m source Locator . get Change Count ( ) ; Input Stream is = m source Locator . locate Source ( path , pkg , name ) ; if ( is != null ) return is ...
InputStream locateScriptFile ( String path , String pkg , String name ) throws FileNotFoundException { if ( m_sourceLocator != null ) { m_sourceLocatorChangeCount = m_sourceLocator . getChangeCount ( ) ; InputStream is = m_sourceLocator . locateSource ( path , pkg , name ) ; if ( is != null ) return is ; } path = path ...
260
java-test-5575
java
What do we try always ?
locating the file directly first
Input Stream locate Script File ( String path , String pkg , String name ) throws File Not Found Exception { if ( m source Locator != null ) { m source Locator Change Count = m source Locator . get Change Count ( ) ; Input Stream is = m source Locator . locate Source ( path , pkg , name ) ; if ( is != null ) return is ...
InputStream locateScriptFile ( String path , String pkg , String name ) throws FileNotFoundException { if ( m_sourceLocator != null ) { m_sourceLocatorChangeCount = m_sourceLocator . getChangeCount ( ) ; InputStream is = m_sourceLocator . locateSource ( path , pkg , name ) ; if ( is != null ) return is ; } path = path ...
260
java-test-5577
java
What does the code add to see if this miss anything ?
some validation
public boolean validation ( ) throws Parallel Task Invalid Exception { Parallel Task task = new Parallel Task ( ) ; target Host Meta = new Target Host Meta ( target Hosts ) ; task = new Parallel Task ( request Protocol , concurrency , http Meta , target Host Meta , ssh Meta , tcp Meta , udp Meta , ping Meta , null , re...
public boolean validation ( ) throws ParallelTaskInvalidException { ParallelTask task = new ParallelTask ( ) ; targetHostMeta = new TargetHostMeta ( targetHosts ) ; task = new ParallelTask ( requestProtocol , concurrency , httpMeta , targetHostMeta , sshMeta , tcpMeta , udpMeta , pingMeta , null , responseContext , rep...
128
java-test-5578
java
For what purpose does the code add some validation ?
to see if this miss anything
public boolean validation ( ) throws Parallel Task Invalid Exception { Parallel Task task = new Parallel Task ( ) ; target Host Meta = new Target Host Meta ( target Hosts ) ; task = new Parallel Task ( request Protocol , concurrency , http Meta , target Host Meta , ssh Meta , tcp Meta , udp Meta , ping Meta , null , re...
public boolean validation ( ) throws ParallelTaskInvalidException { ParallelTask task = new ParallelTask ( ) ; targetHostMeta = new TargetHostMeta ( targetHosts ) ; task = new ParallelTask ( requestProtocol , concurrency , httpMeta , targetHostMeta , sshMeta , tcpMeta , udpMeta , pingMeta , null , responseContext , rep...
128
java-test-5581
java
What does the code create ?
a popup for short_txt that will display poup_txt
public String html popup ( String short txt , String popup txt , String popup title ) { String popup = String . format ( STRING , popup Id , popup title , popup txt ) ; String txt = String . format ( STRING , popup Id ++ , short txt ) ; return txt + STRING + popup ; }
public String html_popup ( String short_txt , String popup_txt , String popup_title ) { String popup = String . format ( STRING , popupId , popup_title , popup_txt ) ; String txt = String . format ( STRING , popupId ++ , short_txt ) ; return txt + STRING + popup ; }
62
java-test-5585
java
How does the nearest enclosing element for a tree determine ?
by climbing the tree toward the root and obtaining the element for the first declaration ( variable , method , or class ) that encloses the tree
private Element nearest Enclosing Except Local ( Tree tree ) { Tree Path path = atype Factory . get Path ( tree ) ; if ( path == null ) { Element method = atype Factory . get Enclosing Method ( tree ) ; if ( method != null ) { return method ; } else { return Internal Utils . symbol ( tree ) ; } } Tree prev = null ; for...
private Element nearestEnclosingExceptLocal ( Tree tree ) { TreePath path = atypeFactory . getPath ( tree ) ; if ( path == null ) { Element method = atypeFactory . getEnclosingMethod ( tree ) ; if ( method != null ) { return method ; } else { return InternalUtils . symbol ( tree ) ; } } Tree prev = null ; for ( Tree t ...
287
java-test-5586
java
How are initializers of local variables handled ?
in a special way
private Element nearest Enclosing Except Local ( Tree tree ) { Tree Path path = atype Factory . get Path ( tree ) ; if ( path == null ) { Element method = atype Factory . get Enclosing Method ( tree ) ; if ( method != null ) { return method ; } else { return Internal Utils . symbol ( tree ) ; } } Tree prev = null ; for...
private Element nearestEnclosingExceptLocal ( Tree tree ) { TreePath path = atypeFactory . getPath ( tree ) ; if ( path == null ) { Element method = atypeFactory . getEnclosingMethod ( tree ) ; if ( method != null ) { return method ; } else { return InternalUtils . symbol ( tree ) ; } } Tree prev = null ; for ( Tree t ...
287
java-test-5587
java
In which direction do the tree climb ?
toward the root
private Element nearest Enclosing Except Local ( Tree tree ) { Tree Path path = atype Factory . get Path ( tree ) ; if ( path == null ) { Element method = atype Factory . get Enclosing Method ( tree ) ; if ( method != null ) { return method ; } else { return Internal Utils . symbol ( tree ) ; } } Tree prev = null ; for...
private Element nearestEnclosingExceptLocal ( Tree tree ) { TreePath path = atypeFactory . getPath ( tree ) ; if ( path == null ) { Element method = atypeFactory . getEnclosingMethod ( tree ) ; if ( method != null ) { return method ; } else { return InternalUtils . symbol ( tree ) ; } } Tree prev = null ; for ( Tree t ...
287
java-test-5588
java
Do it confuse with the lookbehind construct ( " ? < = " or " ? < ! " ) ?
No
static private boolean is Noncapturing Paren ( final String s , final int pos ) { final int len = s . length ( ) ; boolean is Lookbehind = BOOL ; if ( pos >= NUM && pos + NUM < len ) { final String pre = s . substring ( pos , pos + NUM ) ; is Lookbehind = pre . equals ( STRING ) || pre . equals ( STRING ) ; } return po...
static private boolean isNoncapturingParen ( final String s , final int pos ) { final int len = s . length ( ) ; boolean isLookbehind = _BOOL ; if ( pos >= _NUM && pos + _NUM < len ) { final String pre = s . substring ( pos , pos + _NUM ) ; isLookbehind = pre . equals ( STRING ) || pre . equals ( STRING ) ; } return po...
119
java-test-5589
java
What do it not confuse ?
with the lookbehind construct ( " ? < = " or " ? < ! " )
static private boolean is Noncapturing Paren ( final String s , final int pos ) { final int len = s . length ( ) ; boolean is Lookbehind = BOOL ; if ( pos >= NUM && pos + NUM < len ) { final String pre = s . substring ( pos , pos + NUM ) ; is Lookbehind = pre . equals ( STRING ) || pre . equals ( STRING ) ; } return po...
static private boolean isNoncapturingParen ( final String s , final int pos ) { final int len = s . length ( ) ; boolean isLookbehind = _BOOL ; if ( pos >= _NUM && pos + _NUM < len ) { final String pre = s . substring ( pos , pos + _NUM ) ; isLookbehind = pre . equals ( STRING ) || pre . equals ( STRING ) ; } return po...
119
java-test-5590
java
What does the code convert to a color ?
a color string such as " red " or " # nnnnnn " or " rgb ( r , g , b ) "
static Color string To Color ( String str ) { Color color ; if ( str == null ) { return null ; } if ( str . length ( ) == NUM ) color = Color . black ; else if ( str . starts With ( STRING ) ) { color = parse RGB ( str ) ; } else if ( str . char At ( NUM ) == STRING ) color = hex To Color ( str ) ; else if ( str . equa...
static Color stringToColor ( String str ) { Color color ; if ( str == null ) { return null ; } if ( str . length ( ) == _NUM ) color = Color . black ; else if ( str . startsWith ( STRING ) ) { color = parseRGB ( str ) ; } else if ( str . charAt ( _NUM ) == STRING ) color = hexToColor ( str ) ; else if ( str . equalsIgn...
454
java-test-5591
java
What do the selected resource ( s ) return ?
as a list of iresource objects
public List < I Resource > choose Resources ( ) { if ( open ( ) == Window . OK ) { List < I Resource > resources = new Array List < I Resource > ( ) ; for ( Object obj : get Result ( ) ) { resources . add ( ( I Resource ) obj ) ; } return resources ; } return null ; }
public List < IResource > chooseResources ( ) { if ( open ( ) == Window . OK ) { List < IResource > resources = new ArrayList < IResource > ( ) ; for ( Object obj : getResult ( ) ) { resources . add ( ( IResource ) obj ) ; } return resources ; } return null ; }
70
java-test-5592
java
What returns as a list of iresource objects ?
the selected resource ( s )
public List < I Resource > choose Resources ( ) { if ( open ( ) == Window . OK ) { List < I Resource > resources = new Array List < I Resource > ( ) ; for ( Object obj : get Result ( ) ) { resources . add ( ( I Resource ) obj ) ; } return resources ; } return null ; }
public List < IResource > chooseResources ( ) { if ( open ( ) == Window . OK ) { List < IResource > resources = new ArrayList < IResource > ( ) ; for ( Object obj : getResult ( ) ) { resources . add ( ( IResource ) obj ) ; } return resources ; } return null ; }
70
java-test-5593
java
Where does task files create ?
in its task folder
public static void create Task File ( @ Not Null final Virtual File task Dir , @ Not Null final File resource Root , @ Not Null final String name ) throws IO Exception { String system Independent Name = File Util . to System Independent Name ( name ) ; final int index = system Independent Name . last Index Of ( STRING ...
public static void createTaskFile ( @ NotNull final VirtualFile taskDir , @ NotNull final File resourceRoot , @ NotNull final String name ) throws IOException { String systemIndependentName = FileUtil . toSystemIndependentName ( name ) ; final int index = systemIndependentName . lastIndexOf ( STRING ) ; if ( index > _N...
137
java-test-5594
java
What creates in its task folder ?
task files
public static void create Task File ( @ Not Null final Virtual File task Dir , @ Not Null final File resource Root , @ Not Null final String name ) throws IO Exception { String system Independent Name = File Util . to System Independent Name ( name ) ; final int index = system Independent Name . last Index Of ( STRING ...
public static void createTaskFile ( @ NotNull final VirtualFile taskDir , @ NotNull final File resourceRoot , @ NotNull final String name ) throws IOException { String systemIndependentName = FileUtil . toSystemIndependentName ( name ) ; final int index = systemIndependentName . lastIndexOf ( STRING ) ; if ( index > _N...
137
java-test-5596
java
What does the code close ?
the channel that ' s open to this file
public void close ( ) { Preconditions . check State ( channel != null , STRING ) ; try { if ( channel . is Open ( ) ) channel . close ( ) ; } catch ( IO Exception e ) { LOGGER . error ( STRING , path , e ) ; } finally { channel = null ; } }
public void close ( ) { Preconditions . checkState ( channel != null , STRING ) ; try { if ( channel . isOpen ( ) ) channel . close ( ) ; } catch ( IOException e ) { LOGGER . error ( STRING , path , e ) ; } finally { channel = null ; } }
63
java-test-5598
java
What does the code make ?
a binhex string representation of the current digest
@ Override public String to String ( ) { String Builder buf = new String Builder ( DIGEST SIZE * NUM ) ; for ( int nI = NUM ; nI < DIGEST SIZE ; nI ++ ) { buf . append ( HEXTAB . char At ( ( m digest Bits [ nI ] > > > NUM ) & NUM ) ) ; buf . append ( HEXTAB . char At ( m digest Bits [ nI ] & NUM ) ) ; } ; return buf . ...
@ Override public String toString ( ) { StringBuilder buf = new StringBuilder ( DIGEST_SIZE * _NUM ) ; for ( int nI = _NUM ; nI < DIGEST_SIZE ; nI ++ ) { buf . append ( HEXTAB . charAt ( ( m_digestBits [ nI ] > > > _NUM ) & _NUM ) ) ; buf . append ( HEXTAB . charAt ( m_digestBits [ nI ] & _NUM ) ) ; } ; return buf . to...
96
java-test-5599
java
How does a bit of json space save ?
by using integers to represent uuids that are exactly 36 consist of an integer followed by a string of " a " s
private static Object compress Uuid ( String uuid ) { Matcher matcher = COMPRESSIBLE UUID . matcher ( uuid ) ; if ( uuid . length ( ) == NUM && matcher . matches ( ) ) { return Integer . value Of ( matcher . group ( NUM ) ) ; } return uuid ; }
private static Object compressUuid ( String uuid ) { Matcher matcher = COMPRESSIBLE_UUID . matcher ( uuid ) ; if ( uuid . length ( ) == _NUM && matcher . matches ( ) ) { return Integer . valueOf ( matcher . group ( _NUM ) ) ; } return uuid ; }
57
java-test-5600
java
What do integers use ?
to represent uuids that are exactly 36
private static Object compress Uuid ( String uuid ) { Matcher matcher = COMPRESSIBLE UUID . matcher ( uuid ) ; if ( uuid . length ( ) == NUM && matcher . matches ( ) ) { return Integer . value Of ( matcher . group ( NUM ) ) ; } return uuid ; }
private static Object compressUuid ( String uuid ) { Matcher matcher = COMPRESSIBLE_UUID . matcher ( uuid ) ; if ( uuid . length ( ) == _NUM && matcher . matches ( ) ) { return Integer . valueOf ( matcher . group ( _NUM ) ) ; } return uuid ; }
57
java-test-5601
java
What do integers represent ?
uuids that are exactly 36 consist of an integer followed by a string of " a " s
private static Object compress Uuid ( String uuid ) { Matcher matcher = COMPRESSIBLE UUID . matcher ( uuid ) ; if ( uuid . length ( ) == NUM && matcher . matches ( ) ) { return Integer . value Of ( matcher . group ( NUM ) ) ; } return uuid ; }
private static Object compressUuid ( String uuid ) { Matcher matcher = COMPRESSIBLE_UUID . matcher ( uuid ) ; if ( uuid . length ( ) == _NUM && matcher . matches ( ) ) { return Integer . valueOf ( matcher . group ( _NUM ) ) ; } return uuid ; }
57
java-test-5602
java
What do dex repack ?
to jar
private static boolean extract Dex To Jar ( Zip File zip File , Zip Entry entry File , File extract To , String target Md 5 ) throws IO Exception { int num Attempts = NUM ; boolean is Extraction Successful = BOOL ; while ( num Attempts < MAX EXTRACT ATTEMPTS && ! is Extraction Successful ) { num Attempts ++ ; File Outp...
private static boolean extractDexToJar ( ZipFile zipFile , ZipEntry entryFile , File extractTo , String targetMd5 ) throws IOException { int numAttempts = _NUM ; boolean isExtractionSuccessful = _BOOL ; while ( numAttempts < MAX_EXTRACT_ATTEMPTS && ! isExtractionSuccessful ) { numAttempts ++ ; FileOutputStream fos = ne...
353
java-test-5603
java
What repacks to jar ?
dex
private static boolean extract Dex To Jar ( Zip File zip File , Zip Entry entry File , File extract To , String target Md 5 ) throws IO Exception { int num Attempts = NUM ; boolean is Extraction Successful = BOOL ; while ( num Attempts < MAX EXTRACT ATTEMPTS && ! is Extraction Successful ) { num Attempts ++ ; File Outp...
private static boolean extractDexToJar ( ZipFile zipFile , ZipEntry entryFile , File extractTo , String targetMd5 ) throws IOException { int numAttempts = _NUM ; boolean isExtractionSuccessful = _BOOL ; while ( numAttempts < MAX_EXTRACT_ATTEMPTS && ! isExtractionSuccessful ) { numAttempts ++ ; FileOutputStream fos = ne...
353
java-test-5604
java
What does the road have ?
no inner points
public void join Roads ( Intersection intersection ) { if ( intersection . get Road Count ( ) != NUM ) throw new Illegal Argument Exception ( STRING ) ; Road road 0 = intersection . get Road ( NUM ) ; Road road 1 = intersection . get Road ( NUM ) ; if ( road 0 == road 1 ) { roads . remove ( road 1 ) ; intersections . r...
public void joinRoads ( Intersection intersection ) { if ( intersection . getRoadCount ( ) != _NUM ) throw new IllegalArgumentException ( STRING ) ; Road road0 = intersection . getRoad ( _NUM ) ; Road road1 = intersection . getRoad ( _NUM ) ; if ( road0 == road1 ) { roads . remove ( road1 ) ; intersections . remove ( i...
487
java-test-5605
java
What do they form ?
an isolated loop ( such as a racetrack )
public void join Roads ( Intersection intersection ) { if ( intersection . get Road Count ( ) != NUM ) throw new Illegal Argument Exception ( STRING ) ; Road road 0 = intersection . get Road ( NUM ) ; Road road 1 = intersection . get Road ( NUM ) ; if ( road 0 == road 1 ) { roads . remove ( road 1 ) ; intersections . r...
public void joinRoads ( Intersection intersection ) { if ( intersection . getRoadCount ( ) != _NUM ) throw new IllegalArgumentException ( STRING ) ; Road road0 = intersection . getRoad ( _NUM ) ; Road road1 = intersection . getRoad ( _NUM ) ; if ( road0 == road1 ) { roads . remove ( road1 ) ; intersections . remove ( i...
487
java-test-5606
java
What do we remove if the roads are not distinct then ?
the intersection
public void join Roads ( Intersection intersection ) { if ( intersection . get Road Count ( ) != NUM ) throw new Illegal Argument Exception ( STRING ) ; Road road 0 = intersection . get Road ( NUM ) ; Road road 1 = intersection . get Road ( NUM ) ; if ( road 0 == road 1 ) { roads . remove ( road 1 ) ; intersections . r...
public void joinRoads ( Intersection intersection ) { if ( intersection . getRoadCount ( ) != _NUM ) throw new IllegalArgumentException ( STRING ) ; Road road0 = intersection . getRoad ( _NUM ) ; Road road1 = intersection . getRoad ( _NUM ) ; if ( road0 == road1 ) { roads . remove ( road1 ) ; intersections . remove ( i...
487
java-test-5607
java
What does the code initialize ?
the tool bar settings
private void define Tool Bars ( UI Defaults d ) { d . put ( STRING , new Insets UI Resource ( NUM , NUM , NUM , NUM ) ) ; d . put ( STRING , Boolean . TRUE ) ; d . put ( STRING , new Insets UI Resource ( NUM , NUM , NUM , NUM ) ) ; d . put ( STRING , new Insets UI Resource ( NUM , NUM , NUM , NUM ) ) ; add Color ( d , ...
private void defineToolBars ( UIDefaults d ) { d . put ( STRING , new InsetsUIResource ( _NUM , _NUM , _NUM , _NUM ) ) ; d . put ( STRING , Boolean . TRUE ) ; d . put ( STRING , new InsetsUIResource ( _NUM , _NUM , _NUM , _NUM ) ) ; d . put ( STRING , new InsetsUIResource ( _NUM , _NUM , _NUM , _NUM ) ) ; addColor ( d ...
1,015
java-test-5608
java
Where does the code implement more assertions ?
in a consumer
public static void assert Throws ( Class < ? > throwable , Checked Runnable runnable , Consumer < Throwable > exception Consumer ) { boolean fail = BOOL ; try { runnable . run ( ) ; fail = BOOL ; } catch ( Throwable t ) { if ( ! throwable . is Instance ( t ) ) throw new Assertion Error ( STRING , t ) ; exception Consum...
public static void assertThrows ( Class < ? > throwable , CheckedRunnable runnable , Consumer < Throwable > exceptionConsumer ) { boolean fail = _BOOL ; try { runnable . run ( ) ; fail = _BOOL ; } catch ( Throwable t ) { if ( ! throwable . isInstance ( t ) ) throw new AssertionError ( STRING , t ) ; exceptionConsumer ....
90
java-test-5609
java
What does the code assert ?
a throwable type
public static void assert Throws ( Class < ? > throwable , Checked Runnable runnable , Consumer < Throwable > exception Consumer ) { boolean fail = BOOL ; try { runnable . run ( ) ; fail = BOOL ; } catch ( Throwable t ) { if ( ! throwable . is Instance ( t ) ) throw new Assertion Error ( STRING , t ) ; exception Consum...
public static void assertThrows ( Class < ? > throwable , CheckedRunnable runnable , Consumer < Throwable > exceptionConsumer ) { boolean fail = _BOOL ; try { runnable . run ( ) ; fail = _BOOL ; } catch ( Throwable t ) { if ( ! throwable . isInstance ( t ) ) throw new AssertionError ( STRING , t ) ; exceptionConsumer ....
90
java-test-5610
java
What does the code implement in a consumer ?
more assertions
public static void assert Throws ( Class < ? > throwable , Checked Runnable runnable , Consumer < Throwable > exception Consumer ) { boolean fail = BOOL ; try { runnable . run ( ) ; fail = BOOL ; } catch ( Throwable t ) { if ( ! throwable . is Instance ( t ) ) throw new Assertion Error ( STRING , t ) ; exception Consum...
public static void assertThrows ( Class < ? > throwable , CheckedRunnable runnable , Consumer < Throwable > exceptionConsumer ) { boolean fail = _BOOL ; try { runnable . run ( ) ; fail = _BOOL ; } catch ( Throwable t ) { if ( ! throwable . isInstance ( t ) ) throw new AssertionError ( STRING , t ) ; exceptionConsumer ....
90
java-test-5611
java
What does a heapdataoutputstream use ?
the byte array provided as its underlying bytebuffer
public Heap Data Output Stream ( byte [ ] bytes ) { int len = bytes . length ; if ( len <= NUM ) { throw new Illegal Argument Exception ( STRING ) ; } if ( len > NUM ) { this . MIN CHUNK SIZE = len ; } else { this . MIN CHUNK SIZE = NUM ; } this . buffer = Byte Buffer . wrap ( bytes ) ; this . do Not Copy = BOOL ; }
public HeapDataOutputStream ( byte [ ] bytes ) { int len = bytes . length ; if ( len <= _NUM ) { throw new IllegalArgumentException ( STRING ) ; } if ( len > _NUM ) { this . MIN_CHUNK_SIZE = len ; } else { this . MIN_CHUNK_SIZE = _NUM ; } this . buffer = ByteBuffer . wrap ( bytes ) ; this . doNotCopy = _BOOL ; }
84
java-test-5612
java
What did the code set depending on the model ?
the view options
public void config View Mode ( int state ) { switch ( state ) { case ( Viewer Surface View . NORMAL ) : set Overhang ( BOOL ) ; set Xray ( BOOL ) ; set Transparent ( BOOL ) ; break ; case ( Viewer Surface View . XRAY ) : set Overhang ( BOOL ) ; set Xray ( BOOL ) ; set Transparent ( BOOL ) ; break ; case ( Viewer Surfac...
public void configViewMode ( int state ) { switch ( state ) { case ( ViewerSurfaceView . NORMAL ) : setOverhang ( _BOOL ) ; setXray ( _BOOL ) ; setTransparent ( _BOOL ) ; break ; case ( ViewerSurfaceView . XRAY ) : setOverhang ( _BOOL ) ; setXray ( _BOOL ) ; setTransparent ( _BOOL ) ; break ; case ( ViewerSurfaceView ....
138
java-test-5615
java
What does the code obtain ?
a lock on the resource
public void lock ( final T tx , final long timeout ) throws Interrupted Exception , Deadlock Exception { if ( tx == null ) throw new Null Pointer Exception ( ) ; if ( timeout < NUM ) throw new Illegal Argument Exception ( ) ; if ( DEBUG ) log . debug ( STRING + tx + STRING + this ) ; lock . lock ( ) ; if ( DEBUG ) log ...
public void lock ( final T tx , final long timeout ) throws InterruptedException , DeadlockException { if ( tx == null ) throw new NullPointerException ( ) ; if ( timeout < _NUM ) throw new IllegalArgumentException ( ) ; if ( DEBUG ) log . debug ( STRING + tx + STRING + this ) ; lock . lock ( ) ; if ( DEBUG ) log . deb...
568
java-test-5616
java
What does the code add ?
missing application types
private void add Missing Application Types ( ) throws Upgrade Exception { for ( final Node type Node : missing Application Types ) { final Map < String , Set < String > > key Value Map = parse Attribute Value Pair Tags ( type Node ) ; final String name = get Node Attribute Value ( type Node , NAME ) ; Upgrade Progress ...
private void addMissingApplicationTypes ( ) throws UpgradeException { for ( final Node typeNode : missingApplicationTypes ) { final Map < String , Set < String > > keyValueMap = parseAttributeValuePairTags ( typeNode ) ; final String name = getNodeAttributeValue ( typeNode , NAME ) ; UpgradeProgress . reportStart ( AUD...
219
java-test-5617
java
What is the code fills with data from the main buffer ?
the scratch buffet
private void fill Scratch Buffer ( int bytes To Read ) throws IO Exception { assert ( bytes To Read <= scratch Buffer . capacity ( ) ) ; scratch Buffer . clear ( ) ; scratch Buffer . limit ( bytes To Read ) ; read ( scratch Buffer ) ; scratch Buffer . flip ( ) ; }
private void fillScratchBuffer ( int bytesToRead ) throws IOException { assert ( bytesToRead <= scratchBuffer . capacity ( ) ) ; scratchBuffer . clear ( ) ; scratchBuffer . limit ( bytesToRead ) ; read ( scratchBuffer ) ; scratchBuffer . flip ( ) ; }
60
java-test-5618
java
What not is in the buffer ?
enough data
private void fill Scratch Buffer ( int bytes To Read ) throws IO Exception { assert ( bytes To Read <= scratch Buffer . capacity ( ) ) ; scratch Buffer . clear ( ) ; scratch Buffer . limit ( bytes To Read ) ; read ( scratch Buffer ) ; scratch Buffer . flip ( ) ; }
private void fillScratchBuffer ( int bytesToRead ) throws IOException { assert ( bytesToRead <= scratchBuffer . capacity ( ) ) ; scratchBuffer . clear ( ) ; scratchBuffer . limit ( bytesToRead ) ; read ( scratchBuffer ) ; scratchBuffer . flip ( ) ; }
60
java-test-5619
java
Where does enough data not be ?
in the buffer
private void fill Scratch Buffer ( int bytes To Read ) throws IO Exception { assert ( bytes To Read <= scratch Buffer . capacity ( ) ) ; scratch Buffer . clear ( ) ; scratch Buffer . limit ( bytes To Read ) ; read ( scratch Buffer ) ; scratch Buffer . flip ( ) ; }
private void fillScratchBuffer ( int bytesToRead ) throws IOException { assert ( bytesToRead <= scratchBuffer . capacity ( ) ) ; scratchBuffer . clear ( ) ; scratchBuffer . limit ( bytesToRead ) ; read ( scratchBuffer ) ; scratchBuffer . flip ( ) ; }
60
java-test-5620
java
Does enough data be in the buffer ?
No
private void fill Scratch Buffer ( int bytes To Read ) throws IO Exception { assert ( bytes To Read <= scratch Buffer . capacity ( ) ) ; scratch Buffer . clear ( ) ; scratch Buffer . limit ( bytes To Read ) ; read ( scratch Buffer ) ; scratch Buffer . flip ( ) ; }
private void fillScratchBuffer ( int bytesToRead ) throws IOException { assert ( bytesToRead <= scratchBuffer . capacity ( ) ) ; scratchBuffer . clear ( ) ; scratchBuffer . limit ( bytesToRead ) ; read ( scratchBuffer ) ; scratchBuffer . flip ( ) ; }
60
java-test-5621
java
What does the code create ?
a gdsserverversion object
public static GDS Server Version parse Raw Version ( String version String ) throws GDS Server Version Exception { Matcher matcher = VERSION PATTERN . matcher ( version String ) ; if ( ! matcher . matches ( ) ) { throw new GDS Server Version Exception ( String . format ( STRING , version String ) ) ; } return new GDS S...
public static GDSServerVersion parseRawVersion ( String versionString ) throws GDSServerVersionException { Matcher matcher = VERSION_PATTERN . matcher ( versionString ) ; if ( ! matcher . matches ( ) ) { throw new GDSServerVersionException ( String . format ( STRING , versionString ) ) ; } return new GDSServerVersion (...
170
java-test-5622
java
What does the code clean from inactive player data ?
the databse
private void run Cleaning ( ) { log . info ( STRING ) ; start Time = System . current Time Millis ( ) ; int period In Days = Cleaning Config . CLEANING PERIOD ; int SECURITY MINIMUM PERIOD = NUM ; if ( period In Days > SECURITY MINIMUM PERIOD ) { delegate To Threads ( Cleaning Config . CLEANING THREADS , dao . get Inac...
private void runCleaning ( ) { log . info ( STRING ) ; startTime = System . currentTimeMillis ( ) ; int periodInDays = CleaningConfig . CLEANING_PERIOD ; int SECURITY_MINIMUM_PERIOD = _NUM ; if ( periodInDays > SECURITY_MINIMUM_PERIOD ) { delegateToThreads ( CleaningConfig . CLEANING_THREADS , dao . getInactiveAccounts...
99