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-457 | java | Does the code obtain the decimalstyle for the specified locale ? | Yes | public static Decimal Style of ( Locale locale ) { Objects . require Non Null ( locale , STRING ) ; Decimal Style info = CACHE . get ( locale ) ; if ( info == null ) { info = create ( locale ) ; CACHE . put If Absent ( locale , info ) ; info = CACHE . get ( locale ) ; } return info ; } | public static DecimalStyle of ( Locale locale ) { Objects . requireNonNull ( locale , STRING ) ; DecimalStyle info = CACHE . get ( locale ) ; if ( info == null ) { info = create ( locale ) ; CACHE . putIfAbsent ( locale , info ) ; info = CACHE . get ( locale ) ; } return info ; } | 71 |
java-test-458 | java | What does this method provide ? | access to locale sensitive decimal style symbols | public static Decimal Style of ( Locale locale ) { Objects . require Non Null ( locale , STRING ) ; Decimal Style info = CACHE . get ( locale ) ; if ( info == null ) { info = create ( locale ) ; CACHE . put If Absent ( locale , info ) ; info = CACHE . get ( locale ) ; } return info ; } | public static DecimalStyle of ( Locale locale ) { Objects . requireNonNull ( locale , STRING ) ; DecimalStyle info = CACHE . get ( locale ) ; if ( info == null ) { info = create ( locale ) ; CACHE . putIfAbsent ( locale , info ) ; info = CACHE . get ( locale ) ; } return info ; } | 71 |
java-test-461 | java | What does the code write to a file in the csv format ? | the result set of a query | public int write ( Connection conn , String output File Name , String sql , String charset ) throws SQL Exception { Statement stat = conn . create Statement ( ) ; Result Set rs = stat . execute Query ( sql ) ; int rows = write ( output File Name , rs , charset ) ; stat . close ( ) ; return rows ; } | public int write ( Connection conn , String outputFileName , String sql , String charset ) throws SQLException { Statement stat = conn . createStatement ( ) ; ResultSet rs = stat . executeQuery ( sql ) ; int rows = write ( outputFileName , rs , charset ) ; stat . close ( ) ; return rows ; } | 68 |
java-test-462 | java | Does the code write the result set of a query to a file in the csv format ? | Yes | public int write ( Connection conn , String output File Name , String sql , String charset ) throws SQL Exception { Statement stat = conn . create Statement ( ) ; Result Set rs = stat . execute Query ( sql ) ; int rows = write ( output File Name , rs , charset ) ; stat . close ( ) ; return rows ; } | public int write ( Connection conn , String outputFileName , String sql , String charset ) throws SQLException { Statement stat = conn . createStatement ( ) ; ResultSet rs = stat . executeQuery ( sql ) ; int rows = write ( outputFileName , rs , charset ) ; stat . close ( ) ; return rows ; } | 68 |
java-test-463 | java | How does the code create a header ? | by reading the information from the input stream | public static Header read Header ( Array Data Input dis ) throws Truncated File Exception , IO Exception { Header my Header = new Header ( ) ; try { my Header . read ( dis ) ; } catch ( EOF Exception e ) { if ( e . get Cause ( ) instanceof Truncated File Exception ) { throw e ; } return null ; } return my Header ; } | public static Header readHeader ( ArrayDataInput dis ) throws TruncatedFileException , IOException { Header myHeader = new Header ( ) ; try { myHeader . read ( dis ) ; } catch ( EOFException e ) { if ( e . getCause ( ) instanceof TruncatedFileException ) { throw e ; } return null ; } return myHeader ; } | 73 |
java-test-464 | java | Does the code create a header by reading the information from the input stream ? | Yes | public static Header read Header ( Array Data Input dis ) throws Truncated File Exception , IO Exception { Header my Header = new Header ( ) ; try { my Header . read ( dis ) ; } catch ( EOF Exception e ) { if ( e . get Cause ( ) instanceof Truncated File Exception ) { throw e ; } return null ; } return my Header ; } | public static Header readHeader ( ArrayDataInput dis ) throws TruncatedFileException , IOException { Header myHeader = new Header ( ) ; try { myHeader . read ( dis ) ; } catch ( EOFException e ) { if ( e . getCause ( ) instanceof TruncatedFileException ) { throw e ; } return null ; } return myHeader ; } | 73 |
java-test-467 | java | What does the code get ? | the entity at the specified revision | @ Nullable public T ENTITY find Revision ( int id , int revision Number ) { T ENTITY result = null ; try { begin ( ) ; Audit Reader reader = Audit Reader Factory . get ( get Entity Manager ( ) ) ; result = reader . find ( entity Class , id , revision Number ) ; commit ( ) ; } catch ( No Result Exception e ) { rollback ... | @ Nullable public T_ENTITY findRevision ( int id , int revisionNumber ) { T_ENTITY result = null ; try { begin ( ) ; AuditReader reader = AuditReaderFactory . get ( getEntityManager ( ) ) ; result = reader . find ( entityClass , id , revisionNumber ) ; commit ( ) ; } catch ( NoResultException e ) { rollback ( ) ; LOG .... | 103 |
java-test-468 | java | Does the code get the entity at the specified revision ? | Yes | @ Nullable public T ENTITY find Revision ( int id , int revision Number ) { T ENTITY result = null ; try { begin ( ) ; Audit Reader reader = Audit Reader Factory . get ( get Entity Manager ( ) ) ; result = reader . find ( entity Class , id , revision Number ) ; commit ( ) ; } catch ( No Result Exception e ) { rollback ... | @ Nullable public T_ENTITY findRevision ( int id , int revisionNumber ) { T_ENTITY result = null ; try { begin ( ) ; AuditReader reader = AuditReaderFactory . get ( getEntityManager ( ) ) ; result = reader . find ( entityClass , id , revisionNumber ) ; commit ( ) ; } catch ( NoResultException e ) { rollback ( ) ; LOG .... | 103 |
java-test-471 | java | When does a scheduleitem place ? | later in the schedule | public void move Item Down ( Schedule Item si ) { int sequence Id = si . get Sequence Id ( ) ; if ( sequence Id + NUM > sequence Num ) { si . set Sequence Id ( NUM ) ; resequence Ids ( ) ; } else { Schedule Item replace Si = get Item By Sequence Id ( sequence Id + NUM ) ; if ( replace Si != null ) { replace Si . set Se... | public void moveItemDown ( ScheduleItem si ) { int sequenceId = si . getSequenceId ( ) ; if ( sequenceId + _NUM > _sequenceNum ) { si . setSequenceId ( _NUM ) ; resequenceIds ( ) ; } else { ScheduleItem replaceSi = getItemBySequenceId ( sequenceId + _NUM ) ; if ( replaceSi != null ) { replaceSi . setSequenceId ( sequen... | 133 |
java-test-480 | java | What determines whether that state is currently active ? | the code given a time when a particular state changes from inactive to active , and a time when a particular state changes from active to inactive | private boolean is Active ( Calendar active Start , Calendar inactive Start ) { if ( inactive Start != null && active Start != null && inactive Start . before ( active Start ) ) return ! is Active ( inactive Start , active Start ) ; Calendar current = Calendar . get Instance ( ) ; return ! ( active Start != null && cur... | private boolean isActive ( Calendar activeStart , Calendar inactiveStart ) { if ( inactiveStart != null && activeStart != null && inactiveStart . before ( activeStart ) ) return ! isActive ( inactiveStart , activeStart ) ; Calendar current = Calendar . getInstance ( ) ; return ! ( activeStart != null && current . befor... | 91 |
java-test-481 | java | What did the code given a time when a particular state changes from inactive to active , and a time when a particular state changes from active to inactive determine ? | whether that state is currently active | private boolean is Active ( Calendar active Start , Calendar inactive Start ) { if ( inactive Start != null && active Start != null && inactive Start . before ( active Start ) ) return ! is Active ( inactive Start , active Start ) ; Calendar current = Calendar . get Instance ( ) ; return ! ( active Start != null && cur... | private boolean isActive ( Calendar activeStart , Calendar inactiveStart ) { if ( inactiveStart != null && activeStart != null && inactiveStart . before ( activeStart ) ) return ! isActive ( inactiveStart , activeStart ) ; Calendar current = Calendar . getInstance ( ) ; return ! ( activeStart != null && current . befor... | 91 |
java-test-482 | java | Did the code given a time when a particular state changes from inactive to active , and a time when a particular state changes from active to inactive determine ? | Yes | private boolean is Active ( Calendar active Start , Calendar inactive Start ) { if ( inactive Start != null && active Start != null && inactive Start . before ( active Start ) ) return ! is Active ( inactive Start , active Start ) ; Calendar current = Calendar . get Instance ( ) ; return ! ( active Start != null && cur... | private boolean isActive ( Calendar activeStart , Calendar inactiveStart ) { if ( inactiveStart != null && activeStart != null && inactiveStart . before ( activeStart ) ) return ! isActive ( inactiveStart , activeStart ) ; Calendar current = Calendar . getInstance ( ) ; return ! ( activeStart != null && current . befor... | 91 |
java-test-483 | java | What does the code request until a read operation can be performed safely ? | the read lock . block | public synchronized void read Request ( ) { if ( current Writers == NUM && writer Locks . size ( ) == NUM ) { ++ current Readers ; } else { ++ queued Readers ; try { wait ( ) ; } catch ( Interrupted Exception e ) { } } } | public synchronized void readRequest ( ) { if ( currentWriters == _NUM && writerLocks . size ( ) == _NUM ) { ++ currentReaders ; } else { ++ queuedReaders ; try { wait ( ) ; } catch ( InterruptedException e ) { } } } | 53 |
java-test-484 | java | Does the code request the read lock . block until a read operation can be performed safely ? | Yes | public synchronized void read Request ( ) { if ( current Writers == NUM && writer Locks . size ( ) == NUM ) { ++ current Readers ; } else { ++ queued Readers ; try { wait ( ) ; } catch ( Interrupted Exception e ) { } } } | public synchronized void readRequest ( ) { if ( currentWriters == _NUM && writerLocks . size ( ) == _NUM ) { ++ currentReaders ; } else { ++ queuedReaders ; try { wait ( ) ; } catch ( InterruptedException e ) { } } } | 53 |
java-test-485 | java | Till when does the code request the read lock . block ? | until a read operation can be performed safely | public synchronized void read Request ( ) { if ( current Writers == NUM && writer Locks . size ( ) == NUM ) { ++ current Readers ; } else { ++ queued Readers ; try { wait ( ) ; } catch ( Interrupted Exception e ) { } } } | public synchronized void readRequest ( ) { if ( currentWriters == _NUM && writerLocks . size ( ) == _NUM ) { ++ currentReaders ; } else { ++ queuedReaders ; try { wait ( ) ; } catch ( InterruptedException e ) { } } } | 53 |
java-test-487 | java | How do file process ? | with actions ( delete , move , archive ) specified | private void process File Action ( ) throws IO Exception { switch ( file Action . to Lower Case ( ) ) { case STRING : fs . delete ( file , BOOL ) ; break ; case STRING : Path target File Move Path = new Path ( target Folder , file . get Name ( ) ) ; fs . rename ( file , target File Move Path ) ; break ; case STRING : t... | private void processFileAction ( ) throws IOException { switch ( fileAction . toLowerCase ( ) ) { case STRING : fs . delete ( file , _BOOL ) ; break ; case STRING : Path targetFileMovePath = new Path ( targetFolder , file . getName ( ) ) ; fs . rename ( file , targetFileMovePath ) ; break ; case STRING : try ( FSDataOu... | 235 |
java-test-489 | java | What does the code calculate using the blend method ? | the " stop parameter " for this attribute | private double stop Prob Using Blend ( ) { int itcount = NUM ; double stop Prob , aimfor ; double lower , upper , tstop ; K Star Wrapper botvals = new K Star Wrapper ( ) ; K Star Wrapper upvals = new K Star Wrapper ( ) ; K Star Wrapper vals = new K Star Wrapper ( ) ; int testvalue = ( int ) m Test . value ( m Attr Inde... | private double stopProbUsingBlend ( ) { int itcount = _NUM ; double stopProb , aimfor ; double lower , upper , tstop ; KStarWrapper botvals = new KStarWrapper ( ) ; KStarWrapper upvals = new KStarWrapper ( ) ; KStarWrapper vals = new KStarWrapper ( ) ; int testvalue = ( int ) m_Test . value ( m_AttrIndex ) ; aimfor = (... | 432 |
java-test-490 | java | How is the value computed ? | using a root finder algorithm | private double stop Prob Using Blend ( ) { int itcount = NUM ; double stop Prob , aimfor ; double lower , upper , tstop ; K Star Wrapper botvals = new K Star Wrapper ( ) ; K Star Wrapper upvals = new K Star Wrapper ( ) ; K Star Wrapper vals = new K Star Wrapper ( ) ; int testvalue = ( int ) m Test . value ( m Attr Inde... | private double stopProbUsingBlend ( ) { int itcount = _NUM ; double stopProb , aimfor ; double lower , upper , tstop ; KStarWrapper botvals = new KStarWrapper ( ) ; KStarWrapper upvals = new KStarWrapper ( ) ; KStarWrapper vals = new KStarWrapper ( ) ; int testvalue = ( int ) m_Test . value ( m_AttrIndex ) ; aimfor = (... | 432 |
java-test-491 | java | What does it set to an attribute with a missing value also ? | the transformation probability | private double stop Prob Using Blend ( ) { int itcount = NUM ; double stop Prob , aimfor ; double lower , upper , tstop ; K Star Wrapper botvals = new K Star Wrapper ( ) ; K Star Wrapper upvals = new K Star Wrapper ( ) ; K Star Wrapper vals = new K Star Wrapper ( ) ; int testvalue = ( int ) m Test . value ( m Attr Inde... | private double stopProbUsingBlend ( ) { int itcount = _NUM ; double stopProb , aimfor ; double lower , upper , tstop ; KStarWrapper botvals = new KStarWrapper ( ) ; KStarWrapper upvals = new KStarWrapper ( ) ; KStarWrapper vals = new KStarWrapper ( ) ; int testvalue = ( int ) m_Test . value ( m_AttrIndex ) ; aimfor = (... | 432 |
java-test-492 | java | How does the code calculate the " stop parameter " for this attribute ? | using the blend method | private double stop Prob Using Blend ( ) { int itcount = NUM ; double stop Prob , aimfor ; double lower , upper , tstop ; K Star Wrapper botvals = new K Star Wrapper ( ) ; K Star Wrapper upvals = new K Star Wrapper ( ) ; K Star Wrapper vals = new K Star Wrapper ( ) ; int testvalue = ( int ) m Test . value ( m Attr Inde... | private double stopProbUsingBlend ( ) { int itcount = _NUM ; double stopProb , aimfor ; double lower , upper , tstop ; KStarWrapper botvals = new KStarWrapper ( ) ; KStarWrapper upvals = new KStarWrapper ( ) ; KStarWrapper vals = new KStarWrapper ( ) ; int testvalue = ( int ) m_Test . value ( m_AttrIndex ) ; aimfor = (... | 432 |
java-test-493 | java | When does the smallest and average transformation probabilities compute ? | once the stop factor is obtained | private double stop Prob Using Blend ( ) { int itcount = NUM ; double stop Prob , aimfor ; double lower , upper , tstop ; K Star Wrapper botvals = new K Star Wrapper ( ) ; K Star Wrapper upvals = new K Star Wrapper ( ) ; K Star Wrapper vals = new K Star Wrapper ( ) ; int testvalue = ( int ) m Test . value ( m Attr Inde... | private double stopProbUsingBlend ( ) { int itcount = _NUM ; double stopProb , aimfor ; double lower , upper , tstop ; KStarWrapper botvals = new KStarWrapper ( ) ; KStarWrapper upvals = new KStarWrapper ( ) ; KStarWrapper vals = new KStarWrapper ( ) ; int testvalue = ( int ) m_Test . value ( m_AttrIndex ) ; aimfor = (... | 432 |
java-test-494 | java | How does a jdbc connection string return ? | using the current configuration and url | public String connection String ( String url Pattern ) { Properties props = config . as Properties ( ) ; return find And Replace ( url Pattern , props , Jdbc Configuration . DATABASE , Jdbc Configuration . HOSTNAME , Jdbc Configuration . PORT , Jdbc Configuration . USER , Jdbc Configuration . PASSWORD ) ; } | public String connectionString ( String urlPattern ) { Properties props = config . asProperties ( ) ; return findAndReplace ( urlPattern , props , JdbcConfiguration . DATABASE , JdbcConfiguration . HOSTNAME , JdbcConfiguration . PORT , JdbcConfiguration . USER , JdbcConfiguration . PASSWORD ) ; } | 57 |
java-test-495 | java | Why can we not rely on the input file sizes in contrast to mr ? | because inputs might be passed via rdds | public static boolean check CP Reblock ( Execution Context ec , String varin ) throws DML Runtime Exception { Cacheable Data < ? > obj = ec . get Cacheable Data ( varin ) ; Matrix Characteristics mc = ec . get Matrix Characteristics ( varin ) ; long rows = mc . get Rows ( ) ; long cols = mc . get Cols ( ) ; long nnz = ... | public static boolean checkCPReblock ( ExecutionContext ec , String varin ) throws DMLRuntimeException { CacheableData < ? > obj = ec . getCacheableData ( varin ) ; MatrixCharacteristics mc = ec . getMatrixCharacteristics ( varin ) ; long rows = mc . getRows ( ) ; long cols = mc . getCols ( ) ; long nnz = mc . getNonZe... | 318 |
java-test-496 | java | How might inputs be passed ? | via rdds | public static boolean check CP Reblock ( Execution Context ec , String varin ) throws DML Runtime Exception { Cacheable Data < ? > obj = ec . get Cacheable Data ( varin ) ; Matrix Characteristics mc = ec . get Matrix Characteristics ( varin ) ; long rows = mc . get Rows ( ) ; long cols = mc . get Cols ( ) ; long nnz = ... | public static boolean checkCPReblock ( ExecutionContext ec , String varin ) throws DMLRuntimeException { CacheableData < ? > obj = ec . getCacheableData ( varin ) ; MatrixCharacteristics mc = ec . getMatrixCharacteristics ( varin ) ; long rows = mc . getRows ( ) ; long cols = mc . getCols ( ) ; long nnz = mc . getNonZe... | 318 |
java-test-497 | java | What will this draw to the graphics context ? | the node i d | @ Override public void draw Node ( Graphics g , int w , int h ) { if ( ( m type & PURE INPUT ) == PURE INPUT ) { g . set Color ( Color . green ) ; } else { g . set Color ( Color . orange ) ; } Font Metrics fm = g . get Font Metrics ( ) ; int l = ( int ) ( m x * w ) - fm . string Width ( m id ) / NUM ; int t = ( int ) (... | @ Override public void drawNode ( Graphics g , int w , int h ) { if ( ( m_type & PURE_INPUT ) == PURE_INPUT ) { g . setColor ( Color . green ) ; } else { g . setColor ( Color . orange ) ; } FontMetrics fm = g . getFontMetrics ( ) ; int l = ( int ) ( m_x * w ) - fm . stringWidth ( m_id ) / _NUM ; int t = ( int ) ( m_y *... | 189 |
java-test-498 | java | When is the annotation correct ? | when an object is marshalled | private URL [ ] do Get UR Ls ( Class Loader cl ) { if ( disable Smart Get Url ) { return super . get UR Ls ( ) ; } URL [ ] urls = null ; if ( cl . equals ( this ) ) { urls = super . get UR Ls ( ) ; } else { if ( cl instanceof Service Class Loader ) { Service Class Loader scl = ( Service Class Loader ) cl ; urls = scl .... | private URL [ ] doGetURLs ( ClassLoader cl ) { if ( disableSmartGetUrl ) { return super . getURLs ( ) ; } URL [ ] urls = null ; if ( cl . equals ( this ) ) { urls = super . getURLs ( ) ; } else { if ( cl instanceof ServiceClassLoader ) { ServiceClassLoader scl = ( ServiceClassLoader ) cl ; urls = scl . getURLs ( ) ; } ... | 114 |
java-test-499 | java | What does the code compute ? | the hyperbolic tangent of a number | public static double tanh ( double x ) { boolean negate = BOOL ; if ( Double . is Na N ( x ) ) { return x ; } if ( x > NUM ) { return NUM ; } if ( x < - NUM ) { return - NUM ; } if ( x == NUM ) { return x ; } if ( x < NUM ) { x = - x ; negate = BOOL ; } double result ; if ( x >= NUM ) { double hi Prec [ ] = new double ... | public static double tanh ( double x ) { boolean negate = _BOOL ; if ( Double . isNaN ( x ) ) { return x ; } if ( x > _NUM ) { return _NUM ; } if ( x < - _NUM ) { return - _NUM ; } if ( x == _NUM ) { return x ; } if ( x < _NUM ) { x = - x ; negate = _BOOL ; } double result ; if ( x >= _NUM ) { double hiPrec [ ] = new d... | 561 |
java-test-500 | java | What be the code handle ? | the error of a channelinfo request result | private void handle Channel Info Result Error ( String stream , Request Type type , int response Code ) { if ( type == Request Type . CHANNEL ) { if ( response Code == NUM ) { result Listener . received Channel Info ( stream , null , Request Result . NOT FOUND ) ; } else { result Listener . received Channel Info ( stre... | private void handleChannelInfoResultError ( String stream , RequestType type , int responseCode ) { if ( type == RequestType . CHANNEL ) { if ( responseCode == _NUM ) { resultListener . receivedChannelInfo ( stream , null , RequestResult . NOT_FOUND ) ; } else { resultListener . receivedChannelInfo ( stream , null , Re... | 210 |
java-test-501 | java | When do the reader close ? | while closing are ignored | public static long copy And Close Input ( Reader in , Writer out , long length ) throws IO Exception { try { long copied = NUM ; int len = ( int ) Math . min ( length , Constants . IO BUFFER SIZE ) ; char [ ] buffer = new char [ len ] ; while ( length > NUM ) { len = in . read ( buffer , NUM , len ) ; if ( len < NUM ) ... | public static long copyAndCloseInput ( Reader in , Writer out , long length ) throws IOException { try { long copied = _NUM ; int len = ( int ) Math . min ( length , Constants . IO_BUFFER_SIZE ) ; char [ ] buffer = new char [ len ] ; while ( length > _NUM ) { len = in . read ( buffer , _NUM , len ) ; if ( len < _NUM ) ... | 167 |
java-test-504 | java | What does the code process ? | a log event | private void process Event ( Event Log Control check , final String name , final DTN Host host 1 , final DTN Host host 2 , final Message message ) { String desc String ; if ( ! check . show Event ( ) ) { return ; } desc String = name + STRING + ( host 1 != null ? host 1 : STRING ) + ( host 2 != null ? ( HOST DELIM + ho... | private void processEvent ( EventLogControl check , final String name , final DTNHost host1 , final DTNHost host2 , final Message message ) { String descString ; if ( ! check . showEvent ( ) ) { return ; } descString = name + STRING + ( host1 != null ? host1 : STRING ) + ( host2 != null ? ( HOST_DELIM + host2 ) : STRIN... | 179 |
java-test-505 | java | What does the code get ? | the log of the factorial of a number . upto 32 | public static double ln Factorial ( int x ) { if ( x < NUM ) throw new Illegal Argument Exception ( STRING + x ) ; else if ( x > NUM ) return ln Gamma ( x + NUM ) ; else { int l = factorials Buffer . size ( ) ; for ( int i = l ; i <= x ; i ++ ) { factorials Buffer . add ( log ( i ) + factorials Buffer . get ( i - NUM )... | public static double lnFactorial ( int x ) { if ( x < _NUM ) throw new IllegalArgumentException ( STRING + x ) ; else if ( x > _NUM ) return lnGamma ( x + _NUM ) ; else { int l = factorialsBuffer . size ( ) ; for ( int i = l ; i <= x ; i ++ ) { factorialsBuffer . add ( log ( i ) + factorialsBuffer . get ( i - _NUM ) ) ... | 103 |
java-test-506 | java | Why is the gamma function used ? | because the numbers can ' t be represented anyway | public static double ln Factorial ( int x ) { if ( x < NUM ) throw new Illegal Argument Exception ( STRING + x ) ; else if ( x > NUM ) return ln Gamma ( x + NUM ) ; else { int l = factorials Buffer . size ( ) ; for ( int i = l ; i <= x ; i ++ ) { factorials Buffer . add ( log ( i ) + factorials Buffer . get ( i - NUM )... | public static double lnFactorial ( int x ) { if ( x < _NUM ) throw new IllegalArgumentException ( STRING + x ) ; else if ( x > _NUM ) return lnGamma ( x + _NUM ) ; else { int l = factorialsBuffer . size ( ) ; for ( int i = l ; i <= x ; i ++ ) { factorialsBuffer . add ( log ( i ) + factorialsBuffer . get ( i - _NUM ) ) ... | 103 |
java-test-509 | java | How did populated attribute values load ? | from provided inputstream property file | public static Service Configuration create ( Input Stream in Stream ) throws IO Exception , Illegal Argument Exception { try { check Not Null ( in Stream ) ; Properties properties = new Properties ( ) ; properties . load ( in Stream ) ; return ( create ( properties ) ) ; } finally { if ( in Stream != null ) { in Stream... | public static ServiceConfiguration create ( InputStream inStream ) throws IOException , IllegalArgumentException { try { checkNotNull ( inStream ) ; Properties properties = new Properties ( ) ; properties . load ( inStream ) ; return ( create ( properties ) ) ; } finally { if ( inStream != null ) { inStream . close ( )... | 74 |
java-test-510 | java | What does it load ? | with populated attribute values loaded from provided inputstream property file | public static Service Configuration create ( Input Stream in Stream ) throws IO Exception , Illegal Argument Exception { try { check Not Null ( in Stream ) ; Properties properties = new Properties ( ) ; properties . load ( in Stream ) ; return ( create ( properties ) ) ; } finally { if ( in Stream != null ) { in Stream... | public static ServiceConfiguration create ( InputStream inStream ) throws IOException , IllegalArgumentException { try { checkNotNull ( inStream ) ; Properties properties = new Properties ( ) ; properties . load ( inStream ) ; return ( create ( properties ) ) ; } finally { if ( inStream != null ) { inStream . close ( )... | 74 |
java-test-511 | java | What do the knowledgeedge ' s represent ? | required edges | public final Iterator < Knowledge Edge > required Edges Iterator ( ) { Set < Knowledge Edge > edges = new Hash Set < > ( ) ; for ( Ordered Pair < Set < My Node > > o : required Rules Specs ) { final Set < My Node > first = o . get First ( ) ; for ( My Node s1 : first ) { final Set < My Node > second = o . get Second ( ... | public final Iterator < KnowledgeEdge > requiredEdgesIterator ( ) { Set < KnowledgeEdge > edges = new HashSet < > ( ) ; for ( OrderedPair < Set < MyNode > > o : requiredRulesSpecs ) { final Set < MyNode > first = o . getFirst ( ) ; for ( MyNode s1 : first ) { final Set < MyNode > second = o . getSecond ( ) ; for ( MyNo... | 141 |
java-test-512 | java | What is representing required edges ? | the knowledgeedge ' s | public final Iterator < Knowledge Edge > required Edges Iterator ( ) { Set < Knowledge Edge > edges = new Hash Set < > ( ) ; for ( Ordered Pair < Set < My Node > > o : required Rules Specs ) { final Set < My Node > first = o . get First ( ) ; for ( My Node s1 : first ) { final Set < My Node > second = o . get Second ( ... | public final Iterator < KnowledgeEdge > requiredEdgesIterator ( ) { Set < KnowledgeEdge > edges = new HashSet < > ( ) ; for ( OrderedPair < Set < MyNode > > o : requiredRulesSpecs ) { final Set < MyNode > first = o . getFirst ( ) ; for ( MyNode s1 : first ) { final Set < MyNode > second = o . getSecond ( ) ; for ( MyNo... | 141 |
java-test-513 | java | What does this force it ? | to be two digits long | private static String force Number String To Two Digits ( String text ) { while ( text . length ( ) < NUM ) { text = STRING + text ; } if ( text . length ( ) > NUM ) { text = text . substring ( text . length ( ) - NUM , text . length ( ) ) ; } return text ; } | private static String forceNumberStringToTwoDigits ( String text ) { while ( text . length ( ) < _NUM ) { text = STRING + text ; } if ( text . length ( ) > _NUM ) { text = text . substring ( text . length ( ) - _NUM , text . length ( ) ) ; } return text ; } | 69 |
java-test-514 | java | For what purpose is it zero padded if there is only one digit ? | to enforce a two digit string result | private static String force Number String To Two Digits ( String text ) { while ( text . length ( ) < NUM ) { text = STRING + text ; } if ( text . length ( ) > NUM ) { text = text . substring ( text . length ( ) - NUM , text . length ( ) ) ; } return text ; } | private static String forceNumberStringToTwoDigits ( String text ) { while ( text . length ( ) < _NUM ) { text = STRING + text ; } if ( text . length ( ) > _NUM ) { text = text . substring ( text . length ( ) - _NUM , text . length ( ) ) ; } return text ; } | 69 |
java-test-515 | java | What does this take ? | a string of digits | private static String force Number String To Two Digits ( String text ) { while ( text . length ( ) < NUM ) { text = STRING + text ; } if ( text . length ( ) > NUM ) { text = text . substring ( text . length ( ) - NUM , text . length ( ) ) ; } return text ; } | private static String forceNumberStringToTwoDigits ( String text ) { while ( text . length ( ) < _NUM ) { text = STRING + text ; } if ( text . length ( ) > _NUM ) { text = text . substring ( text . length ( ) - _NUM , text . length ( ) ) ; } return text ; } | 69 |
java-test-516 | java | What do you try ? | to unlock from another thread | @ Deprecated public void unlock ( Lock State < T > lock State ) { if ( lock State == null ) { throw new Illegal Argument Exception ( STRING ) ; } if ( lock State . set Lock != this ) { throw new Illegal Argument Exception ( STRING ) ; } if ( lock State . thread != Thread . current Thread ( ) ) { throw new Illegal Argum... | @ Deprecated public void unlock ( LockState < T > lockState ) { if ( lockState == null ) { throw new IllegalArgumentException ( STRING ) ; } if ( lockState . setLock != this ) { throw new IllegalArgumentException ( STRING ) ; } if ( lockState . thread != Thread . currentThread ( ) ) { throw new IllegalArgumentException... | 112 |
java-test-518 | java | How does jpa entities find ? | by their primary keys | public static < E extends Identifiable > List < E > find By Primary Keys ( Entity Manager em , List < Big Integer > ids , Class < E > type ) { require Argument ( em != null , STRING ) ; require Argument ( ids != null && ! ids . is Empty ( ) , STRING ) ; require Argument ( type != null , STRING ) ; Typed Query < E > que... | public static < E extends Identifiable > List < E > findByPrimaryKeys ( EntityManager em , List < BigInteger > ids , Class < E > type ) { requireArgument ( em != null , STRING ) ; requireArgument ( ids != null && ! ids . isEmpty ( ) , STRING ) ; requireArgument ( type != null , STRING ) ; TypedQuery < E > query = em . ... | 152 |
java-test-519 | java | When must a remote object be have exported ? | before it can have any calls in progress | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-520 | java | What can it have ? | any calls in progress | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-521 | java | What have calls in progress still ? | non - permanent remote objects | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-522 | java | What do non - permanent remote objects have still ? | calls in progress | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-523 | java | When is the vm kept alive ? | while the keep - alive count is greater than zero | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-524 | java | When did garbage collect ? | while exported | static void increment Keep Alive Count ( ) { synchronized ( keep Alive Lock ) { keep Alive Count ++ ; if ( reaper == null ) { reaper = Access Controller . do Privileged ( new New Thread Action ( new Reaper ( ) , STRING , BOOL ) ) ; reaper . start ( ) ; } if ( gc Latency Request == null ) { gc Latency Request = GC . req... | static void incrementKeepAliveCount ( ) { synchronized ( keepAliveLock ) { keepAliveCount ++ ; if ( reaper == null ) { reaper = AccessController . doPrivileged ( new NewThreadAction ( new Reaper ( ) , STRING , _BOOL ) ) ; reaper . start ( ) ; } if ( gcLatencyRequest == null ) { gcLatencyRequest = GC . requestLatency ( ... | 84 |
java-test-525 | java | What does the code open ? | a ftp connection | private AFTP Client action Open ( ) throws IO Exception , Page Exception { required ( STRING , server ) ; required ( STRING , username ) ; required ( STRING , password ) ; AFTP Client client = get Client ( ) ; write Cfftp ( client ) ; return client ; } | private AFTPClient actionOpen ( ) throws IOException , PageException { required ( STRING , server ) ; required ( STRING , username ) ; required ( STRING , password ) ; AFTPClient client = getClient ( ) ; writeCfftp ( client ) ; return client ; } | 54 |
java-test-527 | java | How does the code update the filename field ? | to the new value | public synchronized void rename File ( JDBC Sequential File file , String new File Name ) throws SQL Exception { try { connection . set Auto Commit ( BOOL ) ; rename File . set String ( NUM , new File Name ) ; rename File . set Int ( NUM , file . get Id ( ) ) ; rename File . execute Update ( ) ; connection . commit ( )... | public synchronized void renameFile ( JDBCSequentialFile file , String newFileName ) throws SQLException { try { connection . setAutoCommit ( _BOOL ) ; renameFile . setString ( _NUM , newFileName ) ; renameFile . setInt ( _NUM , file . getId ( ) ) ; renameFile . executeUpdate ( ) ; connection . commit ( ) ; } catch ( S... | 93 |
java-test-528 | java | What does the code update to the new value ? | the filename field | public synchronized void rename File ( JDBC Sequential File file , String new File Name ) throws SQL Exception { try { connection . set Auto Commit ( BOOL ) ; rename File . set String ( NUM , new File Name ) ; rename File . set Int ( NUM , file . get Id ( ) ) ; rename File . execute Update ( ) ; connection . commit ( )... | public synchronized void renameFile ( JDBCSequentialFile file , String newFileName ) throws SQLException { try { connection . setAutoCommit ( _BOOL ) ; renameFile . setString ( _NUM , newFileName ) ; renameFile . setInt ( _NUM , file . getId ( ) ) ; renameFile . executeUpdate ( ) ; connection . commit ( ) ; } catch ( S... | 93 |
java-test-529 | java | What do keys construct ? | the key statements | protected List < String > prepare Sort Key Statements ( List < Sort Key > sort Keys ) { List < String > keys = new Array List < String > ( ) ; for ( int i = NUM ; i < sort Keys . size ( ) ; i ++ ) { Sort Key sort Key = sort Keys . get ( i ) ; keys . add ( explicit Mapping . get Db Column Name ( sort Key . get Field ( )... | protected List < String > prepareSortKeyStatements ( List < SortKey > sortKeys ) { List < String > keys = new ArrayList < String > ( ) ; for ( int i = _NUM ; i < sortKeys . size ( ) ; i ++ ) { SortKey sortKey = sortKeys . get ( i ) ; keys . add ( explicitMapping . getDbColumnName ( sortKey . getField ( ) ) + ( sortKey ... | 109 |
java-test-531 | java | What listed in the supplied file ? | all the sequences | protected void transfer From File ( File id File ) throws IO Exception { try ( Buffered Reader br = new Buffered Reader ( new File Reader ( id File ) ) ) { String line ; while ( ( line = br . read Line ( ) ) != null ) { line = line . trim ( ) ; if ( line . length ( ) > NUM ) { transfer ( line ) ; } } } } | protected void transferFromFile ( File idFile ) throws IOException { try ( BufferedReader br = new BufferedReader ( new FileReader ( idFile ) ) ) { String line ; while ( ( line = br . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . length ( ) > _NUM ) { transfer ( line ) ; } } } } | 81 |
java-test-532 | java | Where did all the sequences list ? | in the supplied file | protected void transfer From File ( File id File ) throws IO Exception { try ( Buffered Reader br = new Buffered Reader ( new File Reader ( id File ) ) ) { String line ; while ( ( line = br . read Line ( ) ) != null ) { line = line . trim ( ) ; if ( line . length ( ) > NUM ) { transfer ( line ) ; } } } } | protected void transferFromFile ( File idFile ) throws IOException { try ( BufferedReader br = new BufferedReader ( new FileReader ( idFile ) ) ) { String line ; while ( ( line = br . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . length ( ) > _NUM ) { transfer ( line ) ; } } } } | 81 |
java-test-533 | java | What does the code generate ? | the hostname for a node | public static String generate Host Name ( String vm Name , String host Id ) { String hostname = vm Name + STRING + host Id ; Preconditions . check State ( hostname . equals ( hostname . to Lower Case ( ) ) , STRING ) ; return hostname ; } | public static String generateHostName ( String vmName , String hostId ) { String hostname = vmName + STRING + hostId ; Preconditions . checkState ( hostname . equals ( hostname . toLowerCase ( ) ) , STRING ) ; return hostname ; } | 52 |
java-test-535 | java | What converts to corresponding outputindex ? | parameter index | private int index To Output Index ( int parameter Index ) throws SQL Exception { try { if ( output Parameter Mapper [ parameter Index - NUM ] == - NUM ) { throw new SQL Exception ( STRING + parameter Index + STRING ) ; } return output Parameter Mapper [ parameter Index - NUM ] ; } catch ( Array Index Out Of Bounds Exce... | private int indexToOutputIndex ( int parameterIndex ) throws SQLException { try { if ( outputParameterMapper [ parameterIndex - _NUM ] == - _NUM ) { throw new SQLException ( STRING + parameterIndex + STRING ) ; } return outputParameterMapper [ parameterIndex - _NUM ] ; } catch ( ArrayIndexOutOfBoundsException arrayInde... | 118 |
java-test-536 | java | What do parameter index convert ? | to corresponding outputindex | private int index To Output Index ( int parameter Index ) throws SQL Exception { try { if ( output Parameter Mapper [ parameter Index - NUM ] == - NUM ) { throw new SQL Exception ( STRING + parameter Index + STRING ) ; } return output Parameter Mapper [ parameter Index - NUM ] ; } catch ( Array Index Out Of Bounds Exce... | private int indexToOutputIndex ( int parameterIndex ) throws SQLException { try { if ( outputParameterMapper [ parameterIndex - _NUM ] == - _NUM ) { throw new SQLException ( STRING + parameterIndex + STRING ) ; } return outputParameterMapper [ parameterIndex - _NUM ] ; } catch ( ArrayIndexOutOfBoundsException arrayInde... | 118 |
java-test-537 | java | What imitates operation of old prior to the time zone fix ? | non - time zone - ware operation | protected void enable Non Tz Aware Mode ( ) throws Replicator Exception { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQL Exception e ) { throw new Replicator Exception ( STRING + sql + STRING + e . get Localized Message ( ) ) ; } Time Zone host Tz = runtime . get Host Time... | protected void enableNonTzAwareMode ( ) throws ReplicatorException { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQLException e ) { throw new ReplicatorException ( STRING + sql + STRING + e . getLocalizedMessage ( ) ) ; } TimeZone hostTz = runtime . getHostTimeZone ( ) ; lo... | 135 |
java-test-538 | java | When does non - time zone - ware operation imitate operation of old ? | prior to the time zone fix | protected void enable Non Tz Aware Mode ( ) throws Replicator Exception { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQL Exception e ) { throw new Replicator Exception ( STRING + sql + STRING + e . get Localized Message ( ) ) ; } Time Zone host Tz = runtime . get Host Time... | protected void enableNonTzAwareMode ( ) throws ReplicatorException { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQLException e ) { throw new ReplicatorException ( STRING + sql + STRING + e . getLocalizedMessage ( ) ) ; } TimeZone hostTz = runtime . getHostTimeZone ( ) ; lo... | 135 |
java-test-539 | java | What does non - time zone - ware operation imitate prior to the time zone fix ? | operation of old | protected void enable Non Tz Aware Mode ( ) throws Replicator Exception { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQL Exception e ) { throw new Replicator Exception ( STRING + sql + STRING + e . get Localized Message ( ) ) ; } Time Zone host Tz = runtime . get Host Time... | protected void enableNonTzAwareMode ( ) throws ReplicatorException { logger . info ( STRING ) ; String sql = STRING ; try { conn . execute ( sql ) ; } catch ( SQLException e ) { throw new ReplicatorException ( STRING + sql + STRING + e . getLocalizedMessage ( ) ) ; } TimeZone hostTz = runtime . getHostTimeZone ( ) ; lo... | 135 |
java-test-540 | java | What does the code remove from a nested getter expression ? | the outermost property | private static String unwrap ( String expression ) { if ( expression . starts With ( STRING ) ) { expression = expression . substring ( expression . index Of ( STRING ) + NUM , expression . length ( ) - NUM ) ; if ( expression . ends With ( STRING ) ) { expression = expression . substring ( NUM , expression . last Inde... | private static String unwrap ( String expression ) { if ( expression . startsWith ( STRING ) ) { expression = expression . substring ( expression . indexOf ( STRING ) + _NUM , expression . length ( ) - _NUM ) ; if ( expression . endsWith ( STRING ) ) { expression = expression . substring ( _NUM , expression . lastIndex... | 101 |
java-test-541 | java | Why be the first time this is called realcallbacks be null ? | as there is no just - completed step in the internal auth module | private int inject Callbacks ( final Callback [ ] real Callbacks , final int state ) throws Auth Login Exception { if ( authentication Context . has More Requirements ( ) ) { if ( real Callbacks != null ) { authentication Context . submit Requirements ( real Callbacks ) ; } if ( authentication Context . has More Requir... | private int injectCallbacks ( final Callback [ ] realCallbacks , final int state ) throws AuthLoginException { if ( authenticationContext . hasMoreRequirements ( ) ) { if ( realCallbacks != null ) { authenticationContext . submitRequirements ( realCallbacks ) ; } if ( authenticationContext . hasMoreRequirements ( ) ) {... | 101 |
java-test-542 | java | What is this called the first time ? | realcallbacks | private int inject Callbacks ( final Callback [ ] real Callbacks , final int state ) throws Auth Login Exception { if ( authentication Context . has More Requirements ( ) ) { if ( real Callbacks != null ) { authentication Context . submit Requirements ( real Callbacks ) ; } if ( authentication Context . has More Requir... | private int injectCallbacks ( final Callback [ ] realCallbacks , final int state ) throws AuthLoginException { if ( authenticationContext . hasMoreRequirements ( ) ) { if ( realCallbacks != null ) { authenticationContext . submitRequirements ( realCallbacks ) ; } if ( authenticationContext . hasMoreRequirements ( ) ) {... | 101 |
java-test-546 | java | What does the code create ? | a new project tree component | public C Project Tree ( final J Frame parent , final C Database Manager database Manager ) { Preconditions . check Not Null ( database Manager , STRING ) ; m tree Model = new C Project Tree Model ( this ) ; set Model ( m tree Model ) ; C Project Tree Drag Handler Initializer . initialize ( parent , this , database Mana... | public CProjectTree ( final JFrame parent , final CDatabaseManager databaseManager ) { Preconditions . checkNotNull ( databaseManager , STRING ) ; m_treeModel = new CProjectTreeModel ( this ) ; setModel ( m_treeModel ) ; CProjectTreeDragHandlerInitializer . initialize ( parent , this , databaseManager ) ; addMouseListe... | 157 |
java-test-549 | java | What does the code generate ? | a random name with the specified prefix | public static String generate Random Name ( String prefix ) { String Builder sb = new String Builder ( ) ; Random random = new Random ( ) ; sb . append ( prefix ) ; for ( int i = NUM ; i < NUM ; i ++ ) { sb . append ( STRING + random . next Int ( NUM ) ) ; } return sb . to String ( ) ; } | public static String generateRandomName ( String prefix ) { StringBuilder sb = new StringBuilder ( ) ; Random random = new Random ( ) ; sb . append ( prefix ) ; for ( int i = _NUM ; i < _NUM ; i ++ ) { sb . append ( STRING + random . nextInt ( _NUM ) ) ; } return sb . toString ( ) ; } | 76 |
java-test-550 | java | What haves a receiver already ? | the graphicloader doesn ' t | public void hook Up Graphic Loader With Layer ( Graphic Loader gl ) { if ( gl != null ) { Graphic Loader Plug In glpi = new Graphic Loader Plug In ( ) ; gl . set Receiver ( glpi ) ; glpi . set Graphic Loader ( gl ) ; Layer Handler lh = get Layer Handler ( ) ; Plug In Layer pl = new Plug In Layer ( ) ; pl . set Plug In ... | public void hookUpGraphicLoaderWithLayer ( GraphicLoader gl ) { if ( gl != null ) { GraphicLoaderPlugIn glpi = new GraphicLoaderPlugIn ( ) ; gl . setReceiver ( glpi ) ; glpi . setGraphicLoader ( gl ) ; LayerHandler lh = getLayerHandler ( ) ; PlugInLayer pl = new PlugInLayer ( ) ; pl . setPlugIn ( glpi ) ; pl . setName ... | 166 |
java-test-551 | java | For what purpose does the pluginlayer hand to the layerhandler then ? | to get set on the map | public void hook Up Graphic Loader With Layer ( Graphic Loader gl ) { if ( gl != null ) { Graphic Loader Plug In glpi = new Graphic Loader Plug In ( ) ; gl . set Receiver ( glpi ) ; glpi . set Graphic Loader ( gl ) ; Layer Handler lh = get Layer Handler ( ) ; Plug In Layer pl = new Plug In Layer ( ) ; pl . set Plug In ... | public void hookUpGraphicLoaderWithLayer ( GraphicLoader gl ) { if ( gl != null ) { GraphicLoaderPlugIn glpi = new GraphicLoaderPlugIn ( ) ; gl . setReceiver ( glpi ) ; glpi . setGraphicLoader ( gl ) ; LayerHandler lh = getLayerHandler ( ) ; PlugInLayer pl = new PlugInLayer ( ) ; pl . setPlugIn ( glpi ) ; pl . setName ... | 166 |
java-test-552 | java | What do the graphicloader doesn ' t already have a receiver create ? | a graphicloaderplugin , and a pluginlayer | public void hook Up Graphic Loader With Layer ( Graphic Loader gl ) { if ( gl != null ) { Graphic Loader Plug In glpi = new Graphic Loader Plug In ( ) ; gl . set Receiver ( glpi ) ; glpi . set Graphic Loader ( gl ) ; Layer Handler lh = get Layer Handler ( ) ; Plug In Layer pl = new Plug In Layer ( ) ; pl . set Plug In ... | public void hookUpGraphicLoaderWithLayer ( GraphicLoader gl ) { if ( gl != null ) { GraphicLoaderPlugIn glpi = new GraphicLoaderPlugIn ( ) ; gl . setReceiver ( glpi ) ; glpi . setGraphicLoader ( gl ) ; LayerHandler lh = getLayerHandler ( ) ; PlugInLayer pl = new PlugInLayer ( ) ; pl . setPlugIn ( glpi ) ; pl . setName ... | 166 |
java-test-553 | java | How has content provider returns a file ? | using the content : / / scheme | private boolean is Pdf File From Content Provider Without Extension ( String local Path , String mime Type ) { return local Path . starts With ( Uri Utils . URI CONTENT SCHEME ) && mime Type . equals ( MIME TYPE PDF ) && ! local Path . ends With ( FILE EXTENSION PDF ) ; } | private boolean isPdfFileFromContentProviderWithoutExtension ( String localPath , String mimeType ) { return localPath . startsWith ( UriUtils . URI_CONTENT_SCHEME ) && mimeType . equals ( MIME_TYPE_PDF ) && ! localPath . endsWith ( FILE_EXTENSION_PDF ) ; } | 58 |
java-test-554 | java | What do content provider use ? | the content : / / scheme | private boolean is Pdf File From Content Provider Without Extension ( String local Path , String mime Type ) { return local Path . starts With ( Uri Utils . URI CONTENT SCHEME ) && mime Type . equals ( MIME TYPE PDF ) && ! local Path . ends With ( FILE EXTENSION PDF ) ; } | private boolean isPdfFileFromContentProviderWithoutExtension ( String localPath , String mimeType ) { return localPath . startsWith ( UriUtils . URI_CONTENT_SCHEME ) && mimeType . equals ( MIME_TYPE_PDF ) && ! localPath . endsWith ( FILE_EXTENSION_PDF ) ; } | 58 |
java-test-555 | java | What notifys that a change occurred in the lists ? | all registered listeners | @ Suppress Warnings ( { STRING , STRING } ) private void notify List Listeners ( ) { if ( ! list Listeners . is Empty ( ) ) { List temp = new Array List ( sensor Data Objects . values ( ) ) ; temp . add All ( object Storages . values ( ) ) ; for ( List Listener < ? > list Listener : list Listeners ) { list Listener . c... | @ SuppressWarnings ( { STRING , STRING } ) private void notifyListListeners ( ) { if ( ! listListeners . isEmpty ( ) ) { List temp = new ArrayList ( sensorDataObjects . values ( ) ) ; temp . addAll ( objectStorages . values ( ) ) ; for ( ListListener < ? > listListener : listListeners ) { listListener . contentChanged ... | 85 |
java-test-556 | java | What do all registered listeners notify ? | that a change occurred in the lists | @ Suppress Warnings ( { STRING , STRING } ) private void notify List Listeners ( ) { if ( ! list Listeners . is Empty ( ) ) { List temp = new Array List ( sensor Data Objects . values ( ) ) ; temp . add All ( object Storages . values ( ) ) ; for ( List Listener < ? > list Listener : list Listeners ) { list Listener . c... | @ SuppressWarnings ( { STRING , STRING } ) private void notifyListListeners ( ) { if ( ! listListeners . isEmpty ( ) ) { List temp = new ArrayList ( sensorDataObjects . values ( ) ) ; temp . addAll ( objectStorages . values ( ) ) ; for ( ListListener < ? > listListener : listListeners ) { listListener . contentChanged ... | 85 |
java-test-557 | java | Where do a change occur ? | in the lists | @ Suppress Warnings ( { STRING , STRING } ) private void notify List Listeners ( ) { if ( ! list Listeners . is Empty ( ) ) { List temp = new Array List ( sensor Data Objects . values ( ) ) ; temp . add All ( object Storages . values ( ) ) ; for ( List Listener < ? > list Listener : list Listeners ) { list Listener . c... | @ SuppressWarnings ( { STRING , STRING } ) private void notifyListListeners ( ) { if ( ! listListeners . isEmpty ( ) ) { List temp = new ArrayList ( sensorDataObjects . values ( ) ) ; temp . addAll ( objectStorages . values ( ) ) ; for ( ListListener < ? > listListener : listListeners ) { listListener . contentChanged ... | 85 |
java-test-563 | java | What did we create when ? | the full copies with a name of bar | protected List < Block Object > sort Full Copy Source List ( List < Block Object > fc Source Objects ) { List < Block Object > sorted Source Objects = new Array List < Block Object > ( ) ; Map < String , Block Object > fc Sourc Objects Map = new Hash Map < String , Block Object > ( ) ; for ( Block Object fc Source Obje... | protected List < BlockObject > sortFullCopySourceList ( List < BlockObject > fcSourceObjects ) { List < BlockObject > sortedSourceObjects = new ArrayList < BlockObject > ( ) ; Map < String , BlockObject > fcSourcObjectsMap = new HashMap < String , BlockObject > ( ) ; for ( BlockObject fcSourceObject : fcSourceObjects )... | 173 |
java-test-564 | java | What do you have ? | a cg with two volumes foo - 1 and foo - 2 | protected List < Block Object > sort Full Copy Source List ( List < Block Object > fc Source Objects ) { List < Block Object > sorted Source Objects = new Array List < Block Object > ( ) ; Map < String , Block Object > fc Sourc Objects Map = new Hash Map < String , Block Object > ( ) ; for ( Block Object fc Source Obje... | protected List < BlockObject > sortFullCopySourceList ( List < BlockObject > fcSourceObjects ) { List < BlockObject > sortedSourceObjects = new ArrayList < BlockObject > ( ) ; Map < String , BlockObject > fcSourcObjectsMap = new HashMap < String , BlockObject > ( ) ; for ( BlockObject fcSourceObject : fcSourceObjects )... | 173 |
java-test-565 | java | What did you get when ? | the volumes in the cg | protected List < Block Object > sort Full Copy Source List ( List < Block Object > fc Source Objects ) { List < Block Object > sorted Source Objects = new Array List < Block Object > ( ) ; Map < String , Block Object > fc Sourc Objects Map = new Hash Map < String , Block Object > ( ) ; for ( Block Object fc Source Obje... | protected List < BlockObject > sortFullCopySourceList ( List < BlockObject > fcSourceObjects ) { List < BlockObject > sortedSourceObjects = new ArrayList < BlockObject > ( ) ; Map < String , BlockObject > fcSourcObjectsMap = new HashMap < String , BlockObject > ( ) ; for ( BlockObject fcSourceObject : fcSourceObjects )... | 173 |
java-test-566 | java | What do you create then ? | a full copy of one of these volumes | protected List < Block Object > sort Full Copy Source List ( List < Block Object > fc Source Objects ) { List < Block Object > sorted Source Objects = new Array List < Block Object > ( ) ; Map < String , Block Object > fc Sourc Objects Map = new Hash Map < String , Block Object > ( ) ; for ( Block Object fc Source Obje... | protected List < BlockObject > sortFullCopySourceList ( List < BlockObject > fcSourceObjects ) { List < BlockObject > sortedSourceObjects = new ArrayList < BlockObject > ( ) ; Map < String , BlockObject > fcSourcObjectsMap = new HashMap < String , BlockObject > ( ) ; for ( BlockObject fcSourceObject : fcSourceObjects )... | 173 |
java-test-572 | java | What do handles create ? | server to server configuration xml request | public void handle Button 1 Request ( Request Invocation Event event ) throws Model Control Exception { Server Site Model model = ( Server Site Model ) get Model ( ) ; String server Name = ( String ) get Page Session Attribute ( Server Edit View Bean Base . PG ATTR SERVER NAME ) ; String server Group Type = ( String ) ... | public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { ServerSiteModel model = ( ServerSiteModel ) getModel ( ) ; String serverName = ( String ) getPageSessionAttribute ( ServerEditViewBeanBase . PG_ATTR_SERVER_NAME ) ; String serverGroupType = ( String ) getPageSessionAttribut... | 450 |
java-test-573 | java | What does the code delete ? | the content between start ( included ) and end ( excluded ) | public Span Manager delete ( int start , int end ) { sb . delete ( start , end ) ; adjust Lists ( start , start - end ) ; if ( calculate Src Positions ) for ( int i = NUM ; i < end - start ; i ++ ) ib . remove ( start ) ; return this ; } | public SpanManager delete ( int start , int end ) { sb . delete ( start , end ) ; adjustLists ( start , start - end ) ; if ( calculateSrcPositions ) for ( int i = _NUM ; i < end - start ; i ++ ) ib . remove ( start ) ; return this ; } | 64 |
java-test-574 | java | What does the code instantiate ? | a new adds | public Movie Set Add Action ( boolean with Title ) { if ( with Title ) { put Value ( NAME , BUNDLE . get String ( STRING ) ) ; } put Value ( LARGE ICON KEY , Icon Manager . LIST ADD ) ; put Value ( SMALL ICON , Icon Manager . LIST ADD ) ; put Value ( SHORT DESCRIPTION , BUNDLE . get String ( STRING ) ) ; } | public MovieSetAddAction ( boolean withTitle ) { if ( withTitle ) { putValue ( NAME , BUNDLE . getString ( STRING ) ) ; } putValue ( LARGE_ICON_KEY , IconManager . LIST_ADD ) ; putValue ( SMALL_ICON , IconManager . LIST_ADD ) ; putValue ( SHORT_DESCRIPTION , BUNDLE . getString ( STRING ) ) ; } | 75 |
java-test-576 | java | When will 1000 , 2 , true return ? | 1 , 000 | public static String format Number ( final Big Decimal number , final int fraction Digits , final boolean use Grouping ) { final Number Format number Format = Number Format . get Instance ( ) ; number Format . set Minimum Fraction Digits ( fraction Digits ) ; number Format . set Maximum Fraction Digits ( fraction Digit... | public static String formatNumber ( final BigDecimal number , final int fractionDigits , final boolean useGrouping ) { final NumberFormat numberFormat = NumberFormat . getInstance ( ) ; numberFormat . setMinimumFractionDigits ( fractionDigits ) ; numberFormat . setMaximumFractionDigits ( fractionDigits ) ; numberFormat... | 86 |
java-test-577 | java | What does the code create ? | a name from a sequence of camel strings | public static Name any Camel ( String ... pieces ) { List < Name Piece > name Pieces = new Array List < > ( ) ; for ( String piece : pieces ) { validate Camel ( piece , Check Case . NO CHECK ) ; Case Format format = Case Format . LOWER CAMEL ; if ( Character . is Upper Case ( piece . char At ( NUM ) ) ) { format = Case... | public static Name anyCamel ( String ... pieces ) { List < NamePiece > namePieces = new ArrayList < > ( ) ; for ( String piece : pieces ) { validateCamel ( piece , CheckCase . NO_CHECK ) ; CaseFormat format = CaseFormat . LOWER_CAMEL ; if ( Character . isUpperCase ( piece . charAt ( _NUM ) ) ) { format = CaseFormat . U... | 109 |
java-test-578 | java | What do the current access control context have ? | all of the permissions necessary to load classes from this loader | private void check Permissions ( ) { Security Manager sm = System . get Security Manager ( ) ; if ( sm != null ) { Enumeration < Permission > enum = permissions . elements ( ) ; while ( enum . has More Elements ( ) ) { sm . check Permission ( enum . next Element ( ) ) ; } } } | private void checkPermissions ( ) { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { Enumeration < Permission > enum_ = permissions . elements ( ) ; while ( enum_ . hasMoreElements ( ) ) { sm . checkPermission ( enum_ . nextElement ( ) ) ; } } } | 65 |
java-test-579 | java | What does the code add to the registry returning a new membership key ? | membership | void add ( Membership Key Impl key ) { Inet Address group = key . group ( ) ; List < Membership Key Impl > keys ; if ( groups == null ) { groups = new Hash Map < Inet Address , List < Membership Key Impl > > ( ) ; keys = null ; } else { keys = groups . get ( group ) ; } if ( keys == null ) { keys = new Linked List < Me... | void add ( MembershipKeyImpl key ) { InetAddress group = key . group ( ) ; List < MembershipKeyImpl > keys ; if ( groups == null ) { groups = new HashMap < InetAddress , List < MembershipKeyImpl > > ( ) ; keys = null ; } else { keys = groups . get ( group ) ; } if ( keys == null ) { keys = new LinkedList < MembershipKe... | 108 |
java-test-580 | java | What does the code return ? | a new membership key | void add ( Membership Key Impl key ) { Inet Address group = key . group ( ) ; List < Membership Key Impl > keys ; if ( groups == null ) { groups = new Hash Map < Inet Address , List < Membership Key Impl > > ( ) ; keys = null ; } else { keys = groups . get ( group ) ; } if ( keys == null ) { keys = new Linked List < Me... | void add ( MembershipKeyImpl key ) { InetAddress group = key . group ( ) ; List < MembershipKeyImpl > keys ; if ( groups == null ) { groups = new HashMap < InetAddress , List < MembershipKeyImpl > > ( ) ; keys = null ; } else { keys = groups . get ( group ) ; } if ( keys == null ) { keys = new LinkedList < MembershipKe... | 108 |
java-test-584 | java | What does the code create ? | a zookeeper client | private Optional < Curator Framework > create Client ( String zookeeper Url ) { if ( String Utils . is Not Blank ( zookeeper Url ) ) { Curator Framework client = Configurations Utils . get Client ( zookeeper Url ) ; client . start ( ) ; return Optional . of ( client ) ; } else { return Optional . empty ( ) ; } } | private Optional < CuratorFramework > createClient ( String zookeeperUrl ) { if ( StringUtils . isNotBlank ( zookeeperUrl ) ) { CuratorFramework client = ConfigurationsUtils . getClient ( zookeeperUrl ) ; client . start ( ) ; return Optional . of ( client ) ; } else { return Optional . empty ( ) ; } } | 68 |
java-test-585 | java | What does the code write to the given data block ? | a property name | private void write Prop Name ( String prop Name , Byte Array Builder bab ) { Byte Buffer text Buf = Column Impl . encode Uncompressed Text ( prop Name , database . get Charset ( ) ) ; bab . put Short ( ( short ) text Buf . remaining ( ) ) ; bab . put ( text Buf ) ; } | private void writePropName ( String propName , ByteArrayBuilder bab ) { ByteBuffer textBuf = ColumnImpl . encodeUncompressedText ( propName , _database . getCharset ( ) ) ; bab . putShort ( ( short ) textBuf . remaining ( ) ) ; bab . put ( textBuf ) ; } | 64 |
java-test-586 | java | What do measurement map ? | to a defined measurement name , where the key is the measurement name and the value is the reqex the measurement should be mapped by | public Builder measurement Mappings ( Map < String , String > measurement Mappings ) { Map < String , Pattern > mappings By Pattern = new Hash Map < String , Pattern > ( ) ; for ( Map . Entry < String , String > entry : measurement Mappings . entry Set ( ) ) { try { final Pattern pattern = Pattern . compile ( entry . g... | public Builder measurementMappings ( Map < String , String > measurementMappings ) { Map < String , Pattern > mappingsByPattern = new HashMap < String , Pattern > ( ) ; for ( Map . Entry < String , String > entry : measurementMappings . entrySet ( ) ) { try { final Pattern pattern = Pattern . compile ( entry . getValue... | 132 |
java-test-587 | java | Where is the key the measurement name ? | a defined measurement name | public Builder measurement Mappings ( Map < String , String > measurement Mappings ) { Map < String , Pattern > mappings By Pattern = new Hash Map < String , Pattern > ( ) ; for ( Map . Entry < String , String > entry : measurement Mappings . entry Set ( ) ) { try { final Pattern pattern = Pattern . compile ( entry . g... | public Builder measurementMappings ( Map < String , String > measurementMappings ) { Map < String , Pattern > mappingsByPattern = new HashMap < String , Pattern > ( ) ; for ( Map . Entry < String , String > entry : measurementMappings . entrySet ( ) ) { try { final Pattern pattern = Pattern . compile ( entry . getValue... | 132 |
java-test-588 | java | In which direction does the code traverse the graph ? | from token | private void traverse ( int distance , Word Token token , Immutable Stack < Word Token > history , Traverse Predicate predicate ) { final int new Distance = distance - NUM ; if ( new Distance <= NUM ) { return ; } for ( final Edge e : edges . get ( token ) ) { final Word Token other = e . get Other ( token ) ; if ( ! h... | private void traverse ( int distance , WordToken token , ImmutableStack < WordToken > history , TraversePredicate predicate ) { final int newDistance = distance - _NUM ; if ( newDistance <= _NUM ) { return ; } for ( final Edge e : edges . get ( token ) ) { final WordToken other = e . getOther ( token ) ; if ( ! history... | 131 |
java-test-591 | java | What does we use ? | the same name that is in the barnes code | public final void hack Gravity ( double rsize , Node root ) { Math Vector pos 0 = ( Math Vector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walk Sub Tree ( rsize * rsize , hg ) ; phi = hg . phi 0 ; new Acc = hg . acc 0 ; } | public final void hackGravity ( double rsize , Node root ) { MathVector pos0 = ( MathVector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walkSubTree ( rsize * rsize , hg ) ; phi = hg . phi0 ; newAcc = hg . acc0 ; } | 70 |
java-test-592 | java | What evaluates on the body ? | gravitational field | public final void hack Gravity ( double rsize , Node root ) { Math Vector pos 0 = ( Math Vector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walk Sub Tree ( rsize * rsize , hg ) ; phi = hg . phi 0 ; new Acc = hg . acc 0 ; } | public final void hackGravity ( double rsize , Node root ) { MathVector pos0 = ( MathVector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walkSubTree ( rsize * rsize , hg ) ; phi = hg . phi0 ; newAcc = hg . acc0 ; } | 70 |
java-test-593 | java | Where do gravitational field evaluate ? | on the body | public final void hack Gravity ( double rsize , Node root ) { Math Vector pos 0 = ( Math Vector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walk Sub Tree ( rsize * rsize , hg ) ; phi = hg . phi 0 ; new Acc = hg . acc 0 ; } | public final void hackGravity ( double rsize , Node root ) { MathVector pos0 = ( MathVector ) pos . clone ( ) ; HG hg = new HG ( this , pos ) ; hg = root . walkSubTree ( rsize * rsize , hg ) ; phi = hg . phi0 ; newAcc = hg . acc0 ; } | 70 |
java-test-596 | java | What do all threads reach ? | this barrier | public void await ( int ID ) throws Interrupted Exception { if ( parties == NUM ) return ; final boolean start Condition = competition Condition ; int competing For = ( locks . length * NUM - NUM - ID ) / NUM ; while ( competing For >= NUM ) { final Lock node = locks [ competing For ] ; if ( node . try Lock ( ) ) { syn... | public void await ( int ID ) throws InterruptedException { if ( parties == _NUM ) return ; final boolean startCondition = competitionCondition ; int competingFor = ( locks . length * _NUM - _NUM - ID ) / _NUM ; while ( competingFor >= _NUM ) { final Lock node = locks [ competingFor ] ; if ( node . tryLock ( ) ) { synch... | 166 |
java-test-597 | java | How does the revocation status of a list of certificates check ? | using ocsp | static OCSP Response check ( List < Cert Id > cert Ids , URI responder URI , X509 Certificate issuer Cert , X509 Certificate responder Cert , Date date , List < Extension > extensions ) throws IO Exception , Cert Path Validator Exception { byte [ ] bytes = null ; OCSP Request request = null ; try { request = new OCSP R... | static OCSPResponse check ( List < CertId > certIds , URI responderURI , X509Certificate issuerCert , X509Certificate responderCert , Date date , List < Extension > extensions ) throws IOException , CertPathValidatorException { byte [ ] bytes = null ; OCSPRequest request = null ; try { request = new OCSPRequest ( certI... | 616 |
java-test-605 | java | What has the " content - type " set to json ? | the supplied data | private Response require JSON ( IHTTP Session session ) { final Map < String , String > headers = session . get Headers ( ) ; if ( ! APPLICATION JSON . equals ( headers . get ( CONTENT TYPE ) ) ) { return new Fixed Length Response ( Response . Status . NOT ACCEPTABLE , MIME PLAINTEXT , STRING ) ; } else { return null ;... | private Response requireJSON ( IHTTPSession session ) { final Map < String , String > headers = session . getHeaders ( ) ; if ( ! APPLICATION_JSON . equals ( headers . get ( CONTENT_TYPE ) ) ) { return newFixedLengthResponse ( Response . Status . NOT_ACCEPTABLE , MIME_PLAINTEXT , STRING ) ; } else { return null ; } } | 71 |
java-test-606 | java | What does the supplied data have ? | the " content - type " set to json | private Response require JSON ( IHTTP Session session ) { final Map < String , String > headers = session . get Headers ( ) ; if ( ! APPLICATION JSON . equals ( headers . get ( CONTENT TYPE ) ) ) { return new Fixed Length Response ( Response . Status . NOT ACCEPTABLE , MIME PLAINTEXT , STRING ) ; } else { return null ;... | private Response requireJSON ( IHTTPSession session ) { final Map < String , String > headers = session . getHeaders ( ) ; if ( ! APPLICATION_JSON . equals ( headers . get ( CONTENT_TYPE ) ) ) { return newFixedLengthResponse ( Response . Status . NOT_ACCEPTABLE , MIME_PLAINTEXT , STRING ) ; } else { return null ; } } | 71 |
java-test-607 | java | What does it set also ? | the correct colour of the indicator led | public void disconnect ( ) { connected = BOOL ; synchronized ( conn Lost Wait ) { conn Lost Wait . notify ( ) ; } if ( mqtt != null ) { try { mqtt . disconnect ( ) ; } catch ( Exception ex ) { set Title Text ( STRING ) ; ex . print Stack Trace ( ) ; System . exit ( NUM ) ; } } if ( led . is Flashing ( ) ) { led . set F... | public void disconnect ( ) { connected = _BOOL ; synchronized ( connLostWait ) { connLostWait . notify ( ) ; } if ( mqtt != null ) { try { mqtt . disconnect ( ) ; } catch ( Exception ex ) { setTitleText ( STRING ) ; ex . printStackTrace ( ) ; System . exit ( _NUM ) ; } } if ( led . isFlashing ( ) ) { led . setFlash ( )... | 116 |
java-test-608 | java | When does the code start the publishing monitor ? | once and only once | public void start ( ) { if ( monitor Thread != null ) { if ( ! monitor Thread . is Alive ( ) ) { start Monitor Thread ( ) ; } else { LOG . error ( STRING ) ; } } else { start Monitor Thread ( ) ; } } | public void start ( ) { if ( monitorThread != null ) { if ( ! monitorThread . isAlive ( ) ) { startMonitorThread ( ) ; } else { LOG . error ( STRING ) ; } } else { startMonitorThread ( ) ; } } | 54 |
java-test-609 | java | What does the code start once and only once ? | the publishing monitor | public void start ( ) { if ( monitor Thread != null ) { if ( ! monitor Thread . is Alive ( ) ) { start Monitor Thread ( ) ; } else { LOG . error ( STRING ) ; } } else { start Monitor Thread ( ) ; } } | public void start ( ) { if ( monitorThread != null ) { if ( ! monitorThread . isAlive ( ) ) { startMonitorThread ( ) ; } else { LOG . error ( STRING ) ; } } else { startMonitorThread ( ) ; } } | 54 |
java-test-612 | java | What does the code add to this ? | the information held by another nullinforegistry instance | public Null Info Registry add ( Null Info Registry other ) { if ( ( other . tag Bits & NULL FLAG MASK ) == NUM ) { return this ; } this . tag Bits |= NULL FLAG MASK ; this . null Bit 1 |= other . null Bit 1 ; this . null Bit 2 |= other . null Bit 2 ; this . null Bit 3 |= other . null Bit 3 ; this . null Bit 4 |= other ... | public NullInfoRegistry add ( NullInfoRegistry other ) { if ( ( other . tagBits & NULL_FLAG_MASK ) == _NUM ) { return this ; } this . tagBits |= NULL_FLAG_MASK ; this . nullBit1 |= other . nullBit1 ; this . nullBit2 |= other . nullBit2 ; this . nullBit3 |= other . nullBit3 ; this . nullBit4 |= other . nullBit4 ; if ( o... | 370 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.