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-613
java
What does the code create ?
a new part object
Part ( String s ) { named = s . char At ( NUM ) == STRING && s . char At ( s . length ( ) - NUM ) == STRING ; if ( named ) { this . s = s . substring ( NUM , s . length ( ) - NUM ) ; } else { this . s = s ; try { c = Class . for Name ( STRING + s ) ; } catch ( Exception e ) { } try { c = Class . for Name ( s . replace ( STRING , STRING ) ) ; } catch ( Exception e ) { } } }
Part ( String s ) { named = s . charAt ( _NUM ) == STRING && s . charAt ( s . length ( ) - _NUM ) == STRING ; if ( named ) { this . s = s . substring ( _NUM , s . length ( ) - _NUM ) ; } else { this . s = s ; try { c = Class . forName ( STRING + s ) ; } catch ( Exception e ) { } try { c = Class . forName ( s . replace ( STRING , STRING ) ) ; } catch ( Exception e ) { } } }
118
java-test-614
java
When do the output string have a character of whitespace ?
before adding another word
void fix White Space ( ) { final int index = m Output Builder . length ( ) - NUM ; if ( index >= NUM ) { final char last Character = m Output Builder . char At ( index ) ; if ( ! Character . is Whitespace ( last Character ) ) { m Output Builder . append ( STRING ) ; } } }
void fixWhiteSpace ( ) { final int index = mOutputBuilder . length ( ) - _NUM ; if ( index >= _NUM ) { final char lastCharacter = mOutputBuilder . charAt ( index ) ; if ( ! Character . isWhitespace ( lastCharacter ) ) { mOutputBuilder . append ( STRING ) ; } } }
68
java-test-615
java
What has the code ensure ?
the output string has a character of whitespace before adding another word
void fix White Space ( ) { final int index = m Output Builder . length ( ) - NUM ; if ( index >= NUM ) { final char last Character = m Output Builder . char At ( index ) ; if ( ! Character . is Whitespace ( last Character ) ) { m Output Builder . append ( STRING ) ; } } }
void fixWhiteSpace ( ) { final int index = mOutputBuilder . length ( ) - _NUM ; if ( index >= _NUM ) { final char lastCharacter = mOutputBuilder . charAt ( index ) ; if ( ! Character . isWhitespace ( lastCharacter ) ) { mOutputBuilder . append ( STRING ) ; } } }
68
java-test-616
java
What has a character of whitespace before adding another word ?
the output string
void fix White Space ( ) { final int index = m Output Builder . length ( ) - NUM ; if ( index >= NUM ) { final char last Character = m Output Builder . char At ( index ) ; if ( ! Character . is Whitespace ( last Character ) ) { m Output Builder . append ( STRING ) ; } } }
void fixWhiteSpace ( ) { final int index = mOutputBuilder . length ( ) - _NUM ; if ( index >= _NUM ) { final char lastCharacter = mOutputBuilder . charAt ( index ) ; if ( ! Character . isWhitespace ( lastCharacter ) ) { mOutputBuilder . append ( STRING ) ; } } }
68
java-test-617
java
What do the output string have before adding another word ?
a character of whitespace
void fix White Space ( ) { final int index = m Output Builder . length ( ) - NUM ; if ( index >= NUM ) { final char last Character = m Output Builder . char At ( index ) ; if ( ! Character . is Whitespace ( last Character ) ) { m Output Builder . append ( STRING ) ; } } }
void fixWhiteSpace ( ) { final int index = mOutputBuilder . length ( ) - _NUM ; if ( index >= _NUM ) { final char lastCharacter = mOutputBuilder . charAt ( index ) ; if ( ! Character . isWhitespace ( lastCharacter ) ) { mOutputBuilder . append ( STRING ) ; } } }
68
java-test-618
java
How does the set return ?
with the maximum size contained in the specified map
private int max ( Map < Integer , Modifiable DBI Ds > candidates ) { DBI Ds max Set = null ; Integer max Dim = null ; for ( Integer next Dim : candidates . key Set ( ) ) { DBI Ds next Set = candidates . get ( next Dim ) ; if ( max Set == null || max Set . size ( ) < next Set . size ( ) ) { max Set = next Set ; max Dim = next Dim ; } } return max Dim ; }
private int max ( Map < Integer , ModifiableDBIDs > candidates ) { DBIDs maxSet = null ; Integer maxDim = null ; for ( Integer nextDim : candidates . keySet ( ) ) { DBIDs nextSet = candidates . get ( nextDim ) ; if ( maxSet == null || maxSet . size ( ) < nextSet . size ( ) ) { maxSet = nextSet ; maxDim = nextDim ; } } return maxDim ; }
96
java-test-619
java
What does the code reduce by the given factor ?
this beanvisual ' s icon size
public void scale ( int factor ) { if ( m icon != null ) { remove All ( ) ; Image pic = m icon . get Image ( ) ; int width = m icon . get Icon Width ( ) ; int height = m icon . get Icon Height ( ) ; int reduction = width / factor ; width -= reduction ; height -= reduction ; pic = pic . get Scaled Instance ( width , height , Image . SCALE SMOOTH ) ; m icon = new Image Icon ( pic ) ; m visual Label = new J Label ( m icon ) ; add ( m visual Label , Border Layout . CENTER ) ; Dimension d = m visual Label . get Preferred Size ( ) ; Dimension d2 = new Dimension ( ( int ) d . get Width ( ) + NUM , ( int ) d . get Height ( ) + NUM ) ; set Minimum Size ( d2 ) ; set Preferred Size ( d2 ) ; set Maximum Size ( d2 ) ; } }
public void scale ( int factor ) { if ( m_icon != null ) { removeAll ( ) ; Image pic = m_icon . getImage ( ) ; int width = m_icon . getIconWidth ( ) ; int height = m_icon . getIconHeight ( ) ; int reduction = width / factor ; width -= reduction ; height -= reduction ; pic = pic . getScaledInstance ( width , height , Image . SCALE_SMOOTH ) ; m_icon = new ImageIcon ( pic ) ; m_visualLabel = new JLabel ( m_icon ) ; add ( m_visualLabel , BorderLayout . CENTER ) ; Dimension d = m_visualLabel . getPreferredSize ( ) ; Dimension d2 = new Dimension ( ( int ) d . getWidth ( ) + _NUM , ( int ) d . getHeight ( ) + _NUM ) ; setMinimumSize ( d2 ) ; setPreferredSize ( d2 ) ; setMaximumSize ( d2 ) ; } }
190
java-test-623
java
What does the code invoke as a library directly ?
the onscheduler ( ) in ischeduler
public boolean on Schedule As Library ( Config config , Config runtime , I Scheduler scheduler , Packing Plan packing ) { boolean ret = BOOL ; try { scheduler . initialize ( config , runtime ) ; ret = scheduler . on Schedule ( packing ) ; if ( ret ) { ret = Scheduler Utils . set Lib Scheduler Location ( runtime , scheduler , BOOL ) ; } else { LOG . severe ( STRING ) ; } } finally { scheduler . close ( ) ; } return ret ; }
public boolean onScheduleAsLibrary ( Config config , Config runtime , IScheduler scheduler , PackingPlan packing ) { boolean ret = _BOOL ; try { scheduler . initialize ( config , runtime ) ; ret = scheduler . onSchedule ( packing ) ; if ( ret ) { ret = SchedulerUtils . setLibSchedulerLocation ( runtime , scheduler , _BOOL ) ; } else { LOG . severe ( STRING ) ; } } finally { scheduler . close ( ) ; } return ret ; }
95
java-test-624
java
For what purpose does cipher be in a valid state ?
for update ( ) and dofinal ( ) calls
private void check Cipher State ( ) { if ( ! ( this instanceof Null Cipher ) ) { if ( ! initialized ) { throw new Illegal State Exception ( STRING ) ; } if ( ( opmode != Cipher . ENCRYPT MODE ) && ( opmode != Cipher . DECRYPT MODE ) ) { throw new Illegal State Exception ( STRING + STRING ) ; } } }
private void checkCipherState ( ) { if ( ! ( this instanceof NullCipher ) ) { if ( ! initialized ) { throw new IllegalStateException ( STRING ) ; } if ( ( opmode != Cipher . ENCRYPT_MODE ) && ( opmode != Cipher . DECRYPT_MODE ) ) { throw new IllegalStateException ( STRING + STRING ) ; } } }
70
java-test-625
java
How should that cipher be initialized ?
in encrypt_mode or decrypt_mode
private void check Cipher State ( ) { if ( ! ( this instanceof Null Cipher ) ) { if ( ! initialized ) { throw new Illegal State Exception ( STRING ) ; } if ( ( opmode != Cipher . ENCRYPT MODE ) && ( opmode != Cipher . DECRYPT MODE ) ) { throw new Illegal State Exception ( STRING + STRING ) ; } } }
private void checkCipherState ( ) { if ( ! ( this instanceof NullCipher ) ) { if ( ! initialized ) { throw new IllegalStateException ( STRING ) ; } if ( ( opmode != Cipher . ENCRYPT_MODE ) && ( opmode != Cipher . DECRYPT_MODE ) ) { throw new IllegalStateException ( STRING + STRING ) ; } } }
70
java-test-626
java
When will it continue to this method from where it left off ?
on repeated calls
public boolean parse More Data ( final Encoded Image encoded Image ) { if ( m Parser State == NOT A JPEG ) { return BOOL ; } final int data Buffer Size = encoded Image . get Size ( ) ; if ( data Buffer Size <= m Bytes Parsed ) { return BOOL ; } final Input Stream buffered Data Stream = new Pooled Byte Array Buffered Input Stream ( encoded Image . get Input Stream ( ) , m Byte Array Pool . get ( BUFFER SIZE ) , m Byte Array Pool ) ; try { Stream Util . skip ( buffered Data Stream , m Bytes Parsed ) ; return do Parse More Data ( buffered Data Stream ) ; } catch ( IO Exception ioe ) { Throwables . propagate ( ioe ) ; return BOOL ; } finally { Closeables . close Quietly ( buffered Data Stream ) ; } }
public boolean parseMoreData ( final EncodedImage encodedImage ) { if ( mParserState == NOT_A_JPEG ) { return _BOOL ; } final int dataBufferSize = encodedImage . getSize ( ) ; if ( dataBufferSize <= mBytesParsed ) { return _BOOL ; } final InputStream bufferedDataStream = new PooledByteArrayBufferedInputStream ( encodedImage . getInputStream ( ) , mByteArrayPool . get ( BUFFER_SIZE ) , mByteArrayPool ) ; try { StreamUtil . skip ( bufferedDataStream , mBytesParsed ) ; return doParseMoreData ( bufferedDataStream ) ; } catch ( IOException ioe ) { Throwables . propagate ( ioe ) ; return _BOOL ; } finally { Closeables . closeQuietly ( bufferedDataStream ) ; } }
158
java-test-627
java
What does the code write ?
an arbitrary object to the output
protected void write Arbitrary Object ( Object object , Serializer serializer ) { log . debug ( STRING ) ; Class < ? > object Class = object . get Class ( ) ; if ( ! object Class . is Annotation Present ( Anonymous . class ) ) { buf . put ( AMF . TYPE CLASS OBJECT ) ; put String ( buf , serializer . get Class Name ( object Class ) ) ; } else { buf . put ( AMF . TYPE OBJECT ) ; } for ( Field field : object Class . get Fields ( ) ) { String field Name = field . get Name ( ) ; log . debug ( STRING , field , object Class ) ; if ( ! serialize Field ( serializer , object Class , field Name , field , null ) ) { continue ; } Object value ; try { value = field . get ( object ) ; } catch ( Illegal Access Exception err ) { continue ; } put String ( buf , field Name ) ; serializer . serialize ( this , field , null , object , value ) ; } buf . put ( ( byte ) NUM ) ; buf . put ( ( byte ) NUM ) ; buf . put ( AMF . TYPE END OF OBJECT ) ; }
protected void writeArbitraryObject ( Object object , Serializer serializer ) { log . debug ( STRING ) ; Class < ? > objectClass = object . getClass ( ) ; if ( ! objectClass . isAnnotationPresent ( Anonymous . class ) ) { buf . put ( AMF . TYPE_CLASS_OBJECT ) ; putString ( buf , serializer . getClassName ( objectClass ) ) ; } else { buf . put ( AMF . TYPE_OBJECT ) ; } for ( Field field : objectClass . getFields ( ) ) { String fieldName = field . getName ( ) ; log . debug ( STRING , field , objectClass ) ; if ( ! serializeField ( serializer , objectClass , fieldName , field , null ) ) { continue ; } Object value ; try { value = field . get ( object ) ; } catch ( IllegalAccessException err ) { continue ; } putString ( buf , fieldName ) ; serializer . serialize ( this , field , null , object , value ) ; } buf . put ( ( byte ) _NUM ) ; buf . put ( ( byte ) _NUM ) ; buf . put ( AMF . TYPE_END_OF_OBJECT ) ; }
235
java-test-628
java
For what purpose does it be up to the calling method in case of a cache reference to the process ?
to acquire a write lock
private void start ( final Process process , final String p Host Name , final Timestamp p Startup Time ) { Process Cache Object process Cache Object = ( Process Cache Object ) process ; if ( ! is Running ( process Cache Object ) ) { final Long new PIK = create Process PIK ( ) ; process Cache Object . set Current Host ( p Host Name ) ; process Cache Object . set Startup Time ( p Startup Time ) ; process Cache Object . set Requires Reboot ( Boolean . FALSE ) ; process Cache Object . set Process PIK ( new PIK ) ; process Cache Object . set Local Config ( Local Config . Y ) ; process Cache Object . set Jms Daq Command Queue ( jms Daq Queue Trunk + STRING + process Cache Object . get Current Host ( ) + STRING + process Cache Object . get Name ( ) + STRING + new PIK . to String ( ) ) ; super . start ( process Cache Object , p Startup Time ) ; } }
private void start ( final Process process , final String pHostName , final Timestamp pStartupTime ) { ProcessCacheObject processCacheObject = ( ProcessCacheObject ) process ; if ( ! isRunning ( processCacheObject ) ) { final Long newPIK = createProcessPIK ( ) ; processCacheObject . setCurrentHost ( pHostName ) ; processCacheObject . setStartupTime ( pStartupTime ) ; processCacheObject . setRequiresReboot ( Boolean . FALSE ) ; processCacheObject . setProcessPIK ( newPIK ) ; processCacheObject . setLocalConfig ( LocalConfig . Y ) ; processCacheObject . setJmsDaqCommandQueue ( jmsDaqQueueTrunk + STRING + processCacheObject . getCurrentHost ( ) + STRING + processCacheObject . getName ( ) + STRING + newPIK . toString ( ) ) ; super . start ( processCacheObject , pStartupTime ) ; } }
187
java-test-630
java
How does the code terminate the work ?
on behalf of terminator
protected void terminate ( boolean commit ) throws Heur Rollback Exception , Heur Mixed Exception , Sys Exception , java . lang . Security Exception , Heur Commit Exception , Heur Hazard Exception , Rollback Exception , Illegal State Exception { synchronized ( fsm ) { if ( commit ) { if ( participants . size ( ) <= NUM ) { commit ( BOOL ) ; } else { int prepare Result = prepare ( ) ; if ( prepare Result != Participant . READ ONLY ) commit ( BOOL ) ; } } else { rollback ( ) ; } } }
protected void terminate ( boolean commit ) throws HeurRollbackException , HeurMixedException , SysException , java . lang . SecurityException , HeurCommitException , HeurHazardException , RollbackException , IllegalStateException { synchronized ( fsm_ ) { if ( commit ) { if ( participants_ . size ( ) <= _NUM ) { commit ( _BOOL ) ; } else { int prepareResult = prepare ( ) ; if ( prepareResult != Participant . READ_ONLY ) commit ( _BOOL ) ; } } else { rollback ( ) ; } } }
104
java-test-640
java
What does the code add to the context ?
a new prefix / namespace
public void add Prefix ( String prefix , String namespace URI ) { log . log ( Level . FINE , STRING , new Object [ ] { prefix , namespace URI } ) ; if ( prefix == null || namespace URI == null ) { throw new Illegal Argument Exception ( STRING ) ; } prefix To Namespace . put ( prefix , namespace URI ) ; Set < String > prefixes = namespace To Prefix . get ( namespace URI ) ; if ( prefixes == null ) { prefixes = new Hash Set < String > ( ) ; } prefixes . add ( prefix ) ; namespace To Prefix . put ( namespace URI , prefixes ) ; }
public void addPrefix ( String prefix , String namespaceURI ) { log . log ( Level . FINE , STRING , new Object [ ] { prefix , namespaceURI } ) ; if ( prefix == null || namespaceURI == null ) { throw new IllegalArgumentException ( STRING ) ; } prefixToNamespace . put ( prefix , namespaceURI ) ; Set < String > prefixes = namespaceToPrefix . get ( namespaceURI ) ; if ( prefixes == null ) { prefixes = new HashSet < String > ( ) ; } prefixes . add ( prefix ) ; namespaceToPrefix . put ( namespaceURI , prefixes ) ; }
124
java-test-642
java
How did an input string split ?
by the pattern ' s regular expression
public String [ ] split ( String input ) { List < String > results = new Array List < String > ( ) ; split ( input , results ) ; String [ ] parts = new String [ results . size ( ) ] ; for ( int i = NUM ; i < results . size ( ) ; i ++ ) parts [ i ] = ( String ) results . get ( i ) ; return parts ; }
public String [ ] split ( String input ) { List < String > results = new ArrayList < String > ( ) ; _split ( input , results ) ; String [ ] parts = new String [ results . size ( ) ] ; for ( int i = _NUM ; i < results . size ( ) ; i ++ ) parts [ i ] = ( String ) results . get ( i ) ; return parts ; }
84
java-test-644
java
What does the code write ?
the stack trace of the throwable to a string
protected static String print Stack Trace ( final Throwable t ) { final String Writer stack Trace Writer = new String Writer ( ) ; t . print Stack Trace ( new Print Writer ( stack Trace Writer ) ) ; return stack Trace Writer . to String ( ) ; }
protected static String printStackTrace ( final Throwable t ) { final StringWriter stackTraceWriter = new StringWriter ( ) ; t . printStackTrace ( new PrintWriter ( stackTraceWriter ) ) ; return stackTraceWriter . toString ( ) ; }
52
java-test-645
java
How does new tasks create ?
by following context propagation links
public Integer call ( ) { try { Efficient Terminal Set source Item Lookaheads = lookaheads . get ( current Item ) ; CP Go To Link goto Link = go To Links . get ( current Item ) ; if ( goto Link != null ) { LALR 1 CP State target State = goto Link . get Target State ( ) ; LALR 1 CP Item target Item = target State . get Item With Lookahead By LR 0 Item ( goto Link . get Target Item ( ) ) ; synchronized ( lookaheads ) { Efficient Terminal Set before = lookaheads . get ( target Item ) ; Efficient Terminal Set after = before . plus All ( source Item Lookaheads ) ; if ( ! before . equals ( after ) ) { lookaheads . put ( target Item , after ) ; thread Pool . submit ( new Worker Task CP Links ( target Item , thread Pool , task Count Lock ) ) ; } } } for ( LR 0 Item closure Link : current Item . get Closure Links ( ) ) { LALR 1 CP State target State = item States . get ( current Item ) ; LALR 1 CP Item target Item = target State . get Item With Lookahead By LR 0 Item ( closure Link ) ; synchronized ( lookaheads ) { Efficient Terminal Set before = lookaheads . get ( target Item ) ; Efficient Terminal Set after = before . plus All ( source Item Lookaheads ) ; after = after . plus All ( target Item . get Lookaheads ( ) ) ; if ( ! before . equals ( after ) ) { lookaheads . put ( target Item , after ) ; thread Pool . submit ( new Worker Task CP Links ( target Item , thread Pool , task Count Lock ) ) ; } } } } catch ( Throwable e ) { e . print Stack Trace ( ) ; } decrement Task Count ( ) ; return NUM ; }
public Integer call ( ) { try { EfficientTerminalSet sourceItemLookaheads = lookaheads . get ( currentItem ) ; CPGoToLink gotoLink = goToLinks . get ( currentItem ) ; if ( gotoLink != null ) { LALR1CPState targetState = gotoLink . getTargetState ( ) ; LALR1CPItem targetItem = targetState . getItemWithLookaheadByLR0Item ( gotoLink . getTargetItem ( ) ) ; synchronized ( lookaheads ) { EfficientTerminalSet before = lookaheads . get ( targetItem ) ; EfficientTerminalSet after = before . plusAll ( sourceItemLookaheads ) ; if ( ! before . equals ( after ) ) { lookaheads . put ( targetItem , after ) ; threadPool . submit ( new WorkerTaskCPLinks ( targetItem , threadPool , taskCountLock ) ) ; } } } for ( LR0Item closureLink : currentItem . getClosureLinks ( ) ) { LALR1CPState targetState = itemStates . get ( currentItem ) ; LALR1CPItem targetItem = targetState . getItemWithLookaheadByLR0Item ( closureLink ) ; synchronized ( lookaheads ) { EfficientTerminalSet before = lookaheads . get ( targetItem ) ; EfficientTerminalSet after = before . plusAll ( sourceItemLookaheads ) ; after = after . plusAll ( targetItem . getLookaheads ( ) ) ; if ( ! before . equals ( after ) ) { lookaheads . put ( targetItem , after ) ; threadPool . submit ( new WorkerTaskCPLinks ( targetItem , threadPool , taskCountLock ) ) ; } } } } catch ( Throwable e ) { e . printStackTrace ( ) ; } decrementTaskCount ( ) ; return _NUM ; }
352
java-test-648
java
When is this called ?
once each time that the timer fires
private void tick ( ) { if ( started Index Time Stamp == NUM ) { started Index Time Stamp = System . current Time Millis ( ) ; } long time Elapsed Since Index Start Milliseconds = System . current Time Millis ( ) - started Index Time Stamp ; int maximum Index = divisor List . length - NUM ; int current Divisor = divisor List [ current Index ] ; if ( ticks Since Index Change % current Divisor == NUM ) { time Picker . z Internal Try Change Time By Increment ( change Amount Minutes ) ; if ( ( current Index < maximum Index ) && ( time Elapsed Since Index Start Milliseconds > millis For Divisor List [ current Index ] ) ) { ticks Since Index Change = NUM ; ++ current Index ; started Index Time Stamp = System . current Time Millis ( ) ; } } ++ ticks Since Index Change ; }
private void tick ( ) { if ( startedIndexTimeStamp == _NUM ) { startedIndexTimeStamp = System . currentTimeMillis ( ) ; } long timeElapsedSinceIndexStartMilliseconds = System . currentTimeMillis ( ) - startedIndexTimeStamp ; int maximumIndex = divisorList . length - _NUM ; int currentDivisor = divisorList [ currentIndex ] ; if ( ticksSinceIndexChange % currentDivisor == _NUM ) { timePicker . zInternalTryChangeTimeByIncrement ( changeAmountMinutes ) ; if ( ( currentIndex < maximumIndex ) && ( timeElapsedSinceIndexStartMilliseconds > millisForDivisorList [ currentIndex ] ) ) { ticksSinceIndexChange = _NUM ; ++ currentIndex ; startedIndexTimeStamp = System . currentTimeMillis ( ) ; } } ++ ticksSinceIndexChange ; }
164
java-test-649
java
How is the amount of time spent ?
using each divisorlist array value
private void tick ( ) { if ( started Index Time Stamp == NUM ) { started Index Time Stamp = System . current Time Millis ( ) ; } long time Elapsed Since Index Start Milliseconds = System . current Time Millis ( ) - started Index Time Stamp ; int maximum Index = divisor List . length - NUM ; int current Divisor = divisor List [ current Index ] ; if ( ticks Since Index Change % current Divisor == NUM ) { time Picker . z Internal Try Change Time By Increment ( change Amount Minutes ) ; if ( ( current Index < maximum Index ) && ( time Elapsed Since Index Start Milliseconds > millis For Divisor List [ current Index ] ) ) { ticks Since Index Change = NUM ; ++ current Index ; started Index Time Stamp = System . current Time Millis ( ) ; } } ++ ticks Since Index Change ; }
private void tick ( ) { if ( startedIndexTimeStamp == _NUM ) { startedIndexTimeStamp = System . currentTimeMillis ( ) ; } long timeElapsedSinceIndexStartMilliseconds = System . currentTimeMillis ( ) - startedIndexTimeStamp ; int maximumIndex = divisorList . length - _NUM ; int currentDivisor = divisorList [ currentIndex ] ; if ( ticksSinceIndexChange % currentDivisor == _NUM ) { timePicker . zInternalTryChangeTimeByIncrement ( changeAmountMinutes ) ; if ( ( currentIndex < maximumIndex ) && ( timeElapsedSinceIndexStartMilliseconds > millisForDivisorList [ currentIndex ] ) ) { ticksSinceIndexChange = _NUM ; ++ currentIndex ; startedIndexTimeStamp = System . currentTimeMillis ( ) ; } } ++ ticksSinceIndexChange ; }
164
java-test-650
java
Where do the children expand the specified node ?
in the specified problem
public List < Node > expand ( Node node , Problem problem ) { List < Node > successors = new Array List < Node > ( ) ; Actions Function actions Function = problem . get Actions Function ( ) ; Result Function result Function = problem . get Result Function ( ) ; Step Cost Function step Cost Function = problem . get Step Cost Function ( ) ; for ( Action action : actions Function . actions ( node . get State ( ) ) ) { Object successor State = result Function . result ( node . get State ( ) , action ) ; double step Cost = step Cost Function . c ( node . get State ( ) , action , successor State ) ; successors . add ( create Node ( successor State , node , action , step Cost ) ) ; } for ( Node Listener listener : node Listeners ) listener . on Node Expanded ( node ) ; counter ++ ; return successors ; }
public List < Node > expand ( Node node , Problem problem ) { List < Node > successors = new ArrayList < Node > ( ) ; ActionsFunction actionsFunction = problem . getActionsFunction ( ) ; ResultFunction resultFunction = problem . getResultFunction ( ) ; StepCostFunction stepCostFunction = problem . getStepCostFunction ( ) ; for ( Action action : actionsFunction . actions ( node . getState ( ) ) ) { Object successorState = resultFunction . result ( node . getState ( ) , action ) ; double stepCost = stepCostFunction . c ( node . getState ( ) , action , successorState ) ; successors . add ( createNode ( successorState , node , action , stepCost ) ) ; } for ( NodeListener listener : nodeListeners ) listener . onNodeExpanded ( node ) ; counter ++ ; return successors ; }
177
java-test-651
java
What does the code create ?
a panel that does vertical layout
public static J Panel create Vertical Panel ( String title ) { J Panel panel = new J Panel ( ) ; panel . set Layout ( new Grid Layout ( NUM , NUM ) ) ; if ( title != null ) { panel . set Border ( Border Factory . create Titled Border ( Border Factory . create Etched Border ( ) , title ) ) ; } else { panel . set Border ( Border Factory . create Etched Border ( ) ) ; } return panel ; }
public static JPanel createVerticalPanel ( String title ) { JPanel panel = new JPanel ( ) ; panel . setLayout ( new GridLayout ( _NUM , _NUM ) ) ; if ( title != null ) { panel . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , title ) ) ; } else { panel . setBorder ( BorderFactory . createEtchedBorder ( ) ) ; } return panel ; }
92
java-test-652
java
What does a panel do ?
vertical layout
public static J Panel create Vertical Panel ( String title ) { J Panel panel = new J Panel ( ) ; panel . set Layout ( new Grid Layout ( NUM , NUM ) ) ; if ( title != null ) { panel . set Border ( Border Factory . create Titled Border ( Border Factory . create Etched Border ( ) , title ) ) ; } else { panel . set Border ( Border Factory . create Etched Border ( ) ) ; } return panel ; }
public static JPanel createVerticalPanel ( String title ) { JPanel panel = new JPanel ( ) ; panel . setLayout ( new GridLayout ( _NUM , _NUM ) ) ; if ( title != null ) { panel . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , title ) ) ; } else { panel . setBorder ( BorderFactory . createEtchedBorder ( ) ) ; } return panel ; }
92
java-test-653
java
What does the code find if any ?
the root source code folder for the given android target
@ Nullable public static File find Platform Sources ( @ Not Null I Android Target target ) { String path = target . get Path ( I Android Target . SOURCES ) ; if ( path != null ) { File platform Source = new File ( path ) ; if ( platform Source . is Directory ( ) ) { return platform Source ; } } return null ; }
@ Nullable public static File findPlatformSources ( @ NotNull IAndroidTarget target ) { String path = target . getPath ( IAndroidTarget . SOURCES ) ; if ( path != null ) { File platformSource = new File ( path ) ; if ( platformSource . isDirectory ( ) ) { return platformSource ; } } return null ; }
71
java-test-654
java
What is at most on the beginning of the bottom stack ?
its end
private void clamp Position To Bottom Stack Start ( Stack Scroll State . View State child View State , int child Height ) { child View State . y Translation = Math . min ( child View State . y Translation , m Inner Height - m Bottom Stack Peek Size - m Collapse Second Card Padding - child Height ) ; }
private void clampPositionToBottomStackStart ( StackScrollState . ViewState childViewState , int childHeight ) { childViewState . yTranslation = Math . min ( childViewState . yTranslation , mInnerHeight - mBottomStackPeekSize - mCollapseSecondCardPadding - childHeight ) ; }
63
java-test-655
java
Where does its end be at most ?
on the beginning of the bottom stack
private void clamp Position To Bottom Stack Start ( Stack Scroll State . View State child View State , int child Height ) { child View State . y Translation = Math . min ( child View State . y Translation , m Inner Height - m Bottom Stack Peek Size - m Collapse Second Card Padding - child Height ) ; }
private void clampPositionToBottomStackStart ( StackScrollState . ViewState childViewState , int childHeight ) { childViewState . yTranslation = Math . min ( childViewState . yTranslation , mInnerHeight - mBottomStackPeekSize - mCollapseSecondCardPadding - childHeight ) ; }
63
java-test-656
java
How does the code validate the points for the state of the given cell if the cell is not collapsed ?
recursively
public mx Rectangle validate Points ( mx Cell State parent State , Object cell ) { mx Cell State state = get State ( cell ) ; double min X = NUM ; double min Y = NUM ; double max X = NUM ; double max Y = NUM ; mx I Graph Model model = graph . get Model ( ) ; boolean is Edge = model . is Edge ( cell ) ; if ( state != null ) { if ( state . is Invalid ( ) ) { mx Geometry geo = graph . get Cell Geometry ( cell ) ; if ( is Edge ) { Object source = get Visible Terminal ( cell , BOOL ) ; if ( source != null && ! model . is Ancestor ( source , cell ) ) { Object p = model . get Parent ( source ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , source ) ; } Object target = get Visible Terminal ( cell , BOOL ) ; if ( target != null && ! model . is Ancestor ( target , cell ) ) { Object p = model . get Parent ( target ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , target ) ; } set Terminal Points ( state ) ; update Points ( state , geo . get Points ( ) , source , target ) ; update Terminal Points ( state , source , target ) ; update Edge Bounds ( state ) ; state . set Absolute Offset ( get Point ( state , geo ) ) ; } else if ( geo != null && geo . is Relative ( ) && parent State != null && model . is Edge ( parent State . get Cell ( ) ) ) { mx Point origin = get Point ( parent State , geo ) ; if ( origin != null ) { state . set X ( origin . get X ( ) ) ; state . set Y ( origin . get Y ( ) ) ; origin . set X ( ( origin . get X ( ) / scale ) - translate . get X ( ) ) ; origin . set Y ( ( origin . get Y ( ) / scale ) - translate . get Y ( ) ) ; state . set Origin ( origin ) ; child Moved ( parent State , state ) ; } } state . set Invalid ( BOOL ) ; } if ( is Edge || model . is Vertex ( cell ) ) { update Label Bounds ( state ) ; mx Rectangle bb = update Bounding Box ( state ) ; min X = bb . get X ( ) ; min Y = bb . get Y ( ) ; max X = bb . get X ( ) + bb . get Width ( ) ; max Y = bb . get Y ( ) + bb . get Height ( ) ; } } if ( state != null && ( ! graph . is Cell Collapsed ( cell ) || cell == current Root ) ) { int child Count = model . get Child Count ( cell ) ; for ( int i = NUM ; i < child Count ; i ++ ) { Object child = model . get Child At ( cell , i ) ; mx Rectangle bounds = validate Points ( state , child ) ; min X = Math . min ( min X , bounds . get X ( ) ) ; min Y = Math . min ( min Y , bounds . get Y ( ) ) ; max X = Math . max ( max X , bounds . get X ( ) + bounds . get Width ( ) ) ; max Y = Math . max ( max Y , bounds . get Y ( ) + bounds . get Height ( ) ) ; } } return new mx Rectangle ( min X , min Y , max X - min X , max Y - min Y ) ; }
public mxRectangle validatePoints ( mxCellState parentState , Object cell ) { mxCellState state = getState ( cell ) ; double minX = _NUM ; double minY = _NUM ; double maxX = _NUM ; double maxY = _NUM ; mxIGraphModel model = graph . getModel ( ) ; boolean isEdge = model . isEdge ( cell ) ; if ( state != null ) { if ( state . isInvalid ( ) ) { mxGeometry geo = graph . getCellGeometry ( cell ) ; if ( isEdge ) { Object source = getVisibleTerminal ( cell , _BOOL ) ; if ( source != null && ! model . isAncestor ( source , cell ) ) { Object p = model . getParent ( source ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , source ) ; } Object target = getVisibleTerminal ( cell , _BOOL ) ; if ( target != null && ! model . isAncestor ( target , cell ) ) { Object p = model . getParent ( target ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , target ) ; } setTerminalPoints ( state ) ; updatePoints ( state , geo . getPoints ( ) , source , target ) ; updateTerminalPoints ( state , source , target ) ; updateEdgeBounds ( state ) ; state . setAbsoluteOffset ( getPoint ( state , geo ) ) ; } else if ( geo != null && geo . isRelative ( ) && parentState != null && model . isEdge ( parentState . getCell ( ) ) ) { mxPoint origin = getPoint ( parentState , geo ) ; if ( origin != null ) { state . setX ( origin . getX ( ) ) ; state . setY ( origin . getY ( ) ) ; origin . setX ( ( origin . getX ( ) / scale ) - translate . getX ( ) ) ; origin . setY ( ( origin . getY ( ) / scale ) - translate . getY ( ) ) ; state . setOrigin ( origin ) ; childMoved ( parentState , state ) ; } } state . setInvalid ( _BOOL ) ; } if ( isEdge || model . isVertex ( cell ) ) { updateLabelBounds ( state ) ; mxRectangle bb = updateBoundingBox ( state ) ; minX = bb . getX ( ) ; minY = bb . getY ( ) ; maxX = bb . getX ( ) + bb . getWidth ( ) ; maxY = bb . getY ( ) + bb . getHeight ( ) ; } } if ( state != null && ( ! graph . isCellCollapsed ( cell ) || cell == currentRoot ) ) { int childCount = model . getChildCount ( cell ) ; for ( int i = _NUM ; i < childCount ; i ++ ) { Object child = model . getChildAt ( cell , i ) ; mxRectangle bounds = validatePoints ( state , child ) ; minX = Math . min ( minX , bounds . getX ( ) ) ; minY = Math . min ( minY , bounds . getY ( ) ) ; maxX = Math . max ( maxX , bounds . getX ( ) + bounds . getWidth ( ) ) ; maxY = Math . max ( maxY , bounds . getY ( ) + bounds . getHeight ( ) ) ; } } return new mxRectangle ( minX , minY , maxX - minX , maxY - minY ) ; }
728
java-test-657
java
What does the code not return as a rectangle ?
the bounding box of all visited states
public mx Rectangle validate Points ( mx Cell State parent State , Object cell ) { mx Cell State state = get State ( cell ) ; double min X = NUM ; double min Y = NUM ; double max X = NUM ; double max Y = NUM ; mx I Graph Model model = graph . get Model ( ) ; boolean is Edge = model . is Edge ( cell ) ; if ( state != null ) { if ( state . is Invalid ( ) ) { mx Geometry geo = graph . get Cell Geometry ( cell ) ; if ( is Edge ) { Object source = get Visible Terminal ( cell , BOOL ) ; if ( source != null && ! model . is Ancestor ( source , cell ) ) { Object p = model . get Parent ( source ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , source ) ; } Object target = get Visible Terminal ( cell , BOOL ) ; if ( target != null && ! model . is Ancestor ( target , cell ) ) { Object p = model . get Parent ( target ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , target ) ; } set Terminal Points ( state ) ; update Points ( state , geo . get Points ( ) , source , target ) ; update Terminal Points ( state , source , target ) ; update Edge Bounds ( state ) ; state . set Absolute Offset ( get Point ( state , geo ) ) ; } else if ( geo != null && geo . is Relative ( ) && parent State != null && model . is Edge ( parent State . get Cell ( ) ) ) { mx Point origin = get Point ( parent State , geo ) ; if ( origin != null ) { state . set X ( origin . get X ( ) ) ; state . set Y ( origin . get Y ( ) ) ; origin . set X ( ( origin . get X ( ) / scale ) - translate . get X ( ) ) ; origin . set Y ( ( origin . get Y ( ) / scale ) - translate . get Y ( ) ) ; state . set Origin ( origin ) ; child Moved ( parent State , state ) ; } } state . set Invalid ( BOOL ) ; } if ( is Edge || model . is Vertex ( cell ) ) { update Label Bounds ( state ) ; mx Rectangle bb = update Bounding Box ( state ) ; min X = bb . get X ( ) ; min Y = bb . get Y ( ) ; max X = bb . get X ( ) + bb . get Width ( ) ; max Y = bb . get Y ( ) + bb . get Height ( ) ; } } if ( state != null && ( ! graph . is Cell Collapsed ( cell ) || cell == current Root ) ) { int child Count = model . get Child Count ( cell ) ; for ( int i = NUM ; i < child Count ; i ++ ) { Object child = model . get Child At ( cell , i ) ; mx Rectangle bounds = validate Points ( state , child ) ; min X = Math . min ( min X , bounds . get X ( ) ) ; min Y = Math . min ( min Y , bounds . get Y ( ) ) ; max X = Math . max ( max X , bounds . get X ( ) + bounds . get Width ( ) ) ; max Y = Math . max ( max Y , bounds . get Y ( ) + bounds . get Height ( ) ) ; } } return new mx Rectangle ( min X , min Y , max X - min X , max Y - min Y ) ; }
public mxRectangle validatePoints ( mxCellState parentState , Object cell ) { mxCellState state = getState ( cell ) ; double minX = _NUM ; double minY = _NUM ; double maxX = _NUM ; double maxY = _NUM ; mxIGraphModel model = graph . getModel ( ) ; boolean isEdge = model . isEdge ( cell ) ; if ( state != null ) { if ( state . isInvalid ( ) ) { mxGeometry geo = graph . getCellGeometry ( cell ) ; if ( isEdge ) { Object source = getVisibleTerminal ( cell , _BOOL ) ; if ( source != null && ! model . isAncestor ( source , cell ) ) { Object p = model . getParent ( source ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , source ) ; } Object target = getVisibleTerminal ( cell , _BOOL ) ; if ( target != null && ! model . isAncestor ( target , cell ) ) { Object p = model . getParent ( target ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , target ) ; } setTerminalPoints ( state ) ; updatePoints ( state , geo . getPoints ( ) , source , target ) ; updateTerminalPoints ( state , source , target ) ; updateEdgeBounds ( state ) ; state . setAbsoluteOffset ( getPoint ( state , geo ) ) ; } else if ( geo != null && geo . isRelative ( ) && parentState != null && model . isEdge ( parentState . getCell ( ) ) ) { mxPoint origin = getPoint ( parentState , geo ) ; if ( origin != null ) { state . setX ( origin . getX ( ) ) ; state . setY ( origin . getY ( ) ) ; origin . setX ( ( origin . getX ( ) / scale ) - translate . getX ( ) ) ; origin . setY ( ( origin . getY ( ) / scale ) - translate . getY ( ) ) ; state . setOrigin ( origin ) ; childMoved ( parentState , state ) ; } } state . setInvalid ( _BOOL ) ; } if ( isEdge || model . isVertex ( cell ) ) { updateLabelBounds ( state ) ; mxRectangle bb = updateBoundingBox ( state ) ; minX = bb . getX ( ) ; minY = bb . getY ( ) ; maxX = bb . getX ( ) + bb . getWidth ( ) ; maxY = bb . getY ( ) + bb . getHeight ( ) ; } } if ( state != null && ( ! graph . isCellCollapsed ( cell ) || cell == currentRoot ) ) { int childCount = model . getChildCount ( cell ) ; for ( int i = _NUM ; i < childCount ; i ++ ) { Object child = model . getChildAt ( cell , i ) ; mxRectangle bounds = validatePoints ( state , child ) ; minX = Math . min ( minX , bounds . getX ( ) ) ; minY = Math . min ( minY , bounds . getY ( ) ) ; maxX = Math . max ( maxX , bounds . getX ( ) + bounds . getWidth ( ) ) ; maxY = Math . max ( maxY , bounds . getY ( ) + bounds . getHeight ( ) ) ; } } return new mxRectangle ( minX , minY , maxX - minX , maxY - minY ) ; }
728
java-test-658
java
Does the code return the bounding box of all visited states as a rectangle ?
No
public mx Rectangle validate Points ( mx Cell State parent State , Object cell ) { mx Cell State state = get State ( cell ) ; double min X = NUM ; double min Y = NUM ; double max X = NUM ; double max Y = NUM ; mx I Graph Model model = graph . get Model ( ) ; boolean is Edge = model . is Edge ( cell ) ; if ( state != null ) { if ( state . is Invalid ( ) ) { mx Geometry geo = graph . get Cell Geometry ( cell ) ; if ( is Edge ) { Object source = get Visible Terminal ( cell , BOOL ) ; if ( source != null && ! model . is Ancestor ( source , cell ) ) { Object p = model . get Parent ( source ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , source ) ; } Object target = get Visible Terminal ( cell , BOOL ) ; if ( target != null && ! model . is Ancestor ( target , cell ) ) { Object p = model . get Parent ( target ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , target ) ; } set Terminal Points ( state ) ; update Points ( state , geo . get Points ( ) , source , target ) ; update Terminal Points ( state , source , target ) ; update Edge Bounds ( state ) ; state . set Absolute Offset ( get Point ( state , geo ) ) ; } else if ( geo != null && geo . is Relative ( ) && parent State != null && model . is Edge ( parent State . get Cell ( ) ) ) { mx Point origin = get Point ( parent State , geo ) ; if ( origin != null ) { state . set X ( origin . get X ( ) ) ; state . set Y ( origin . get Y ( ) ) ; origin . set X ( ( origin . get X ( ) / scale ) - translate . get X ( ) ) ; origin . set Y ( ( origin . get Y ( ) / scale ) - translate . get Y ( ) ) ; state . set Origin ( origin ) ; child Moved ( parent State , state ) ; } } state . set Invalid ( BOOL ) ; } if ( is Edge || model . is Vertex ( cell ) ) { update Label Bounds ( state ) ; mx Rectangle bb = update Bounding Box ( state ) ; min X = bb . get X ( ) ; min Y = bb . get Y ( ) ; max X = bb . get X ( ) + bb . get Width ( ) ; max Y = bb . get Y ( ) + bb . get Height ( ) ; } } if ( state != null && ( ! graph . is Cell Collapsed ( cell ) || cell == current Root ) ) { int child Count = model . get Child Count ( cell ) ; for ( int i = NUM ; i < child Count ; i ++ ) { Object child = model . get Child At ( cell , i ) ; mx Rectangle bounds = validate Points ( state , child ) ; min X = Math . min ( min X , bounds . get X ( ) ) ; min Y = Math . min ( min Y , bounds . get Y ( ) ) ; max X = Math . max ( max X , bounds . get X ( ) + bounds . get Width ( ) ) ; max Y = Math . max ( max Y , bounds . get Y ( ) + bounds . get Height ( ) ) ; } } return new mx Rectangle ( min X , min Y , max X - min X , max Y - min Y ) ; }
public mxRectangle validatePoints ( mxCellState parentState , Object cell ) { mxCellState state = getState ( cell ) ; double minX = _NUM ; double minY = _NUM ; double maxX = _NUM ; double maxY = _NUM ; mxIGraphModel model = graph . getModel ( ) ; boolean isEdge = model . isEdge ( cell ) ; if ( state != null ) { if ( state . isInvalid ( ) ) { mxGeometry geo = graph . getCellGeometry ( cell ) ; if ( isEdge ) { Object source = getVisibleTerminal ( cell , _BOOL ) ; if ( source != null && ! model . isAncestor ( source , cell ) ) { Object p = model . getParent ( source ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , source ) ; } Object target = getVisibleTerminal ( cell , _BOOL ) ; if ( target != null && ! model . isAncestor ( target , cell ) ) { Object p = model . getParent ( target ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , target ) ; } setTerminalPoints ( state ) ; updatePoints ( state , geo . getPoints ( ) , source , target ) ; updateTerminalPoints ( state , source , target ) ; updateEdgeBounds ( state ) ; state . setAbsoluteOffset ( getPoint ( state , geo ) ) ; } else if ( geo != null && geo . isRelative ( ) && parentState != null && model . isEdge ( parentState . getCell ( ) ) ) { mxPoint origin = getPoint ( parentState , geo ) ; if ( origin != null ) { state . setX ( origin . getX ( ) ) ; state . setY ( origin . getY ( ) ) ; origin . setX ( ( origin . getX ( ) / scale ) - translate . getX ( ) ) ; origin . setY ( ( origin . getY ( ) / scale ) - translate . getY ( ) ) ; state . setOrigin ( origin ) ; childMoved ( parentState , state ) ; } } state . setInvalid ( _BOOL ) ; } if ( isEdge || model . isVertex ( cell ) ) { updateLabelBounds ( state ) ; mxRectangle bb = updateBoundingBox ( state ) ; minX = bb . getX ( ) ; minY = bb . getY ( ) ; maxX = bb . getX ( ) + bb . getWidth ( ) ; maxY = bb . getY ( ) + bb . getHeight ( ) ; } } if ( state != null && ( ! graph . isCellCollapsed ( cell ) || cell == currentRoot ) ) { int childCount = model . getChildCount ( cell ) ; for ( int i = _NUM ; i < childCount ; i ++ ) { Object child = model . getChildAt ( cell , i ) ; mxRectangle bounds = validatePoints ( state , child ) ; minX = Math . min ( minX , bounds . getX ( ) ) ; minY = Math . min ( minY , bounds . getY ( ) ) ; maxX = Math . max ( maxX , bounds . getX ( ) + bounds . getWidth ( ) ) ; maxY = Math . max ( maxY , bounds . getY ( ) + bounds . getHeight ( ) ) ; } } return new mxRectangle ( minX , minY , maxX - minX , maxY - minY ) ; }
728
java-test-659
java
What does the code validate if the cell is not collapsed recursively ?
the points for the state of the given cell
public mx Rectangle validate Points ( mx Cell State parent State , Object cell ) { mx Cell State state = get State ( cell ) ; double min X = NUM ; double min Y = NUM ; double max X = NUM ; double max Y = NUM ; mx I Graph Model model = graph . get Model ( ) ; boolean is Edge = model . is Edge ( cell ) ; if ( state != null ) { if ( state . is Invalid ( ) ) { mx Geometry geo = graph . get Cell Geometry ( cell ) ; if ( is Edge ) { Object source = get Visible Terminal ( cell , BOOL ) ; if ( source != null && ! model . is Ancestor ( source , cell ) ) { Object p = model . get Parent ( source ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , source ) ; } Object target = get Visible Terminal ( cell , BOOL ) ; if ( target != null && ! model . is Ancestor ( target , cell ) ) { Object p = model . get Parent ( target ) ; mx Cell State pstate = get State ( p ) ; validate Points ( pstate , target ) ; } set Terminal Points ( state ) ; update Points ( state , geo . get Points ( ) , source , target ) ; update Terminal Points ( state , source , target ) ; update Edge Bounds ( state ) ; state . set Absolute Offset ( get Point ( state , geo ) ) ; } else if ( geo != null && geo . is Relative ( ) && parent State != null && model . is Edge ( parent State . get Cell ( ) ) ) { mx Point origin = get Point ( parent State , geo ) ; if ( origin != null ) { state . set X ( origin . get X ( ) ) ; state . set Y ( origin . get Y ( ) ) ; origin . set X ( ( origin . get X ( ) / scale ) - translate . get X ( ) ) ; origin . set Y ( ( origin . get Y ( ) / scale ) - translate . get Y ( ) ) ; state . set Origin ( origin ) ; child Moved ( parent State , state ) ; } } state . set Invalid ( BOOL ) ; } if ( is Edge || model . is Vertex ( cell ) ) { update Label Bounds ( state ) ; mx Rectangle bb = update Bounding Box ( state ) ; min X = bb . get X ( ) ; min Y = bb . get Y ( ) ; max X = bb . get X ( ) + bb . get Width ( ) ; max Y = bb . get Y ( ) + bb . get Height ( ) ; } } if ( state != null && ( ! graph . is Cell Collapsed ( cell ) || cell == current Root ) ) { int child Count = model . get Child Count ( cell ) ; for ( int i = NUM ; i < child Count ; i ++ ) { Object child = model . get Child At ( cell , i ) ; mx Rectangle bounds = validate Points ( state , child ) ; min X = Math . min ( min X , bounds . get X ( ) ) ; min Y = Math . min ( min Y , bounds . get Y ( ) ) ; max X = Math . max ( max X , bounds . get X ( ) + bounds . get Width ( ) ) ; max Y = Math . max ( max Y , bounds . get Y ( ) + bounds . get Height ( ) ) ; } } return new mx Rectangle ( min X , min Y , max X - min X , max Y - min Y ) ; }
public mxRectangle validatePoints ( mxCellState parentState , Object cell ) { mxCellState state = getState ( cell ) ; double minX = _NUM ; double minY = _NUM ; double maxX = _NUM ; double maxY = _NUM ; mxIGraphModel model = graph . getModel ( ) ; boolean isEdge = model . isEdge ( cell ) ; if ( state != null ) { if ( state . isInvalid ( ) ) { mxGeometry geo = graph . getCellGeometry ( cell ) ; if ( isEdge ) { Object source = getVisibleTerminal ( cell , _BOOL ) ; if ( source != null && ! model . isAncestor ( source , cell ) ) { Object p = model . getParent ( source ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , source ) ; } Object target = getVisibleTerminal ( cell , _BOOL ) ; if ( target != null && ! model . isAncestor ( target , cell ) ) { Object p = model . getParent ( target ) ; mxCellState pstate = getState ( p ) ; validatePoints ( pstate , target ) ; } setTerminalPoints ( state ) ; updatePoints ( state , geo . getPoints ( ) , source , target ) ; updateTerminalPoints ( state , source , target ) ; updateEdgeBounds ( state ) ; state . setAbsoluteOffset ( getPoint ( state , geo ) ) ; } else if ( geo != null && geo . isRelative ( ) && parentState != null && model . isEdge ( parentState . getCell ( ) ) ) { mxPoint origin = getPoint ( parentState , geo ) ; if ( origin != null ) { state . setX ( origin . getX ( ) ) ; state . setY ( origin . getY ( ) ) ; origin . setX ( ( origin . getX ( ) / scale ) - translate . getX ( ) ) ; origin . setY ( ( origin . getY ( ) / scale ) - translate . getY ( ) ) ; state . setOrigin ( origin ) ; childMoved ( parentState , state ) ; } } state . setInvalid ( _BOOL ) ; } if ( isEdge || model . isVertex ( cell ) ) { updateLabelBounds ( state ) ; mxRectangle bb = updateBoundingBox ( state ) ; minX = bb . getX ( ) ; minY = bb . getY ( ) ; maxX = bb . getX ( ) + bb . getWidth ( ) ; maxY = bb . getY ( ) + bb . getHeight ( ) ; } } if ( state != null && ( ! graph . isCellCollapsed ( cell ) || cell == currentRoot ) ) { int childCount = model . getChildCount ( cell ) ; for ( int i = _NUM ; i < childCount ; i ++ ) { Object child = model . getChildAt ( cell , i ) ; mxRectangle bounds = validatePoints ( state , child ) ; minX = Math . min ( minX , bounds . getX ( ) ) ; minY = Math . min ( minY , bounds . getY ( ) ) ; maxX = Math . max ( maxX , bounds . getX ( ) + bounds . getWidth ( ) ) ; maxY = Math . max ( maxY , bounds . getY ( ) + bounds . getHeight ( ) ) ; } } return new mxRectangle ( minX , minY , maxX - minX , maxY - minY ) ; }
728
java-test-660
java
In which direction does a point constrain to the closest grid point ?
in any direction
@ Override public Point 2 D . Double constrain Point ( Point 2 D . Double p ) { p . x = Math . round ( p . x / width ) * width ; p . y = Math . round ( p . y / height ) * height ; return p ; }
@ Override public Point2D . Double constrainPoint ( Point2D . Double p ) { p . x = Math . round ( p . x / width ) * width ; p . y = Math . round ( p . y / height ) * height ; return p ; }
57
java-test-662
java
What does the code create from the image colormodel and samplemodel ?
a color table
private static byte [ ] create Color Table ( Color Model color Model , Sample Model sample Model ) { byte [ ] color Table ; if ( color Model instanceof Index Color Model ) { Index Color Model icm = ( Index Color Model ) color Model ; int map Size = icm . get Map Size ( ) ; int ct Size = get Gif Palette Size ( map Size ) ; byte [ ] reds = new byte [ ct Size ] ; byte [ ] greens = new byte [ ct Size ] ; byte [ ] blues = new byte [ ct Size ] ; icm . get Reds ( reds ) ; icm . get Greens ( greens ) ; icm . get Blues ( blues ) ; for ( int i = map Size ; i < ct Size ; i ++ ) { reds [ i ] = reds [ NUM ] ; greens [ i ] = greens [ NUM ] ; blues [ i ] = blues [ NUM ] ; } color Table = new byte [ NUM * ct Size ] ; int idx = NUM ; for ( int i = NUM ; i < ct Size ; i ++ ) { color Table [ idx ++ ] = reds [ i ] ; color Table [ idx ++ ] = greens [ i ] ; color Table [ idx ++ ] = blues [ i ] ; } } else if ( sample Model . get Num Bands ( ) == NUM ) { int num Bits = sample Model . get Sample Size ( ) [ NUM ] ; if ( num Bits > NUM ) { num Bits = NUM ; } int color Table Length = NUM * ( NUM << num Bits ) ; color Table = new byte [ color Table Length ] ; for ( int i = NUM ; i < color Table Length ; i ++ ) { color Table [ i ] = ( byte ) ( i / NUM ) ; } } else { color Table = null ; } return color Table ; }
private static byte [ ] createColorTable ( ColorModel colorModel , SampleModel sampleModel ) { byte [ ] colorTable ; if ( colorModel instanceof IndexColorModel ) { IndexColorModel icm = ( IndexColorModel ) colorModel ; int mapSize = icm . getMapSize ( ) ; int ctSize = getGifPaletteSize ( mapSize ) ; byte [ ] reds = new byte [ ctSize ] ; byte [ ] greens = new byte [ ctSize ] ; byte [ ] blues = new byte [ ctSize ] ; icm . getReds ( reds ) ; icm . getGreens ( greens ) ; icm . getBlues ( blues ) ; for ( int i = mapSize ; i < ctSize ; i ++ ) { reds [ i ] = reds [ _NUM ] ; greens [ i ] = greens [ _NUM ] ; blues [ i ] = blues [ _NUM ] ; } colorTable = new byte [ _NUM * ctSize ] ; int idx = _NUM ; for ( int i = _NUM ; i < ctSize ; i ++ ) { colorTable [ idx ++ ] = reds [ i ] ; colorTable [ idx ++ ] = greens [ i ] ; colorTable [ idx ++ ] = blues [ i ] ; } } else if ( sampleModel . getNumBands ( ) == _NUM ) { int numBits = sampleModel . getSampleSize ( ) [ _NUM ] ; if ( numBits > _NUM ) { numBits = _NUM ; } int colorTableLength = _NUM * ( _NUM << numBits ) ; colorTable = new byte [ colorTableLength ] ; for ( int i = _NUM ; i < colorTableLength ; i ++ ) { colorTable [ i ] = ( byte ) ( i / _NUM ) ; } } else { colorTable = null ; } return colorTable ; }
370
java-test-663
java
How does the code create a color table ?
from the image colormodel and samplemodel
private static byte [ ] create Color Table ( Color Model color Model , Sample Model sample Model ) { byte [ ] color Table ; if ( color Model instanceof Index Color Model ) { Index Color Model icm = ( Index Color Model ) color Model ; int map Size = icm . get Map Size ( ) ; int ct Size = get Gif Palette Size ( map Size ) ; byte [ ] reds = new byte [ ct Size ] ; byte [ ] greens = new byte [ ct Size ] ; byte [ ] blues = new byte [ ct Size ] ; icm . get Reds ( reds ) ; icm . get Greens ( greens ) ; icm . get Blues ( blues ) ; for ( int i = map Size ; i < ct Size ; i ++ ) { reds [ i ] = reds [ NUM ] ; greens [ i ] = greens [ NUM ] ; blues [ i ] = blues [ NUM ] ; } color Table = new byte [ NUM * ct Size ] ; int idx = NUM ; for ( int i = NUM ; i < ct Size ; i ++ ) { color Table [ idx ++ ] = reds [ i ] ; color Table [ idx ++ ] = greens [ i ] ; color Table [ idx ++ ] = blues [ i ] ; } } else if ( sample Model . get Num Bands ( ) == NUM ) { int num Bits = sample Model . get Sample Size ( ) [ NUM ] ; if ( num Bits > NUM ) { num Bits = NUM ; } int color Table Length = NUM * ( NUM << num Bits ) ; color Table = new byte [ color Table Length ] ; for ( int i = NUM ; i < color Table Length ; i ++ ) { color Table [ i ] = ( byte ) ( i / NUM ) ; } } else { color Table = null ; } return color Table ; }
private static byte [ ] createColorTable ( ColorModel colorModel , SampleModel sampleModel ) { byte [ ] colorTable ; if ( colorModel instanceof IndexColorModel ) { IndexColorModel icm = ( IndexColorModel ) colorModel ; int mapSize = icm . getMapSize ( ) ; int ctSize = getGifPaletteSize ( mapSize ) ; byte [ ] reds = new byte [ ctSize ] ; byte [ ] greens = new byte [ ctSize ] ; byte [ ] blues = new byte [ ctSize ] ; icm . getReds ( reds ) ; icm . getGreens ( greens ) ; icm . getBlues ( blues ) ; for ( int i = mapSize ; i < ctSize ; i ++ ) { reds [ i ] = reds [ _NUM ] ; greens [ i ] = greens [ _NUM ] ; blues [ i ] = blues [ _NUM ] ; } colorTable = new byte [ _NUM * ctSize ] ; int idx = _NUM ; for ( int i = _NUM ; i < ctSize ; i ++ ) { colorTable [ idx ++ ] = reds [ i ] ; colorTable [ idx ++ ] = greens [ i ] ; colorTable [ idx ++ ] = blues [ i ] ; } } else if ( sampleModel . getNumBands ( ) == _NUM ) { int numBits = sampleModel . getSampleSize ( ) [ _NUM ] ; if ( numBits > _NUM ) { numBits = _NUM ; } int colorTableLength = _NUM * ( _NUM << numBits ) ; colorTable = new byte [ colorTableLength ] ; for ( int i = _NUM ; i < colorTableLength ; i ++ ) { colorTable [ i ] = ( byte ) ( i / _NUM ) ; } } else { colorTable = null ; } return colorTable ; }
370
java-test-664
java
What does the code add to the controller ?
a core equipment configuration changer
public void add Core Equipment Configuration Changer ( final long equipment Id , final I Core Equipment Configuration Changer core Equipment Configuration Changer ) { List < I Core Equipment Configuration Changer > changers = core Equipment Configuration Changers . get ( equipment Id ) ; if ( changers == null ) { changers = new Array List < > ( ) ; core Equipment Configuration Changers . put ( equipment Id , changers ) ; } changers . add ( core Equipment Configuration Changer ) ; }
public void addCoreEquipmentConfigurationChanger ( final long equipmentId , final ICoreEquipmentConfigurationChanger coreEquipmentConfigurationChanger ) { List < ICoreEquipmentConfigurationChanger > changers = coreEquipmentConfigurationChangers . get ( equipmentId ) ; if ( changers == null ) { changers = new ArrayList < > ( ) ; coreEquipmentConfigurationChangers . put ( equipmentId , changers ) ; } changers . add ( coreEquipmentConfigurationChanger ) ; }
88
java-test-665
java
What notifys that something has changed ?
the change - receivers
private void notify Change ( final String what ) { if ( D ) LOG . info ( STRING + what ) ; update Remote Control Client ( what ) ; if ( what . equals ( POSITION CHANGED ) ) { return ; } final Intent intent = new Intent ( what ) ; intent . put Extra ( STRING , get Audio Id ( ) ) ; intent . put Extra ( STRING , get Artist Name ( ) ) ; intent . put Extra ( STRING , get Album Name ( ) ) ; intent . put Extra ( STRING , get Track Name ( ) ) ; intent . put Extra ( STRING , is Playing ( ) ) ; intent . put Extra ( STRING , is Favorite ( ) ) ; send Sticky Broadcast ( intent ) ; final Intent music Intent = new Intent ( intent ) ; music Intent . set Action ( what . replace ( APOLLO PACKAGE NAME , MUSIC PACKAGE NAME ) ) ; send Sticky Broadcast ( music Intent ) ; if ( what . equals ( META CHANGED ) ) { if ( m Favorites Cache == null ) { m Favorites Cache = Favorites Store . get Instance ( this ) ; } if ( m Favorites Cache . get Song Id ( get Audio Id ( ) ) != null ) { m Favorites Cache . add Song Id ( get Audio Id ( ) , get Track Name ( ) , get Album Name ( ) , get Artist Name ( ) ) ; } if ( m Recents Cache == null ) { m Recents Cache = Recent Store . get Instance ( this ) ; } m Recents Cache . add Album Id ( get Album Id ( ) , get Album Name ( ) , get Artist Name ( ) , Music Utils . get Song Count For Album ( this , get Album Id ( ) ) , Music Utils . get Release Date For Album ( this , get Album Id ( ) ) ) ; } else if ( what . equals ( QUEUE CHANGED ) ) { save Queue ( BOOL ) ; if ( is Playing ( ) ) { set Next Track ( ) ; } } else { save Queue ( BOOL ) ; } if ( what . equals ( PLAYSTATE CHANGED ) ) { m Notification Helper . update Play State ( is Playing ( ) ) ; } }
private void notifyChange ( final String what ) { if ( D ) LOG . info ( STRING + what ) ; updateRemoteControlClient ( what ) ; if ( what . equals ( POSITION_CHANGED ) ) { return ; } final Intent intent = new Intent ( what ) ; intent . putExtra ( STRING , getAudioId ( ) ) ; intent . putExtra ( STRING , getArtistName ( ) ) ; intent . putExtra ( STRING , getAlbumName ( ) ) ; intent . putExtra ( STRING , getTrackName ( ) ) ; intent . putExtra ( STRING , isPlaying ( ) ) ; intent . putExtra ( STRING , isFavorite ( ) ) ; sendStickyBroadcast ( intent ) ; final Intent musicIntent = new Intent ( intent ) ; musicIntent . setAction ( what . replace ( APOLLO_PACKAGE_NAME , MUSIC_PACKAGE_NAME ) ) ; sendStickyBroadcast ( musicIntent ) ; if ( what . equals ( META_CHANGED ) ) { if ( mFavoritesCache == null ) { mFavoritesCache = FavoritesStore . getInstance ( this ) ; } if ( mFavoritesCache . getSongId ( getAudioId ( ) ) != null ) { mFavoritesCache . addSongId ( getAudioId ( ) , getTrackName ( ) , getAlbumName ( ) , getArtistName ( ) ) ; } if ( mRecentsCache == null ) { mRecentsCache = RecentStore . getInstance ( this ) ; } mRecentsCache . addAlbumId ( getAlbumId ( ) , getAlbumName ( ) , getArtistName ( ) , MusicUtils . getSongCountForAlbum ( this , getAlbumId ( ) ) , MusicUtils . getReleaseDateForAlbum ( this , getAlbumId ( ) ) ) ; } else if ( what . equals ( QUEUE_CHANGED ) ) { saveQueue ( _BOOL ) ; if ( isPlaying ( ) ) { setNextTrack ( ) ; } } else { saveQueue ( _BOOL ) ; } if ( what . equals ( PLAYSTATE_CHANGED ) ) { mNotificationHelper . updatePlayState ( isPlaying ( ) ) ; } }
428
java-test-666
java
What do the change - receivers notify ?
that something has changed
private void notify Change ( final String what ) { if ( D ) LOG . info ( STRING + what ) ; update Remote Control Client ( what ) ; if ( what . equals ( POSITION CHANGED ) ) { return ; } final Intent intent = new Intent ( what ) ; intent . put Extra ( STRING , get Audio Id ( ) ) ; intent . put Extra ( STRING , get Artist Name ( ) ) ; intent . put Extra ( STRING , get Album Name ( ) ) ; intent . put Extra ( STRING , get Track Name ( ) ) ; intent . put Extra ( STRING , is Playing ( ) ) ; intent . put Extra ( STRING , is Favorite ( ) ) ; send Sticky Broadcast ( intent ) ; final Intent music Intent = new Intent ( intent ) ; music Intent . set Action ( what . replace ( APOLLO PACKAGE NAME , MUSIC PACKAGE NAME ) ) ; send Sticky Broadcast ( music Intent ) ; if ( what . equals ( META CHANGED ) ) { if ( m Favorites Cache == null ) { m Favorites Cache = Favorites Store . get Instance ( this ) ; } if ( m Favorites Cache . get Song Id ( get Audio Id ( ) ) != null ) { m Favorites Cache . add Song Id ( get Audio Id ( ) , get Track Name ( ) , get Album Name ( ) , get Artist Name ( ) ) ; } if ( m Recents Cache == null ) { m Recents Cache = Recent Store . get Instance ( this ) ; } m Recents Cache . add Album Id ( get Album Id ( ) , get Album Name ( ) , get Artist Name ( ) , Music Utils . get Song Count For Album ( this , get Album Id ( ) ) , Music Utils . get Release Date For Album ( this , get Album Id ( ) ) ) ; } else if ( what . equals ( QUEUE CHANGED ) ) { save Queue ( BOOL ) ; if ( is Playing ( ) ) { set Next Track ( ) ; } } else { save Queue ( BOOL ) ; } if ( what . equals ( PLAYSTATE CHANGED ) ) { m Notification Helper . update Play State ( is Playing ( ) ) ; } }
private void notifyChange ( final String what ) { if ( D ) LOG . info ( STRING + what ) ; updateRemoteControlClient ( what ) ; if ( what . equals ( POSITION_CHANGED ) ) { return ; } final Intent intent = new Intent ( what ) ; intent . putExtra ( STRING , getAudioId ( ) ) ; intent . putExtra ( STRING , getArtistName ( ) ) ; intent . putExtra ( STRING , getAlbumName ( ) ) ; intent . putExtra ( STRING , getTrackName ( ) ) ; intent . putExtra ( STRING , isPlaying ( ) ) ; intent . putExtra ( STRING , isFavorite ( ) ) ; sendStickyBroadcast ( intent ) ; final Intent musicIntent = new Intent ( intent ) ; musicIntent . setAction ( what . replace ( APOLLO_PACKAGE_NAME , MUSIC_PACKAGE_NAME ) ) ; sendStickyBroadcast ( musicIntent ) ; if ( what . equals ( META_CHANGED ) ) { if ( mFavoritesCache == null ) { mFavoritesCache = FavoritesStore . getInstance ( this ) ; } if ( mFavoritesCache . getSongId ( getAudioId ( ) ) != null ) { mFavoritesCache . addSongId ( getAudioId ( ) , getTrackName ( ) , getAlbumName ( ) , getArtistName ( ) ) ; } if ( mRecentsCache == null ) { mRecentsCache = RecentStore . getInstance ( this ) ; } mRecentsCache . addAlbumId ( getAlbumId ( ) , getAlbumName ( ) , getArtistName ( ) , MusicUtils . getSongCountForAlbum ( this , getAlbumId ( ) ) , MusicUtils . getReleaseDateForAlbum ( this , getAlbumId ( ) ) ) ; } else if ( what . equals ( QUEUE_CHANGED ) ) { saveQueue ( _BOOL ) ; if ( isPlaying ( ) ) { setNextTrack ( ) ; } } else { saveQueue ( _BOOL ) ; } if ( what . equals ( PLAYSTATE_CHANGED ) ) { mNotificationHelper . updatePlayState ( isPlaying ( ) ) ; } }
428
java-test-667
java
What does the code create ?
a new bookmark action
public C Create Bookmark Action ( final Bookmark Manager manager , final I Address offset ) { super ( String . format ( STRING , offset . to Hex String ( ) ) ) ; m manager = Preconditions . check Not Null ( manager , STRING ) ; m offset = Preconditions . check Not Null ( offset , STRING ) ; }
public CCreateBookmarkAction ( final BookmarkManager manager , final IAddress offset ) { super ( String . format ( STRING , offset . toHexString ( ) ) ) ; m_manager = Preconditions . checkNotNull ( manager , STRING ) ; m_offset = Preconditions . checkNotNull ( offset , STRING ) ; }
64
java-test-668
java
What do you have ?
a class named ' org . hibernate . internal . util . stringhelper '
public static String collapse ( String name ) { if ( name == null ) { return null ; } int break Point = name . last Index Of ( STRING ) ; if ( break Point < NUM ) { return name ; } return collapse Qualifier ( name . substring ( NUM , break Point ) , BOOL ) + name . substring ( break Point ) ; }
public static String collapse ( String name ) { if ( name == null ) { return null ; } int breakPoint = name . lastIndexOf ( STRING ) ; if ( breakPoint < _NUM ) { return name ; } return collapseQualifier ( name . substring ( _NUM , breakPoint ) , _BOOL ) + name . substring ( breakPoint ) ; }
71
java-test-669
java
What might an example serve best ?
to explain
public static String collapse ( String name ) { if ( name == null ) { return null ; } int break Point = name . last Index Of ( STRING ) ; if ( break Point < NUM ) { return name ; } return collapse Qualifier ( name . substring ( NUM , break Point ) , BOOL ) + name . substring ( break Point ) ; }
public static String collapse ( String name ) { if ( name == null ) { return null ; } int breakPoint = name . lastIndexOf ( STRING ) ; if ( breakPoint < _NUM ) { return name ; } return collapseQualifier ( name . substring ( _NUM , breakPoint ) , _BOOL ) + name . substring ( breakPoint ) ; }
71
java-test-670
java
What do it add ?
to the target itemelement
private void parse Bind Elements ( Xml Reader . Element e , Item Element ie , String refer Variable ) { final Array < Xml Reader . Element > binds = e . get Children By Name ( Xml Element Names . BIND ) ; if ( binds == null || binds . size == NUM ) return ; Bind Element be ; Xml Reader . Element bind Ele ; List < Property Element > props ; for ( int i = NUM , size = binds . size ; i < size ; i ++ ) { be = new Bind Element ( Xml Element Names . BIND ) ; bind Ele = binds . get ( i ) ; String id = bind Ele . get Attribute ( Xml Keys . ID , null ) ; if ( ! Text Utils . is Empty ( id ) ) { be . set Id ( id ) ; } String refer = bind Ele . get Attribute ( Xml Keys . REFER VARIABLE , null ) ; if ( ! Text Utils . is Empty ( refer ) ) { be . set Refer Variable ( refer ) ; } refer = Data Bind Util . merge Refer Variable ( refer Variable , refer ) ; props = parse Property Elements ( bind Ele , refer , id , BOOL ) ; if ( props != null && props . size ( ) > NUM ) { be . set Property Elements ( props ) ; } parse Image Property ( be , bind Ele , refer , id ) ; ie . add Bind Element ( be ) ; } }
private void parseBindElements ( XmlReader . Element e , ItemElement ie , String referVariable ) { final Array < XmlReader . Element > binds = e . getChildrenByName ( XmlElementNames . BIND ) ; if ( binds == null || binds . size == _NUM ) return ; BindElement be ; XmlReader . Element bindEle ; List < PropertyElement > props ; for ( int i = _NUM , size = binds . size ; i < size ; i ++ ) { be = new BindElement ( XmlElementNames . BIND ) ; bindEle = binds . get ( i ) ; String id = bindEle . getAttribute ( XmlKeys . ID , null ) ; if ( ! TextUtils . isEmpty ( id ) ) { be . setId ( id ) ; } String refer = bindEle . getAttribute ( XmlKeys . REFER_VARIABLE , null ) ; if ( ! TextUtils . isEmpty ( refer ) ) { be . setReferVariable ( refer ) ; } refer = DataBindUtil . mergeReferVariable ( referVariable , refer ) ; props = parsePropertyElements ( bindEle , refer , id , _BOOL ) ; if ( props != null && props . size ( ) > _NUM ) { be . setPropertyElements ( props ) ; } parseImageProperty ( be , bindEle , refer , id ) ; ie . addBindElement ( be ) ; } }
283
java-test-672
java
What does the code find ?
specified virtual method description
public final RVM Method find Virtual Method ( Atom member Name , Atom member Descriptor ) { if ( VM . Verify Assertions ) VM . assert ( is Resolved ( ) ) ; RVM Method [ ] methods = get Virtual Methods ( ) ; for ( int i = NUM , n = methods . length ; i < n ; ++ i ) { RVM Method method = methods [ i ] ; if ( method . get Name ( ) == member Name && method . get Descriptor ( ) == member Descriptor ) { return method ; } } return null ; }
public final RVMMethod findVirtualMethod ( Atom memberName , Atom memberDescriptor ) { if ( VM . VerifyAssertions ) VM . _assert ( isResolved ( ) ) ; RVMMethod [ ] methods = getVirtualMethods ( ) ; for ( int i = _NUM , n = methods . length ; i < n ; ++ i ) { RVMMethod method = methods [ i ] ; if ( method . getName ( ) == memberName && method . getDescriptor ( ) == memberDescriptor ) { return method ; } } return null ; }
108
java-test-673
java
What does the code create ?
a fixed partition list to be used for fixed partition region
private static void create Fixed Partition List ( int primary Index ) { fpa List . clear ( ) ; if ( primary Index == NUM ) { fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , BOOL , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; } if ( primary Index == NUM ) { fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , BOOL , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; } if ( primary Index == NUM ) { fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , NUM ) ) ; fpa List . add ( Fixed Partition Attributes . create Fixed Partition ( STRING , BOOL , NUM ) ) ; } }
private static void createFixedPartitionList ( int primaryIndex ) { fpaList . clear ( ) ; if ( primaryIndex == _NUM ) { fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _BOOL , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; } if ( primaryIndex == _NUM ) { fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _BOOL , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; } if ( primaryIndex == _NUM ) { fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _NUM ) ) ; fpaList . add ( FixedPartitionAttributes . createFixedPartition ( STRING , _BOOL , _NUM ) ) ; } }
225
java-test-675
java
For what purpose did any xmlfilter objects require ?
to allow the sax event stream to be filtered and preprocessed before it gets to dom4j
protected XML Reader install XML Filter ( XML Reader reader ) { XML Filter filter = get XML Filter ( ) ; if ( filter != null ) { XML Filter root = filter ; while ( BOOL ) { XML Reader parent = root . get Parent ( ) ; if ( parent instanceof XML Filter ) { root = ( XML Filter ) parent ; } else { break ; } } root . set Parent ( reader ) ; return filter ; } return reader ; }
protected XMLReader installXMLFilter ( XMLReader reader ) { XMLFilter filter = getXMLFilter ( ) ; if ( filter != null ) { XMLFilter root = filter ; while ( _BOOL ) { XMLReader parent = root . getParent ( ) ; if ( parent instanceof XMLFilter ) { root = ( XMLFilter ) parent ; } else { break ; } } root . setParent ( reader ) ; return filter ; } return reader ; }
90
java-test-677
java
What does the code create ?
a new jdbcpiedataset
public JDBC Pie Dataset ( String url , String driver Name , String user , String password ) throws SQL Exception , Class Not Found Exception { Class . for Name ( driver Name ) ; this . connection = Driver Manager . get Connection ( url , user , password ) ; }
public JDBCPieDataset ( String url , String driverName , String user , String password ) throws SQLException , ClassNotFoundException { Class . forName ( driverName ) ; this . connection = DriverManager . getConnection ( url , user , password ) ; }
54
java-test-678
java
What does the code append ?
the string result from applying a freemarker template
public static void apply Template ( String Builder builder , final String template , final Map < String , Object > map ) { configuration = get Configuration ( ) ; try ( Byte Array Output Stream output Stream = new Byte Array Output Stream ( ) ; Writer writer = new Output Stream Writer ( output Stream ) ) { Template configuration Template = configuration . get Template ( template ) ; configuration Template . process ( map , writer ) ; builder . append ( output Stream . to String ( ) ) ; } catch ( Exception e ) { throw new Runtime Exception ( e . get Message ( ) , e ) ; } }
public static void applyTemplate ( StringBuilder builder , final String template , final Map < String , Object > map ) { configuration = getConfiguration ( ) ; try ( ByteArrayOutputStream outputStream = new ByteArrayOutputStream ( ) ; Writer writer = new OutputStreamWriter ( outputStream ) ) { Template configurationTemplate = configuration . getTemplate ( template ) ; configurationTemplate . process ( map , writer ) ; builder . append ( outputStream . toString ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( e . getMessage ( ) , e ) ; } }
120
java-test-679
java
In which direction is this method invoked in canvas ?
from the event handler
void dispatch Committed Text ( String str , long when ) { if ( str == null ) return ; if ( composed Text == null ) { Attributed String attrstr = new Attributed String ( str ) ; post Input Method Event ( Input Method Event . INPUT METHOD TEXT CHANGED , attrstr . get Iterator ( ) , str . length ( ) , null , null , when ) ; } else { committed Text = str ; } }
void dispatchCommittedText ( String str , long when ) { if ( str == null ) return ; if ( composedText == null ) { AttributedString attrstr = new AttributedString ( str ) ; postInputMethodEvent ( InputMethodEvent . INPUT_METHOD_TEXT_CHANGED , attrstr . getIterator ( ) , str . length ( ) , null , null , when ) ; } else { committedText = str ; } }
83
java-test-680
java
Where is this method invoked from the event handler ?
in canvas
void dispatch Committed Text ( String str , long when ) { if ( str == null ) return ; if ( composed Text == null ) { Attributed String attrstr = new Attributed String ( str ) ; post Input Method Event ( Input Method Event . INPUT METHOD TEXT CHANGED , attrstr . get Iterator ( ) , str . length ( ) , null , null , when ) ; } else { committed Text = str ; } }
void dispatchCommittedText ( String str , long when ) { if ( str == null ) return ; if ( composedText == null ) { AttributedString attrstr = new AttributedString ( str ) ; postInputMethodEvent ( InputMethodEvent . INPUT_METHOD_TEXT_CHANGED , attrstr . getIterator ( ) , str . length ( ) , null , null , when ) ; } else { committedText = str ; } }
83
java-test-683
java
How do the nearest objects to a given coordinate get in a quadtree ?
with a large number of entries
public void test Get ( ) { final double min X = NUM ; final double max X = NUM ; final double min Y = NUM ; final double max Y = NUM ; final long n Of Entries = NUM ; final long n Of Queries = NUM ; Random r = new Random ( NUM ) ; double delta X = max X - min X ; double delta Y = max Y - min Y ; log . info ( STRING + n Of Entries + STRING ) ; Quad Tree < Long > qt = new Quad Tree < Long > ( min X , min Y , max X , max Y ) ; for ( long i = NUM ; i < n Of Entries ; i ++ ) { double x = r . next Double ( ) * delta X + min X ; double y = r . next Double ( ) * delta Y + min Y ; qt . put ( x , y , Long . value Of ( i ) ) ; } log . info ( STRING ) ; Gbl . start Measurement ( ) ; for ( long i = NUM ; i < n Of Queries ; i ++ ) { double x = r . next Double ( ) * delta X + min X ; double y = r . next Double ( ) * delta Y + min Y ; qt . get Closest ( x , y ) ; } Gbl . print Elapsed Time ( ) ; log . info ( STRING ) ; }
public void testGet ( ) { final double minX = _NUM ; final double maxX = _NUM ; final double minY = _NUM ; final double maxY = _NUM ; final long nOfEntries = _NUM ; final long nOfQueries = _NUM ; Random r = new Random ( _NUM ) ; double deltaX = maxX - minX ; double deltaY = maxY - minY ; log . info ( STRING + nOfEntries + STRING ) ; QuadTree < Long > qt = new QuadTree < Long > ( minX , minY , maxX , maxY ) ; for ( long i = _NUM ; i < nOfEntries ; i ++ ) { double x = r . nextDouble ( ) * deltaX + minX ; double y = r . nextDouble ( ) * deltaY + minY ; qt . put ( x , y , Long . valueOf ( i ) ) ; } log . info ( STRING ) ; Gbl . startMeasurement ( ) ; for ( long i = _NUM ; i < nOfQueries ; i ++ ) { double x = r . nextDouble ( ) * deltaX + minX ; double y = r . nextDouble ( ) * deltaY + minY ; qt . getClosest ( x , y ) ; } Gbl . printElapsedTime ( ) ; log . info ( STRING ) ; }
277
java-test-684
java
What do stress test use ?
an encoder with a random number of bits reversed
public void test encode decode random Bits stress ( ) { final Random r = new Random ( ) ; for ( int i = NUM ; i < NUM ; i ++ ) { final int nbits = r . next Int ( NUM ) ; final int pid = r . next Int ( ) ; final int ctr = r . next Int ( ) ; if ( pid == NUM && ctr == NUM ) { continue ; } final Term Id Encoder encoder = new Term Id Encoder ( nbits ) ; do Encode Decode Test ( encoder , pid , ctr ) ; } }
public void test_encode_decode_randomBits_stress ( ) { final Random r = new Random ( ) ; for ( int i = _NUM ; i < _NUM ; i ++ ) { final int nbits = r . nextInt ( _NUM ) ; final int pid = r . nextInt ( ) ; final int ctr = r . nextInt ( ) ; if ( pid == _NUM && ctr == _NUM ) { continue ; } final TermIdEncoder encoder = new TermIdEncoder ( nbits ) ; doEncodeDecodeTest ( encoder , pid , ctr ) ; } }
111
java-test-685
java
What does the code verify ?
the signature of a file
public static boolean verify ( Public Key public Key , byte [ ] sig , Byte Buffer data ) throws Invalid Key Exception , Signature Exception { int old Pos = data . position ( ) ; Signature signature = null ; try { signature = Signature . get Instance ( STRING ) ; signature . init Verify ( public Key ) ; signature . update ( data ) ; boolean verify = signature . verify ( sig ) ; return verify ; } catch ( No Such Algorithm Exception e ) { } finally { data . position ( old Pos ) ; } return BOOL ; }
public static boolean verify ( PublicKey publicKey , byte [ ] sig , ByteBuffer data ) throws InvalidKeyException , SignatureException { int oldPos = data . position ( ) ; Signature signature = null ; try { signature = Signature . getInstance ( STRING ) ; signature . initVerify ( publicKey ) ; signature . update ( data ) ; boolean verify = signature . verify ( sig ) ; return verify ; } catch ( NoSuchAlgorithmException e ) { } finally { data . position ( oldPos ) ; } return _BOOL ; }
109
java-test-686
java
How does the code advance the position ?
by the given number of 16 - bit code units
public void jumpahead ( int count ) { if ( count < NUM ) { throw new Illegal Argument Exception ( ) ; } if ( buf != null ) { buf Pos += count ; if ( buf Pos > buf . length ) { throw new Illegal Argument Exception ( ) ; } if ( buf Pos == buf . length ) { buf = null ; } } else { int i = pos . get Index ( ) + count ; pos . set Index ( i ) ; if ( i > text . length ( ) ) { throw new Illegal Argument Exception ( ) ; } } }
public void jumpahead ( int count ) { if ( count < _NUM ) { throw new IllegalArgumentException ( ) ; } if ( buf != null ) { bufPos += count ; if ( bufPos > buf . length ) { throw new IllegalArgumentException ( ) ; } if ( bufPos == buf . length ) { buf = null ; } } else { int i = pos . getIndex ( ) + count ; pos . setIndex ( i ) ; if ( i > text . length ( ) ) { throw new IllegalArgumentException ( ) ; } } }
115
java-test-687
java
What does the code provide ?
an end - of - run summary of ram usage
public static void report Ram Usage ( String measurement Point ) { logger . info ( STRING ) ; logger . info ( STRING + measurement Point ) ; logger . info ( String . format ( STRING , STRING , STRING , STRING , STRING , STRING , STRING ) ) ; for ( int i = NUM ; i < ram Pool Type . length ; i ++ ) { logger . info ( String . format ( STRING , ram Pool Name [ i ] , ram Pool Type [ i ] , ram Pool Committed [ i ] / ( NUM << NUM ) , ram Pool Init [ i ] / ( NUM << NUM ) , ram Pool Max [ i ] / ( NUM << NUM ) , ram Pool Used [ i ] / ( NUM << NUM ) ) ) ; } logger . info ( STRING ) ; }
public static void reportRamUsage ( String measurementPoint ) { logger . info ( STRING ) ; logger . info ( STRING + measurementPoint ) ; logger . info ( String . format ( STRING , STRING , STRING , STRING , STRING , STRING , STRING ) ) ; for ( int i = _NUM ; i < ramPoolType . length ; i ++ ) { logger . info ( String . format ( STRING , ramPoolName [ i ] , ramPoolType [ i ] , ramPoolCommitted [ i ] / ( _NUM << _NUM ) , ramPoolInit [ i ] / ( _NUM << _NUM ) , ramPoolMax [ i ] / ( _NUM << _NUM ) , ramPoolUsed [ i ] / ( _NUM << _NUM ) ) ) ; } logger . info ( STRING ) ; }
159
java-test-696
java
What do a string represent ?
the cutpoints
public static String cutpoints To String ( double [ ] cut Points , boolean [ ] cut And Left ) { String Buffer text = new String Buffer ( STRING ) ; if ( cut Points == null ) { text . append ( STRING ) ; } else { text . append ( STRING + cut Points . length + STRING ) ; for ( int i = NUM ; i < cut Points . length ; i ++ ) { text . append ( STRING + cut Points [ i ] + STRING ) ; text . append ( STRING + cut And Left [ i ] + STRING ) ; } text . append ( STRING ) ; } return text . to String ( ) ; }
public static String cutpointsToString ( double [ ] cutPoints , boolean [ ] cutAndLeft ) { StringBuffer text = new StringBuffer ( STRING ) ; if ( cutPoints == null ) { text . append ( STRING ) ; } else { text . append ( STRING + cutPoints . length + STRING ) ; for ( int i = _NUM ; i < cutPoints . length ; i ++ ) { text . append ( STRING + cutPoints [ i ] + STRING ) ; text . append ( STRING + cutAndLeft [ i ] + STRING ) ; } text . append ( STRING ) ; } return text . toString ( ) ; }
131
java-test-697
java
What does the code decode using the specified encoding ( e . g . utf - 8 ) ?
the encoded string values in the map
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . key Set ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . to String ( ) , encoding ) ) ; } } } return form ; }
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . keySet ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . toString ( ) , encoding ) ) ; } } } return form ; }
89
java-test-698
java
What does the code use ?
the specified encoding ( e . g . utf - 8 )
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . key Set ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . to String ( ) , encoding ) ) ; } } } return form ; }
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . keySet ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . toString ( ) , encoding ) ) ; } } } return form ; }
89
java-test-699
java
How does the code decode the encoded string values in the map ?
using the specified encoding ( e . g . utf - 8 )
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . key Set ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . to String ( ) , encoding ) ) ; } } } return form ; }
public static Map < String , Object > decode ( final Map < String , Object > form , final String encoding ) { if ( form != null ) { for ( final String key : form . keySet ( ) ) { final Object value = form . get ( key ) ; if ( value instanceof String ) { form . put ( key , decode ( value . toString ( ) , encoding ) ) ; } } } return form ; }
89
java-test-700
java
When do one feature add to the list of features ?
while increasing or maintaining the current accuracy
static protected int SFS Select Feature ( Set < Integer > available , Data Set data Set , Set < Integer > cat To Remove , Set < Integer > num To Remove , Set < Integer > cat Selecteed , Set < Integer > num Selected , Object evaluater , int folds , Random rand , double [ ] Pbest Score , int min Features ) { int n Cat = data Set . get Num Categorical Vars ( ) ; int cur Best = - NUM ; double cur Best Score = Double . POSITIVE INFINITY ; for ( int feature : available ) { remove Feature ( feature , n Cat , cat To Remove , num To Remove ) ; Data Set work On = data Set . shallow Clone ( ) ; Remove Attribute Transform remove = new Remove Attribute Transform ( work On , cat To Remove , num To Remove ) ; work On . apply Transform ( remove ) ; double score = get Score ( work On , evaluater , folds , rand ) ; if ( score < cur Best Score ) { cur Best Score = score ; cur Best = feature ; } add Feature ( feature , n Cat , cat To Remove , num To Remove ) ; } if ( cur Best Score <= NUM && Pbest Score [ NUM ] <= NUM && cat Selecteed . size ( ) + num Selected . size ( ) >= min Features ) return - NUM ; if ( cur Best Score < Pbest Score [ NUM ] || cat Selecteed . size ( ) + num Selected . size ( ) < min Features || Math . abs ( Pbest Score [ NUM ] - cur Best Score ) < NUM ) { Pbest Score [ NUM ] = cur Best Score ; add Feature ( cur Best , n Cat , cat Selecteed , num Selected ) ; remove Feature ( cur Best , n Cat , cat To Remove , num To Remove ) ; available . remove ( cur Best ) ; return cur Best ; } else return - NUM ; }
static protected int SFSSelectFeature ( Set < Integer > available , DataSet dataSet , Set < Integer > catToRemove , Set < Integer > numToRemove , Set < Integer > catSelecteed , Set < Integer > numSelected , Object evaluater , int folds , Random rand , double [ ] PbestScore , int minFeatures ) { int nCat = dataSet . getNumCategoricalVars ( ) ; int curBest = - _NUM ; double curBestScore = Double . POSITIVE_INFINITY ; for ( int feature : available ) { removeFeature ( feature , nCat , catToRemove , numToRemove ) ; DataSet workOn = dataSet . shallowClone ( ) ; RemoveAttributeTransform remove = new RemoveAttributeTransform ( workOn , catToRemove , numToRemove ) ; workOn . applyTransform ( remove ) ; double score = getScore ( workOn , evaluater , folds , rand ) ; if ( score < curBestScore ) { curBestScore = score ; curBest = feature ; } addFeature ( feature , nCat , catToRemove , numToRemove ) ; } if ( curBestScore <= _NUM && PbestScore [ _NUM ] <= _NUM && catSelecteed . size ( ) + numSelected . size ( ) >= minFeatures ) return - _NUM ; if ( curBestScore < PbestScore [ _NUM ] || catSelecteed . size ( ) + numSelected . size ( ) < minFeatures || Math . abs ( PbestScore [ _NUM ] - curBestScore ) < _NUM ) { PbestScore [ _NUM ] = curBestScore ; addFeature ( curBest , nCat , catSelecteed , numSelected ) ; removeFeature ( curBest , nCat , catToRemove , numToRemove ) ; available . remove ( curBest ) ; return curBest ; } else return - _NUM ; }
370
java-test-701
java
What adds to the list of features while increasing or maintaining the current accuracy ?
one feature
static protected int SFS Select Feature ( Set < Integer > available , Data Set data Set , Set < Integer > cat To Remove , Set < Integer > num To Remove , Set < Integer > cat Selecteed , Set < Integer > num Selected , Object evaluater , int folds , Random rand , double [ ] Pbest Score , int min Features ) { int n Cat = data Set . get Num Categorical Vars ( ) ; int cur Best = - NUM ; double cur Best Score = Double . POSITIVE INFINITY ; for ( int feature : available ) { remove Feature ( feature , n Cat , cat To Remove , num To Remove ) ; Data Set work On = data Set . shallow Clone ( ) ; Remove Attribute Transform remove = new Remove Attribute Transform ( work On , cat To Remove , num To Remove ) ; work On . apply Transform ( remove ) ; double score = get Score ( work On , evaluater , folds , rand ) ; if ( score < cur Best Score ) { cur Best Score = score ; cur Best = feature ; } add Feature ( feature , n Cat , cat To Remove , num To Remove ) ; } if ( cur Best Score <= NUM && Pbest Score [ NUM ] <= NUM && cat Selecteed . size ( ) + num Selected . size ( ) >= min Features ) return - NUM ; if ( cur Best Score < Pbest Score [ NUM ] || cat Selecteed . size ( ) + num Selected . size ( ) < min Features || Math . abs ( Pbest Score [ NUM ] - cur Best Score ) < NUM ) { Pbest Score [ NUM ] = cur Best Score ; add Feature ( cur Best , n Cat , cat Selecteed , num Selected ) ; remove Feature ( cur Best , n Cat , cat To Remove , num To Remove ) ; available . remove ( cur Best ) ; return cur Best ; } else return - NUM ; }
static protected int SFSSelectFeature ( Set < Integer > available , DataSet dataSet , Set < Integer > catToRemove , Set < Integer > numToRemove , Set < Integer > catSelecteed , Set < Integer > numSelected , Object evaluater , int folds , Random rand , double [ ] PbestScore , int minFeatures ) { int nCat = dataSet . getNumCategoricalVars ( ) ; int curBest = - _NUM ; double curBestScore = Double . POSITIVE_INFINITY ; for ( int feature : available ) { removeFeature ( feature , nCat , catToRemove , numToRemove ) ; DataSet workOn = dataSet . shallowClone ( ) ; RemoveAttributeTransform remove = new RemoveAttributeTransform ( workOn , catToRemove , numToRemove ) ; workOn . applyTransform ( remove ) ; double score = getScore ( workOn , evaluater , folds , rand ) ; if ( score < curBestScore ) { curBestScore = score ; curBest = feature ; } addFeature ( feature , nCat , catToRemove , numToRemove ) ; } if ( curBestScore <= _NUM && PbestScore [ _NUM ] <= _NUM && catSelecteed . size ( ) + numSelected . size ( ) >= minFeatures ) return - _NUM ; if ( curBestScore < PbestScore [ _NUM ] || catSelecteed . size ( ) + numSelected . size ( ) < minFeatures || Math . abs ( PbestScore [ _NUM ] - curBestScore ) < _NUM ) { PbestScore [ _NUM ] = curBestScore ; addFeature ( curBest , nCat , catSelecteed , numSelected ) ; removeFeature ( curBest , nCat , catToRemove , numToRemove ) ; available . remove ( curBest ) ; return curBest ; } else return - _NUM ; }
370
java-test-702
java
What do one feature add while increasing or maintaining the current accuracy ?
to the list of features
static protected int SFS Select Feature ( Set < Integer > available , Data Set data Set , Set < Integer > cat To Remove , Set < Integer > num To Remove , Set < Integer > cat Selecteed , Set < Integer > num Selected , Object evaluater , int folds , Random rand , double [ ] Pbest Score , int min Features ) { int n Cat = data Set . get Num Categorical Vars ( ) ; int cur Best = - NUM ; double cur Best Score = Double . POSITIVE INFINITY ; for ( int feature : available ) { remove Feature ( feature , n Cat , cat To Remove , num To Remove ) ; Data Set work On = data Set . shallow Clone ( ) ; Remove Attribute Transform remove = new Remove Attribute Transform ( work On , cat To Remove , num To Remove ) ; work On . apply Transform ( remove ) ; double score = get Score ( work On , evaluater , folds , rand ) ; if ( score < cur Best Score ) { cur Best Score = score ; cur Best = feature ; } add Feature ( feature , n Cat , cat To Remove , num To Remove ) ; } if ( cur Best Score <= NUM && Pbest Score [ NUM ] <= NUM && cat Selecteed . size ( ) + num Selected . size ( ) >= min Features ) return - NUM ; if ( cur Best Score < Pbest Score [ NUM ] || cat Selecteed . size ( ) + num Selected . size ( ) < min Features || Math . abs ( Pbest Score [ NUM ] - cur Best Score ) < NUM ) { Pbest Score [ NUM ] = cur Best Score ; add Feature ( cur Best , n Cat , cat Selecteed , num Selected ) ; remove Feature ( cur Best , n Cat , cat To Remove , num To Remove ) ; available . remove ( cur Best ) ; return cur Best ; } else return - NUM ; }
static protected int SFSSelectFeature ( Set < Integer > available , DataSet dataSet , Set < Integer > catToRemove , Set < Integer > numToRemove , Set < Integer > catSelecteed , Set < Integer > numSelected , Object evaluater , int folds , Random rand , double [ ] PbestScore , int minFeatures ) { int nCat = dataSet . getNumCategoricalVars ( ) ; int curBest = - _NUM ; double curBestScore = Double . POSITIVE_INFINITY ; for ( int feature : available ) { removeFeature ( feature , nCat , catToRemove , numToRemove ) ; DataSet workOn = dataSet . shallowClone ( ) ; RemoveAttributeTransform remove = new RemoveAttributeTransform ( workOn , catToRemove , numToRemove ) ; workOn . applyTransform ( remove ) ; double score = getScore ( workOn , evaluater , folds , rand ) ; if ( score < curBestScore ) { curBestScore = score ; curBest = feature ; } addFeature ( feature , nCat , catToRemove , numToRemove ) ; } if ( curBestScore <= _NUM && PbestScore [ _NUM ] <= _NUM && catSelecteed . size ( ) + numSelected . size ( ) >= minFeatures ) return - _NUM ; if ( curBestScore < PbestScore [ _NUM ] || catSelecteed . size ( ) + numSelected . size ( ) < minFeatures || Math . abs ( PbestScore [ _NUM ] - curBestScore ) < _NUM ) { PbestScore [ _NUM ] = curBestScore ; addFeature ( curBest , nCat , catSelecteed , numSelected ) ; removeFeature ( curBest , nCat , catToRemove , numToRemove ) ; available . remove ( curBest ) ; return curBest ; } else return - _NUM ; }
370
java-test-706
java
What does the code call ?
the externally provided classloader
public Class plain Class For Name ( String name ) throws Class Not Found Exception { Class c = null ; try { if ( external Class Loader != null ) c = external Class Loader . load Class ( name ) ; else c = Class . for Name ( name ) ; cache Class Info ( name , c ) ; } catch ( No Class Def Found Error e ) { throw no Class Def Found ( name , e ) ; } return c ; }
public Class plainClassForName ( String name ) throws ClassNotFoundException { Class c = null ; try { if ( externalClassLoader != null ) c = externalClassLoader . loadClass ( name ) ; else c = Class . forName ( name ) ; cacheClassInfo ( name , c ) ; } catch ( NoClassDefFoundError e ) { throw noClassDefFound ( name , e ) ; } return c ; }
90
java-test-707
java
What does this provide simply ?
a central point for monitoring and handling certain java version dependent bugs , etc
public Class plain Class For Name ( String name ) throws Class Not Found Exception { Class c = null ; try { if ( external Class Loader != null ) c = external Class Loader . load Class ( name ) ; else c = Class . for Name ( name ) ; cache Class Info ( name , c ) ; } catch ( No Class Def Found Error e ) { throw no Class Def Found ( name , e ) ; } return c ; }
public Class plainClassForName ( String name ) throws ClassNotFoundException { Class c = null ; try { if ( externalClassLoader != null ) c = externalClassLoader . loadClass ( name ) ; else c = Class . forName ( name ) ; cacheClassInfo ( name , c ) ; } catch ( NoClassDefFoundError e ) { throw noClassDefFound ( name , e ) ; } return c ; }
90
java-test-708
java
What does the code perform if to ?
a plain class
public Class plain Class For Name ( String name ) throws Class Not Found Exception { Class c = null ; try { if ( external Class Loader != null ) c = external Class Loader . load Class ( name ) ; else c = Class . for Name ( name ) ; cache Class Info ( name , c ) ; } catch ( No Class Def Found Error e ) { throw no Class Def Found ( name , e ) ; } return c ; }
public Class plainClassForName ( String name ) throws ClassNotFoundException { Class c = null ; try { if ( externalClassLoader != null ) c = externalClassLoader . loadClass ( name ) ; else c = Class . forName ( name ) ; cacheClassInfo ( name , c ) ; } catch ( NoClassDefFoundError e ) { throw noClassDefFound ( name , e ) ; } return c ; }
90
java-test-709
java
For what purpose will the call be delegated to it if a bshclassmanager implementation is loaded ?
to allow for additional hooks
public Class plain Class For Name ( String name ) throws Class Not Found Exception { Class c = null ; try { if ( external Class Loader != null ) c = external Class Loader . load Class ( name ) ; else c = Class . for Name ( name ) ; cache Class Info ( name , c ) ; } catch ( No Class Def Found Error e ) { throw no Class Def Found ( name , e ) ; } return c ; }
public Class plainClassForName ( String name ) throws ClassNotFoundException { Class c = null ; try { if ( externalClassLoader != null ) c = externalClassLoader . loadClass ( name ) ; else c = Class . forName ( name ) ; cacheClassInfo ( name , c ) ; } catch ( NoClassDefFoundError e ) { throw noClassDefFound ( name , e ) ; } return c ; }
90
java-test-710
java
What does the code create with this version ?
a new applied baseline migration
private Applied Migration create Applied Init Migration ( int version ) { return new Applied Migration ( version , version , Migration Version . from Version ( Integer . to String ( version ) ) , STRING , Migration Type . BASELINE , STRING , null , new Date ( ) , STRING , NUM , BOOL ) ; }
private AppliedMigration createAppliedInitMigration ( int version ) { return new AppliedMigration ( version , version , MigrationVersion . fromVersion ( Integer . toString ( version ) ) , STRING , MigrationType . BASELINE , STRING , null , new Date ( ) , STRING , _NUM , _BOOL ) ; }
60
java-test-711
java
What does the code translate a value ?
to java 2d space
@ Override public double value To Java 2 D ( double value , Rectangle 2 D data Area , Rectangle Edge edge ) { Range range = get Range ( ) ; double vmin = range . get Lower Bound ( ) ; double vmax = range . get Upper Bound ( ) ; double vp = get Cycle Bound ( ) ; if ( ( value < vmin ) || ( value > vmax ) ) { return Double . Na N ; } double jmin = NUM ; double jmax = NUM ; if ( Rectangle Edge . is Top Or Bottom ( edge ) ) { jmin = data Area . get Min X ( ) ; jmax = data Area . get Max X ( ) ; } else if ( Rectangle Edge . is Left Or Right ( edge ) ) { jmax = data Area . get Min Y ( ) ; jmin = data Area . get Max Y ( ) ; } if ( is Inverted ( ) ) { if ( value == vp ) { return this . bound Mapped To Last Cycle ? jmin : jmax ; } else if ( value > vp ) { return jmax - ( value - vp ) * ( jmax - jmin ) / this . period ; } else { return jmin + ( vp - value ) * ( jmax - jmin ) / this . period ; } } else { if ( value == vp ) { return this . bound Mapped To Last Cycle ? jmax : jmin ; } else if ( value >= vp ) { return jmin + ( value - vp ) * ( jmax - jmin ) / this . period ; } else { return jmax - ( vp - value ) * ( jmax - jmin ) / this . period ; } } }
@ Override public double valueToJava2D ( double value , Rectangle2D dataArea , RectangleEdge edge ) { Range range = getRange ( ) ; double vmin = range . getLowerBound ( ) ; double vmax = range . getUpperBound ( ) ; double vp = getCycleBound ( ) ; if ( ( value < vmin ) || ( value > vmax ) ) { return Double . NaN ; } double jmin = _NUM ; double jmax = _NUM ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { jmin = dataArea . getMinX ( ) ; jmax = dataArea . getMaxX ( ) ; } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { jmax = dataArea . getMinY ( ) ; jmin = dataArea . getMaxY ( ) ; } if ( isInverted ( ) ) { if ( value == vp ) { return this . boundMappedToLastCycle ? jmin : jmax ; } else if ( value > vp ) { return jmax - ( value - vp ) * ( jmax - jmin ) / this . period ; } else { return jmin + ( vp - value ) * ( jmax - jmin ) / this . period ; } } else { if ( value == vp ) { return this . boundMappedToLastCycle ? jmax : jmin ; } else if ( value >= vp ) { return jmin + ( value - vp ) * ( jmax - jmin ) / this . period ; } else { return jmax - ( vp - value ) * ( jmax - jmin ) / this . period ; } } }
325
java-test-712
java
What does the code dump into a string ?
the specified usb interface descriptor
public static String dump ( final Interface Descriptor descriptor ) { return String . format ( STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING , descriptor . b Length ( ) , descriptor . b Descriptor Type ( ) , descriptor . b Interface Number ( ) & NUM , descriptor . b Alternate Setting ( ) & NUM , descriptor . b Num Endpoints ( ) & NUM , descriptor . b Interface Class ( ) & NUM , get USB Class Name ( descriptor . b Interface Class ( ) ) , descriptor . b Interface Sub Class ( ) & NUM , descriptor . b Interface Protocol ( ) & NUM , descriptor . i Interface ( ) & NUM ) ; }
public static String dump ( final InterfaceDescriptor descriptor ) { return String . format ( STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING + STRING , descriptor . bLength ( ) , descriptor . bDescriptorType ( ) , descriptor . bInterfaceNumber ( ) & _NUM , descriptor . bAlternateSetting ( ) & _NUM , descriptor . bNumEndpoints ( ) & _NUM , descriptor . bInterfaceClass ( ) & _NUM , getUSBClassName ( descriptor . bInterfaceClass ( ) ) , descriptor . bInterfaceSubClass ( ) & _NUM , descriptor . bInterfaceProtocol ( ) & _NUM , descriptor . iInterface ( ) & _NUM ) ; }
137
java-test-714
java
What does private key use directly ?
to encrypt the data
public byte [ ] encrypt Data With Private Key ( byte [ ] buffer , int length ) { try { Cipher cipher = Cipher . get Instance ( TTT ENCRYPTION ALGORITHM ) ; cipher . init ( Cipher . ENCRYPT MODE , private Key ) ; byte [ ] cipher Data = cipher . do Final ( buffer , NUM , length ) ; return cipher Data ; } catch ( General Security Exception e ) { throw new Illegal State Exception ( e ) ; } }
public byte [ ] encryptDataWithPrivateKey ( byte [ ] buffer , int length ) { try { Cipher cipher = Cipher . getInstance ( TTT_ENCRYPTION_ALGORITHM ) ; cipher . init ( Cipher . ENCRYPT_MODE , privateKey ) ; byte [ ] cipherData = cipher . doFinal ( buffer , _NUM , length ) ; return cipherData ; } catch ( GeneralSecurityException e ) { throw new IllegalStateException ( e ) ; } }
89
java-test-715
java
What did gossip not produce for a specific period ?
changes
public static boolean is Node Group Available ( Service Host host , Node Group State local State ) { if ( Node Group Utils . is Membership Settled ( host , host . get Maintenance Interval Micros ( ) , local State ) && Node Group Utils . has Membership Quorum ( host , local State ) ) { return BOOL ; } return BOOL ; }
public static boolean isNodeGroupAvailable ( ServiceHost host , NodeGroupState localState ) { if ( NodeGroupUtils . isMembershipSettled ( host , host . getMaintenanceIntervalMicros ( ) , localState ) && NodeGroupUtils . hasMembershipQuorum ( host , localState ) ) { return _BOOL ; } return _BOOL ; }
67
java-test-716
java
When did gossip not produce changes ?
for a specific period
public static boolean is Node Group Available ( Service Host host , Node Group State local State ) { if ( Node Group Utils . is Membership Settled ( host , host . get Maintenance Interval Micros ( ) , local State ) && Node Group Utils . has Membership Quorum ( host , local State ) ) { return BOOL ; } return BOOL ; }
public static boolean isNodeGroupAvailable ( ServiceHost host , NodeGroupState localState ) { if ( NodeGroupUtils . isMembershipSettled ( host , host . getMaintenanceIntervalMicros ( ) , localState ) && NodeGroupUtils . hasMembershipQuorum ( host , localState ) ) { return _BOOL ; } return _BOOL ; }
67
java-test-717
java
Did gossip produce changes for a specific period ?
No
public static boolean is Node Group Available ( Service Host host , Node Group State local State ) { if ( Node Group Utils . is Membership Settled ( host , host . get Maintenance Interval Micros ( ) , local State ) && Node Group Utils . has Membership Quorum ( host , local State ) ) { return BOOL ; } return BOOL ; }
public static boolean isNodeGroupAvailable ( ServiceHost host , NodeGroupState localState ) { if ( NodeGroupUtils . isMembershipSettled ( host , host . getMaintenanceIntervalMicros ( ) , localState ) && NodeGroupUtils . hasMembershipQuorum ( host , localState ) ) { return _BOOL ; } return _BOOL ; }
67
java-test-718
java
What did not produce changes for a specific period ?
gossip
public static boolean is Node Group Available ( Service Host host , Node Group State local State ) { if ( Node Group Utils . is Membership Settled ( host , host . get Maintenance Interval Micros ( ) , local State ) && Node Group Utils . has Membership Quorum ( host , local State ) ) { return BOOL ; } return BOOL ; }
public static boolean isNodeGroupAvailable ( ServiceHost host , NodeGroupState localState ) { if ( NodeGroupUtils . isMembershipSettled ( host , host . getMaintenanceIntervalMicros ( ) , localState ) && NodeGroupUtils . hasMembershipQuorum ( host , localState ) ) { return _BOOL ; } return _BOOL ; }
67
java-test-719
java
What did the code init into the cache array ?
the words
private void init Vold Fstab To Cache ( ) throws IO Exception { cache . clear ( ) ; Buffered Reader br = new Buffered Reader ( new File Reader ( VOLD FSTAB ) ) ; String tmp = null ; while ( ( tmp = br . read Line ( ) ) != null ) { if ( tmp . starts With ( HEAD ) ) { cache . add ( tmp ) ; } } br . close ( ) ; cache . trim To Size ( ) ; }
private void initVoldFstabToCache ( ) throws IOException { cache . clear ( ) ; BufferedReader br = new BufferedReader ( new FileReader ( VOLD_FSTAB ) ) ; String tmp = null ; while ( ( tmp = br . readLine ( ) ) != null ) { if ( tmp . startsWith ( HEAD ) ) { cache . add ( tmp ) ; } } br . close ( ) ; cache . trimToSize ( ) ; }
92
java-test-720
java
What did the code set ?
all registered mocks to replay
protected final void replay Mocks ( ) { assert False ( STRING , mocks Replayed ) ; if ( use Power Mock ) { Power Mock . replay All ( ) ; } else { Easy Mock . replay ( mocks . to Array ( ) ) ; } for ( I Mocks Control mock Control : mock Controls ) { mock Control . replay ( ) ; } mocks Replayed = BOOL ; }
protected final void replayMocks ( ) { assertFalse ( STRING , mocksReplayed ) ; if ( usePowerMock ) { PowerMock . replayAll ( ) ; } else { EasyMock . replay ( mocks . toArray ( ) ) ; } for ( IMocksControl mockControl : mockControls ) { mockControl . replay ( ) ; } mocksReplayed = _BOOL ; }
75
java-test-721
java
What do we visit more than once more than once ?
some nodes
private Set < CCFG Node > handle Method Call Node ( CCFG Node node , Stack < Method Call > call Stack , Set < CCFG Node > handled ) { CCFG Method Call Node call Node = ( CCFG Method Call Node ) node ; update Call Stack For Call Node ( call Stack , call Node ) ; return filter Handled Map For Method Call Node ( call Node , handled ) ; }
private Set < CCFGNode > handleMethodCallNode ( CCFGNode node , Stack < MethodCall > callStack , Set < CCFGNode > handled ) { CCFGMethodCallNode callNode = ( CCFGMethodCallNode ) node ; updateCallStackForCallNode ( callStack , callNode ) ; return filterHandledMapForMethodCallNode ( callNode , handled ) ; }
76
java-test-723
java
When do this host instance destroy freeing its resources ?
after calling this
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-724
java
What can the host no longer receive after calling this ?
extension updates
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-725
java
Can the host receive extension updates after calling this ?
No
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-726
java
What is holding this host ?
the activity or service
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-727
java
When can the host no longer receive extension updates ?
after calling this
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-728
java
What do the activity or service hold ?
this host
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-729
java
What can no longer receive extension updates after calling this ?
the host
public void destroy ( ) { m Destroyed = BOOL ; m Handler . remove Callbacks And Messages ( null ) ; if ( m Service != null ) { try { m Service . listen To ( null , m Callback ) ; m Context . unbind Service ( m Connection ) ; } catch ( Remote Exception e ) { } } }
public void destroy ( ) { mDestroyed = _BOOL ; mHandler . removeCallbacksAndMessages ( null ) ; if ( mService != null ) { try { mService . listenTo ( null , mCallback ) ; mContext . unbindService ( mConnection ) ; } catch ( RemoteException e ) { } } }
65
java-test-732
java
What does the temporal have ?
the correct chronology
private void validate Chrono ( Temporal Accessor temporal ) { Objects . require Non Null ( temporal , STRING ) ; Chronology temporal Chrono = temporal . query ( Temporal Queries . chronology ( ) ) ; if ( temporal Chrono != null && chrono . equals ( temporal Chrono ) == BOOL ) { throw new Date Time Exception ( STRING + chrono . get Id ( ) + STRING + temporal Chrono . get Id ( ) ) ; } }
private void validateChrono ( TemporalAccessor temporal ) { Objects . requireNonNull ( temporal , STRING ) ; Chronology temporalChrono = temporal . query ( TemporalQueries . chronology ( ) ) ; if ( temporalChrono != null && chrono . equals ( temporalChrono ) == _BOOL ) { throw new DateTimeException ( STRING + chrono . getId ( ) + STRING + temporalChrono . getId ( ) ) ; } }
83
java-test-733
java
What has the correct chronology ?
the temporal
private void validate Chrono ( Temporal Accessor temporal ) { Objects . require Non Null ( temporal , STRING ) ; Chronology temporal Chrono = temporal . query ( Temporal Queries . chronology ( ) ) ; if ( temporal Chrono != null && chrono . equals ( temporal Chrono ) == BOOL ) { throw new Date Time Exception ( STRING + chrono . get Id ( ) + STRING + temporal Chrono . get Id ( ) ) ; } }
private void validateChrono ( TemporalAccessor temporal ) { Objects . requireNonNull ( temporal , STRING ) ; Chronology temporalChrono = temporal . query ( TemporalQueries . chronology ( ) ) ; if ( temporalChrono != null && chrono . equals ( temporalChrono ) == _BOOL ) { throw new DateTimeException ( STRING + chrono . getId ( ) + STRING + temporalChrono . getId ( ) ) ; } }
83
java-test-734
java
What does the code generate ?
the instructions to jump to a label based on the comparison of the top two stack values
public void if Cmp ( final Type type , final int mode , final Label label ) { switch ( type . get Sort ( ) ) { case Type . LONG : mv . visit Insn ( Opcodes . LCMP ) ; break ; case Type . DOUBLE : mv . visit Insn ( mode == GE || mode == GT ? Opcodes . DCMPL : Opcodes . DCMPG ) ; break ; case Type . FLOAT : mv . visit Insn ( mode == GE || mode == GT ? Opcodes . FCMPL : Opcodes . FCMPG ) ; break ; case Type . ARRAY : case Type . OBJECT : switch ( mode ) { case EQ : mv . visit Jump Insn ( Opcodes . IF ACMPEQ , label ) ; return ; case NE : mv . visit Jump Insn ( Opcodes . IF ACMPNE , label ) ; return ; } throw new Illegal Argument Exception ( STRING + type ) ; default : int int Op = - NUM ; switch ( mode ) { case EQ : int Op = Opcodes . IF ICMPEQ ; break ; case NE : int Op = Opcodes . IF ICMPNE ; break ; case GE : int Op = Opcodes . IF ICMPGE ; break ; case LT : int Op = Opcodes . IF ICMPLT ; break ; case LE : int Op = Opcodes . IF ICMPLE ; break ; case GT : int Op = Opcodes . IF ICMPGT ; break ; } mv . visit Jump Insn ( int Op , label ) ; return ; } mv . visit Jump Insn ( mode , label ) ; }
public void ifCmp ( final Type type , final int mode , final Label label ) { switch ( type . getSort ( ) ) { case Type . LONG : mv . visitInsn ( Opcodes . LCMP ) ; break ; case Type . DOUBLE : mv . visitInsn ( mode == GE || mode == GT ? Opcodes . DCMPL : Opcodes . DCMPG ) ; break ; case Type . FLOAT : mv . visitInsn ( mode == GE || mode == GT ? Opcodes . FCMPL : Opcodes . FCMPG ) ; break ; case Type . ARRAY : case Type . OBJECT : switch ( mode ) { case EQ : mv . visitJumpInsn ( Opcodes . IF_ACMPEQ , label ) ; return ; case NE : mv . visitJumpInsn ( Opcodes . IF_ACMPNE , label ) ; return ; } throw new IllegalArgumentException ( STRING + type ) ; default : int intOp = - _NUM ; switch ( mode ) { case EQ : intOp = Opcodes . IF_ICMPEQ ; break ; case NE : intOp = Opcodes . IF_ICMPNE ; break ; case GE : intOp = Opcodes . IF_ICMPGE ; break ; case LT : intOp = Opcodes . IF_ICMPLT ; break ; case LE : intOp = Opcodes . IF_ICMPLE ; break ; case GT : intOp = Opcodes . IF_ICMPGT ; break ; } mv . visitJumpInsn ( intOp , label ) ; return ; } mv . visitJumpInsn ( mode , label ) ; }
288
java-test-735
java
What does the code generate if the parameter are same ?
the unique i d by the parameter < br >
public static String id ( Object ... ss ) { String Builder sb = new String Builder ( ) ; for ( Object s : ss ) { if ( sb . length ( ) > NUM ) sb . append ( STRING ) ; sb . append ( s ) ; } return id ( hash ( sb . to String ( ) ) ) ; }
public static String id ( Object ... ss ) { StringBuilder sb = new StringBuilder ( ) ; for ( Object s : ss ) { if ( sb . length ( ) > _NUM ) sb . append ( STRING ) ; sb . append ( s ) ; } return id ( hash ( sb . toString ( ) ) ) ; }
68
java-test-737
java
Where do a fixed view appear ?
at the top of the list
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-738
java
When is addheaderview called ?
more than once
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-739
java
What appears at the top of the list ?
a fixed view
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-740
java
When is this call ?
before calling setadapter
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-741
java
What can listview wrap with one that will also account for header and footer views ?
the supplied cursor
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-742
java
What does the code add ?
a fixed view to appear at the top of the list
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-743
java
What can wrap the supplied cursor with one that will also account for header and footer views ?
listview
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-744
java
Can views added using this call take focus if they want ?
No
public void add Header View ( View v , Object data , boolean is Selectable ) { if ( m Adapter != null ) { throw new Illegal State Exception ( STRING ) ; } Fixed View Info info = new Fixed View Info ( ) ; info . view = v ; info . data = data ; info . is Selectable = is Selectable ; m Header View Infos . add ( info ) ; }
public void addHeaderView ( View v , Object data , boolean isSelectable ) { if ( mAdapter != null ) { throw new IllegalStateException ( STRING ) ; } FixedViewInfo info = new FixedViewInfo ( ) ; info . view = v ; info . data = data ; info . isSelectable = isSelectable ; mHeaderViewInfos . add ( info ) ; }
78
java-test-745
java
What does the code close ?
the datagram socket
@ Override protected void do Unbind ( ) throws Communication Exception , Interrupted Exception { if ( SNMP ADAPTOR LOGGER . is Loggable ( Level . FINER ) ) { SNMP ADAPTOR LOGGER . logp ( Level . FINER , dbg Tag , STRING , STRING ) ; } synchronized ( this ) { if ( socket != null ) { socket . close ( ) ; socket = null ; } } close Trap Socket If Needed ( ) ; close Inform Socket If Needed ( ) ; }
@ Override protected void doUnbind ( ) throws CommunicationException , InterruptedException { if ( SNMP_ADAPTOR_LOGGER . isLoggable ( Level . FINER ) ) { SNMP_ADAPTOR_LOGGER . logp ( Level . FINER , dbgTag , STRING , STRING ) ; } synchronized ( this ) { if ( socket != null ) { socket . close ( ) ; socket = null ; } } closeTrapSocketIfNeeded ( ) ; closeInformSocketIfNeeded ( ) ; }
90
java-test-747
java
What does the code append into the stringbuffer buf ?
the contents of the characteriterator iterator
private final void append Contents ( String Buffer buf , Character Iterator iterator ) { int index = iterator . get Begin Index ( ) ; int end = iterator . get End Index ( ) ; while ( index < end ) { iterator . set Index ( index ++ ) ; buf . append ( iterator . current ( ) ) ; } }
private final void appendContents ( StringBuffer buf , CharacterIterator iterator ) { int index = iterator . getBeginIndex ( ) ; int end = iterator . getEndIndex ( ) ; while ( index < end ) { iterator . setIndex ( index ++ ) ; buf . append ( iterator . current ( ) ) ; } }
66
java-test-748
java
What did the code perform ?
post change vpool operations on rp volumes
private String post RP Change Vpool Steps ( Workflow workflow , String wait For , List < Volume Descriptor > volume Descriptors , String task Id ) { List < Volume Descriptor > rp Volume Descriptors = Volume Descriptor . filter By Type ( volume Descriptors , new Volume Descriptor . Type [ ] { Volume Descriptor . Type . RP EXISTING SOURCE } , null ) ; if ( rp Volume Descriptors . is Empty ( ) ) { return wait For ; } List < Volume Descriptor > migrated Block Data Descriptors = new Array List < Volume Descriptor > ( ) ; List < URI > volumes With Migration = new Array List < URI > ( ) ; if ( volume Descriptors != null ) { List < Volume Descriptor > migrate Descriptors = Volume Descriptor . filter By Type ( volume Descriptors , new Volume Descriptor . Type [ ] { Volume Descriptor . Type . VPLEX MIGRATE VOLUME } , null ) ; if ( migrate Descriptors != null && ! migrate Descriptors . is Empty ( ) ) { s logger . info ( STRING ) ; Iterator < Volume Descriptor > migration Iter = migrate Descriptors . iterator ( ) ; while ( migration Iter . has Next ( ) ) { Volume Descriptor migration Desc = migration Iter . next ( ) ; Migration migration = s db Client . query Object ( Migration . class , migration Desc . get Migration Id ( ) ) ; volumes With Migration . add ( migration . get Source ( ) ) ; Volume migrated Volume = s db Client . query Object ( Volume . class , migration . get Volume ( ) ) ; Volume Descriptor migrated Block Data Desc = new Volume Descriptor ( Volume Descriptor . Type . BLOCK DATA , migrated Volume . get Storage Controller ( ) , migrated Volume . get Id ( ) , null , migrated Volume . get Consistency Group ( ) , migration Desc . get Capabilities Values ( ) ) ; migrated Block Data Descriptors . add ( migrated Block Data Desc ) ; } } } List < Volume Descriptor > block Data Descriptors = new Array List < Volume Descriptor > ( ) ; for ( Volume Descriptor descr : rp Volume Descriptors ) { Volume rp Existing Source = s db Client . query Object ( Volume . class , descr . get Volume URI ( ) ) ; if ( RP Helper . is V Plex Volume ( rp Existing Source , s db Client ) ) { s logger . info ( String . format ( STRING , rp Existing Source . get Label ( ) ) ) ; if ( null != rp Existing Source . get Associated Volumes ( ) ) { for ( String assoc Volume Id : rp Existing Source . get Associated Volumes ( ) ) { Volume assoc Volume = s db Client . query Object ( Volume . class , URI . create ( assoc Volume Id ) ) ; if ( volumes With Migration . contains ( assoc Volume . get Id ( ) ) ) { s logger . info ( String . format ( STRING , assoc Volume . get Label ( ) ) ) ; continue ; } if ( Null Column Value Getter . is Not Null Value ( assoc Volume . get Replication Group Instance ( ) ) ) { Volume Descriptor block Data Desc = new Volume Descriptor ( Volume Descriptor . Type . BLOCK DATA , assoc Volume . get Storage Controller ( ) , assoc Volume . get Id ( ) , null , rp Existing Source . get Consistency Group ( ) , descr . get Capabilities Values ( ) ) ; block Data Descriptors . add ( block Data Desc ) ; assoc Volume . set Consistency Group ( rp Existing Source . get Consistency Group ( ) ) ; s db Client . update Object ( assoc Volume ) ; s logger . info ( String . format ( STRING , assoc Volume . get Label ( ) , rp Existing Source . get Consistency Group ( ) , assoc Volume . get Storage Controller ( ) ) ) ; } } } } } if ( ! block Data Descriptors . is Empty ( ) ) { wait For = block Device Controller . add Steps For Create Consistency Group ( workflow , wait For , block Data Descriptors , STRING ) ; wait For = block Device Controller . add Steps For Update Consistency Group ( workflow , wait For , block Data Descriptors , null ) ; } block Data Descriptors . add All ( migrated Block Data Descriptors ) ; s logger . info ( STRING ) ; wait For = replica Device Controller . add Steps For Create Volumes ( workflow , wait For , block Data Descriptors , task Id ) ; return wait For ; }
private String postRPChangeVpoolSteps ( Workflow workflow , String waitFor , List < VolumeDescriptor > volumeDescriptors , String taskId ) { List < VolumeDescriptor > rpVolumeDescriptors = VolumeDescriptor . filterByType ( volumeDescriptors , new VolumeDescriptor . Type [ ] { VolumeDescriptor . Type . RP_EXISTING_SOURCE } , null ) ; if ( rpVolumeDescriptors . isEmpty ( ) ) { return waitFor ; } List < VolumeDescriptor > migratedBlockDataDescriptors = new ArrayList < VolumeDescriptor > ( ) ; List < URI > volumesWithMigration = new ArrayList < URI > ( ) ; if ( volumeDescriptors != null ) { List < VolumeDescriptor > migrateDescriptors = VolumeDescriptor . filterByType ( volumeDescriptors , new VolumeDescriptor . Type [ ] { VolumeDescriptor . Type . VPLEX_MIGRATE_VOLUME } , null ) ; if ( migrateDescriptors != null && ! migrateDescriptors . isEmpty ( ) ) { s_logger . info ( STRING ) ; Iterator < VolumeDescriptor > migrationIter = migrateDescriptors . iterator ( ) ; while ( migrationIter . hasNext ( ) ) { VolumeDescriptor migrationDesc = migrationIter . next ( ) ; Migration migration = s_dbClient . queryObject ( Migration . class , migrationDesc . getMigrationId ( ) ) ; volumesWithMigration . add ( migration . getSource ( ) ) ; Volume migratedVolume = s_dbClient . queryObject ( Volume . class , migration . getVolume ( ) ) ; VolumeDescriptor migratedBlockDataDesc = new VolumeDescriptor ( VolumeDescriptor . Type . BLOCK_DATA , migratedVolume . getStorageController ( ) , migratedVolume . getId ( ) , null , migratedVolume . getConsistencyGroup ( ) , migrationDesc . getCapabilitiesValues ( ) ) ; migratedBlockDataDescriptors . add ( migratedBlockDataDesc ) ; } } } List < VolumeDescriptor > blockDataDescriptors = new ArrayList < VolumeDescriptor > ( ) ; for ( VolumeDescriptor descr : rpVolumeDescriptors ) { Volume rpExistingSource = s_dbClient . queryObject ( Volume . class , descr . getVolumeURI ( ) ) ; if ( RPHelper . isVPlexVolume ( rpExistingSource , s_dbClient ) ) { s_logger . info ( String . format ( STRING , rpExistingSource . getLabel ( ) ) ) ; if ( null != rpExistingSource . getAssociatedVolumes ( ) ) { for ( String assocVolumeId : rpExistingSource . getAssociatedVolumes ( ) ) { Volume assocVolume = s_dbClient . queryObject ( Volume . class , URI . create ( assocVolumeId ) ) ; if ( volumesWithMigration . contains ( assocVolume . getId ( ) ) ) { s_logger . info ( String . format ( STRING , assocVolume . getLabel ( ) ) ) ; continue ; } if ( NullColumnValueGetter . isNotNullValue ( assocVolume . getReplicationGroupInstance ( ) ) ) { VolumeDescriptor blockDataDesc = new VolumeDescriptor ( VolumeDescriptor . Type . BLOCK_DATA , assocVolume . getStorageController ( ) , assocVolume . getId ( ) , null , rpExistingSource . getConsistencyGroup ( ) , descr . getCapabilitiesValues ( ) ) ; blockDataDescriptors . add ( blockDataDesc ) ; assocVolume . setConsistencyGroup ( rpExistingSource . getConsistencyGroup ( ) ) ; s_dbClient . updateObject ( assocVolume ) ; s_logger . info ( String . format ( STRING , assocVolume . getLabel ( ) , rpExistingSource . getConsistencyGroup ( ) , assocVolume . getStorageController ( ) ) ) ; } } } } } if ( ! blockDataDescriptors . isEmpty ( ) ) { waitFor = _blockDeviceController . addStepsForCreateConsistencyGroup ( workflow , waitFor , blockDataDescriptors , STRING ) ; waitFor = _blockDeviceController . addStepsForUpdateConsistencyGroup ( workflow , waitFor , blockDataDescriptors , null ) ; } blockDataDescriptors . addAll ( migratedBlockDataDescriptors ) ; s_logger . info ( STRING ) ; waitFor = _replicaDeviceController . addStepsForCreateVolumes ( workflow , waitFor , blockDataDescriptors , taskId ) ; return waitFor ; }
846
java-test-749
java
What did the code need ?
to perform post change vpool operations on rp volumes
private String post RP Change Vpool Steps ( Workflow workflow , String wait For , List < Volume Descriptor > volume Descriptors , String task Id ) { List < Volume Descriptor > rp Volume Descriptors = Volume Descriptor . filter By Type ( volume Descriptors , new Volume Descriptor . Type [ ] { Volume Descriptor . Type . RP EXISTING SOURCE } , null ) ; if ( rp Volume Descriptors . is Empty ( ) ) { return wait For ; } List < Volume Descriptor > migrated Block Data Descriptors = new Array List < Volume Descriptor > ( ) ; List < URI > volumes With Migration = new Array List < URI > ( ) ; if ( volume Descriptors != null ) { List < Volume Descriptor > migrate Descriptors = Volume Descriptor . filter By Type ( volume Descriptors , new Volume Descriptor . Type [ ] { Volume Descriptor . Type . VPLEX MIGRATE VOLUME } , null ) ; if ( migrate Descriptors != null && ! migrate Descriptors . is Empty ( ) ) { s logger . info ( STRING ) ; Iterator < Volume Descriptor > migration Iter = migrate Descriptors . iterator ( ) ; while ( migration Iter . has Next ( ) ) { Volume Descriptor migration Desc = migration Iter . next ( ) ; Migration migration = s db Client . query Object ( Migration . class , migration Desc . get Migration Id ( ) ) ; volumes With Migration . add ( migration . get Source ( ) ) ; Volume migrated Volume = s db Client . query Object ( Volume . class , migration . get Volume ( ) ) ; Volume Descriptor migrated Block Data Desc = new Volume Descriptor ( Volume Descriptor . Type . BLOCK DATA , migrated Volume . get Storage Controller ( ) , migrated Volume . get Id ( ) , null , migrated Volume . get Consistency Group ( ) , migration Desc . get Capabilities Values ( ) ) ; migrated Block Data Descriptors . add ( migrated Block Data Desc ) ; } } } List < Volume Descriptor > block Data Descriptors = new Array List < Volume Descriptor > ( ) ; for ( Volume Descriptor descr : rp Volume Descriptors ) { Volume rp Existing Source = s db Client . query Object ( Volume . class , descr . get Volume URI ( ) ) ; if ( RP Helper . is V Plex Volume ( rp Existing Source , s db Client ) ) { s logger . info ( String . format ( STRING , rp Existing Source . get Label ( ) ) ) ; if ( null != rp Existing Source . get Associated Volumes ( ) ) { for ( String assoc Volume Id : rp Existing Source . get Associated Volumes ( ) ) { Volume assoc Volume = s db Client . query Object ( Volume . class , URI . create ( assoc Volume Id ) ) ; if ( volumes With Migration . contains ( assoc Volume . get Id ( ) ) ) { s logger . info ( String . format ( STRING , assoc Volume . get Label ( ) ) ) ; continue ; } if ( Null Column Value Getter . is Not Null Value ( assoc Volume . get Replication Group Instance ( ) ) ) { Volume Descriptor block Data Desc = new Volume Descriptor ( Volume Descriptor . Type . BLOCK DATA , assoc Volume . get Storage Controller ( ) , assoc Volume . get Id ( ) , null , rp Existing Source . get Consistency Group ( ) , descr . get Capabilities Values ( ) ) ; block Data Descriptors . add ( block Data Desc ) ; assoc Volume . set Consistency Group ( rp Existing Source . get Consistency Group ( ) ) ; s db Client . update Object ( assoc Volume ) ; s logger . info ( String . format ( STRING , assoc Volume . get Label ( ) , rp Existing Source . get Consistency Group ( ) , assoc Volume . get Storage Controller ( ) ) ) ; } } } } } if ( ! block Data Descriptors . is Empty ( ) ) { wait For = block Device Controller . add Steps For Create Consistency Group ( workflow , wait For , block Data Descriptors , STRING ) ; wait For = block Device Controller . add Steps For Update Consistency Group ( workflow , wait For , block Data Descriptors , null ) ; } block Data Descriptors . add All ( migrated Block Data Descriptors ) ; s logger . info ( STRING ) ; wait For = replica Device Controller . add Steps For Create Volumes ( workflow , wait For , block Data Descriptors , task Id ) ; return wait For ; }
private String postRPChangeVpoolSteps ( Workflow workflow , String waitFor , List < VolumeDescriptor > volumeDescriptors , String taskId ) { List < VolumeDescriptor > rpVolumeDescriptors = VolumeDescriptor . filterByType ( volumeDescriptors , new VolumeDescriptor . Type [ ] { VolumeDescriptor . Type . RP_EXISTING_SOURCE } , null ) ; if ( rpVolumeDescriptors . isEmpty ( ) ) { return waitFor ; } List < VolumeDescriptor > migratedBlockDataDescriptors = new ArrayList < VolumeDescriptor > ( ) ; List < URI > volumesWithMigration = new ArrayList < URI > ( ) ; if ( volumeDescriptors != null ) { List < VolumeDescriptor > migrateDescriptors = VolumeDescriptor . filterByType ( volumeDescriptors , new VolumeDescriptor . Type [ ] { VolumeDescriptor . Type . VPLEX_MIGRATE_VOLUME } , null ) ; if ( migrateDescriptors != null && ! migrateDescriptors . isEmpty ( ) ) { s_logger . info ( STRING ) ; Iterator < VolumeDescriptor > migrationIter = migrateDescriptors . iterator ( ) ; while ( migrationIter . hasNext ( ) ) { VolumeDescriptor migrationDesc = migrationIter . next ( ) ; Migration migration = s_dbClient . queryObject ( Migration . class , migrationDesc . getMigrationId ( ) ) ; volumesWithMigration . add ( migration . getSource ( ) ) ; Volume migratedVolume = s_dbClient . queryObject ( Volume . class , migration . getVolume ( ) ) ; VolumeDescriptor migratedBlockDataDesc = new VolumeDescriptor ( VolumeDescriptor . Type . BLOCK_DATA , migratedVolume . getStorageController ( ) , migratedVolume . getId ( ) , null , migratedVolume . getConsistencyGroup ( ) , migrationDesc . getCapabilitiesValues ( ) ) ; migratedBlockDataDescriptors . add ( migratedBlockDataDesc ) ; } } } List < VolumeDescriptor > blockDataDescriptors = new ArrayList < VolumeDescriptor > ( ) ; for ( VolumeDescriptor descr : rpVolumeDescriptors ) { Volume rpExistingSource = s_dbClient . queryObject ( Volume . class , descr . getVolumeURI ( ) ) ; if ( RPHelper . isVPlexVolume ( rpExistingSource , s_dbClient ) ) { s_logger . info ( String . format ( STRING , rpExistingSource . getLabel ( ) ) ) ; if ( null != rpExistingSource . getAssociatedVolumes ( ) ) { for ( String assocVolumeId : rpExistingSource . getAssociatedVolumes ( ) ) { Volume assocVolume = s_dbClient . queryObject ( Volume . class , URI . create ( assocVolumeId ) ) ; if ( volumesWithMigration . contains ( assocVolume . getId ( ) ) ) { s_logger . info ( String . format ( STRING , assocVolume . getLabel ( ) ) ) ; continue ; } if ( NullColumnValueGetter . isNotNullValue ( assocVolume . getReplicationGroupInstance ( ) ) ) { VolumeDescriptor blockDataDesc = new VolumeDescriptor ( VolumeDescriptor . Type . BLOCK_DATA , assocVolume . getStorageController ( ) , assocVolume . getId ( ) , null , rpExistingSource . getConsistencyGroup ( ) , descr . getCapabilitiesValues ( ) ) ; blockDataDescriptors . add ( blockDataDesc ) ; assocVolume . setConsistencyGroup ( rpExistingSource . getConsistencyGroup ( ) ) ; s_dbClient . updateObject ( assocVolume ) ; s_logger . info ( String . format ( STRING , assocVolume . getLabel ( ) , rpExistingSource . getConsistencyGroup ( ) , assocVolume . getStorageController ( ) ) ) ; } } } } } if ( ! blockDataDescriptors . isEmpty ( ) ) { waitFor = _blockDeviceController . addStepsForCreateConsistencyGroup ( workflow , waitFor , blockDataDescriptors , STRING ) ; waitFor = _blockDeviceController . addStepsForUpdateConsistencyGroup ( workflow , waitFor , blockDataDescriptors , null ) ; } blockDataDescriptors . addAll ( migratedBlockDataDescriptors ) ; s_logger . info ( STRING ) ; waitFor = _replicaDeviceController . addStepsForCreateVolumes ( workflow , waitFor , blockDataDescriptors , taskId ) ; return waitFor ; }
846
java-test-751
java
What will replace a brother node ?
this node in the oid tree
void export Children ( Snmp Mib Oid brother ) throws Illegal Access Exception { if ( brother == null ) return ; final long [ ] oid = new long [ NUM ] ; for ( int i = NUM ; i < nb Children ; i ++ ) { final Snmp Mib Node child = children . element At ( i ) ; if ( child == null ) continue ; oid [ NUM ] = var List [ i ] ; brother . register Node ( oid , NUM , child ) ; } }
void exportChildren ( SnmpMibOid brother ) throws IllegalAccessException { if ( brother == null ) return ; final long [ ] oid = new long [ _NUM ] ; for ( int i = _NUM ; i < nbChildren ; i ++ ) { final SnmpMibNode child = children . elementAt ( i ) ; if ( child == null ) continue ; oid [ _NUM ] = varList [ i ] ; brother . registerNode ( oid , _NUM , child ) ; } }
97
java-test-752
java
What exports to a brother node that will replace this node in the oid tree ?
this node ' s children
void export Children ( Snmp Mib Oid brother ) throws Illegal Access Exception { if ( brother == null ) return ; final long [ ] oid = new long [ NUM ] ; for ( int i = NUM ; i < nb Children ; i ++ ) { final Snmp Mib Node child = children . element At ( i ) ; if ( child == null ) continue ; oid [ NUM ] = var List [ i ] ; brother . register Node ( oid , NUM , child ) ; } }
void exportChildren ( SnmpMibOid brother ) throws IllegalAccessException { if ( brother == null ) return ; final long [ ] oid = new long [ _NUM ] ; for ( int i = _NUM ; i < nbChildren ; i ++ ) { final SnmpMibNode child = children . elementAt ( i ) ; if ( child == null ) continue ; oid [ _NUM ] = varList [ i ] ; brother . registerNode ( oid , _NUM , child ) ; } }
97
java-test-753
java
What will this node in the oid tree replace ?
a brother node
void export Children ( Snmp Mib Oid brother ) throws Illegal Access Exception { if ( brother == null ) return ; final long [ ] oid = new long [ NUM ] ; for ( int i = NUM ; i < nb Children ; i ++ ) { final Snmp Mib Node child = children . element At ( i ) ; if ( child == null ) continue ; oid [ NUM ] = var List [ i ] ; brother . register Node ( oid , NUM , child ) ; } }
void exportChildren ( SnmpMibOid brother ) throws IllegalAccessException { if ( brother == null ) return ; final long [ ] oid = new long [ _NUM ] ; for ( int i = _NUM ; i < nbChildren ; i ++ ) { final SnmpMibNode child = children . elementAt ( i ) ; if ( child == null ) continue ; oid [ _NUM ] = varList [ i ] ; brother . registerNode ( oid , _NUM , child ) ; } }
97