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-4429
java
What can be made the rwstore ?
" shadow " allocations
public void test allocation Contexts ( ) throws IO Exception { final Journal store = ( Journal ) get Store ( ) ; try { final RW Strategy bs = ( RW Strategy ) store . get Buffer Strategy ( ) ; final RW Store rw = bs . get Store ( ) ; final I Allocation Context alloc Context 1 = rw . new Allocation Context ( BOOL ) ; fin...
public void test_allocationContexts ( ) throws IOException { final Journal store = ( Journal ) getStore ( ) ; try { final RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final RWStore rw = bs . getStore ( ) ; final IAllocationContext allocContext1 = rw . newAllocationContext ( _BOOL ) ; final IAllocation...
455
java-test-4430
java
What required to support transactions ?
the core functionality
public void test allocation Contexts ( ) throws IO Exception { final Journal store = ( Journal ) get Store ( ) ; try { final RW Strategy bs = ( RW Strategy ) store . get Buffer Strategy ( ) ; final RW Store rw = bs . get Store ( ) ; final I Allocation Context alloc Context 1 = rw . new Allocation Context ( BOOL ) ; fin...
public void test_allocationContexts ( ) throws IOException { final Journal store = ( Journal ) getStore ( ) ; try { final RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final RWStore rw = bs . getStore ( ) ; final IAllocationContext allocContext1 = rw . newAllocationContext ( _BOOL ) ; final IAllocation...
455
java-test-4431
java
What did the core functionality require ?
to support transactions
public void test allocation Contexts ( ) throws IO Exception { final Journal store = ( Journal ) get Store ( ) ; try { final RW Strategy bs = ( RW Strategy ) store . get Buffer Strategy ( ) ; final RW Store rw = bs . get Store ( ) ; final I Allocation Context alloc Context 1 = rw . new Allocation Context ( BOOL ) ; fin...
public void test_allocationContexts ( ) throws IOException { final Journal store = ( Journal ) getStore ( ) ; try { final RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final RWStore rw = bs . getStore ( ) ; final IAllocationContext allocContext1 = rw . newAllocationContext ( _BOOL ) ; final IAllocation...
455
java-test-4432
java
What being created in the rwstore within which " shadow " allocations can be made ?
a contextallocation object
public void test allocation Contexts ( ) throws IO Exception { final Journal store = ( Journal ) get Store ( ) ; try { final RW Strategy bs = ( RW Strategy ) store . get Buffer Strategy ( ) ; final RW Store rw = bs . get Store ( ) ; final I Allocation Context alloc Context 1 = rw . new Allocation Context ( BOOL ) ; fin...
public void test_allocationContexts ( ) throws IOException { final Journal store = ( Journal ) getStore ( ) ; try { final RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final RWStore rw = bs . getStore ( ) ; final IAllocationContext allocContext1 = rw . newAllocationContext ( _BOOL ) ; final IAllocation...
455
java-test-4433
java
What is deleted within the allocationcontext ?
such a shadow allocation
public void test allocation Contexts ( ) throws IO Exception { final Journal store = ( Journal ) get Store ( ) ; try { final RW Strategy bs = ( RW Strategy ) store . get Buffer Strategy ( ) ; final RW Store rw = bs . get Store ( ) ; final I Allocation Context alloc Context 1 = rw . new Allocation Context ( BOOL ) ; fin...
public void test_allocationContexts ( ) throws IOException { final Journal store = ( Journal ) getStore ( ) ; try { final RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final RWStore rw = bs . getStore ( ) ; final IAllocationContext allocContext1 = rw . newAllocationContext ( _BOOL ) ; final IAllocation...
455
java-test-4434
java
What does the code create given a sequence of bytes representing the fixed - width cross reference table line ?
a new pdfxref
public PDF Xref ( byte [ ] line ) { if ( line == null ) { id = - NUM ; generation = - NUM ; } else { id = Integer . parse Int ( new String ( line , NUM , NUM ) ) ; generation = Integer . parse Int ( new String ( line , NUM , NUM ) ) ; } compressed = BOOL ; }
public PDFXref ( byte [ ] line ) { if ( line == null ) { id = - _NUM ; generation = - _NUM ; } else { id = Integer . parseInt ( new String ( line , _NUM , _NUM ) ) ; generation = Integer . parseInt ( new String ( line , _NUM , _NUM ) ) ; } compressed = _BOOL ; }
72
java-test-4436
java
What did the timer go when ?
ping
public void action Performed ( Action Event ae ) { if ( ae . get Source ( ) == get Timer ( ) ) { change Time By ( time Increment * clock Direction , time Wrap , clock Direction < NUM ? Timer Status . UPDATE : Timer Status . FORWARD ) ; } }
public void actionPerformed ( ActionEvent ae ) { if ( ae . getSource ( ) == getTimer ( ) ) { changeTimeBy ( timeIncrement * clockDirection , timeWrap , clockDirection < _NUM ? TimerStatus . UPDATE : TimerStatus . FORWARD ) ; } }
56
java-test-4437
java
When did actionlistener interface call ?
when the timer goes ping if there isn ' t a command with the actionevent
public void action Performed ( Action Event ae ) { if ( ae . get Source ( ) == get Timer ( ) ) { change Time By ( time Increment * clock Direction , time Wrap , clock Direction < NUM ? Timer Status . UPDATE : Timer Status . FORWARD ) ; } }
public void actionPerformed ( ActionEvent ae ) { if ( ae . getSource ( ) == getTimer ( ) ) { changeTimeBy ( timeIncrement * clockDirection , timeWrap , clockDirection < _NUM ? TimerStatus . UPDATE : TimerStatus . FORWARD ) ; } }
56
java-test-4438
java
For what purpose did socket write ?
to be done sync / blocking
private final boolean use Sync Writes ( boolean force Async ) { if ( force Async ) { return BOOL ; } if ( this . async Queuing In Progress ) { return BOOL ; } if ( this . is Receiver ) { return BOOL ; } if ( ! this . preserve Order ) { return BOOL ; } if ( this . async Distribution Timeout == NUM ) { return BOOL ; } re...
private final boolean useSyncWrites ( boolean forceAsync ) { if ( forceAsync ) { return _BOOL ; } if ( this . asyncQueuingInProgress ) { return _BOOL ; } if ( this . isReceiver ) { return _BOOL ; } if ( ! this . preserveOrder ) { return _BOOL ; } if ( this . asyncDistributionTimeout == _NUM ) { return _BOOL ; } return ...
80
java-test-4439
java
What do socket write ?
to be done async / nonblocking return
private final boolean use Sync Writes ( boolean force Async ) { if ( force Async ) { return BOOL ; } if ( this . async Queuing In Progress ) { return BOOL ; } if ( this . is Receiver ) { return BOOL ; } if ( ! this . preserve Order ) { return BOOL ; } if ( this . async Distribution Timeout == NUM ) { return BOOL ; } re...
private final boolean useSyncWrites ( boolean forceAsync ) { if ( forceAsync ) { return _BOOL ; } if ( this . asyncQueuingInProgress ) { return _BOOL ; } if ( this . isReceiver ) { return _BOOL ; } if ( ! this . preserveOrder ) { return _BOOL ; } if ( this . asyncDistributionTimeout == _NUM ) { return _BOOL ; } return ...
80
java-test-4440
java
What does this static method convert into a kilobyte string grouping digits with locale - dependant thousand separator and with " kb " locale - dependant unit at the end ?
the passed in number of bytes
public static String to Kilobytes ( long bytes ) { if ( bytes < NUM ) return STRING + GENERAL UNIT KILOBYTES ; long kbytes = bytes / NUM ; if ( ( bytes & NUM ) != NUM || ( bytes > NUM && bytes < NUM ) ) kbytes ++ ; return NUMBER FORMAT 0 . format ( kbytes ) + GENERAL UNIT KILOBYTES ; }
public static String toKilobytes ( long bytes ) { if ( bytes < _NUM ) return STRING + GENERAL_UNIT_KILOBYTES ; long kbytes = bytes / _NUM ; if ( ( bytes & _NUM ) != _NUM || ( bytes > _NUM && bytes < _NUM ) ) kbytes ++ ; return NUMBER_FORMAT0 . format ( kbytes ) + GENERAL_UNIT_KILOBYTES ; }
68
java-test-4441
java
What is grouping digits ?
a kilobyte string
public static String to Kilobytes ( long bytes ) { if ( bytes < NUM ) return STRING + GENERAL UNIT KILOBYTES ; long kbytes = bytes / NUM ; if ( ( bytes & NUM ) != NUM || ( bytes > NUM && bytes < NUM ) ) kbytes ++ ; return NUMBER FORMAT 0 . format ( kbytes ) + GENERAL UNIT KILOBYTES ; }
public static String toKilobytes ( long bytes ) { if ( bytes < _NUM ) return STRING + GENERAL_UNIT_KILOBYTES ; long kbytes = bytes / _NUM ; if ( ( bytes & _NUM ) != _NUM || ( bytes > _NUM && bytes < _NUM ) ) kbytes ++ ; return NUMBER_FORMAT0 . format ( kbytes ) + GENERAL_UNIT_KILOBYTES ; }
68
java-test-4442
java
What does the code create ?
a copy of the given component and its hierarchy
private com . codename 1 . ui . Component copy Component ( com . codename 1 . ui . Component cmp ) { com . codename 1 . ui . Container cnt = builder . create Container ( res , copied Resource Name ) ; com . codename 1 . ui . Component dest = builder . find By Name ( cmp . get Name ( ) , cnt ) ; if ( dest != null && des...
private com . codename1 . ui . Component copyComponent ( com . codename1 . ui . Component cmp ) { com . codename1 . ui . Container cnt = builder . createContainer ( res , copiedResourceName ) ; com . codename1 . ui . Component dest = builder . findByName ( cmp . getName ( ) , cnt ) ; if ( dest != null && dest . getPare...
106
java-test-4443
java
What does the code create from the storable fence ?
a pending intent
private Pending Intent create Request Pending Intent ( @ Non Null String pending Intent Class Name ) { Pending Intent pending Intent = null ; try { Class class Of Pending Intent = Class . for Name ( pending Intent Class Name ) ; if ( class Of Pending Intent != null ) { Intent intent = new Intent ( m Context , class Of ...
private PendingIntent createRequestPendingIntent ( @ NonNull String pendingIntentClassName ) { PendingIntent pendingIntent = null ; try { Class classOfPendingIntent = Class . forName ( pendingIntentClassName ) ; if ( classOfPendingIntent != null ) { Intent intent = new Intent ( mContext , classOfPendingIntent ) ; pendi...
118
java-test-4444
java
What does the code create ?
a string array of host addresses from a collection of inetaddresses
public static String [ ] make Strings ( Collection < Inet Address > addrs ) { String [ ] result = new String [ addrs . size ( ) ] ; int i = NUM ; for ( Inet Address addr : addrs ) { result [ i ++ ] = addr . get Host Address ( ) ; } return result ; }
public static String [ ] makeStrings ( Collection < InetAddress > addrs ) { String [ ] result = new String [ addrs . size ( ) ] ; int i = _NUM ; for ( InetAddress addr : addrs ) { result [ i ++ ] = addr . getHostAddress ( ) ; } return result ; }
64
java-test-4446
java
How do one string operation test ?
using the string cache
void test String ( ) { String a = random String ( ) ; if ( return New ) { String b = String Utils . from Cache Or New ( a ) ; try { assert Equals ( a , b ) ; } catch ( Exception e ) { Test Base . log Error ( STRING , e ) ; } if ( a != null && a == b && a . length ( ) > NUM ) { throw new Assertion Error ( STRING + Syste...
void testString ( ) { String a = randomString ( ) ; if ( returnNew ) { String b = StringUtils . fromCacheOrNew ( a ) ; try { assertEquals ( a , b ) ; } catch ( Exception e ) { TestBase . logError ( STRING , e ) ; } if ( a != null && a == b && a . length ( ) > _NUM ) { throw new AssertionError ( STRING + System . identi...
182
java-test-4449
java
What does the code create ?
a change from each compilation unit
protected void scan Compilation Units ( final List < I Compilation Unit > us ) throws Illegal Argument Exception , Core Exception { progress Monitor . begin Task ( STRING , us . size ( ) ) ; for ( final I Compilation Unit ¢ : us ) scan Compilation Unit ( ¢ , new Sub Monitor ( progress Monitor ) ) ; progress Monitor . d...
protected void scanCompilationUnits ( final List < ICompilationUnit > us ) throws IllegalArgumentException , CoreException { progressMonitor . beginTask ( STRING , us . size ( ) ) ; for ( final ICompilationUnit ¢ : us ) scanCompilationUnit ( ¢ , newSubMonitor ( progressMonitor ) ) ; progressMonitor . done ( ) ; }
71
java-test-4450
java
What is a jar file has that is ?
protocol " jar " , " zip " , " vfszip " or " wsjar "
public static boolean is Jar URL ( URL url ) { String protocol = url . get Protocol ( ) ; return ( URL PROTOCOL JAR . equals ( protocol ) || URL PROTOCOL ZIP . equals ( protocol ) || URL PROTOCOL VFSZIP . equals ( protocol ) || URL PROTOCOL WSJAR . equals ( protocol ) ) ; }
public static boolean isJarURL ( URL url ) { String protocol = url . getProtocol ( ) ; return ( URL_PROTOCOL_JAR . equals ( protocol ) || URL_PROTOCOL_ZIP . equals ( protocol ) || URL_PROTOCOL_VFSZIP . equals ( protocol ) || URL_PROTOCOL_WSJAR . equals ( protocol ) ) ; }
61
java-test-4451
java
What makes decision for a particular screen ?
your
private static boolean is Retina ( ) { if ( System Info . is Apple Jvm ) { return has Apple Retina Device ( ) ; } if ( System Info . is Mac ) { Graphics Environment e = Graphics Environment . get Local Graphics Environment ( ) ; Graphics Device [ ] devices = e . get Screen Devices ( ) ; for ( Graphics Device device : d...
private static boolean isRetina ( ) { if ( SystemInfo . isAppleJvm ) { return hasAppleRetinaDevice ( ) ; } if ( SystemInfo . isMac ) { GraphicsEnvironment e = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ; GraphicsDevice [ ] devices = e . getScreenDevices ( ) ; for ( GraphicsDevice device : devices ) { if ( is...
95
java-test-4452
java
What do your make ?
decision for a particular screen
private static boolean is Retina ( ) { if ( System Info . is Apple Jvm ) { return has Apple Retina Device ( ) ; } if ( System Info . is Mac ) { Graphics Environment e = Graphics Environment . get Local Graphics Environment ( ) ; Graphics Device [ ] devices = e . get Screen Devices ( ) ; for ( Graphics Device device : d...
private static boolean isRetina ( ) { if ( SystemInfo . isAppleJvm ) { return hasAppleRetinaDevice ( ) ; } if ( SystemInfo . isMac ) { GraphicsEnvironment e = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ; GraphicsDevice [ ] devices = e . getScreenDevices ( ) ; for ( GraphicsDevice device : devices ) { if ( is...
95
java-test-4453
java
What does the code draw ?
the combat indicators
private void draw Combat ( final Graphics 2 D g2 d , final int x , final int y , final int width , final int height ) { Rectangle 2 D wrect = entity . get Area ( ) ; final Rectangle srect = new Rectangle ( ( int ) ( wrect . get X ( ) * I Game Screen . SIZE UNIT PIXELS ) , ( int ) ( wrect . get Y ( ) * I Game Screen . S...
private void drawCombat ( final Graphics2D g2d , final int x , final int y , final int width , final int height ) { Rectangle2D wrect = entity . getArea ( ) ; final Rectangle srect = new Rectangle ( ( int ) ( wrect . getX ( ) * IGameScreen . SIZE_UNIT_PIXELS ) , ( int ) ( wrect . getY ( ) * IGameScreen . SIZE_UNIT_PIXE...
915
java-test-4454
java
What do the task list contain ?
any other serviceidtasks associated with this task ' s service i d which were queued prior to this task
@ Override public boolean run After ( List tasks , int size ) { for ( int i = NUM ; i < size ; i ++ ) { Cache Task t = ( Cache Task ) tasks . get ( i ) ; if ( t instanceof Register Listener Task || t instanceof Lookup Task ) { Proxy Reg other Reg = t . get Proxy Reg ( ) ; if ( reg . equals ( other Reg ) ) { if ( this T...
@ Override public boolean runAfter ( List tasks , int size ) { for ( int i = _NUM ; i < size ; i ++ ) { CacheTask t = ( CacheTask ) tasks . get ( i ) ; if ( t instanceof RegisterListenerTask || t instanceof LookupTask ) { ProxyReg otherReg = t . getProxyReg ( ) ; if ( reg . equals ( otherReg ) ) { if ( thisTaskSeqN > t...
115
java-test-4455
java
When does those tasks run if the task list contains any registerlistenertasks or lookuptasks associated with this task ' s lookup service ( proxyreg ) , and if those tasks were queued prior to this task ( have lower sequence numbers ) if the task list contains any registerlistenertasks or lookuptasks associated with th...
before this task ( return true
@ Override public boolean run After ( List tasks , int size ) { for ( int i = NUM ; i < size ; i ++ ) { Cache Task t = ( Cache Task ) tasks . get ( i ) ; if ( t instanceof Register Listener Task || t instanceof Lookup Task ) { Proxy Reg other Reg = t . get Proxy Reg ( ) ; if ( reg . equals ( other Reg ) ) { if ( this T...
@ Override public boolean runAfter ( List tasks , int size ) { for ( int i = _NUM ; i < size ; i ++ ) { CacheTask t = ( CacheTask ) tasks . get ( i ) ; if ( t instanceof RegisterListenerTask || t instanceof LookupTask ) { ProxyReg otherReg = t . getProxyReg ( ) ; if ( reg . equals ( otherReg ) ) { if ( thisTaskSeqN > t...
115
java-test-4456
java
When do those tasks run if the task list contains any other serviceidtasks associated with this task ' s service i d which were queued prior to this task if the task list contains any other serviceidtasks associated with this task ' s service i d which were queued prior to this task ?
before this task
@ Override public boolean run After ( List tasks , int size ) { for ( int i = NUM ; i < size ; i ++ ) { Cache Task t = ( Cache Task ) tasks . get ( i ) ; if ( t instanceof Register Listener Task || t instanceof Lookup Task ) { Proxy Reg other Reg = t . get Proxy Reg ( ) ; if ( reg . equals ( other Reg ) ) { if ( this T...
@ Override public boolean runAfter ( List tasks , int size ) { for ( int i = _NUM ; i < size ; i ++ ) { CacheTask t = ( CacheTask ) tasks . get ( i ) ; if ( t instanceof RegisterListenerTask || t instanceof LookupTask ) { ProxyReg otherReg = t . getProxyReg ( ) ; if ( reg . equals ( otherReg ) ) { if ( thisTaskSeqN > t...
115
java-test-4457
java
What does the code generate if the token does not equal the specified character ?
a syntax error
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4458
java
What does the code expand if the token is a string ?
references to system properties
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4459
java
What does the token not equal ?
the specified character
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4460
java
Does the token equal the specified character ?
No
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4461
java
What does not equal the specified character ?
the token
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4462
java
What does the code parse ?
the next token from the stream
private void token ( char c ) throws Configuration Exception , IO Exception { int t = st . next Token ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
private void token ( char c ) throws ConfigurationException , IOException { int t = st . nextToken ( ) ; if ( t != c ) { if ( c == STRING ) { syntax ( STRING ) ; } else { syntax ( new String ( new char [ ] { STRING , c , + STRING } ) ) ; } } }
69
java-test-4463
java
For what purpose may the selection be moved ?
so that it does not intersect the faded edges
private View fill From Selection ( int selected Left , int children Left , int children Right ) { if ( DEBUG ) Log . i ( TAG , STRING + selected Left + STRING + children Left + CHILDREN RIGHT + children Right + M FIRST POSITION + m First Position ) ; final int fading Edge Length = get Horizontal Fading Edge Length ( ) ...
private View fillFromSelection ( int selectedLeft , int childrenLeft , int childrenRight ) { if ( DEBUG ) Log . i ( TAG , STRING + selectedLeft + STRING + childrenLeft + CHILDREN_RIGHT + childrenRight + M_FIRST_POSITION + mFirstPosition ) ; final int fadingEdgeLength = getHorizontalFadingEdgeLength ( ) ; final int sele...
426
java-test-4464
java
Does it intersect the faded edges ?
No
private View fill From Selection ( int selected Left , int children Left , int children Right ) { if ( DEBUG ) Log . i ( TAG , STRING + selected Left + STRING + children Left + CHILDREN RIGHT + children Right + M FIRST POSITION + m First Position ) ; final int fading Edge Length = get Horizontal Fading Edge Length ( ) ...
private View fillFromSelection ( int selectedLeft , int childrenLeft , int childrenRight ) { if ( DEBUG ) Log . i ( TAG , STRING + selectedLeft + STRING + childrenLeft + CHILDREN_RIGHT + childrenRight + M_FIRST_POSITION + mFirstPosition ) ; final int fadingEdgeLength = getHorizontalFadingEdgeLength ( ) ; final int sele...
426
java-test-4465
java
In which direction is the grid filled then ?
upwards and downwards
private View fill From Selection ( int selected Left , int children Left , int children Right ) { if ( DEBUG ) Log . i ( TAG , STRING + selected Left + STRING + children Left + CHILDREN RIGHT + children Right + M FIRST POSITION + m First Position ) ; final int fading Edge Length = get Horizontal Fading Edge Length ( ) ...
private View fillFromSelection ( int selectedLeft , int childrenLeft , int childrenRight ) { if ( DEBUG ) Log . i ( TAG , STRING + selectedLeft + STRING + childrenLeft + CHILDREN_RIGHT + childrenRight + M_FIRST_POSITION + mFirstPosition ) ; final int fadingEdgeLength = getHorizontalFadingEdgeLength ( ) ; final int sele...
426
java-test-4466
java
What does it not intersect ?
the faded edges
private View fill From Selection ( int selected Left , int children Left , int children Right ) { if ( DEBUG ) Log . i ( TAG , STRING + selected Left + STRING + children Left + CHILDREN RIGHT + children Right + M FIRST POSITION + m First Position ) ; final int fading Edge Length = get Horizontal Fading Edge Length ( ) ...
private View fillFromSelection ( int selectedLeft , int childrenLeft , int childrenRight ) { if ( DEBUG ) Log . i ( TAG , STRING + selectedLeft + STRING + childrenLeft + CHILDREN_RIGHT + childrenRight + M_FIRST_POSITION + mFirstPosition ) ; final int fadingEdgeLength = getHorizontalFadingEdgeLength ( ) ; final int sele...
426
java-test-4467
java
What does the code request ?
the supported meter types
@ Override public Collection < Serial Message > initialize ( boolean refresh ) { Array List < Serial Message > result = new Array List < Serial Message > ( ) ; if ( is Support Request Supported == BOOL && ( refresh == BOOL || initialise Done == BOOL ) && get Version ( ) > NUM ) { result . add ( get Supported Message ( ...
@ Override public Collection < SerialMessage > initialize ( boolean refresh ) { ArrayList < SerialMessage > result = new ArrayList < SerialMessage > ( ) ; if ( isSupportRequestSupported == _BOOL && ( refresh == _BOOL || initialiseDone == _BOOL ) && getVersion ( ) > _NUM ) { result . add ( getSupportedMessage ( ) ) ; } ...
76
java-test-4468
java
What does the code initialize ?
the meter command class
@ Override public Collection < Serial Message > initialize ( boolean refresh ) { Array List < Serial Message > result = new Array List < Serial Message > ( ) ; if ( is Support Request Supported == BOOL && ( refresh == BOOL || initialise Done == BOOL ) && get Version ( ) > NUM ) { result . add ( get Supported Message ( ...
@ Override public Collection < SerialMessage > initialize ( boolean refresh ) { ArrayList < SerialMessage > result = new ArrayList < SerialMessage > ( ) ; if ( isSupportRequestSupported == _BOOL && ( refresh == _BOOL || initialiseDone == _BOOL ) && getVersion ( ) > _NUM ) { result . add ( getSupportedMessage ( ) ) ; } ...
76
java-test-4469
java
What does the code inject into the destination file ?
the configured content files
private void inject Content ( Inject inject Content ) throws IO Exception , Mojo Execution Exception { Map < Pattern , File > contents = get Contents Map ( inject Content . get Contents ( ) ) ; File tmp File = io Factory . create Temporary File ( inject Content . get Destination File ( ) ) ; Buffered Reader reader = nu...
private void injectContent ( Inject injectContent ) throws IOException , MojoExecutionException { Map < Pattern , File > contents = getContentsMap ( injectContent . getContents ( ) ) ; File tmpFile = ioFactory . createTemporaryFile ( injectContent . getDestinationFile ( ) ) ; BufferedReader reader = null ; BufferedWrit...
235
java-test-4470
java
For what purpose does the code initialize the pattern ?
to match files
private void init Pattern ( ) { String Buffer pattern Template Regex = new String Buffer ( ) ; logger . debug ( STRING ) ; Matcher placeholder Matcher = get Placeholder Matcher ( ) ; logger . debug ( STRING ) ; while ( placeholder Matcher . find ( ) ) { String group = placeholder Matcher . group ( NUM ) ; if ( ! groups...
private void initPattern ( ) { StringBuffer patternTemplateRegex = new StringBuffer ( ) ; logger . debug ( STRING ) ; Matcher placeholderMatcher = getPlaceholderMatcher ( ) ; logger . debug ( STRING ) ; while ( placeholderMatcher . find ( ) ) { String group = placeholderMatcher . group ( _NUM ) ; if ( ! groups . contai...
208
java-test-4473
java
What does the glue frame contain ?
the method i d of the native method
@ Uninterruptible public static Address unwind Native Stack Frame ( Address currfp ) { if ( VM . Build For IA 32 ) { return currfp ; } Address callee fp ; Address fp = Magic . get Caller Frame Pointer ( currfp ) ; Address ip ; do { callee fp = fp ; ip = Magic . get Return Address Unchecked ( fp ) ; fp = Magic . get Cal...
@ Uninterruptible public static Address unwindNativeStackFrame ( Address currfp ) { if ( VM . BuildForIA32 ) { return currfp ; } Address callee_fp ; Address fp = Magic . getCallerFramePointer ( currfp ) ; Address ip ; do { callee_fp = fp ; ip = Magic . getReturnAddressUnchecked ( fp ) ; fp = Magic . getCallerFramePoint...
133
java-test-4474
java
For what purpose is this necessary ?
to allow retrieving the return address of the glue frame
@ Uninterruptible public static Address unwind Native Stack Frame ( Address currfp ) { if ( VM . Build For IA 32 ) { return currfp ; } Address callee fp ; Address fp = Magic . get Caller Frame Pointer ( currfp ) ; Address ip ; do { callee fp = fp ; ip = Magic . get Return Address Unchecked ( fp ) ; fp = Magic . get Cal...
@ Uninterruptible public static Address unwindNativeStackFrame ( Address currfp ) { if ( VM . BuildForIA32 ) { return currfp ; } Address callee_fp ; Address fp = Magic . getCallerFramePointer ( currfp ) ; Address ip ; do { callee_fp = fp ; ip = Magic . getReturnAddressUnchecked ( fp ) ; fp = Magic . getCallerFramePoint...
133
java-test-4475
java
What is preceding the glue frame immediately ?
the native frame
@ Uninterruptible public static Address unwind Native Stack Frame ( Address currfp ) { if ( VM . Build For IA 32 ) { return currfp ; } Address callee fp ; Address fp = Magic . get Caller Frame Pointer ( currfp ) ; Address ip ; do { callee fp = fp ; ip = Magic . get Return Address Unchecked ( fp ) ; fp = Magic . get Cal...
@ Uninterruptible public static Address unwindNativeStackFrame ( Address currfp ) { if ( VM . BuildForIA32 ) { return currfp ; } Address callee_fp ; Address fp = Magic . getCallerFramePointer ( currfp ) ; Address ip ; do { callee_fp = fp ; ip = Magic . getReturnAddressUnchecked ( fp ) ; fp = Magic . getCallerFramePoint...
133
java-test-4476
java
How do over all frames below skip stopping at the native frame immediately preceding the glue frame which contains the method i d of the native method ( this is necessary to allow retrieving the return address of the glue frame ) ?
with saved code pointers outside of heap ( c frames )
@ Uninterruptible public static Address unwind Native Stack Frame ( Address currfp ) { if ( VM . Build For IA 32 ) { return currfp ; } Address callee fp ; Address fp = Magic . get Caller Frame Pointer ( currfp ) ; Address ip ; do { callee fp = fp ; ip = Magic . get Return Address Unchecked ( fp ) ; fp = Magic . get Cal...
@ Uninterruptible public static Address unwindNativeStackFrame ( Address currfp ) { if ( VM . BuildForIA32 ) { return currfp ; } Address callee_fp ; Address fp = Magic . getCallerFramePointer ( currfp ) ; Address ip ; do { callee_fp = fp ; ip = Magic . getReturnAddressUnchecked ( fp ) ; fp = Magic . getCallerFramePoint...
133
java-test-4477
java
Where do i would the method ?
of the native method
@ Uninterruptible public static Address unwind Native Stack Frame ( Address currfp ) { if ( VM . Build For IA 32 ) { return currfp ; } Address callee fp ; Address fp = Magic . get Caller Frame Pointer ( currfp ) ; Address ip ; do { callee fp = fp ; ip = Magic . get Return Address Unchecked ( fp ) ; fp = Magic . get Cal...
@ Uninterruptible public static Address unwindNativeStackFrame ( Address currfp ) { if ( VM . BuildForIA32 ) { return currfp ; } Address callee_fp ; Address fp = Magic . getCallerFramePointer ( currfp ) ; Address ip ; do { callee_fp = fp ; ip = Magic . getReturnAddressUnchecked ( fp ) ; fp = Magic . getCallerFramePoint...
133
java-test-4478
java
How does a new headrule construct ?
by decoding the specific head tagsets
public Head Rule ( String dir , String rule ) { String [ ] tmp = P TAGSETS . split ( rule ) ; int i , size = tmp . length ; b r2 l = dir . equals ( DIR RIGHT TO LEFT ) ; a tag Sets = new Head Tag Set [ size ] ; for ( i = NUM ; i < size ; i ++ ) a tag Sets [ i ] = new Head Tag Set ( tmp [ i ] ) ; }
public HeadRule ( String dir , String rule ) { String [ ] tmp = P_TAGSETS . split ( rule ) ; int i , size = tmp . length ; b_r2l = dir . equals ( DIR_RIGHT_TO_LEFT ) ; a_tagSets = new HeadTagSet [ size ] ; for ( i = _NUM ; i < size ; i ++ ) a_tagSets [ i ] = new HeadTagSet ( tmp [ i ] ) ; }
91
java-test-4480
java
What does the query use ?
to change the server timestamp , if needed and if possible ( if the database support such a feature )
protected void apply Set Timestamp ( Long timestamp ) throws SQL Exception { if ( timestamp != null && conn . supports Control Timestamp ( ) ) { if ( timestamp . long Value ( ) != current Timestamp ) { current Timestamp = timestamp . long Value ( ) ; statement . add Batch ( conn . get Control Timestamp Query ( timestam...
protected void applySetTimestamp ( Long timestamp ) throws SQLException { if ( timestamp != null && conn . supportsControlTimestamp ( ) ) { if ( timestamp . longValue ( ) != currentTimestamp ) { currentTimestamp = timestamp . longValue ( ) ; statement . addBatch ( conn . getControlTimestampQuery ( timestamp ) ) ; } } }
70
java-test-4481
java
Where does a new array contain all the values of this vector ?
in the appropriate indices
public double [ ] array Copy ( ) { double [ ] array = new double [ length ( ) ] ; for ( Index Value iv : this ) array [ iv . get Index ( ) ] = iv . get Value ( ) ; return array ; }
public double [ ] arrayCopy ( ) { double [ ] array = new double [ length ( ) ] ; for ( IndexValue iv : this ) array [ iv . getIndex ( ) ] = iv . getValue ( ) ; return array ; }
51
java-test-4482
java
What does the code create ?
a new array that contains all the values of this vector in the appropriate indices
public double [ ] array Copy ( ) { double [ ] array = new double [ length ( ) ] ; for ( Index Value iv : this ) array [ iv . get Index ( ) ] = iv . get Value ( ) ; return array ; }
public double [ ] arrayCopy ( ) { double [ ] array = new double [ length ( ) ] ; for ( IndexValue iv : this ) array [ iv . getIndex ( ) ] = iv . getValue ( ) ; return array ; }
51
java-test-4483
java
What does a new array contain in the appropriate indices ?
all the values of this vector
public double [ ] array Copy ( ) { double [ ] array = new double [ length ( ) ] ; for ( Index Value iv : this ) array [ iv . get Index ( ) ] = iv . get Value ( ) ; return array ; }
public double [ ] arrayCopy ( ) { double [ ] array = new double [ length ( ) ] ; for ( IndexValue iv : this ) array [ iv . getIndex ( ) ] = iv . getValue ( ) ; return array ; }
51
java-test-4484
java
What does the code generate ?
a uuid key string
String generate Key ( ) throws Oracle Exception { byte [ ] data = null ; try { data = Hash Funcs . get Random ( ) ; } catch ( Exception e ) { if ( Oracle Log . is Logging Enabled ( ) ) log . warning ( e . to String ( ) ) ; } if ( data == null ) { data = fetch Guid ( ) ; } if ( data == null ) { throw SODA Utils . make E...
String generateKey ( ) throws OracleException { byte [ ] data = null ; try { data = HashFuncs . getRandom ( ) ; } catch ( Exception e ) { if ( OracleLog . isLoggingEnabled ( ) ) log . warning ( e . toString ( ) ) ; } if ( data == null ) { data = fetchGuid ( ) ; } if ( data == null ) { throw SODAUtils . makeException ( ...
113
java-test-4485
java
By how much does the code rotate the given image ?
by 180 degrees
public Image rotate 180 Degrees ( Image image , boolean maintain Opacity ) { int [ ] rgb = image . get RGB ( ) ; int [ ] new RGB = new int [ rgb . length ] ; int width = image . get Width ( ) ; int height = image . get Height ( ) ; for ( int y = NUM ; y < height ; y ++ ) { for ( int x = NUM ; x < width ; x ++ ) { int d...
public Image rotate180Degrees ( Image image , boolean maintainOpacity ) { int [ ] rgb = image . getRGB ( ) ; int [ ] newRGB = new int [ rgb . length ] ; int width = image . getWidth ( ) ; int height = image . getHeight ( ) ; for ( int y = _NUM ; y < height ; y ++ ) { for ( int x = _NUM ; x < width ; x ++ ) { int destX ...
149
java-test-4486
java
Where do the cts tests create one ?
on the test thread
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4487
java
What will surfacetexture try if one exists ?
to use the looper in the current thread
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4488
java
Why is this necessary ?
because surfacetexture will try to use the looper in the current thread if one exists , and the cts tests create one on the test thread . < p / > the wrapper propagates exceptions thrown by the worker thread back to the caller . < p / > / tests encoding of avc video from camera input . the output is saved as an mp4 fil...
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4489
java
How is the output saved ?
as an mp4 file
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4490
java
What do surfacetexture use if one exists ?
the looper in the current thread
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4491
java
What does the wrapper propagate back to the caller p / > ?
exceptions thrown by the worker thread
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4492
java
What create one on the test thread ?
the cts tests
@ Target Api ( Build . VERSION CODES . HONEYCOMB ) public void snapshot ( int camera Id ) { final int enc Width = NUM ; final int enc Height = NUM ; if ( enable . contains Key ( camera Id ) && ! enable . get ( camera Id ) ) { return ; } Camera camera = null ; synchronized ( camera Lock ) { try { camera = prepare Camera...
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void snapshot ( int cameraId ) { final int encWidth = _NUM ; final int encHeight = _NUM ; if ( enable . containsKey ( cameraId ) && ! enable . get ( cameraId ) ) { return ; } Camera camera = null ; synchronized ( cameraLock ) { try { camera = prepareCamera ( came...
311
java-test-4494
java
For what purpose does ( and retries try ( and retries as specified ?
to " ping " the specified clamd daemon to check if it is up and accepting requests
protected void ping ( Inet Address address ) throws Exception { Socket socket = null ; int ping = NUM ; for ( ; ; ) { if ( is Debug ( ) ) { log ( STRING + ping + STRING + get Max Pings ( ) + STRING + address + STRING + get Port ( ) ) ; } try { socket = new Socket ( address , get Port ( ) ) ; break ; } catch ( Connect E...
protected void ping ( InetAddress address ) throws Exception { Socket socket = null ; int ping = _NUM ; for ( ; ; ) { if ( isDebug ( ) ) { log ( STRING + ping + STRING + getMaxPings ( ) + STRING + address + STRING + getPort ( ) ) ; } try { socket = new Socket ( address , getPort ( ) ) ; break ; } catch ( ConnectExcepti...
389
java-test-4495
java
For what purpose does the specified clamd daemon ping ?
to check if it is up and accepting requests
protected void ping ( Inet Address address ) throws Exception { Socket socket = null ; int ping = NUM ; for ( ; ; ) { if ( is Debug ( ) ) { log ( STRING + ping + STRING + get Max Pings ( ) + STRING + address + STRING + get Port ( ) ) ; } try { socket = new Socket ( address , get Port ( ) ) ; break ; } catch ( Connect E...
protected void ping ( InetAddress address ) throws Exception { Socket socket = null ; int ping = _NUM ; for ( ; ; ) { if ( isDebug ( ) ) { log ( STRING + ping + STRING + getMaxPings ( ) + STRING + address + STRING + getPort ( ) ) ; } try { socket = new Socket ( address , getPort ( ) ) ; break ; } catch ( ConnectExcepti...
389
java-test-4496
java
How is the matches sort ?
according to their precedence ( that is , according to the precedence of their keys )
private List < Match < T > > sort ( final Map < String , Match < T > > possible Matches ) { List < String > keys = new Array List < > ( possible Matches . key Set ( ) ) ; Collections . sort ( keys , match Comparator ) ; List < Match < T > > matches 1 = new Array List < > ( possible Matches . size ( ) ) ; for ( String k...
private List < Match < T > > sort ( final Map < String , Match < T > > possibleMatches ) { List < String > keys = new ArrayList < > ( possibleMatches . keySet ( ) ) ; Collections . sort ( keys , matchComparator ) ; List < Match < T > > matches1 = new ArrayList < > ( possibleMatches . size ( ) ) ; for ( String key : key...
107
java-test-4497
java
For what purpose do the image size compute ?
to fit in a square
private Image Size compute Size To Fit ( float max Side ) { if ( NUM == max Side ) { return new Image Size ( NUM , NUM ) ; } Image Size resized = new Image Size ( this ) ; if ( ( this . m Width > max Side ) || ( this . m Height > max Side ) ) { double ratio X = max Side / this . m Width ; double ratio Y = max Side / th...
private ImageSize computeSizeToFit ( float maxSide ) { if ( _NUM == maxSide ) { return new ImageSize ( _NUM , _NUM ) ; } ImageSize resized = new ImageSize ( this ) ; if ( ( this . mWidth > maxSide ) || ( this . mHeight > maxSide ) ) { double ratioX = maxSide / this . mWidth ; double ratioY = maxSide / this . mHeight ; ...
184
java-test-4498
java
What does this assume ?
the next position is the size as an int
public static String to String ( Byte Buffer bb ) { byte [ ] bytes = new byte [ bb . get Int ( ) ] ; String s = STRING ; try { if ( Array Utils . is Not Empty ( bytes ) ) { bb . get ( bytes ) ; s = new String ( bytes , UTF 8 ) ; } } catch ( Exception e ) { throw new Runtime Exception ( STRING + STRING , e ) ; } return ...
public static String toString ( ByteBuffer bb ) { byte [ ] bytes = new byte [ bb . getInt ( ) ] ; String s = STRING ; try { if ( ArrayUtils . isNotEmpty ( bytes ) ) { bb . get ( bytes ) ; s = new String ( bytes , UTF8 ) ; } } catch ( Exception e ) { throw new RuntimeException ( STRING + STRING , e ) ; } return s ; }
90
java-test-4499
java
What does the code add ?
a sub button with 4 params
public Builder add Sub Button ( Context context , int drawable , int [ ] two Colors , String string ) { if ( drawables == null ) drawables = new Array List < > ( ) ; drawables . add ( Context Compat . get Drawable ( context , drawable ) ) ; if ( colors == null ) colors = new Array List < > ( ) ; colors . add ( two Colo...
public Builder addSubButton ( Context context , int drawable , int [ ] twoColors , String string ) { if ( drawables == null ) drawables = new ArrayList < > ( ) ; drawables . add ( ContextCompat . getDrawable ( context , drawable ) ) ; if ( colors == null ) colors = new ArrayList < > ( ) ; colors . add ( twoColors ) ; i...
105
java-test-4501
java
What has the specified value ?
the specified header name
protected void assert Has Header Value ( String name , String value ) { Multivalued Map < String , String > headers = get Last Received Headers ( ) ; Assert . assert Not Null ( headers ) ; List < String > values = headers . get ( name ) ; Assert . assert Not Null ( values ) ; Assert . assert True ( values . contains ( ...
protected void assertHasHeaderValue ( String name , String value ) { MultivaluedMap < String , String > headers = getLastReceivedHeaders ( ) ; Assert . assertNotNull ( headers ) ; List < String > values = headers . get ( name ) ; Assert . assertNotNull ( values ) ; Assert . assertTrue ( values . contains ( value ) ) ; ...
75
java-test-4502
java
What does the code look ?
an annotation directory offset from a class def index
public int annotation Directory Offset From Class Def Index ( int class Def Index ) { check Bounds ( class Def Index , table Of Contents . class Defs . size ) ; int position = table Of Contents . class Defs . off + ( Size Of . CLASS DEF ITEM * class Def Index ) ; position += Size Of . UINT ; position += Size Of . UINT ...
public int annotationDirectoryOffsetFromClassDefIndex ( int classDefIndex ) { checkBounds ( classDefIndex , tableOfContents . classDefs . size ) ; int position = tableOfContents . classDefs . off + ( SizeOf . CLASS_DEF_ITEM * classDefIndex ) ; position += SizeOf . UINT ; position += SizeOf . UINT ; position += SizeOf ....
103
java-test-4503
java
What does the code remove ?
an interval index todo
public void remove Interval ( final Batch Writer writer , final Temporal Interval interval , final Statement statement ) throws Mutations Rejected Exception { final Text cf = new Text ( Statement Serializer . write Context ( statement ) ) ; final Text cq Begin = new Text ( Key Parts . CQ BEGIN ) ; final Text cq End = n...
public void removeInterval ( final BatchWriter writer , final TemporalInterval interval , final Statement statement ) throws MutationsRejectedException { final Text cf = new Text ( StatementSerializer . writeContext ( statement ) ) ; final Text cqBegin = new Text ( KeyParts . CQ_BEGIN ) ; final Text cqEnd = new Text ( ...
186
java-test-4504
java
What does the code initialize ?
the zk components
private void init Components ( ) { label Value = new Label ( ) ; label Value . set Value ( Util . clean Amp ( Msg . translate ( Env . get Ctx ( ) , STRING ) ) ) ; label Name = new Label ( ) ; label Name . set Value ( Util . clean Amp ( Msg . translate ( Env . get Ctx ( ) , STRING ) ) ) ; label Contact = new Label ( ) ;...
private void initComponents ( ) { labelValue = new Label ( ) ; labelValue . setValue ( Util . cleanAmp ( Msg . translate ( Env . getCtx ( ) , STRING ) ) ) ; labelName = new Label ( ) ; labelName . setValue ( Util . cleanAmp ( Msg . translate ( Env . getCtx ( ) , STRING ) ) ) ; labelContact = new Label ( ) ; labelContac...
658
java-test-4505
java
What does the code remove ?
beginning which is path to ownload data folder
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4506
java
Where does fullpath not start ?
with that folder
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4507
java
Does fullpath start with that folder ?
No
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4508
java
What does the code take ?
a full path to owncloud file
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4509
java
How is fullpath is returned if fullpath does not start with that folder ?
as is
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4510
java
What does not start with that folder ?
fullpath
public static final String remove Data Folder Path ( String full Path ) { File sd Card = Environment . get External Storage Directory ( ) ; String data Folder Path = sd Card . get Absolute Path ( ) + STRING + Main App . get Data Folder ( ) + STRING ; if ( full Path . index Of ( data Folder Path ) == NUM ) { return full...
public static final String removeDataFolderPath ( String fullPath ) { File sdCard = Environment . getExternalStorageDirectory ( ) ; String dataFolderPath = sdCard . getAbsolutePath ( ) + STRING + MainApp . getDataFolder ( ) + STRING ; if ( fullPath . indexOf ( dataFolderPath ) == _NUM ) { return fullPath . substring ( ...
91
java-test-4511
java
What were introduced in more recent versions of the asm api ?
elements
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4512
java
Where were elements introduced ?
in more recent versions of the asm api
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4513
java
What do this node , and all its nodes recursively , not contain ?
elements that were introduced in more recent versions of the asm api than the given version
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4514
java
What does this methods check ?
that this node , and all its nodes recursively , do not contain elements that were introduced in more recent versions of the asm api than the given version
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4515
java
Do this node , and all its nodes recursively , contain elements that were introduced in more recent versions of the asm api than the given version ?
No
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4516
java
What do not contain elements that were introduced in more recent versions of the asm api than the given version ?
this node , and all its nodes recursively ,
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4517
java
What checks that this node , and all its nodes recursively , do not contain elements that were introduced in more recent versions of the asm api than the given version ?
this methods
public void check ( final int api ) { if ( api == Opcodes . ASM 4 ) { if ( visible Type Annotations != null && visible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } if ( invisible Type Annotations != null && invisible Type Annotations . size ( ) > NUM ) { throw new Runtime Exception ( ) ; } ...
public void check ( final int api ) { if ( api == Opcodes . ASM4 ) { if ( visibleTypeAnnotations != null && visibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } if ( invisibleTypeAnnotations != null && invisibleTypeAnnotations . size ( ) > _NUM ) { throw new RuntimeException ( ) ; } } }
75
java-test-4519
java
For what purpose do a new near - real - time reader open new nrt point ?
to make the changes visible to searching . returns true if there were changes
public boolean flush And Refresh ( ) throws IO Exception { message ( STRING ) ; Set < String > completed Merge Files ; synchronized ( finished Merged Files ) { completed Merge Files = Collections . unmodifiable Set ( new Hash Set < > ( finished Merged Files ) ) ; } mgr . maybe Refresh Blocking ( ) ; boolean result = se...
public boolean flushAndRefresh ( ) throws IOException { message ( STRING ) ; Set < String > completedMergeFiles ; synchronized ( finishedMergedFiles ) { completedMergeFiles = Collections . unmodifiableSet ( new HashSet < > ( finishedMergedFiles ) ) ; } mgr . maybeRefreshBlocking ( ) ; boolean result = setCurrentInfos (...
149
java-test-4520
java
How does the target map update ?
with the token / counts
private void add Token Occurrences ( Reader stream , Map < String , Integer > target ) throws java . io . IO Exception { String token ; String header = STRING ; while ( ( token = next Token ( stream ) ) != null ) { boolean ending Line = BOOL ; if ( token . length ( ) > NUM && token . char At ( token . length ( ) - NUM ...
private void addTokenOccurrences ( Reader stream , Map < String , Integer > target ) throws java . io . IOException { String token ; String header = STRING ; while ( ( token = nextToken ( stream ) ) != null ) { boolean endingLine = _BOOL ; if ( token . length ( ) > _NUM && token . charAt ( token . length ( ) - _NUM ) =...
244
java-test-4523
java
What does message provide ?
notice that the operator has started execution and will consume some specific number of binding set chunks
final protected void start Op ( final I Start Op Message msg ) { if ( ! controller ) throw new Unsupported Operation Exception ( ERR NOT CONTROLLER ) ; if ( msg == null ) throw new Illegal Argument Exception ( ) ; if ( ! query Id . equals ( msg . get Query Id ( ) ) ) throw new Illegal Argument Exception ( ) ; lock . lo...
final protected void startOp ( final IStartOpMessage msg ) { if ( ! controller ) throw new UnsupportedOperationException ( ERR_NOT_CONTROLLER ) ; if ( msg == null ) throw new IllegalArgumentException ( ) ; if ( ! queryId . equals ( msg . getQueryId ( ) ) ) throw new IllegalArgumentException ( ) ; lock . lock ( ) ; try ...
149
java-test-4524
java
When is this method called ?
when new node receives topology from coordinator
public void restore Topology ( Iterable < Tcp Discovery Node > nodes , long top Ver ) { assert ! F . is Empty ( nodes ) ; assert top Ver > NUM ; rw Lock . write Lock ( ) . lock ( ) ; try { loc Node . internal Order ( top Ver ) ; clear ( ) ; boolean first Add = BOOL ; for ( Tcp Discovery Node node : nodes ) { if ( nodes...
public void restoreTopology ( Iterable < TcpDiscoveryNode > nodes , long topVer ) { assert ! F . isEmpty ( nodes ) ; assert topVer > _NUM ; rwLock . writeLock ( ) . lock ( ) ; try { locNode . internalOrder ( topVer ) ; clear ( ) ; boolean firstAdd = _BOOL ; for ( TcpDiscoveryNode node : nodes ) { if ( nodesMap . contai...
190
java-test-4525
java
When does nodes initialize also ?
last update time
public void restore Topology ( Iterable < Tcp Discovery Node > nodes , long top Ver ) { assert ! F . is Empty ( nodes ) ; assert top Ver > NUM ; rw Lock . write Lock ( ) . lock ( ) ; try { loc Node . internal Order ( top Ver ) ; clear ( ) ; boolean first Add = BOOL ; for ( Tcp Discovery Node node : nodes ) { if ( nodes...
public void restoreTopology ( Iterable < TcpDiscoveryNode > nodes , long topVer ) { assert ! F . isEmpty ( nodes ) ; assert topVer > _NUM ; rwLock . writeLock ( ) . lock ( ) ; try { locNode . internalOrder ( topVer ) ; clear ( ) ; boolean firstAdd = _BOOL ; for ( TcpDiscoveryNode node : nodes ) { if ( nodesMap . contai...
190
java-test-4526
java
What did new node receive from coordinator when ?
topology
public void restore Topology ( Iterable < Tcp Discovery Node > nodes , long top Ver ) { assert ! F . is Empty ( nodes ) ; assert top Ver > NUM ; rw Lock . write Lock ( ) . lock ( ) ; try { loc Node . internal Order ( top Ver ) ; clear ( ) ; boolean first Add = BOOL ; for ( Tcp Discovery Node node : nodes ) { if ( nodes...
public void restoreTopology ( Iterable < TcpDiscoveryNode > nodes , long topVer ) { assert ! F . isEmpty ( nodes ) ; assert topVer > _NUM ; rwLock . writeLock ( ) . lock ( ) ; try { locNode . internalOrder ( topVer ) ; clear ( ) ; boolean firstAdd = _BOOL ; for ( TcpDiscoveryNode node : nodes ) { if ( nodesMap . contai...
190
java-test-4527
java
What are remote in this case ?
all nodes received
public void restore Topology ( Iterable < Tcp Discovery Node > nodes , long top Ver ) { assert ! F . is Empty ( nodes ) ; assert top Ver > NUM ; rw Lock . write Lock ( ) . lock ( ) ; try { loc Node . internal Order ( top Ver ) ; clear ( ) ; boolean first Add = BOOL ; for ( Tcp Discovery Node node : nodes ) { if ( nodes...
public void restoreTopology ( Iterable < TcpDiscoveryNode > nodes , long topVer ) { assert ! F . isEmpty ( nodes ) ; assert topVer > _NUM ; rwLock . writeLock ( ) . lock ( ) ; try { locNode . internalOrder ( topVer ) ; clear ( ) ; boolean firstAdd = _BOOL ; for ( TcpDiscoveryNode node : nodes ) { if ( nodesMap . contai...
190
java-test-4528
java
For what purpose do discovery perform ?
for a storage provider
public Driver Task discover Storage Provider ( Storage Provider storage Provider , List < Storage System > storage Systems ) { Dell SC Driver Task task = new Dell SC Driver Task ( STRING ) ; try { LOG . info ( STRING , storage Provider . get Provider Host ( ) , storage Provider . get Port Number ( ) , storage Provider ...
public DriverTask discoverStorageProvider ( StorageProvider storageProvider , List < StorageSystem > storageSystems ) { DellSCDriverTask task = new DellSCDriverTask ( STRING ) ; try { LOG . info ( STRING , storageProvider . getProviderHost ( ) , storageProvider . getPortNumber ( ) , storageProvider . getUsername ( ) ) ...
360
java-test-4529
java
What does the code create ?
the gmapsfx model polyline
public void create Underlying ( ) { if ( options != null ) { options . create Underlying ( ) ; if ( Platform . is Fx Application Thread ( ) ) { line = new com . lynden . gmapsfx . shapes . Polyline ( options . convert ( ) ) ; } } }
public void createUnderlying ( ) { if ( options != null ) { options . createUnderlying ( ) ; if ( Platform . isFxApplicationThread ( ) ) { line = new com . lynden . gmapsfx . shapes . Polyline ( options . convert ( ) ) ; } } }
56
java-test-4533
java
What does the code redo if any has been performed ?
the last action
public void redo ( ) { try { if ( undo Manager . can Redo ( ) ) { undo Manager . redo ( ) ; for ( Key Listener kl : get Key Listeners ( ) ) { kl . key Typed ( null ) ; kl . key Released ( null ) ; } } } catch ( Cannot Redo Exception e ) { } }
public void redo ( ) { try { if ( undoManager . canRedo ( ) ) { undoManager . redo ( ) ; for ( KeyListener kl : getKeyListeners ( ) ) { kl . keyTyped ( null ) ; kl . keyReleased ( null ) ; } } } catch ( CannotRedoException e ) { } }
68
java-test-4534
java
What does the code separate into an input and output list ?
the recipe
private void add Final ( Object [ ] stacks ) { Object [ ] input = new Object [ input Size ] , output = new Object [ output Size ] ; for ( int i = NUM ; i < stacks . length ; i ++ ) { if ( i < input Size ) { input [ i ] = stacks [ i ] ; } else if ( ! ( i - input Size > output Size ) ) { output [ i - input Size ] = stack...
private void addFinal ( Object [ ] stacks ) { Object [ ] input = new Object [ inputSize ] , output = new Object [ outputSize ] ; for ( int i = _NUM ; i < stacks . length ; i ++ ) { if ( i < inputSize ) { input [ i ] = stacks [ i ] ; } else if ( ! ( i - inputSize > outputSize ) ) { output [ i - inputSize ] = stacks [ i ...
118
java-test-4536
java
What does the code compute ?
the depth of the graph
protected int max Depth ( Layout . Node node ) { int depth = NUM ; for ( int i = NUM ; i < node . num Children ( ) ; i ++ ) { Layout . Node child = node . get Child ( i ) ; depth = Math . max ( depth , max Depth ( child ) ) ; } return depth + NUM ; }
protected int maxDepth ( Layout . Node node ) { int depth = _NUM ; for ( int i = _NUM ; i < node . numChildren ( ) ; i ++ ) { Layout . Node child = node . getChild ( i ) ; depth = Math . max ( depth , maxDepth ( child ) ) ; } return depth + _NUM ; }
71
java-test-4537
java
What does the code provide ?
a string representation of whether this connection is closed or not
private String liveness ( ) { boolean is Closed = BOOL ; try { if ( is Closed ( ) ) { is Closed = BOOL ; } } catch ( SQL Exception s ) { is Closed = BOOL ; } if ( is Closed ) { return STRING ; } return STRING ; }
private String liveness ( ) { boolean isClosed = _BOOL ; try { if ( isClosed ( ) ) { isClosed = _BOOL ; } } catch ( SQLException s ) { isClosed = _BOOL ; } if ( isClosed ) { return STRING ; } return STRING ; }
56
java-test-4539
java
Does another vm write the exact same contents ?
No
private boolean write Jar Bytes To File ( final File file , final byte [ ] jar Bytes ) { final boolean is Debug Enabled = logger . is Debug Enabled ( ) ; try { if ( file . create New File ( ) ) { if ( is Debug Enabled ) { logger . debug ( STRING , file . get Absolute Path ( ) ) ; } final Output Stream out Stream = new ...
private boolean writeJarBytesToFile ( final File file , final byte [ ] jarBytes ) { final boolean isDebugEnabled = logger . isDebugEnabled ( ) ; try { if ( file . createNewFile ( ) ) { if ( isDebugEnabled ) { logger . debug ( STRING , file . getAbsolutePath ( ) ) ; } final OutputStream outStream = new FileOutputStream ...
146
java-test-4540
java
Do this vm write the contents to the file successfully ?
No
private boolean write Jar Bytes To File ( final File file , final byte [ ] jar Bytes ) { final boolean is Debug Enabled = logger . is Debug Enabled ( ) ; try { if ( file . create New File ( ) ) { if ( is Debug Enabled ) { logger . debug ( STRING , file . get Absolute Path ( ) ) ; } final Output Stream out Stream = new ...
private boolean writeJarBytesToFile ( final File file , final byte [ ] jarBytes ) { final boolean isDebugEnabled = logger . isDebugEnabled ( ) ; try { if ( file . createNewFile ( ) ) { if ( isDebugEnabled ) { logger . debug ( STRING , file . getAbsolutePath ( ) ) ; } final OutputStream outStream = new FileOutputStream ...
146
java-test-4541
java
What did the code read ?
the specified number of bytes
@ Override public int read ( byte [ ] b , int off , int len ) throws IO Exception { if ( b == null ) { throw new Null Pointer Exception ( STRING ) ; } if ( len < NUM || off < NUM || ( off + len ) > b . length ) { throw new Index Out Of Bounds Exception ( STRING + b . length + STRING + off + STRING + len ) ; } int read ...
@ Override public int read ( byte [ ] b , int off , int len ) throws IOException { if ( b == null ) { throw new NullPointerException ( STRING ) ; } if ( len < _NUM || off < _NUM || ( off + len ) > b . length ) { throw new IndexOutOfBoundsException ( STRING + b . length + STRING + off + STRING + len ) ; } int read = _NU...
202
java-test-4542
java
What does the code extract from the name ?
the streamid
public static String stream Id From Name ( String name ) { Objects . require Non Null ( name , STRING ) ; if ( ! name . starts With ( ID PREFIX ) ) return null ; return name . substring ( ID PREFIX . length ( ) ) ; }
public static String streamIdFromName ( String name ) { Objects . requireNonNull ( name , STRING ) ; if ( ! name . startsWith ( ID_PREFIX ) ) return null ; return name . substring ( ID_PREFIX . length ( ) ) ; }
52
java-test-4544
java
What does this check contain ?
a workaround for an issue in aem 6 . 1 , when after the deploy occasionally insert window contains an empty list
public boolean is Displayed Expecting Components ( ) { boolean result = BOOL ; if ( conditions . is Condition Met ( visibility Of ( window ) ) ) { if ( components . is Empty ( ) ) { close Button . click ( ) ; } else { result = BOOL ; } } return result ; }
public boolean isDisplayedExpectingComponents ( ) { boolean result = _BOOL ; if ( conditions . isConditionMet ( visibilityOf ( window ) ) ) { if ( components . isEmpty ( ) ) { closeButton . click ( ) ; } else { result = _BOOL ; } } return result ; }
60
java-test-4545
java
What does the code calculate ?
the diff for the given revision
protected Diff process Revision ( final Revision revision ) throws Unsupported Encoding Exception { Diff diff = super . process Revision ( revision ) ; if ( diff == null ) { this . ignored Revisions Counter ++ ; } else { this . revision Counter ++ ; this . diff Part Counter += diff . size ( ) ; } return diff ; }
protected Diff processRevision ( final Revision revision ) throws UnsupportedEncodingException { Diff diff = super . processRevision ( revision ) ; if ( diff == null ) { this . ignoredRevisionsCounter ++ ; } else { this . revisionCounter ++ ; this . diffPartCounter += diff . size ( ) ; } return diff ; }
65
java-test-4547
java
How does a diagram specification ( and a configuration ) save ?
using a stream
private static void save Diagram ( String source , Bean < ? extends Configuration > configuration , Output Stream stream , String encoding ) throws IO Exception , XML Exception { if ( configuration != null ) { Document document = Doc Util . new Document ( ) ; Element root = document . create Element ( STRING ) ; docume...
private static void saveDiagram ( String source , Bean < ? extends Configuration > configuration , OutputStream stream , String encoding ) throws IOException , XMLException { if ( configuration != null ) { Document document = DocUtil . newDocument ( ) ; Element root = document . createElement ( STRING ) ; document . ap...
204