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 ... | 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 ... | 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 ... | 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 ; } } ... | 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 , hei... | 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 , Im... | 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 , sched... | 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 , _B... | 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 In... | 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 ( encoded... | 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 ( ob... | 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 ... | 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 (... | 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 ) ; proce... | 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... | protected void terminate ( boolean commit ) throws HeurRollbackException , HeurMixedException , SysException , java . lang . SecurityException , HeurCommitException , HeurHazardException , RollbackException , IllegalStateException { synchronized ( fsm_ ) { if ( commit ) { if ( participants_ . size ( ) <= _NUM ) { commi... | 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 > p... | 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 =... | 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 ... | 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... | 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 = diviso... | private void tick ( ) { if ( startedIndexTimeStamp == _NUM ) { startedIndexTimeStamp = System . currentTimeMillis ( ) ; } long timeElapsedSinceIndexStartMilliseconds = System . currentTimeMillis ( ) - startedIndexTimeStamp ; int maximumIndex = divisorList . length - _NUM ; int currentDivisor = divisorList [ currentInde... | 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 = diviso... | private void tick ( ) { if ( startedIndexTimeStamp == _NUM ) { startedIndexTimeStamp = System . currentTimeMillis ( ) ; } long timeElapsedSinceIndexStartMilliseconds = System . currentTimeMillis ( ) - startedIndexTimeStamp ; int maximumIndex = divisorList . length - _NUM ; int currentDivisor = divisorList [ currentInde... | 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... | 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 (... | 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 ... | 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 ( BorderFacto... | 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 ... | 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 ( BorderFacto... | 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 != nu... | 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 ( st... | 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 != nu... | 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 ( st... | 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 != nu... | 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 ( st... | 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 != nu... | 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 ( st... | 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 ... | 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... | 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 ... | 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... | 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 ) { chang... | public void addCoreEquipmentConfigurationChanger ( final long equipmentId , final ICoreEquipmentConfigurationChanger coreEquipmentConfigurationChanger ) { List < ICoreEquipmentConfigurationChanger > changers = coreEquipmentConfigurationChangers . get ( equipmentId ) ; if ( changers == null ) { changers = new ArrayList ... | 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 Artis... | 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 ( )... | 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 Artis... | 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 ( )... | 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 < Prope... | 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 > ... | 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... | 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 ( ) ... | 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... | 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 ( Fixe... | 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 Pa... | 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 ( reade... | 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 con... | 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 configurationTem... | 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 )... | 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 {... | 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 )... | 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 {... | 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... | 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 + nOfEntrie... | 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 = n... | 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 = ne... | 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 . upda... | 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 ... | 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 ... | 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 . setIn... | 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 ( Stri... | 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 . ... | 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 ++... | 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... | 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 ) ) ... | 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 ) ) ; ... | 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 ) ) ... | 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 ) ) ; ... | 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 ) ) ... | 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 ) ) ; ... | 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 = ... | 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 . get... | 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 = ... | 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 . get... | 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 = ... | 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 . get... | 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 ... | 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 ... | 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 ... | 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 ... | 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 ... | 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 ... | 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 ... | 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 ... | 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 Doubl... | @ 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 ; } dou... | 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 S... | 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 ... | 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 ... | 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 ( GeneralSecurityE... | 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 . tr... | 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... | 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 + ... | 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 . ... | 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 + ... | 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 . ... | 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 In... | 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 ( ... | 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 ; ... | @ 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 ; } } c... | 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 . ... | 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_SOURC... | 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 . ... | 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_SOURC... | 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 ] ; ... | 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... | 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 ] ; ... | 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... | 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 ] ; ... | 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... | 97 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.