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-6865 | java | What does procedure c procedure generate ? | the a value from the given p , q , returning the a value | private Big Integer procedure C ( Big Integer p , Big Integer q ) { Big Integer p Sub 1 = p . subtract ( ONE ) ; Big Integer p Sub 1 Div Q = p Sub 1 . divide ( q ) ; int length = p . bit Length ( ) ; for ( ; ; ) { Big Integer d = new Big Integer ( length , init random ) ; if ( d . compare To ( ONE ) > NUM && d . compar... | private BigInteger procedure_C ( BigInteger p , BigInteger q ) { BigInteger pSub1 = p . subtract ( ONE ) ; BigInteger pSub1DivQ = pSub1 . divide ( q ) ; int length = p . bitLength ( ) ; for ( ; ; ) { BigInteger d = new BigInteger ( length , init_random ) ; if ( d . compareTo ( ONE ) > _NUM && d . compareTo ( pSub1 ) < ... | 138 |
java-test-6866 | java | What does the code update with the current time ? | the groups_timestamp table | private void update Timestamp ( List < String > batch List ) { Timestamp last Update = new Timestamp ( System . current Time Millis ( ) ) ; batch List . add ( STRING + ANALYSIS GROUPS TIME TABLE + STRING + STRING + STRING + last Update . to String ( ) + STRING ) ; } | private void updateTimestamp ( List < String > batchList ) { Timestamp lastUpdate = new Timestamp ( System . currentTimeMillis ( ) ) ; batchList . add ( STRING + ANALYSIS_GROUPS_TIME_TABLE + STRING + STRING + STRING + lastUpdate . toString ( ) + STRING ) ; } | 59 |
java-test-6867 | java | What does the code fetch ? | the lookup result from server | private Document fetch Result ( URL cgi Url ) { try { Document Builder Factory doc Builder Factory = Document Builder Factory . new Instance ( ) ; Document Builder doc Builder = doc Builder Factory . new Document Builder ( ) ; URL Connection UR Lconnection = cgi Url . open Connection ( ) ; Http URL Connection http Conn... | private Document fetchResult ( URL cgiUrl ) { try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder docBuilder = docBuilderFactory . newDocumentBuilder ( ) ; URLConnection URLconnection = cgiUrl . openConnection ( ) ; HttpURLConnection httpConnection = ( HttpURLConn... | 207 |
java-test-6868 | java | What does the code add ? | an angle | private void add Angle ( ) { if ( angles == null ) { angles = new double [ NUM ] ; selected Angle Index = NUM ; btn Delete Angle . set Enabled ( BOOL ) ; } else { double [ ] tmp Angles = new double [ angles . length + NUM ] ; for ( int i = NUM ; i < angles . length ; i ++ ) { tmp Angles [ i ] = angles [ i ] ; } angles ... | private void addAngle ( ) { if ( angles == null ) { angles = new double [ _NUM ] ; selectedAngleIndex = _NUM ; btnDeleteAngle . setEnabled ( _BOOL ) ; } else { double [ ] tmpAngles = new double [ angles . length + _NUM ] ; for ( int i = _NUM ; i < angles . length ; i ++ ) { tmpAngles [ i ] = angles [ i ] ; } angles = t... | 170 |
java-test-6869 | java | What does the code find ? | rowindexmin for greaterthanequal operator | private static int uarimin Ge ( double value , double [ ] bv , int [ ] bvi , Binary Operator b Op ) throws DML Runtime Exception { int ix Min = NUM ; if ( value <= bv [ NUM ] || value > bv [ bv . length - NUM ] ) return ix Min ; int ix = Arrays . binary Search ( bv , value ) ; if ( ix < NUM ) ix = Math . abs ( ix ) - N... | private static int uariminGe ( double value , double [ ] bv , int [ ] bvi , BinaryOperator bOp ) throws DMLRuntimeException { int ixMin = _NUM ; if ( value <= bv [ _NUM ] || value > bv [ bv . length - _NUM ] ) return ixMin ; int ix = Arrays . binarySearch ( bv , value ) ; if ( ix < _NUM ) ix = Math . abs ( ix ) - _NUM ... | 106 |
java-test-6870 | java | What does the code add ? | a info line with separated key and value | private void add Info ( J Panel panel , String key , String value ) { lgbc . gridx = NUM ; lgbc . anchor = Grid Bag Constraints . WEST ; panel . add ( new J Label ( key ) , lgbc ) ; lgbc . gridx = NUM ; lgbc . anchor = Grid Bag Constraints . EAST ; panel . add ( new J Label ( String Util . shorten To ( value , NUM , NU... | private void addInfo ( JPanel panel , String key , String value ) { lgbc . gridx = _NUM ; lgbc . anchor = GridBagConstraints . WEST ; panel . add ( new JLabel ( key ) , lgbc ) ; lgbc . gridx = _NUM ; lgbc . anchor = GridBagConstraints . EAST ; panel . add ( new JLabel ( StringUtil . shortenTo ( value , _NUM , _NUM ) ) ... | 93 |
java-test-6871 | java | What does content allow ? | child & lt ; p & gt ; , & lt ; span & gt ; and & lt ; br / & gt ; tags , as well as character data ( text content ) | public void add Content Child ( FXG Node child ) { if ( child instanceof Paragraph Node || child instanceof BR Node || child instanceof Span Node || child instanceof CDATA Node ) { if ( content == null ) { content = new Array List < Text Node > ( ) ; contiguous = BOOL ; } if ( ! contiguous ) { throw new FXG Exception (... | public void addContentChild ( FXGNode child ) { if ( child instanceof ParagraphNode || child instanceof BRNode || child instanceof SpanNode || child instanceof CDATANode ) { if ( content == null ) { content = new ArrayList < TextNode > ( ) ; contiguous = _BOOL ; } if ( ! contiguous ) { throw new FXGException ( child . ... | 102 |
java-test-6875 | java | What does the code create if they don ' t exist ? | the directory including the parent directories | protected static void mkdir ( String dir ) { File f = new File ( dir ) ; if ( f . exists ( ) ) { if ( f . is File ( ) ) { throw new Runtime Exception ( STRING + dir + STRING ) ; } } else { mkdirs ( f ) ; } } | protected static void mkdir ( String dir ) { File f = new File ( dir ) ; if ( f . exists ( ) ) { if ( f . isFile ( ) ) { throw new RuntimeException ( STRING + dir + STRING ) ; } } else { mkdirs ( f ) ; } } | 60 |
java-test-6876 | java | What will this generate between l times ? | a series of uniformally distributed numbers | public static double [ ] generate Uniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = NUM ; i < l ; i ++ ) { ret [ i ] = rgen . next Double ( ) ; } return ret ; } | public static double [ ] generateUniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = _NUM ; i < l ; i ++ ) { ret [ i ] = rgen . nextDouble ( ) ; } return ret ; } | 71 |
java-test-6877 | java | When will this generate a series of uniformally distributed numbers ? | between l times | public static double [ ] generate Uniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = NUM ; i < l ; i ++ ) { ret [ i ] = rgen . next Double ( ) ; } return ret ; } | public static double [ ] generateUniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = _NUM ; i < l ; i ++ ) { ret [ i ] = rgen . nextDouble ( ) ; } return ret ; } | 71 |
java-test-6878 | java | How did numbers distribute ? | uniformally | public static double [ ] generate Uniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = NUM ; i < l ; i ++ ) { ret [ i ] = rgen . next Double ( ) ; } return ret ; } | public static double [ ] generateUniform ( int l ) { double [ ] ret = new double [ l ] ; java . util . Random rgen = new java . util . Random ( ) ; for ( int i = _NUM ; i < l ; i ++ ) { ret [ i ] = rgen . nextDouble ( ) ; } return ret ; } | 71 |
java-test-6879 | java | What does our implementation not do when sending , only when receiving , we rotate left as per the rrc count , to revert it ? | any rotates | private void rotate ( ) { if ( rrc % token Data Len != NUM ) { rrc = rrc % token Data Len ; byte [ ] new Bytes = new byte [ token Data Len ] ; System . arraycopy ( token Data , rrc , new Bytes , NUM , token Data Len - rrc ) ; System . arraycopy ( token Data , NUM , new Bytes , token Data Len - rrc , rrc ) ; token Data ... | private void rotate ( ) { if ( rrc % tokenDataLen != _NUM ) { rrc = rrc % tokenDataLen ; byte [ ] newBytes = new byte [ tokenDataLen ] ; System . arraycopy ( tokenData , rrc , newBytes , _NUM , tokenDataLen - rrc ) ; System . arraycopy ( tokenData , _NUM , newBytes , tokenDataLen - rrc , rrc ) ; tokenData = newBytes ; ... | 89 |
java-test-6880 | java | When do we rotate left as per the rrc count ? | when receiving | private void rotate ( ) { if ( rrc % token Data Len != NUM ) { rrc = rrc % token Data Len ; byte [ ] new Bytes = new byte [ token Data Len ] ; System . arraycopy ( token Data , rrc , new Bytes , NUM , token Data Len - rrc ) ; System . arraycopy ( token Data , NUM , new Bytes , token Data Len - rrc , rrc ) ; token Data ... | private void rotate ( ) { if ( rrc % tokenDataLen != _NUM ) { rrc = rrc % tokenDataLen ; byte [ ] newBytes = new byte [ tokenDataLen ] ; System . arraycopy ( tokenData , rrc , newBytes , _NUM , tokenDataLen - rrc ) ; System . arraycopy ( tokenData , _NUM , newBytes , tokenDataLen - rrc , rrc ) ; tokenData = newBytes ; ... | 89 |
java-test-6881 | java | What does not do any rotates when sending , only when receiving , we rotate left as per the rrc count , to revert it ? | our implementation | private void rotate ( ) { if ( rrc % token Data Len != NUM ) { rrc = rrc % token Data Len ; byte [ ] new Bytes = new byte [ token Data Len ] ; System . arraycopy ( token Data , rrc , new Bytes , NUM , token Data Len - rrc ) ; System . arraycopy ( token Data , NUM , new Bytes , token Data Len - rrc , rrc ) ; token Data ... | private void rotate ( ) { if ( rrc % tokenDataLen != _NUM ) { rrc = rrc % tokenDataLen ; byte [ ] newBytes = new byte [ tokenDataLen ] ; System . arraycopy ( tokenData , rrc , newBytes , _NUM , tokenDataLen - rrc ) ; System . arraycopy ( tokenData , _NUM , newBytes , tokenDataLen - rrc , rrc ) ; tokenData = newBytes ; ... | 89 |
java-test-6882 | java | When does our implementation not do any rotates ? | when sending , only when receiving , we rotate left as per the rrc count , to revert it | private void rotate ( ) { if ( rrc % token Data Len != NUM ) { rrc = rrc % token Data Len ; byte [ ] new Bytes = new byte [ token Data Len ] ; System . arraycopy ( token Data , rrc , new Bytes , NUM , token Data Len - rrc ) ; System . arraycopy ( token Data , NUM , new Bytes , token Data Len - rrc , rrc ) ; token Data ... | private void rotate ( ) { if ( rrc % tokenDataLen != _NUM ) { rrc = rrc % tokenDataLen ; byte [ ] newBytes = new byte [ tokenDataLen ] ; System . arraycopy ( tokenData , rrc , newBytes , _NUM , tokenDataLen - rrc ) ; System . arraycopy ( tokenData , _NUM , newBytes , tokenDataLen - rrc , rrc ) ; tokenData = newBytes ; ... | 89 |
java-test-6883 | java | How do bytes rotate ? | as per the " rrc " ( right rotation count ) received | private void rotate ( ) { if ( rrc % token Data Len != NUM ) { rrc = rrc % token Data Len ; byte [ ] new Bytes = new byte [ token Data Len ] ; System . arraycopy ( token Data , rrc , new Bytes , NUM , token Data Len - rrc ) ; System . arraycopy ( token Data , NUM , new Bytes , token Data Len - rrc , rrc ) ; token Data ... | private void rotate ( ) { if ( rrc % tokenDataLen != _NUM ) { rrc = rrc % tokenDataLen ; byte [ ] newBytes = new byte [ tokenDataLen ] ; System . arraycopy ( tokenData , rrc , newBytes , _NUM , tokenDataLen - rrc ) ; System . arraycopy ( tokenData , _NUM , newBytes , tokenDataLen - rrc , rrc ) ; tokenData = newBytes ; ... | 89 |
java-test-6884 | java | What is the code send if arduino is in a callback ? | a shield frame | public void send Shield Frame ( Shield Frame frame , boolean wait If In A Callback ) { if ( frame == null ) throw new Null Pointer Exception ( STRING ) ; if ( ! is Connected ( ) ) { on Error ( One Sheeld Error . DEVICE NOT CONNECTED ) ; return ; } else if ( is Updating Firmware ( ) ) { on Error ( One Sheeld Error . FIR... | public void sendShieldFrame ( ShieldFrame frame , boolean waitIfInACallback ) { if ( frame == null ) throw new NullPointerException ( STRING ) ; if ( ! isConnected ( ) ) { onError ( OneSheeldError . DEVICE_NOT_CONNECTED ) ; return ; } else if ( isUpdatingFirmware ( ) ) { onError ( OneSheeldError . FIRMWARE_UPDATE_IN_PR... | 173 |
java-test-6885 | java | How does the given cells align ? | vertically or horizontally | public Object [ ] align Cells ( String align , Object [ ] cells , Object param ) { if ( cells == null ) { cells = get Selection Cells ( ) ; } if ( cells != null && cells . length > NUM ) { if ( param == null ) { for ( int i = NUM ; i < cells . length ; i ++ ) { mx Geometry geo = get Cell Geometry ( cells [ i ] ) ; if (... | public Object [ ] alignCells ( String align , Object [ ] cells , Object param ) { if ( cells == null ) { cells = getSelectionCells ( ) ; } if ( cells != null && cells . length > _NUM ) { if ( param == null ) { for ( int i = _NUM ; i < cells . length ; i ++ ) { mxGeometry geo = getCellGeometry ( cells [ i ] ) ; if ( geo... | 819 |
java-test-6886 | java | What does the code add ? | the header stored in internal hashtable | private void add Internal Header Fields ( String name , String value ) { String key = name . to Upper Case ( ) ; Vector < String > v = get Headers ( key ) ; if ( v == null ) { v = new Vector < > ( ) ; m Header Fields . put ( key , v ) ; } if ( value != null ) { v . add ( value ) ; } else { m Header Fields . remove ( ke... | private void addInternalHeaderFields ( String name , String value ) { String key = name . toUpperCase ( ) ; Vector < String > v = getHeaders ( key ) ; if ( v == null ) { v = new Vector < > ( ) ; mHeaderFields . put ( key , v ) ; } if ( value != null ) { v . add ( value ) ; } else { mHeaderFields . remove ( key ) ; } } | 93 |
java-test-6889 | java | What does the method not change ? | state of this reader | public Object Reader with Value To Update ( Object value ) { if ( value == value To Update ) return this ; if ( value == null ) { throw new Illegal Argument Exception ( STRING ) ; } Java Type t = ( value Type == null ) ? config . construct Type ( value . get Class ( ) ) : value Type ; return new Object Reader ( this , ... | public ObjectReader withValueToUpdate ( Object value ) { if ( value == _valueToUpdate ) return this ; if ( value == null ) { throw new IllegalArgumentException ( STRING ) ; } JavaType t = ( _valueType == null ) ? _config . constructType ( value . getClass ( ) ) : _valueType ; return new ObjectReader ( this , _config , ... | 87 |
java-test-6890 | java | What do the method not construct rather ? | a newly configured instance | public Object Reader with Value To Update ( Object value ) { if ( value == value To Update ) return this ; if ( value == null ) { throw new Illegal Argument Exception ( STRING ) ; } Java Type t = ( value Type == null ) ? config . construct Type ( value . get Class ( ) ) : value Type ; return new Object Reader ( this , ... | public ObjectReader withValueToUpdate ( Object value ) { if ( value == _valueToUpdate ) return this ; if ( value == null ) { throw new IllegalArgumentException ( STRING ) ; } JavaType t = ( _valueType == null ) ? _config . constructType ( value . getClass ( ) ) : _valueType ; return new ObjectReader ( this , _config , ... | 87 |
java-test-6892 | java | How does the code print ? | in a prototype | void build Code ( Prototype f ) { int [ ] code = f . code ; int pc , n = code . length ; for ( pc = NUM ; pc < n ; pc ++ ) { build Op Code ( f , pc ) ; ps . append ( STRING ) ; } } | void buildCode ( Prototype f ) { int [ ] code = f . code ; int pc , n = code . length ; for ( pc = _NUM ; pc < n ; pc ++ ) { buildOpCode ( f , pc ) ; ps . append ( STRING ) ; } } | 58 |
java-test-6894 | java | Till when do we execute work loop here ? | until we run out of video or are told to stop | private void do Extract ( Media Extractor extractor , int track Index , Media Codec decoder , Frame Callback frame Callback ) { final int TIMEOUT USEC = NUM ; Byte Buffer [ ] decoder Input Buffers = decoder . get Input Buffers ( ) ; int input Chunk = NUM ; long first Input Time Nsec = - NUM ; boolean output Done = BOOL... | private void doExtract ( MediaExtractor extractor , int trackIndex , MediaCodec decoder , FrameCallback frameCallback ) { final int TIMEOUT_USEC = _NUM ; ByteBuffer [ ] decoderInputBuffers = decoder . getInputBuffers ( ) ; int inputChunk = _NUM ; long firstInputTimeNsec = - _NUM ; boolean outputDone = _BOOL ; boolean i... | 809 |
java-test-6896 | java | What does the code create ? | a number from its textual representation | public NS Number ( String text ) { if ( text == null ) throw new Illegal Argument Exception ( STRING ) ; try { long l ; if ( text . starts With ( STRING ) ) { l = Long . parse Long ( text . substring ( NUM ) , NUM ) ; } else { l = Long . parse Long ( text ) ; } double Value = long Value = l ; type = INTEGER ; } catch (... | public NSNumber ( String text ) { if ( text == null ) throw new IllegalArgumentException ( STRING ) ; try { long l ; if ( text . startsWith ( STRING ) ) { l = Long . parseLong ( text . substring ( _NUM ) , _NUM ) ; } else { l = Long . parseLong ( text ) ; } doubleValue = longValue = l ; type = INTEGER ; } catch ( Excep... | 222 |
java-test-6897 | java | What does the code delete ? | a snapshot schedule | public void delete Snapshot Schedule ( String id ) throws Isilon Exception { try { id = URL Encoder . encode ( id , STRING ) ; } catch ( Unsupported Encoding Exception e ) { e . print Stack Trace ( ) ; } delete Snapshot Schedule ( base Url . resolve ( URI SNAPSHOT SCHEDULES + STRING + id ) ) ; } | public void deleteSnapshotSchedule ( String id ) throws IsilonException { try { id = URLEncoder . encode ( id , STRING ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } deleteSnapshotSchedule ( _baseUrl . resolve ( URI_SNAPSHOT_SCHEDULES + STRING + id ) ) ; } | 65 |
java-test-6898 | java | What does source contain in it in order to decide whether a gif image is animated or not ? | more than one frame header | public static boolean is Animated ( Input Stream source ) { final byte [ ] buffer = new byte [ FRAME HEADER SIZE ] ; try { source . read ( buffer , NUM , FRAME HEADER SIZE ) ; int offset = NUM ; int frame Headers = NUM ; while ( source . read ( buffer , offset , NUM ) > NUM ) { if ( circular Buffer Matches Byte Pattern... | public static boolean isAnimated ( InputStream source ) { final byte [ ] buffer = new byte [ FRAME_HEADER_SIZE ] ; try { source . read ( buffer , _NUM , FRAME_HEADER_SIZE ) ; int offset = _NUM ; int frameHeaders = _NUM ; while ( source . read ( buffer , offset , _NUM ) > _NUM ) { if ( circularBufferMatchesBytePattern (... | 176 |
java-test-6899 | java | For what purpose does source contain more than one frame header in it ? | in order to decide whether a gif image is animated or not | public static boolean is Animated ( Input Stream source ) { final byte [ ] buffer = new byte [ FRAME HEADER SIZE ] ; try { source . read ( buffer , NUM , FRAME HEADER SIZE ) ; int offset = NUM ; int frame Headers = NUM ; while ( source . read ( buffer , offset , NUM ) > NUM ) { if ( circular Buffer Matches Byte Pattern... | public static boolean isAnimated ( InputStream source ) { final byte [ ] buffer = new byte [ FRAME_HEADER_SIZE ] ; try { source . read ( buffer , _NUM , FRAME_HEADER_SIZE ) ; int offset = _NUM ; int frameHeaders = _NUM ; while ( source . read ( buffer , offset , _NUM ) > _NUM ) { if ( circularBufferMatchesBytePattern (... | 176 |
java-test-6902 | java | What does the code convert into an arraylist of string array ? | an arraylist of string | public static Array List < String [ ] > lines To Array ( Array List < String > in Line ) { Array List < String [ ] > frames En Tab = new Array List < > ( ) ; for ( int i = NUM ; i < in Line . size ( ) ; i ++ ) { frames En Tab . add ( line To Array ( in Line . get ( i ) ) ) ; } return frames En Tab ; } | public static ArrayList < String [ ] > linesToArray ( ArrayList < String > inLine ) { ArrayList < String [ ] > framesEnTab = new ArrayList < > ( ) ; for ( int i = _NUM ; i < inLine . size ( ) ; i ++ ) { framesEnTab . add ( lineToArray ( inLine . get ( i ) ) ) ; } return framesEnTab ; } | 88 |
java-test-6903 | java | What does the code read ? | a single preference | private void read And Set Preference ( String name , byte type Id , Data Input Stream reader , Editor editor ) throws IO Exception { boolean save = BOOL ; if ( do Not Backup . contains ( name ) ) { save = BOOL ; } switch ( type Id ) { case Content Type Ids . BOOLEAN TYPE ID : boolean boolean Value = reader . read Boole... | private void readAndSetPreference ( String name , byte typeId , DataInputStream reader , Editor editor ) throws IOException { boolean save = _BOOL ; if ( doNotBackup . contains ( name ) ) { save = _BOOL ; } switch ( typeId ) { case ContentTypeIds . BOOLEAN_TYPE_ID : boolean booleanValue = reader . readBoolean ( ) ; if ... | 251 |
java-test-6904 | java | What does the code broadcast ? | a tuner configuration event | public void add Tuner Configuration ( Tuner Configuration config ) { if ( ! m Tuner Configurations . contains ( config ) && config . get Unique ID ( ) != null && config . get Name ( ) != null ) { m Tuner Configurations . add ( config ) ; int index = m Tuner Configurations . index Of ( config ) ; fire Table Rows Inserte... | public void addTunerConfiguration ( TunerConfiguration config ) { if ( ! mTunerConfigurations . contains ( config ) && config . getUniqueID ( ) != null && config . getName ( ) != null ) { mTunerConfigurations . add ( config ) ; int index = mTunerConfigurations . indexOf ( config ) ; fireTableRowsInserted ( index , inde... | 92 |
java-test-6905 | java | What do the model fire ? | a table model row add event | public void add Tuner Configuration ( Tuner Configuration config ) { if ( ! m Tuner Configurations . contains ( config ) && config . get Unique ID ( ) != null && config . get Name ( ) != null ) { m Tuner Configurations . add ( config ) ; int index = m Tuner Configurations . index Of ( config ) ; fire Table Rows Inserte... | public void addTunerConfiguration ( TunerConfiguration config ) { if ( ! mTunerConfigurations . contains ( config ) && config . getUniqueID ( ) != null && config . getName ( ) != null ) { mTunerConfigurations . add ( config ) ; int index = mTunerConfigurations . indexOf ( config ) ; fireTableRowsInserted ( index , inde... | 92 |
java-test-6910 | java | What is denoting the return type ? | the returned list | public static List < Type > to Jimple Desc ( String desc ) { Array List < Type > types = new Array List < Type > ( NUM ) ; int len = desc . length ( ) ; int idx = NUM ; all : while ( idx != len ) { int nr Dims = NUM ; Type base Type = null ; this type : while ( idx != len ) { char c = desc . char At ( idx ++ ) ; switch... | public static List < Type > toJimpleDesc ( String desc ) { ArrayList < Type > types = new ArrayList < Type > ( _NUM ) ; int len = desc . length ( ) ; int idx = _NUM ; all : while ( idx != len ) { int nrDims = _NUM ; Type baseType = null ; this_type : while ( idx != len ) { char c = desc . charAt ( idx ++ ) ; switch ( c... | 378 |
java-test-6911 | java | What does the code execute ? | a sql prepared statement with the specified arguments | private void execute Prepared Statement ( String sql , Object ... arguments ) throws SQL Exception { Connection connection = null ; Prepared Statement prepared Statement = null ; try { Data Source data Source = Dao Spring Module Config . get Herd Data Source ( ) ; connection = data Source . get Connection ( ) ; prepare... | private void executePreparedStatement ( String sql , Object ... arguments ) throws SQLException { Connection connection = null ; PreparedStatement preparedStatement = null ; try { DataSource dataSource = DaoSpringModuleConfig . getHerdDataSource ( ) ; connection = dataSource . getConnection ( ) ; preparedStatement = co... | 145 |
java-test-6913 | java | How does a tree of geometries reduce to a list of geometries ? | by recursively unioning the subtrees in the list | private List reduce To Geometries ( List geom Tree ) { List geoms = new Array List ( ) ; for ( Iterator i = geom Tree . iterator ( ) ; i . has Next ( ) ; ) { Object o = i . next ( ) ; Geometry geom = null ; if ( o instanceof List ) { geom = union Tree ( ( List ) o ) ; } else if ( o instanceof Geometry ) { geom = ( Geom... | private List reduceToGeometries ( List geomTree ) { List geoms = new ArrayList ( ) ; for ( Iterator i = geomTree . iterator ( ) ; i . hasNext ( ) ; ) { Object o = i . next ( ) ; Geometry geom = null ; if ( o instanceof List ) { geom = unionTree ( ( List ) o ) ; } else if ( o instanceof Geometry ) { geom = ( Geometry ) ... | 102 |
java-test-6914 | java | What do the string resize if these are the default values ? | specifications | public final String encode ( ) { String Buffer buffer = new String Buffer ( ) ; Default Alignment alignment Default = is Horizontal ( ) ? Column Spec . DEFAULT : Row Spec . DEFAULT ; if ( ! alignment Default . equals ( default Alignment ) ) { buffer . append ( default Alignment . abbreviation ( ) ) ; buffer . append ( ... | public final String encode ( ) { StringBuffer buffer = new StringBuffer ( ) ; DefaultAlignment alignmentDefault = isHorizontal ( ) ? ColumnSpec . DEFAULT : RowSpec . DEFAULT ; if ( ! alignmentDefault . equals ( defaultAlignment ) ) { buffer . append ( defaultAlignment . abbreviation ( ) ) ; buffer . append ( STRING ) ;... | 157 |
java-test-6915 | java | What will the string omit if these are the default values ? | the alignment and | public final String encode ( ) { String Buffer buffer = new String Buffer ( ) ; Default Alignment alignment Default = is Horizontal ( ) ? Column Spec . DEFAULT : Row Spec . DEFAULT ; if ( ! alignment Default . equals ( default Alignment ) ) { buffer . append ( default Alignment . abbreviation ( ) ) ; buffer . append ( ... | public final String encode ( ) { StringBuffer buffer = new StringBuffer ( ) ; DefaultAlignment alignmentDefault = isHorizontal ( ) ? ColumnSpec . DEFAULT : RowSpec . DEFAULT ; if ( ! alignmentDefault . equals ( defaultAlignment ) ) { buffer . append ( defaultAlignment . abbreviation ( ) ) ; buffer . append ( STRING ) ;... | 157 |
java-test-6916 | java | What do it put ? | into the state monitor | public void load Offsets ( Context context ) { String prefs = Utils . get String ( PREF OFFSETS , STRING , context ) ; if ( prefs . length ( ) < NUM ) return ; Map < Integer , Long > offsets = new Hash Map < > ( ) ; String [ ] s Offsets = prefs . split ( STRING ) ; for ( String offset : s Offsets ) { String [ ] parts =... | public void loadOffsets ( Context context ) { String prefs = Utils . getString ( PREF_OFFSETS , STRING , context ) ; if ( prefs . length ( ) < _NUM ) return ; Map < Integer , Long > offsets = new HashMap < > ( ) ; String [ ] sOffsets = prefs . split ( STRING ) ; for ( String offset : sOffsets ) { String [ ] parts = off... | 126 |
java-test-6917 | java | What does the code create ? | the web target | private Web Target create Web Target ( String rest Path , Map < String , String > query Params ) { Web Target web Target ; try { URI u = new URI ( this . base URI + STRING + rest Path ) ; Client client = creater Rest Client ( ) ; web Target = client . target ( u ) ; if ( query Params != null && ! query Params . is Empt... | private WebTarget createWebTarget ( String restPath , Map < String , String > queryParams ) { WebTarget webTarget ; try { URI u = new URI ( this . baseURI + STRING + restPath ) ; Client client = createrRestClient ( ) ; webTarget = client . target ( u ) ; if ( queryParams != null && ! queryParams . isEmpty ( ) ) { for (... | 196 |
java-test-6918 | java | What does the code add to the ccfgmethodentrynode of each public method ? | a ccfgframeedge | private void connect Public Methods To Frame ( ) { for ( Class Call Node ccg Node : ccg . vertex Set ( ) ) { Raw Control Flow Graph cfg = get RCFG ( ccg Node ) ; if ( cfg . is Public Method ( ) ) { add Edge ( get Frame Node ( Frame Node Type . CALL ) , method Entries . get ( ccg Node . get Method ( ) ) , new CCFG Frame... | private void connectPublicMethodsToFrame ( ) { for ( ClassCallNode ccgNode : ccg . vertexSet ( ) ) { RawControlFlowGraph cfg = getRCFG ( ccgNode ) ; if ( cfg . isPublicMethod ( ) ) { addEdge ( getFrameNode ( FrameNodeType . CALL ) , methodEntries . get ( ccgNode . getMethod ( ) ) , new CCFGFrameEdge ( ) ) ; addEdge ( m... | 145 |
java-test-6919 | java | How does the code perform a cleaning of the uri ? | by trimming it and removing last ' / ' character if exists | private static String clean Uri ( final String uri ) { String result = uri . trim ( ) ; if ( ! String Utils . is Empty ( uri ) ) { final int end Index = result . length ( ) - NUM ; if ( result . last Index Of ( STRING ) == end Index ) { result = result . substring ( NUM , end Index ) ; } } return result ; } | private static String cleanUri ( final String uri ) { String result = uri . trim ( ) ; if ( ! StringUtils . isEmpty ( uri ) ) { final int endIndex = result . length ( ) - _NUM ; if ( result . lastIndexOf ( STRING ) == endIndex ) { result = result . substring ( _NUM , endIndex ) ; } } return result ; } | 79 |
java-test-6920 | java | What does the code perform by trimming it and removing last ' / ' character if exists ? | a cleaning of the uri | private static String clean Uri ( final String uri ) { String result = uri . trim ( ) ; if ( ! String Utils . is Empty ( uri ) ) { final int end Index = result . length ( ) - NUM ; if ( result . last Index Of ( STRING ) == end Index ) { result = result . substring ( NUM , end Index ) ; } } return result ; } | private static String cleanUri ( final String uri ) { String result = uri . trim ( ) ; if ( ! StringUtils . isEmpty ( uri ) ) { final int endIndex = result . length ( ) - _NUM ; if ( result . lastIndexOf ( STRING ) == endIndex ) { result = result . substring ( _NUM , endIndex ) ; } } return result ; } | 79 |
java-test-6922 | java | What does the code construct ? | the index table | private void parse Jars ( String [ ] files ) throws IO Exception { if ( files == null ) { return ; } String current Jar = null ; for ( int i = NUM ; i < files . length ; i ++ ) { current Jar = files [ i ] ; Zip File zrf = new Zip File ( current Jar . replace ( STRING , File . separator Char ) ) ; Enumeration < ? extend... | private void parseJars ( String [ ] files ) throws IOException { if ( files == null ) { return ; } String currentJar = null ; for ( int i = _NUM ; i < files . length ; i ++ ) { currentJar = files [ i ] ; ZipFile zrf = new ZipFile ( currentJar . replace ( STRING , File . separatorChar ) ) ; Enumeration < ? extends ZipEn... | 218 |
java-test-6925 | java | What does some tokens in a query string replace ? | with tokens of format $ { token - name } with the given replacements , which may again be tokens ( e . g . in another format ) or values . tokens that have no replacement defined stay in the original token format | public String replace Some Tokens ( String query String , Map < String , String > replacements ) { Matcher matcher = token Pattern . matcher ( query String ) ; String Buffer buf = new String Buffer ( ) ; while ( matcher . find ( ) ) { String orig Token = matcher . group ( NUM ) ; if ( orig Token != null ) { String repl... | public String replaceSomeTokens ( String queryString , Map < String , String > replacements ) { Matcher matcher = tokenPattern . matcher ( queryString ) ; StringBuffer buf = new StringBuffer ( ) ; while ( matcher . find ( ) ) { String origToken = matcher . group ( _NUM ) ; if ( origToken != null ) { String replacement ... | 133 |
java-test-6926 | java | What does the code draw ? | the component background | void paint Component ( Graphics g ) { Rectangular Shape rectangle ; int radius = Rapid Look And Feel . CORNER DEFAULT RADIUS ; switch ( position ) { case Swing Constants . LEFT : rectangle = new Round Rectangle 2 D . Double ( NUM , NUM , button . get Width ( ) + radius , button . get Height ( ) , radius , radius ) ; br... | void paintComponent ( Graphics g ) { RectangularShape rectangle ; int radius = RapidLookAndFeel . CORNER_DEFAULT_RADIUS ; switch ( position ) { case SwingConstants . LEFT : rectangle = new RoundRectangle2D . Double ( _NUM , _NUM , button . getWidth ( ) + radius , button . getHeight ( ) , radius , radius ) ; break ; cas... | 164 |
java-test-6927 | java | What does the code trim ? | the cookie list | private void trim Size ( ) { int count = m Cookie Entity Dao . count ( ) ; if ( count > MAX COOKIE SIZE + NUM ) { List < Cookie Entity > rm List = m Cookie Entity Dao . get List ( null , null , Integer . to String ( count - MAX COOKIE SIZE ) , null ) ; if ( rm List != null ) m Cookie Entity Dao . delete ( rm List ) ; }... | private void trimSize ( ) { int count = mCookieEntityDao . count ( ) ; if ( count > MAX_COOKIE_SIZE + _NUM ) { List < CookieEntity > rmList = mCookieEntityDao . getList ( null , null , Integer . toString ( count - MAX_COOKIE_SIZE ) , null ) ; if ( rmList != null ) mCookieEntityDao . delete ( rmList ) ; } } | 85 |
java-test-6928 | java | How does the code initialize the test ? | using a discrete data sets | public Ind Test Probabilistic Verbose ( Data Set data Set , Print Writer out , Ind Test D Sep dsep Test ) { this . out = out ; this . dsep Test = dsep Test ; if ( ! data Set . is Discrete ( ) ) { throw new Illegal Argument Exception ( STRING ) ; } this . data = data Set ; int [ ] node Dimensions = new int [ data Set . ... | public IndTestProbabilisticVerbose ( DataSet dataSet , PrintWriter out , IndTestDSep dsepTest ) { this . out = out ; this . dsepTest = dsepTest ; if ( ! dataSet . isDiscrete ( ) ) { throw new IllegalArgumentException ( STRING ) ; } this . data = dataSet ; int [ ] nodeDimensions = new int [ dataSet . getNumColumns ( ) +... | 336 |
java-test-6930 | java | What can be found in the group membership map & # 45 ? | the user with the specified dn | private boolean user In Groups Membership List ( String user DN , Map < String , Collection < String > > group Membership List ) { boolean result = BOOL ; Collection < Collection < String > > member Lists = group Membership List . values ( ) ; Iterator < Collection < String > > member Lists Iterator = member Lists . it... | private boolean userInGroupsMembershipList ( String userDN , Map < String , Collection < String > > groupMembershipList ) { boolean result = _BOOL ; Collection < Collection < String > > memberLists = groupMembershipList . values ( ) ; Iterator < Collection < String > > memberListsIterator = memberLists . iterator ( ) ;... | 113 |
java-test-6931 | java | Where can the user with the specified dn be found ? | in the group membership map & # 45 | private boolean user In Groups Membership List ( String user DN , Map < String , Collection < String > > group Membership List ) { boolean result = BOOL ; Collection < Collection < String > > member Lists = group Membership List . values ( ) ; Iterator < Collection < String > > member Lists Iterator = member Lists . it... | private boolean userInGroupsMembershipList ( String userDN , Map < String , Collection < String > > groupMembershipList ) { boolean result = _BOOL ; Collection < Collection < String > > memberLists = groupMembershipList . values ( ) ; Iterator < Collection < String > > memberListsIterator = memberLists . iterator ( ) ;... | 113 |
java-test-6934 | java | What does we delete from the type and all supertypes if this is the last registered instance of the service type if this is the last registered instance of the service type ? | the concrete class information | private void delete Service ( Svc Reg reg , long now ) { Item item = reg . item ; generate Events ( item , null , now ) ; service By ID . remove ( item . service ID ) ; service By Time . remove ( reg ) ; delete Service From Types ( item . service Type , reg ) ; Entry Rep [ ] entries = item . attribute Sets ; for ( int ... | private void deleteService ( SvcReg reg , long now ) { Item item = reg . item ; generateEvents ( item , null , now ) ; serviceByID . remove ( item . serviceID ) ; serviceByTime . remove ( reg ) ; deleteServiceFromTypes ( item . serviceType , reg ) ; EntryRep [ ] entries = item . attributeSets ; for ( int i = entries . ... | 112 |
java-test-6935 | java | For what purpose do the layout scroll meaning scroll to exitoffset ? | to exit | public void scroll To Exit ( ) { if ( ! is Support Exit ) return ; if ( current Inner Status == Inner Status . EXIT ) { return ; } if ( exit Offset == max Offset ) { return ; } int dy = - get Scroll Y ( ) - exit Offset ; if ( dy == NUM ) { return ; } current Inner Status = Inner Status . SCROLLING ; int duration = MIN ... | public void scrollToExit ( ) { if ( ! isSupportExit ) return ; if ( currentInnerStatus == InnerStatus . EXIT ) { return ; } if ( exitOffset == maxOffset ) { return ; } int dy = - getScrollY ( ) - exitOffset ; if ( dy == _NUM ) { return ; } currentInnerStatus = InnerStatus . SCROLLING ; int duration = MIN_SCROLL_DURATIO... | 133 |
java-test-6936 | java | How did the same omdist object fill in ? | with the new value | protected OM Dist < T > find Closest Test ( OM Dist < T > current , int index , OM Geometry graphic , double x , double y , float limit , boolean reset Select ) { if ( current == null ) { current = create Dist ( ) ; } OM List < ? extends OM Geometry > omgl ; float current Distance = Float . MAX VALUE ; if ( ! should Pr... | protected OMDist < T > findClosestTest ( OMDist < T > current , int index , OMGeometry graphic , double x , double y , float limit , boolean resetSelect ) { if ( current == null ) { current = createDist ( ) ; } OMList < ? extends OMGeometry > omgl ; float currentDistance = Float . MAX_VALUE ; if ( ! shouldProcess ( gra... | 251 |
java-test-6937 | java | How did the upgrade perform so that the migrated policy can be validated to ensure the upgrade went well ? | without saving | @ Override public void initialize ( ) throws Upgrade Exception { if ( ! is Current Version Less Than ( NUM , BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : get Realm Names ( ) ) { if ( ! realm . starts With ( STRING ) ) { realm = STRING + realm ; } Privilege Manager privilege Manager = ge... | @ Override public void initialize ( ) throws UpgradeException { if ( ! isCurrentVersionLessThan ( _NUM , _BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : getRealmNames ( ) ) { if ( ! realm . startsWith ( STRING ) ) { realm = STRING + realm ; } PrivilegeManager privilegeManager = getPrivile... | 232 |
java-test-6938 | java | For what purpose can the migrated policy be validated ? | to ensure the upgrade went well | @ Override public void initialize ( ) throws Upgrade Exception { if ( ! is Current Version Less Than ( NUM , BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : get Realm Names ( ) ) { if ( ! realm . starts With ( STRING ) ) { realm = STRING + realm ; } Privilege Manager privilege Manager = ge... | @ Override public void initialize ( ) throws UpgradeException { if ( ! isCurrentVersionLessThan ( _NUM , _BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : getRealmNames ( ) ) { if ( ! realm . startsWith ( STRING ) ) { realm = STRING + realm ; } PrivilegeManager privilegeManager = getPrivile... | 232 |
java-test-6939 | java | For what purpose did the upgrade perform without saving ? | so that the migrated policy can be validated to ensure the upgrade went well | @ Override public void initialize ( ) throws Upgrade Exception { if ( ! is Current Version Less Than ( NUM , BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : get Realm Names ( ) ) { if ( ! realm . starts With ( STRING ) ) { realm = STRING + realm ; } Privilege Manager privilege Manager = ge... | @ Override public void initialize ( ) throws UpgradeException { if ( ! isCurrentVersionLessThan ( _NUM , _BOOL ) ) { return ; } try { DEBUG . message ( STRING ) ; for ( String realm : getRealmNames ( ) ) { if ( ! realm . startsWith ( STRING ) ) { realm = STRING + realm ; } PrivilegeManager privilegeManager = getPrivile... | 232 |
java-test-6940 | java | What does the code copy into it ? | coords | public static Float Buffer allocate Float Buffer ( float [ ] coords ) { Byte Buffer byte Buffer = Byte Buffer . allocate Direct ( coords . length * BYTES PER FLOAT ) ; byte Buffer . order ( Byte Order . native Order ( ) ) ; Float Buffer float Buffer = byte Buffer . as Float Buffer ( ) ; float Buffer . put ( coords ) ; ... | public static FloatBuffer allocateFloatBuffer ( float [ ] coords ) { ByteBuffer byteBuffer = ByteBuffer . allocateDirect ( coords . length * BYTES_PER_FLOAT ) ; byteBuffer . order ( ByteOrder . nativeOrder ( ) ) ; FloatBuffer floatBuffer = byteBuffer . asFloatBuffer ( ) ; floatBuffer . put ( coords ) ; floatBuffer . po... | 83 |
java-test-6941 | java | For what purpose does the the given sourcefile copy in case it exists ? | to destfile , | public static void copy File ( File source File , File dest File ) throws IO Exception { if ( ! source File . exists ( ) ) { throw new IO Exception ( STRING + source File . get Absolute Path ( ) ) ; } copy File ( new File Input Stream ( source File ) , new File Output Stream ( dest File ) ) ; } | public static void copyFile ( File sourceFile , File destFile ) throws IOException { if ( ! sourceFile . exists ( ) ) { throw new IOException ( STRING + sourceFile . getAbsolutePath ( ) ) ; } copyFile ( new FileInputStream ( sourceFile ) , new FileOutputStream ( destFile ) ) ; } | 70 |
java-test-6942 | java | What does the code add to the list ? | entries for the first and last points of the edge | public void add Endpoints ( ) { int max Seg Index = edge . pts . length - NUM ; add ( edge . pts [ NUM ] , NUM , NUM ) ; add ( edge . pts [ max Seg Index ] , max Seg Index , NUM ) ; } | public void addEndpoints ( ) { int maxSegIndex = edge . pts . length - _NUM ; add ( edge . pts [ _NUM ] , _NUM , _NUM ) ; add ( edge . pts [ maxSegIndex ] , maxSegIndex , _NUM ) ; } | 53 |
java-test-6943 | java | What does the code apply ? | any partner customization grid overrides | private void apply Partner Device Profile Overrides ( Context ctx , Display Metrics dm ) { Partner p = Partner . get ( ctx . get Package Manager ( ) ) ; if ( p != null ) { Device Profile partner Dp = p . get Device Profile Override ( dm ) ; if ( partner Dp != null ) { if ( partner Dp . num Rows > NUM && partner Dp . nu... | private void applyPartnerDeviceProfileOverrides ( Context ctx , DisplayMetrics dm ) { Partner p = Partner . get ( ctx . getPackageManager ( ) ) ; if ( p != null ) { DeviceProfile partnerDp = p . getDeviceProfileOverride ( dm ) ; if ( partnerDp != null ) { if ( partnerDp . numRows > _NUM && partnerDp . numColumns > _NUM... | 199 |
java-test-6946 | java | What does the code dump in textual form ? | the voice | public void dump ( Print Writer output , int pad , String title ) { Utilities . dump ( output , pad , title ) ; features . dump ( output , pad + NUM , title + STRING ) ; dump Processors ( output , pad + NUM , title + STRING ) ; } | public void dump ( PrintWriter output , int pad , String title ) { Utilities . dump ( output , pad , title ) ; features . dump ( output , pad + _NUM , title + STRING ) ; dumpProcessors ( output , pad + _NUM , title + STRING ) ; } | 56 |
java-test-6949 | java | What does the code compute ? | the minimum and maximum | public void compute Min Max ( int samples Per Pixel , float missing ) { minimum = new double [ samples Per Pixel ] ; maximum = new double [ samples Per Pixel ] ; Arrays . fill ( minimum , Double . MAX VALUE ) ; Arrays . fill ( maximum , - Double . MAX VALUE ) ; byte [ ] b Array = new byte [ width * num Bytes ] ; Byte B... | public void computeMinMax ( int samplesPerPixel , float missing ) { minimum = new double [ samplesPerPixel ] ; maximum = new double [ samplesPerPixel ] ; Arrays . fill ( minimum , Double . MAX_VALUE ) ; Arrays . fill ( maximum , - Double . MAX_VALUE ) ; byte [ ] bArray = new byte [ width * numBytes ] ; ByteBuffer bBuf ... | 1,352 |
java-test-6951 | java | What does the code write to the target stream from a string ? | the low order bytes | public final void write Bytes ( String str ) throws IO Exception { if ( str . length ( ) == NUM ) { return ; } byte bytes [ ] = new byte [ str . length ( ) ] ; for ( int index = NUM ; index < str . length ( ) ; index ++ ) { bytes [ index ] = ( byte ) str . char At ( index ) ; } out . write ( bytes ) ; written += bytes ... | public final void writeBytes ( String str ) throws IOException { if ( str . length ( ) == _NUM ) { return ; } byte bytes [ ] = new byte [ str . length ( ) ] ; for ( int index = _NUM ; index < str . length ( ) ; index ++ ) { bytes [ index ] = ( byte ) str . charAt ( index ) ; } out . write ( bytes ) ; written += bytes .... | 92 |
java-test-6952 | java | Where d the code finds a data object by i d ? | within a collection | public static < T extends Data Object Rest Rep > T find ( Collection < T > values , URI id ) { if ( ( values != null ) && ( id != null ) ) { for ( T value : values ) { if ( id . equals ( id ( value ) ) ) { return value ; } } } return null ; } | public static < T extends DataObjectRestRep > T find ( Collection < T > values , URI id ) { if ( ( values != null ) && ( id != null ) ) { for ( T value : values ) { if ( id . equals ( id ( value ) ) ) { return value ; } } } return null ; } | 69 |
java-test-6953 | java | What d the code finds within a collection by i d ? | a data object | public static < T extends Data Object Rest Rep > T find ( Collection < T > values , URI id ) { if ( ( values != null ) && ( id != null ) ) { for ( T value : values ) { if ( id . equals ( id ( value ) ) ) { return value ; } } } return null ; } | public static < T extends DataObjectRestRep > T find ( Collection < T > values , URI id ) { if ( ( values != null ) && ( id != null ) ) { for ( T value : values ) { if ( id . equals ( id ( value ) ) ) { return value ; } } } return null ; } | 69 |
java-test-6954 | java | How has the user specified any property file ? | via setcustompropsfile ( ) | public void reset Options ( ) { reset Structure ( ) ; try { if ( m Data Base Connection != null && m Data Base Connection . is Connected ( ) ) { m Data Base Connection . disconnect From Database ( ) ; } m Data Base Connection = new Database Connection ( ) ; } catch ( Exception ex ) { print Exception ( ex ) ; } m URL = ... | public void resetOptions ( ) { resetStructure ( ) ; try { if ( m_DataBaseConnection != null && m_DataBaseConnection . isConnected ( ) ) { m_DataBaseConnection . disconnectFromDatabase ( ) ; } m_DataBaseConnection = newDatabaseConnection ( ) ; } catch ( Exception ex ) { printException ( ex ) ; } m_URL = m_DataBaseConnec... | 167 |
java-test-6956 | java | What read to arraylist ? | file lines | public static Array List < String > file Lines ( String fin ) { File file = new File ( fin ) ; Buffered Reader br ; File Reader fr ; Array List < String > lines = new Array List < String > ( ) ; try { fr = new File Reader ( file ) ; br = new Buffered Reader ( fr ) ; String line ; try { while ( ( line = br . read Line (... | public static ArrayList < String > fileLines ( String fin ) { File file = new File ( fin ) ; BufferedReader br ; FileReader fr ; ArrayList < String > lines = new ArrayList < String > ( ) ; try { fr = new FileReader ( file ) ; br = new BufferedReader ( fr ) ; String line ; try { while ( ( line = br . readLine ( ) ) != n... | 132 |
java-test-6957 | java | What did file lines read ? | to arraylist | public static Array List < String > file Lines ( String fin ) { File file = new File ( fin ) ; Buffered Reader br ; File Reader fr ; Array List < String > lines = new Array List < String > ( ) ; try { fr = new File Reader ( file ) ; br = new Buffered Reader ( fr ) ; String line ; try { while ( ( line = br . read Line (... | public static ArrayList < String > fileLines ( String fin ) { File file = new File ( fin ) ; BufferedReader br ; FileReader fr ; ArrayList < String > lines = new ArrayList < String > ( ) ; try { fr = new FileReader ( file ) ; br = new BufferedReader ( fr ) ; String line ; try { while ( ( line = br . readLine ( ) ) != n... | 132 |
java-test-6958 | java | What does it return if successful if successful ? | the number of parsed bytes which is the encryption context length | private int parse Encryption Context ( final byte [ ] b , final int off ) throws Parse Exception { final int len = b . length - off ; if ( len >= encryption Context Len ) { encryption Context = Arrays . copy Of Range ( b , off , off + encryption Context Len ) ; return encryption Context Len ; } else { throw new Parse E... | private int parseEncryptionContext ( final byte [ ] b , final int off ) throws ParseException { final int len = b . length - off ; if ( len >= encryptionContextLen_ ) { encryptionContext_ = Arrays . copyOfRange ( b , off , off + encryptionContextLen_ ) ; return encryptionContextLen_ ; } else { throw new ParseException ... | 77 |
java-test-6960 | java | What does a row have ? | some padding at the top of it , and bottom | public static J Panel create Row With Top And Bottom Padding ( final J Panel content Row , final int top Padding , final int bottom Padding ) { final J Panel row Contents = new J Panel ( ) ; row Contents . set Layout ( new Box Layout ( row Contents , Box Layout . Y AXIS ) ) ; row Contents . add ( Box . create Vertical ... | public static JPanel createRowWithTopAndBottomPadding ( final JPanel contentRow , final int topPadding , final int bottomPadding ) { final JPanel rowContents = new JPanel ( ) ; rowContents . setLayout ( new BoxLayout ( rowContents , BoxLayout . Y_AXIS ) ) ; rowContents . add ( Box . createVerticalStrut ( topPadding ) )... | 108 |
java-test-6961 | java | What does the code find ? | minimum close to vector x ( desired fractional digits for each parameter is specified | public double find Minimum ( Multivariate Function f , double [ ] xvec , int fx Frac Digits , int x Frac Digits , Minimiser Monitor monitor ) { double tolfx = Math . pow ( NUM , - NUM - fx Frac Digits ) ; double tolx = Math . pow ( NUM , - NUM - x Frac Digits ) ; optimize ( f , xvec , tolfx , tolx , monitor ) ; double ... | public double findMinimum ( MultivariateFunction f , double [ ] xvec , int fxFracDigits , int xFracDigits , MinimiserMonitor monitor ) { double tolfx = Math . pow ( _NUM , - _NUM - fxFracDigits ) ; double tolx = Math . pow ( _NUM , - _NUM - xFracDigits ) ; optimize ( f , xvec , tolfx , tolx , monitor ) ; double m = Mat... | 145 |
java-test-6962 | java | What does the code evaluate ? | the result of the expression , given an assignment of values to the unknown variables | public double evaluate ( Assignment input ) { Assignment input 2 = ( functions . is Empty ( ) ) ? input : input . copy ( ) ; for ( Functional Template f : functions ) { Custom Function fu = f . get Function ( ) ; Value result = f . get Value ( input 2 ) ; input 2 . add Pair ( ( fu . get Name ( ) + f . hash Code ( ) ) ,... | public double evaluate ( Assignment input ) { Assignment input2 = ( functions . isEmpty ( ) ) ? input : input . copy ( ) ; for ( FunctionalTemplate f : functions ) { CustomFunction fu = f . getFunction ( ) ; Value result = f . getValue ( input2 ) ; input2 . addPair ( ( fu . getName ( ) + f . hashCode ( ) ) , result ) ;... | 125 |
java-test-6963 | java | What does the code add ? | a collection of final fields whose final modifier was removed by our instrumentation | public void add Final Fields ( Collection < String > new Final Fields ) { for ( String final Field : new Final Fields ) { if ( ! final Fields . contains ( final Field ) ) { logger . debug ( STRING + new Final Fields ) ; final Fields . add ( final Field ) ; } } } | public void addFinalFields ( Collection < String > newFinalFields ) { for ( String finalField : newFinalFields ) { if ( ! finalFields . contains ( finalField ) ) { logger . debug ( STRING + newFinalFields ) ; finalFields . add ( finalField ) ; } } } | 62 |
java-test-6964 | java | How are resource bundles searched ? | in the reverse order they were added | public synchronized void add Resource Bundle ( String bundle Name ) { if ( bundle Name == null ) { return ; } if ( resource Bundles == null ) { resource Bundles = new Vector < String > ( NUM ) ; } if ( ! resource Bundles . contains ( bundle Name ) ) { resource Bundles . add ( bundle Name ) ; resource Cache . clear ( ) ... | public synchronized void addResourceBundle ( String bundleName ) { if ( bundleName == null ) { return ; } if ( resourceBundles == null ) { resourceBundles = new Vector < String > ( _NUM ) ; } if ( ! resourceBundles . contains ( bundleName ) ) { resourceBundles . add ( bundleName ) ; resourceCache . clear ( ) ; } } | 75 |
java-test-6965 | java | What does the code add a resource bundle ? | to the list of resource bundles that are searched for localized values | public synchronized void add Resource Bundle ( String bundle Name ) { if ( bundle Name == null ) { return ; } if ( resource Bundles == null ) { resource Bundles = new Vector < String > ( NUM ) ; } if ( ! resource Bundles . contains ( bundle Name ) ) { resource Bundles . add ( bundle Name ) ; resource Cache . clear ( ) ... | public synchronized void addResourceBundle ( String bundleName ) { if ( bundleName == null ) { return ; } if ( resourceBundles == null ) { resourceBundles = new Vector < String > ( _NUM ) ; } if ( ! resourceBundles . contains ( bundleName ) ) { resourceBundles . add ( bundleName ) ; resourceCache . clear ( ) ; } } | 75 |
java-test-6971 | java | What did the code read ? | implementation information from an xml element | protected void read Implementation ( final Entity Setup Descriptor desc , final Element element ) { if ( element . has Attribute ( STRING ) ) { desc . set Implementation ( element . get Attribute ( STRING ) ) ; } else { LOGGER . error ( STRING ) ; } read Parameters ( desc , element ) ; } | protected void readImplementation ( final EntitySetupDescriptor desc , final Element element ) { if ( element . hasAttribute ( STRING ) ) { desc . setImplementation ( element . getAttribute ( STRING ) ) ; } else { LOGGER . error ( STRING ) ; } readParameters ( desc , element ) ; } | 61 |
java-test-6972 | java | What does the code add ? | a rate limit for the given type | public void add Rate Limit ( Rate Limit Type type , Server server , long retry After ) { if ( server == null ) { rate Limits . put ( type , System . current Time Millis ( ) + retry After ) ; } else { Hash Map < Rate Limit Type , Long > rate Limits = server Rate Limits . get ( server ) ; if ( rate Limits == null ) { rat... | public void addRateLimit ( RateLimitType type , Server server , long retryAfter ) { if ( server == null ) { rateLimits . put ( type , System . currentTimeMillis ( ) + retryAfter ) ; } else { HashMap < RateLimitType , Long > rateLimits = serverRateLimits . get ( server ) ; if ( rateLimits == null ) { rateLimits = new Ha... | 122 |
java-test-6973 | java | What does this define ? | the " probability " of a constraint between two widgets | private static void estimate Probability ( Scout Widget from , Direction from Dir , Scout Widget to , Direction to Dir , Scout Widget [ ] list , float [ ] result ) { result [ RESULT PROBABILITY ] = NUM ; result [ RESULT MARGIN ] = NUM ; if ( from == to ) { return ; } if ( from . is Guideline ( ) ) { return ; } if ( to ... | private static void estimateProbability ( ScoutWidget from , Direction fromDir , ScoutWidget to , Direction toDir , ScoutWidget [ ] list , float [ ] result ) { result [ RESULT_PROBABILITY ] = _NUM ; result [ RESULT_MARGIN ] = _NUM ; if ( from == to ) { return ; } if ( from . isGuideline ( ) ) { return ; } if ( to . isG... | 405 |
java-test-6976 | java | What does the code create ? | a new codedinputstream wrapping the given bytebuffer | public static Coded Input Stream new Instance ( Byte Buffer buf ) { if ( buf . has Array ( ) ) { return new Instance ( buf . array ( ) , buf . array Offset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { Byte Buffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . ge... | public static CodedInputStream newInstance ( ByteBuffer buf ) { if ( buf . hasArray ( ) ) { return newInstance ( buf . array ( ) , buf . arrayOffset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { ByteBuffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . get ( buff... | 97 |
java-test-6977 | java | What is no other thread trying ? | to alter the bytebuffer ' s status | public static Coded Input Stream new Instance ( Byte Buffer buf ) { if ( buf . has Array ( ) ) { return new Instance ( buf . array ( ) , buf . array Offset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { Byte Buffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . ge... | public static CodedInputStream newInstance ( ByteBuffer buf ) { if ( buf . hasArray ( ) ) { return newInstance ( buf . array ( ) , buf . arrayOffset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { ByteBuffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . get ( buff... | 97 |
java-test-6978 | java | What do no other thread alter ? | the bytebuffer ' s status | public static Coded Input Stream new Instance ( Byte Buffer buf ) { if ( buf . has Array ( ) ) { return new Instance ( buf . array ( ) , buf . array Offset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { Byte Buffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . ge... | public static CodedInputStream newInstance ( ByteBuffer buf ) { if ( buf . hasArray ( ) ) { return newInstance ( buf . array ( ) , buf . arrayOffset ( ) + buf . position ( ) , buf . remaining ( ) ) ; } else { ByteBuffer temp = buf . duplicate ( ) ; byte [ ] buffer = new byte [ temp . remaining ( ) ] ; temp . get ( buff... | 97 |
java-test-6980 | java | What do we access how how ? | the official constants | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6981 | java | What do the derby client offer as a way of accessing the state , which is normally in 5 - digit xxyyy string format ( at least in the cases we care about ) ? | the getsqlstate ( ) method | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6982 | java | What represents here ? | the " broad category " we seek ( yyy represents something specific within that category ) | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6983 | java | What uses terminology oriented towards " session " when describing this class of errors ? | most online doc | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6984 | java | When must we ask about the underlying database implementation ? | as we proceed | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6985 | java | What do we use ? | constants from : org . apache . derby . shared . common . reference . sqlstate | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6986 | java | What do we figure ? | how to properly access the official constants | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6987 | java | What does the derby client note ? | that we should like to use constants from : org . apache . derby . shared . common . reference . sqlstate but this package does not appear to be included in the derby jar files that we use . . . ( ? not quite sure why . . . ) | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6988 | java | What should we like ? | to use constants from : org . apache . derby . shared . common . reference . sqlstate | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6989 | java | What do most online doc use when describing this class of errors ? | terminology oriented towards " session " | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6990 | java | Where does a way of accessing the state be in 5 - digit xxyyy string format at least normally ? | in the cases we care about | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6991 | java | What is in 5 - digit xxyyy string format in the cases we care about ? | a way of accessing the state | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6992 | java | When do most online doc use terminology oriented towards " session " ? | when describing this class of errors | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6993 | java | Till when does we make due with constant derby_session_severity above ? | until such time as we figure out how to properly access the official constants | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6994 | java | How do the world see ? | thru its own pair of rose glasses | public static boolean is Connection Exception ( SQL Exception e ) throws Ade Internal Exception { boolean is Session Severity ; logger . trace ( STRING ) ; final String connection Url = get Database Url ( ) ; if ( connection Url == null ) { throw new Ade Internal Exception ( STRING ) ; } if ( ! connection Url . contain... | public static boolean isConnectionException ( SQLException e ) throws AdeInternalException { boolean isSessionSeverity ; logger . trace ( STRING ) ; final String connectionUrl = getDatabaseUrl ( ) ; if ( connectionUrl == null ) { throw new AdeInternalException ( STRING ) ; } if ( ! connectionUrl . contains ( DERBY_JDBC... | 160 |
java-test-6995 | java | What does the code add to a key ? | a new certificate request | public static synchronized String add Cert Request ( String key Id , Client Id member Id , String subject Name , Key Usage Info key Usage ) { log . trace ( STRING , key Id , member Id ) ; Key key = find Key ( key Id ) ; if ( key . get Usage ( ) != null && key . get Usage ( ) != key Usage ) { throw Coded Exception . tr ... | public static synchronized String addCertRequest ( String keyId , ClientId memberId , String subjectName , KeyUsageInfo keyUsage ) { log . trace ( STRING , keyId , memberId ) ; Key key = findKey ( keyId ) ; if ( key . getUsage ( ) != null && key . getUsage ( ) != keyUsage ) { throw CodedException . tr ( X_WRONG_CERT_US... | 288 |
java-test-6996 | java | What does the code create ? | the xml element for an integer value | private void create Element ( Document doc , Element parent Element , String element Name , int value ) { Element element = doc . create Element ( element Name ) ; element . append Child ( doc . create Text Node ( Integer . to String ( value ) ) ) ; parent Element . append Child ( element ) ; } | private void createElement ( Document doc , Element parentElement , String elementName , int value ) { Element element = doc . createElement ( elementName ) ; element . appendChild ( doc . createTextNode ( Integer . toString ( value ) ) ) ; parentElement . appendChild ( element ) ; } | 63 |
java-test-6997 | java | What does the code create ? | a string representation of this fibonacci heap | @ Override public String to String ( ) { if ( min Node == null ) { return STRING ; } Stack < Fibonacci Heap Node < T > > stack = new Stack < Fibonacci Heap Node < T > > ( ) ; stack . push ( min Node ) ; String Buffer buf = new String Buffer ( NUM ) ; buf . append ( STRING ) ; while ( ! stack . empty ( ) ) { Fibonacci H... | @ Override public String toString ( ) { if ( minNode == null ) { return STRING ; } Stack < FibonacciHeapNode < T > > stack = new Stack < FibonacciHeapNode < T > > ( ) ; stack . push ( minNode ) ; StringBuffer buf = new StringBuffer ( _NUM ) ; buf . append ( STRING ) ; while ( ! stack . empty ( ) ) { FibonacciHeapNode <... | 208 |
java-test-7000 | java | When does the annualcalendar work ? | over years | public void test Days Excluded Over Time ( ) { Annual Calendar annual Calendar = new Annual Calendar ( ) ; Calendar day = Calendar . get Instance ( ) ; day . set ( Calendar . MONTH , Calendar . JUNE ) ; day . set ( Calendar . YEAR , NUM ) ; day . set ( Calendar . DAY OF MONTH , NUM ) ; annual Calendar . set Day Exclude... | public void testDaysExcludedOverTime ( ) { AnnualCalendar annualCalendar = new AnnualCalendar ( ) ; Calendar day = Calendar . getInstance ( ) ; day . set ( Calendar . MONTH , Calendar . JUNE ) ; day . set ( Calendar . YEAR , _NUM ) ; day . set ( Calendar . DAY_OF_MONTH , _NUM ) ; annualCalendar . setDayExcluded ( ( Cal... | 160 |
java-test-7002 | java | How does the code initialize the counts ? | variable | public void init Counts ( ) { counts = new Counts < Link > ( ) ; Calendar cal = Calendar . get Instance ( ) ; counts . set Year ( cal . get ( Calendar . YEAR ) ) ; if ( net != null ) counts . set Name ( STRING + net . get Name ( ) + STRING ) ; } | public void initCounts ( ) { counts = new Counts < Link > ( ) ; Calendar cal = Calendar . getInstance ( ) ; counts . setYear ( cal . get ( Calendar . YEAR ) ) ; if ( net != null ) counts . setName ( STRING + net . getName ( ) + STRING ) ; } | 66 |
java-test-7004 | java | How does the code create a new dataset of the same size ? | using random sampling with replacement | public Instances resample ( Random random ) { Instances new Data = new Instances ( this , num Instances ( ) ) ; while ( new Data . num Instances ( ) < num Instances ( ) ) { new Data . add ( instance ( random . next Int ( num Instances ( ) ) ) ) ; } return new Data ; } | public Instances resample ( Random random ) { Instances newData = new Instances ( this , numInstances ( ) ) ; while ( newData . numInstances ( ) < numInstances ( ) ) { newData . add ( instance ( random . nextInt ( numInstances ( ) ) ) ) ; } return newData ; } | 65 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.