idx
int64 0
34.9k
| question
stringlengths 12
26.4k
| target
stringlengths 15
2.15k
|
---|---|---|
34,400 | @ Override public void onBackup ( ParcelFileDescriptor oldState , BackupDataOutput data , ParcelFileDescriptor newState ) throws IOException { long savedFileSize = - 1 ; long savedCrc = - 1 ; int savedVersion = - 1 ; DataInputStream in = new DataInputStream ( new FileInputStream ( oldState . getFileDescriptor ( ) ) ) ; try { savedFileSize = in . readLong ( ) ; savedCrc = in . readLong ( ) ; savedVersion = in . readInt ( ) ; } catch ( EOFException e ) { return ; } finally { if ( in != null ) { in . close ( ) ; } } writeBackupState ( savedFileSize , savedCrc , newState ) ; } | Updates a digest with one byte. |
34,401 | public static boolean isAssociatedToAnyRpVplexTypes ( Volume volume , DbClient dbClient ) { return isAssociatedToRpVplexType ( volume , dbClient , PersonalityTypes . SOURCE , PersonalityTypes . TARGET , PersonalityTypes . METADATA ) ; } | Removes wheel clicking listener |
34,402 | private void readObject ( ObjectInputStream oos ) throws IOException , ClassNotFoundException { iInstant = ( MutableDateTime ) oos . readObject ( ) ; DateTimeFieldType type = ( DateTimeFieldType ) oos . readObject ( ) ; iField = type . getField ( iInstant . getChronology ( ) ) ; } | Adds a childnode to the node |
34,403 | private void expandTo ( int size ) { final double [ ] tempArray = new double [ size ] ; System . arraycopy ( internalArray , 0 , tempArray , 0 , internalArray . length ) ; internalArray = tempArray ; } | This is to create an instance of a QuickSelectSketch with custom resize factor and sampling probability |
34,404 | private void save ( char ch ) { updateCoordinates ( ch ) ; _saved . append ( ch ) ; } | TODO Add method documentation |
34,405 | private static DecoderResult createDecoderResultFromAmbiguousValues ( int ecLevel , int [ ] codewords , int [ ] erasureArray , int [ ] ambiguousIndexes , int [ ] [ ] ambiguousIndexValues ) throws FormatException , ChecksumException { int [ ] ambiguousIndexCount = new int [ ambiguousIndexes . length ] ; int tries = 100 ; while ( tries -- > 0 ) { for ( int i = 0 ; i < ambiguousIndexCount . length ; i ++ ) { codewords [ ambiguousIndexes [ i ] ] = ambiguousIndexValues [ i ] [ ambiguousIndexCount [ i ] ] ; } try { return decodeCodewords ( codewords , ecLevel , erasureArray ) ; } catch ( ChecksumException ignored ) { } if ( ambiguousIndexCount . length == 0 ) { throw ChecksumException . getChecksumInstance ( ) ; } for ( int i = 0 ; i < ambiguousIndexCount . length ; i ++ ) { if ( ambiguousIndexCount [ i ] < ambiguousIndexValues [ i ] . length - 1 ) { ambiguousIndexCount [ i ] ++ ; break ; } else { ambiguousIndexCount [ i ] = 0 ; if ( i == ambiguousIndexCount . length - 1 ) { throw ChecksumException . getChecksumInstance ( ) ; } } } } throw ChecksumException . getChecksumInstance ( ) ; } | Create persistent selection in T_Selection table |
34,406 | private boolean positionSign ( Entity sign ) { for ( int y = 125 ; y <= 127 ; y ++ ) { for ( int x = 80 ; x > 51 ; x -- ) { if ( ! zone . collides ( sign , x , y ) ) { sign . setPosition ( x , y ) ; zone . add ( sign ) ; return true ; } } } return false ; } | Checks only format correctness, logging more thoroughly tested in respective unit test. |
34,407 | public static void touch ( File file ) throws IOException { if ( ! file . exists ( ) ) { OutputStream out = openOutputStream ( file ) ; IOUtils . closeQuietly ( out ) ; } boolean success = file . setLastModified ( System . currentTimeMillis ( ) ) ; if ( ! success ) { throw new IOException ( "Unable to set the last modification time for " + file ) ; } } | This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your own "content.types.user.table" means you don't get any of the built-ins, and the built-ins come from "$JAVA_HOME/lib/content-types.properties". |
34,408 | public void testDivisionKnuthIsNormalized ( ) { byte aBytes [ ] = { - 9 , - 8 , - 7 , - 6 , - 5 , - 4 , - 3 , - 2 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 } ; byte bBytes [ ] = { - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } ; int aSign = - 1 ; int bSign = - 1 ; byte rBytes [ ] = { 0 , - 9 , - 8 , - 7 , - 6 , - 5 , - 4 , - 3 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; BigInteger result = aNumber . divide ( bNumber ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , result . signum ( ) ) ; } | Creates a Tomcat manager wrapper for the specified URL, username, password and URL encoding. |
34,409 | public String queryCatalogClassName ( ) { String className = System . getProperty ( pClassname ) ; if ( className == null ) { if ( resources == null ) readProperties ( ) ; if ( resources == null ) return null ; try { return resources . getString ( "catalog-class-name" ) ; } catch ( MissingResourceException e ) { return null ; } } return className ; } | Awaits completion or aborts on interrupt or timeout. |
34,410 | public String encodeBody ( ) { StringBuffer s = new StringBuffer ( ) ; if ( retryAfter != null ) s . append ( retryAfter ) ; if ( comment != null ) s . append ( SP + LPAREN + comment + RPAREN ) ; if ( ! parameters . isEmpty ( ) ) { s . append ( SEMICOLON + parameters . encode ( ) ) ; } return s . toString ( ) ; } | Finds which nodes can be append targets. |
34,411 | public BatchedImageRequest ( Request < ? > request , ImageContainer container ) { mRequest = request ; mContainers . add ( container ) ; } | Internal -- push the global variables from the Stylesheet onto the context's runtime variable stack. <p>If we encounter a variable that is already defined in the variable stack, we ignore it. This is because the second variable definition will be at a lower import precedence. Presumably, global"variables at the same import precedence with the same name will have been caught during the recompose process. <p>However, if we encounter a parameter that is already defined in the variable stack, we need to see if this is a parameter whose value was supplied by a setParameter call. If so, we need to "receive" the one already in the stack, ignoring this one. If it is just an earlier xsl:param or xsl:variable definition, we ignore it using the same reasoning as explained above for the variable. |
34,412 | public static int findBeforeNewLineChar ( CharSequence s , int start ) { for ( int i = start - 1 ; i > 0 ; i -- ) { if ( s . charAt ( i ) == '\n' ) { return i ; } } return - 1 ; } | to be called when explanation is presented to the user |
34,413 | private AggregatorUtils ( ) { } | Creates a random working set based on the distribution. |
34,414 | public void addSubFilter ( SubFilter subFilter ) { subFilters . add ( subFilter ) ; } | Returns the first foo in the ordered set where uuid = ?. |
34,415 | static Object newInstance ( String className , ClassLoader cl , boolean doFallback ) throws ConfigurationError { try { Class providerClass = findProviderClass ( className , cl , doFallback ) ; Object instance = providerClass . newInstance ( ) ; debugPrintln ( "created new instance of " + providerClass + " using ClassLoader: " + cl ) ; return instance ; } catch ( ClassNotFoundException x ) { throw new ConfigurationError ( "Provider " + className + " not found" , x ) ; } catch ( Exception x ) { throw new ConfigurationError ( "Provider " + className + " could not be instantiated: " + x , x ) ; } } | Another pass might need to add to the results for JSAStrings. This method will clone an existing result to a new value box + hotspot. |
34,416 | @ Override public boolean covers ( Instance datum ) { boolean isCover = true ; for ( int i = 0 ; i < m_Antds . size ( ) ; i ++ ) { Antd antd = m_Antds . get ( i ) ; if ( ! antd . covers ( datum ) ) { isCover = false ; break ; } } return isCover ; } | Read the contents of a file in /proc/[pid]/[filename]. |
34,417 | private void activatePart ( ) { if ( ! isFocused ( ) ) { setFocus ( true ) ; if ( delegate != null ) { delegate . activatePart ( ) ; } } } | Dumps the wave for the given utterance. |
34,418 | public static int binarySearch ( float [ ] array , int startIndex , int endIndex , float value ) { checkIndexForBinarySearch ( array . length , startIndex , endIndex ) ; int intBits = Float . floatToIntBits ( value ) ; int low = startIndex , mid = - 1 , high = endIndex - 1 ; while ( low <= high ) { mid = ( low + high ) > > > 1 ; if ( lessThan ( array [ mid ] , value ) ) { low = mid + 1 ; } else if ( intBits == Float . floatToIntBits ( array [ mid ] ) ) { return mid ; } else { high = mid - 1 ; } } if ( mid < 0 ) { int insertPoint = endIndex ; for ( int index = startIndex ; index < endIndex ; index ++ ) { if ( value < array [ index ] ) { insertPoint = index ; } } return - insertPoint - 1 ; } return - mid - ( lessThan ( value , array [ mid ] ) ? 1 : 2 ) ; } | Decodes and sets the mech's armor and internal structure values |
34,419 | public static String paddedHashCode ( Object o ) { String s = "0000000000" ; if ( o != null ) { s = PADDED_HASH_FORMAT . format ( o . hashCode ( ) ) ; } return s ; } | Creates a new inject manager. |
34,420 | public void addCPItem ( CP cp ) { String uniq = cp . getUniq ( ) ; CP intern ; if ( ( intern = ( CP ) ( cpe . get ( uniq ) ) ) == null ) { cpe . put ( uniq , cp ) ; cp . resolve ( this ) ; } } | Save and restore all nonvolatile registers around a syscall. We do this in case the sys call does not respect our register conventions.<p> We save/restore all nonvolatiles and the PR, whether or not this routine uses them. This may be a tad inefficient, but if you're making a system call, you probably don't care.<p> Side effect: changes the operator of the call instruction to IA32_CALL. |
34,421 | public static Enumeration < String > listStemmers ( ) { initStemmers ( ) ; return m_Stemmers . elements ( ) ; } | Returns the remote client's inet address. |
34,422 | public boolean isValid ( ) { return wind != null && condition != null && ! condition . isEmpty ( ) ; } | For keyboard mode, processes key events. |
34,423 | public String buildUri ( String representationId , int segmentNumber , int bandwidth , long time ) { StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < identifierCount ; i ++ ) { builder . append ( urlPieces [ i ] ) ; if ( identifiers [ i ] == REPRESENTATION_ID ) { builder . append ( representationId ) ; } else if ( identifiers [ i ] == NUMBER_ID ) { builder . append ( String . format ( identifierFormatTags [ i ] , segmentNumber ) ) ; } else if ( identifiers [ i ] == BANDWIDTH_ID ) { builder . append ( String . format ( identifierFormatTags [ i ] , bandwidth ) ) ; } else if ( identifiers [ i ] == TIME_ID ) { builder . append ( String . format ( identifierFormatTags [ i ] , time ) ) ; } } builder . append ( urlPieces [ identifierCount ] ) ; return builder . toString ( ) ; } | Constructs a web server. |
34,424 | static void clearInstanceCache ( ) { synchronized ( INSTANCE_CACHE ) { INSTANCE_CACHE . clear ( ) ; } } | Produces a generator that will suspend its computation returning a yielded value, plus the rest of the computation to be completed later. |
34,425 | public void writeEndOfClass ( ) { out . println ( "}" ) ; } | Used to zoom into the map page |
34,426 | public ActionsList < T > add ( Func2 func2 , T element ) { return addAll ( func2 , Arrays . asList ( element ) ) ; } | Get a cloned LocPathIterator. |
34,427 | private void writeAttribute ( java . lang . String prefix , java . lang . String namespace , java . lang . String attName , java . lang . String attValue , javax . xml . stream . XMLStreamWriter xmlWriter ) throws javax . xml . stream . XMLStreamException { if ( xmlWriter . getPrefix ( namespace ) == null ) { xmlWriter . writeNamespace ( prefix , namespace ) ; xmlWriter . setPrefix ( prefix , namespace ) ; } xmlWriter . writeAttribute ( namespace , attName , attValue ) ; } | verifies the complete list of all authentication tags w.r.t. the central file authentication tag |
34,428 | protected static String fixURI ( String str ) { str = str . replace ( java . io . File . separatorChar , '/' ) ; StringBuffer sb = null ; if ( str . length ( ) >= 2 ) { char ch1 = str . charAt ( 1 ) ; if ( ch1 == ':' ) { char ch0 = Character . toUpperCase ( str . charAt ( 0 ) ) ; if ( ch0 >= 'A' && ch0 <= 'Z' ) { sb = new StringBuffer ( str . length ( ) + 8 ) ; sb . append ( "file:///" ) ; } } else if ( ch1 == '/' && str . charAt ( 0 ) == '/' ) { sb = new StringBuffer ( str . length ( ) + 5 ) ; sb . append ( "file:" ) ; } } int pos = str . indexOf ( ' ' ) ; if ( pos < 0 ) { if ( sb != null ) { sb . append ( str ) ; str = sb . toString ( ) ; } } else { if ( sb == null ) sb = new StringBuffer ( str . length ( ) ) ; for ( int i = 0 ; i < pos ; i ++ ) sb . append ( str . charAt ( i ) ) ; sb . append ( "%20" ) ; for ( int i = pos + 1 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) == ' ' ) sb . append ( "%20" ) ; else sb . append ( str . charAt ( i ) ) ; } str = sb . toString ( ) ; } return str ; } | Transpile the given resource to the given writers. |
34,429 | public static boolean isInvoiceType ( GenericValue invoice , String inputTypeId ) throws GenericEntityException { if ( invoice == null ) { return false ; } GenericValue invoiceType = invoice . getRelatedOne ( "InvoiceType" , true ) ; if ( invoiceType == null ) { throw new GenericEntityException ( "Cannot find InvoiceType for invoiceId " + invoice . getString ( "invoiceId" ) ) ; } String invoiceTypeId = invoiceType . getString ( "invoiceTypeId" ) ; if ( inputTypeId . equals ( invoiceTypeId ) ) { return true ; } return isInvoiceTypeRecurse ( invoiceType , inputTypeId ) ; } | Recreate inner state for object after deserialization. |
34,430 | private long toLong ( InetAddress inetAddress ) { byte [ ] address = inetAddress . getAddress ( ) ; long result = 0 ; for ( int i = 0 ; i < address . length ; i ++ ) { result <<= 8 ; result |= address [ i ] & BYTE_MASK ; } return result ; } | Unregisters a callback by type and cbid. May not be on the current thread. |
34,431 | public void destroy ( ) { try { raf . close ( ) ; } catch ( IOException e ) { log . error ( e , e ) ; } if ( ! file . delete ( ) ) log . warn ( "Could not delete file: " + file ) ; } | Serialize array data linearly. |
34,432 | private void updateView ( ) { Map < String , List < String > > attributes = dataObject . getAttributes ( ) ; final String artifactId = getAttribute ( ARTIFACT_ID ) ; if ( ! artifactId . isEmpty ( ) ) { view . setArtifactId ( artifactId ) ; } if ( attributes . get ( GROUP_ID ) != null ) { view . setGroupId ( getAttribute ( GROUP_ID ) ) ; } else { view . setGroupId ( getAttribute ( PARENT_GROUP_ID ) ) ; } if ( attributes . get ( VERSION ) != null ) { view . setVersion ( getAttribute ( VERSION ) ) ; } else { view . setVersion ( getAttribute ( PARENT_VERSION ) ) ; } view . setPackaging ( getAttribute ( PACKAGING ) ) ; } | Collect the rule(s) that fire for the supplied incoming instance |
34,433 | private StreamInfo parseStream ( JSONObject stream , boolean follows ) { if ( stream == null ) { LOGGER . warning ( "Error parsing stream: Should be JSONObject, not null" ) ; return null ; } Number viewersTemp ; String status ; String game ; String name ; String display_name ; long timeStarted = - 1 ; long userId = - 1 ; boolean noChannelObject = false ; try { viewersTemp = ( Number ) stream . get ( "viewers" ) ; JSONObject channel = ( JSONObject ) stream . get ( "channel" ) ; if ( channel == null ) { LOGGER . warning ( "Error parsing StreamInfo: channel null" ) ; return null ; } status = ( String ) channel . get ( "status" ) ; game = ( String ) channel . get ( "game" ) ; name = ( String ) channel . get ( "name" ) ; display_name = ( String ) channel . get ( "display_name" ) ; userId = JSONUtil . getLong ( channel , "_id" , - 1 ) ; if ( ! channel . containsKey ( "status" ) ) { LOGGER . warning ( "Error parsing StreamInfo: no channel object (" + name + ")" ) ; noChannelObject = true ; } } catch ( ClassCastException ex ) { LOGGER . warning ( "Error parsing StreamInfo: unpexected type" ) ; return null ; } if ( name == null || name . isEmpty ( ) ) { LOGGER . warning ( "Error parsing StreamInfo: name null or empty" ) ; return null ; } if ( viewersTemp == null ) { LOGGER . warning ( "Error parsing StreamInfo: viewercount null (" + name + ")" ) ; return null ; } try { timeStarted = Util . parseTime ( ( String ) stream . get ( "created_at" ) ) ; } catch ( java . text . ParseException | NullPointerException | ClassCastException ex ) { LOGGER . warning ( "Warning parsing StreamInfo: could not parse created_at (" + ex + ")" ) ; } int viewers = viewersTemp . intValue ( ) ; if ( viewers < 0 ) { viewers = 0 ; LOGGER . warning ( "Warning: Viewercount should not be negative, set to 0 (" + name + ")." ) ; } StreamInfo streamInfo = getStreamInfo ( name ) ; if ( noChannelObject ) { status = streamInfo . getStatus ( ) ; game = streamInfo . getGame ( ) ; } streamInfo . setDisplayName ( display_name ) ; if ( streamInfo . setUserId ( userId ) ) { api . setUserId ( name , userId ) ; } if ( follows ) { streamInfo . setFollowed ( status , game , viewers , timeStarted ) ; } else { streamInfo . set ( status , game , viewers , timeStarted ) ; } return streamInfo ; } | Log a log message and exception at the given level. |
34,434 | @ Override public void startAttlist ( String elementName , Augmentations augs ) throws XNIException { } | Check parameter lexFile. Must not be null and file must exist. |
34,435 | @ SuppressWarnings ( "fallthrough" ) private int findHeaderEnd ( byte [ ] bs ) { boolean newline = true ; int len = bs . length ; for ( int i = 0 ; i < len ; i ++ ) { switch ( bs [ i ] ) { case '\r' : if ( i < len - 1 && bs [ i + 1 ] == '\n' ) i ++ ; case '\n' : if ( newline ) return i + 1 ; newline = true ; break ; default : newline = false ; } } return len ; } | Modifies the variable label |
34,436 | public static Matrix covarianceMatrix ( Vec mean , DataSet dataSet ) { Matrix covariance = new DenseMatrix ( mean . length ( ) , mean . length ( ) ) ; covarianceMatrix ( mean , dataSet , covariance ) ; return covariance ; } | Creates a new ZkConfigManager |
34,437 | private static void decodeAnsiX12Segment ( BitSource bits , StringBuilder result ) throws FormatException { int [ ] cValues = new int [ 3 ] ; do { if ( bits . available ( ) == 8 ) { return ; } int firstByte = bits . readBits ( 8 ) ; if ( firstByte == 254 ) { return ; } parseTwoBytes ( firstByte , bits . readBits ( 8 ) , cValues ) ; for ( int i = 0 ; i < 3 ; i ++ ) { int cValue = cValues [ i ] ; if ( cValue == 0 ) { result . append ( '\r' ) ; } else if ( cValue == 1 ) { result . append ( '*' ) ; } else if ( cValue == 2 ) { result . append ( '>' ) ; } else if ( cValue == 3 ) { result . append ( ' ' ) ; } else if ( cValue < 14 ) { result . append ( ( char ) ( cValue + 44 ) ) ; } else if ( cValue < 40 ) { result . append ( ( char ) ( cValue + 51 ) ) ; } else { throw FormatException . getFormatInstance ( ) ; } } } while ( bits . available ( ) > 0 ) ; } | Returns an object cast to the specified type. |
34,438 | public boolean isBlockBanned ( Block block ) { return blockBanList . contains ( block ) ; } | Removes a conversation by name |
34,439 | public void endDrawing ( GL10 gl ) { gl . glDisable ( GL10 . GL_ALPHA_TEST ) ; gl . glMatrixMode ( GL10 . GL_PROJECTION ) ; gl . glPopMatrix ( ) ; gl . glMatrixMode ( GL10 . GL_MODELVIEW ) ; gl . glPopMatrix ( ) ; gl . glDisable ( GL10 . GL_TEXTURE_2D ) ; gl . glColor4x ( FixedPoint . ONE , FixedPoint . ONE , FixedPoint . ONE , FixedPoint . ONE ) ; } | Constructs a ThreadMonitor object to get thread information in a remote JVM. |
34,440 | public int size ( ) { synchronized ( eventsList ) { return eventsList . size ( ) ; } } | Returns the authorization challenges appropriate for this response's code. If the response code is 401 unauthorized, this returns the "WWW-Authenticate" challenges. If the response code is 407 proxy unauthorized, this returns the "Proxy-Authenticate" challenges. Otherwise this returns an empty list of challenges. |
34,441 | public static void jsonObjectsEquals ( JSONObject o1 , JSONObject o2 ) throws JSONException { if ( o1 != o2 ) { if ( o1 . length ( ) != o2 . length ( ) ) { fail ( "JSONObjects length differ: " + o1 . length ( ) + " / " + o2 . length ( ) ) ; } @ SuppressWarnings ( "unchecked" ) Iterator < String > o1Keys = o1 . keys ( ) ; while ( o1Keys . hasNext ( ) ) { String key = o1Keys . next ( ) ; Object o1Value = o1 . get ( key ) ; Object o2Value = o2 . get ( key ) ; if ( ! jsonValueEquals ( o1Value , o2Value ) ) { fail ( "JSONObject '" + key + "' values differ: " + o1Value + " / " + o2Value ) ; } } } } | reset the chaining vector back to the IV and reset the underlying cipher. |
34,442 | public void removeLimitLine ( LimitLine l ) { mLimitLines . remove ( l ) ; } | Returns the current relation set as an array of AccessibleRelation |
34,443 | private static String H ( String data ) { try { MessageDigest digest = MessageDigest . getInstance ( "MD5" ) ; return toHexString ( digest . digest ( data . getBytes ( ) ) ) ; } catch ( NoSuchAlgorithmException ex ) { throw new RuntimeException ( "Failed to instantiate an MD5 algorithm" , ex ) ; } } | Close the underlying stream writer flushing any buffered content. |
34,444 | Map < Integer , Integer > strippedWhitespaceUpToColumn ( String intro ) { Map < Integer , Integer > stripped = new TreeMap < > ( ) ; boolean countingWhitespace = false ; int col = 0 ; int count = 0 ; for ( char c : intro . toCharArray ( ) ) { if ( c == '\n' && ! countingWhitespace ) { countingWhitespace = true ; } else if ( countingWhitespace ) { if ( Character . isWhitespace ( c ) ) count ++ ; else countingWhitespace = false ; } stripped . put ( col , count ) ; col ++ ; } return stripped ; } | Loop through each of the columns in the row, migrating each as a resource or relation. |
34,445 | private List < Runnable > drainQueue ( ) { BlockingQueue < Runnable > q = workQueue ; List < Runnable > taskList = new ArrayList < Runnable > ( ) ; q . drainTo ( taskList ) ; if ( ! q . isEmpty ( ) ) { for ( Runnable r : q . toArray ( new Runnable [ 0 ] ) ) { if ( q . remove ( r ) ) taskList . add ( r ) ; } } return taskList ; } | Displays a message to the output stream. |
34,446 | private void updateProgress ( String progressLabel , int progress ) { if ( myHost != null && ( ( progress != previousProgress ) || ( ! progressLabel . equals ( previousProgressLabel ) ) ) ) { myHost . updateProgress ( progressLabel , progress ) ; } previousProgress = progress ; previousProgressLabel = progressLabel ; } | Test if the root variation is below rootEpsilon |
34,447 | public boolean isMine ( Wallet wallet ) { try { Script script = getScriptPubKey ( ) ; if ( script . isSentToRawPubKey ( ) ) { byte [ ] pubkey = script . getPubKey ( ) ; return wallet . isPubKeyMine ( pubkey ) ; } else { byte [ ] pubkeyHash = script . getPubKeyHash ( ) ; return wallet . isPubKeyHashMine ( pubkeyHash ) ; } } catch ( ScriptException e ) { log . debug ( "Could not parse tx output script: {}" , e . toString ( ) ) ; return false ; } } | Recompute the separation of cluster means. |
34,448 | @ Override public String toString ( ) { StringBuffer buf = new StringBuffer ( ) ; boolean first = true ; for ( FilterPredClause clause : clauses ) { if ( first ) first = false ; else { buf . append ( ' ' ) ; buf . append ( boolOp ) ; buf . append ( ' ' ) ; } buf . append ( clause ) ; } return buf . toString ( ) ; } | Read a document from the content at the given URL. |
34,449 | public static void realTransform ( double data [ ] , boolean inverse ) { double c1 = 0.5 ; int n = data . length ; double twoPi = - MathUtils . TWOPI ; if ( inverse ) twoPi = MathUtils . TWOPI ; double delta = twoPi / n ; double wStepReal = Math . cos ( delta ) ; double wStepImag = Math . sin ( delta ) ; double wReal = wStepReal ; double wImag = wStepImag ; double c2 ; if ( ! inverse ) { c2 = - 0.5 ; transform ( data , false ) ; } else { c2 = 0.5 ; } int n4 = n > > 2 ; for ( int i = 1 ; i < n4 ; i ++ ) { int twoI = i << 1 ; int twoIPlus1 = twoI + 1 ; int nMinusTwoI = n - twoI ; int nMinusTwoIPlus1 = nMinusTwoI + 1 ; double h1r = c1 * ( data [ twoI ] + data [ nMinusTwoI ] ) ; double h1i = c1 * ( data [ twoIPlus1 ] - data [ nMinusTwoIPlus1 ] ) ; double h2r = - c2 * ( data [ twoIPlus1 ] + data [ nMinusTwoIPlus1 ] ) ; double h2i = c2 * ( data [ twoI ] - data [ nMinusTwoI ] ) ; data [ twoI ] = h1r + wReal * h2r - wImag * h2i ; data [ twoIPlus1 ] = h1i + wReal * h2i + wImag * h2r ; data [ nMinusTwoI ] = h1r - wReal * h2r + wImag * h2i ; data [ nMinusTwoIPlus1 ] = - h1i + wReal * h2i + wImag * h2r ; double oldWReal = wReal ; wReal = oldWReal * wStepReal - wImag * wStepImag ; wImag = oldWReal * wStepImag + wImag * wStepReal ; } if ( ! inverse ) { double tmp = data [ 0 ] ; data [ 0 ] += data [ 1 ] ; data [ 1 ] = tmp - data [ 1 ] ; data [ n / 2 + 1 ] = - data [ n / 2 + 1 ] ; } else { double tmp = data [ 0 ] ; data [ 0 ] = 0.5 * ( tmp + data [ 1 ] ) ; data [ 1 ] = 0.5 * ( tmp - data [ 1 ] ) ; data [ n / 2 + 1 ] = - data [ n / 2 + 1 ] ; transform ( data , true ) ; } } | Take the output of lengthValueEncode() and decode it to a Message of the given type. |
34,450 | public FeatureFlag forName ( String name ) throws BadApiRequestException { FeatureFlag flag = NAMES_TO_VALUES . get ( name . toUpperCase ( Locale . ENGLISH ) ) ; return flag != null ? flag : Utils . < FeatureFlag > insteadThrowRuntime ( new BadApiRequestException ( "Invalid feature flag: " + name ) ) ; } | Util method to write an attribute with the ns prefix |
34,451 | public void testMaxGreater ( ) { byte aBytes [ ] = { 12 , 56 , 100 , - 2 , - 76 , 89 , 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; byte bBytes [ ] = { 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; int aSign = 1 ; int bSign = 1 ; byte rBytes [ ] = { 12 , 56 , 100 , - 2 , - 76 , 89 , 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; BigInteger result = aNumber . max ( bNumber ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertTrue ( "incorrect sign" , result . signum ( ) == 1 ) ; } | Appends the string representation of the char argument to this string buffer. The argument is appended to the contents of this string buffer. The length of this string buffer increases by 1. The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuffer object. |
34,452 | private static final int computeDirection ( int from , int to ) { int dx = Position . getX ( to ) - Position . getX ( from ) ; int dy = Position . getY ( to ) - Position . getY ( from ) ; if ( dx == 0 ) { if ( dy == 0 ) return 0 ; return ( dy > 0 ) ? 8 : - 8 ; } if ( dy == 0 ) return ( dx > 0 ) ? 1 : - 1 ; if ( Math . abs ( dx ) == Math . abs ( dy ) ) return ( ( dy > 0 ) ? 8 : - 8 ) + ( dx > 0 ? 1 : - 1 ) ; if ( Math . abs ( dx * dy ) == 2 ) return dy * 8 + dx ; return 0 ; } | Launches the associated editor application and opens a file for editing. |
34,453 | public void testEntityReferenceSetTextContent ( ) throws TransformerException { document = builder . newDocument ( ) ; Element root = document . createElement ( "menu" ) ; document . appendChild ( root ) ; EntityReference entityReference = document . createEntityReference ( "sp" ) ; root . appendChild ( entityReference ) ; try { entityReference . setTextContent ( "Lite Syrup" ) ; fail ( ) ; } catch ( DOMException e ) { } } | Overloads the leftShift operator to add objects to an ObjectOutputStream. |
34,454 | @ KnownFailure ( "not supported" ) public void testUpdate7 ( ) throws SQLException { DatabaseCreator . fillFKStrictTable ( conn ) ; statement . executeUpdate ( "UPDATE " + DatabaseCreator . FKSTRICT_TABLE + " SET value = 'updated' WHERE name_id = ANY (SELECT id FROM " + DatabaseCreator . PARENT_TABLE + " WHERE id > 1)" ) ; ResultSet r = statement . executeQuery ( "SELECT COUNT(*) FROM " + DatabaseCreator . FKSTRICT_TABLE + " WHERE value = 'updated';" ) ; r . next ( ) ; assertEquals ( "Should be 1 row" , 1 , r . getInt ( 1 ) ) ; r . close ( ) ; } | Adds the address for later freeing to the deferred free list. <p> If the allocation is for a BLOB then the sze is also stored <p> The deferred list is checked on AllocBlock and prior to commit. <p> DeferredFrees are written to the deferred PSOutputStream |
34,455 | public void addSatallite ( SatelliteBase satallite ) { satallites . add ( satallite ) ; if ( satallite . canTick ( ) ) tickingSatallites . add ( satallite ) ; } | Add a vertex to this model |
34,456 | public static void rotateM ( float [ ] m , int mOffset , float a , float x , float y , float z ) { synchronized ( TEMP_MATRIX_ARRAY ) { setRotateM ( TEMP_MATRIX_ARRAY , 0 , a , x , y , z ) ; multiplyMM ( TEMP_MATRIX_ARRAY , 16 , m , mOffset , TEMP_MATRIX_ARRAY , 0 ) ; System . arraycopy ( TEMP_MATRIX_ARRAY , 16 , m , mOffset , 16 ) ; } } | Creates a new internal trace logger object. |
34,457 | public PerDirectorySuite ( Class < ? > klass ) throws Throwable { super ( klass , Collections . < Runner > emptyList ( ) ) ; final TestClass testClass = getTestClass ( ) ; final Class < ? > javaTestClass = testClass . getJavaClass ( ) ; final List < List < File > > parametersList = getParametersList ( testClass ) ; for ( List < File > parameters : parametersList ) { runners . add ( new PerParameterSetTestRunner ( javaTestClass , parameters ) ) ; } } | Returns the distribution's hashcode |
34,458 | public LetterValidator ( @ NonNull final CharSequence errorMessage , @ NonNull final Case caseSensitivity , final boolean allowSpaces , @ NonNull final char ... allowedCharacters ) { super ( errorMessage ) ; setCaseSensitivity ( caseSensitivity ) ; allowSpaces ( allowSpaces ) ; setAllowedCharacters ( allowedCharacters ) ; } | align set of nodes with the right most node in the list |
34,459 | private byte [ ] entityToBytes ( HttpEntity entity ) throws IOException , ServerError { PoolingByteArrayOutputStream bytes = new PoolingByteArrayOutputStream ( mPool , ( int ) entity . getContentLength ( ) ) ; byte [ ] buffer = null ; try { InputStream in = entity . getContent ( ) ; if ( in == null ) { throw new ServerError ( ) ; } buffer = mPool . getBuf ( 1024 ) ; int count ; while ( ( count = in . read ( buffer ) ) != - 1 ) { bytes . write ( buffer , 0 , count ) ; } return bytes . toByteArray ( ) ; } finally { try { entity . consumeContent ( ) ; } catch ( IOException e ) { VolleyLog . v ( "Error occured when calling consumingContent" ) ; } mPool . returnBuf ( buffer ) ; bytes . close ( ) ; } } | Construct a new media size attribute from the given floating-point values. |
34,460 | public static void printRawLines ( PrintWriter writer , String msg ) { int nl ; while ( ( nl = msg . indexOf ( '\n' ) ) != - 1 ) { writer . println ( msg . substring ( 0 , nl ) ) ; msg = msg . substring ( nl + 1 ) ; } if ( msg . length ( ) != 0 ) writer . println ( msg ) ; } | Delete the attribute value. |
34,461 | public static void write ( OutStream out , List records ) throws IOException { for ( Iterator enumerator = records . iterator ( ) ; enumerator . hasNext ( ) ; ) { ButtonRecord2 rec = ( ButtonRecord2 ) enumerator . next ( ) ; rec . write ( out ) ; } out . writeUI8 ( 0 ) ; } | Report version information about JAXP interfaces. Currently distinguishes between JAXP 1.0.1 and JAXP 1.1, and not found; only tests the interfaces, and does not check for reference implementation versions. |
34,462 | public long first ( ) { return startDate . getTime ( ) ; } | Creates a new place-holder attribute type having the specified name, default syntax, and default matching rule. |
34,463 | public Cuboid ( Location l1 ) { this ( l1 , l1 ) ; } | Check if the entity is defending against an attack right now. The entity is defending if the last attack happened within 1.2s. |
34,464 | static byte [ ] decode_base64 ( String s , int maxolen ) throws IllegalArgumentException { ByteArrayOutputStream out = new ByteArrayOutputStream ( maxolen ) ; int off = 0 , slen = s . length ( ) , olen = 0 ; byte c1 , c2 , c3 , c4 , o ; if ( maxolen <= 0 ) { throw new IllegalArgumentException ( "Invalid maxolen" ) ; } while ( off < slen - 1 && olen < maxolen ) { c1 = char64 ( s . charAt ( off ++ ) ) ; c2 = char64 ( s . charAt ( off ++ ) ) ; if ( c1 == - 1 || c2 == - 1 ) { break ; } o = ( byte ) ( c1 << 2 ) ; o |= ( c2 & 0x30 ) > > 4 ; out . write ( o ) ; if ( ++ olen >= maxolen || off >= slen ) { break ; } c3 = char64 ( s . charAt ( off ++ ) ) ; if ( c3 == - 1 ) { break ; } o = ( byte ) ( ( c2 & 0x0f ) << 4 ) ; o |= ( c3 & 0x3c ) > > 2 ; out . write ( o ) ; if ( ++ olen >= maxolen || off >= slen ) { break ; } c4 = char64 ( s . charAt ( off ++ ) ) ; o = ( byte ) ( ( c3 & 0x03 ) << 6 ) ; o |= c4 ; out . write ( o ) ; ++ olen ; } return out . toByteArray ( ) ; } | cast a Object to a Byte Object(reference type) |
34,465 | void expireInvite ( final String name ) { JComponent button = invites . get ( name ) ; if ( button != null ) { inviteContainer . remove ( button ) ; inviteContainer . revalidate ( ) ; } invites . remove ( name ) ; } | Starts machine in running workspace. |
34,466 | public void writeExif ( InputStream jpegStream , String exifOutFileName ) throws FileNotFoundException , IOException { if ( jpegStream == null || exifOutFileName == null ) { throw new IllegalArgumentException ( NULL_ARGUMENT_STRING ) ; } OutputStream s = null ; try { s = getExifWriterStream ( exifOutFileName ) ; doExifStreamIO ( jpegStream , s ) ; s . flush ( ) ; } catch ( IOException e ) { closeSilently ( s ) ; throw e ; } s . close ( ) ; } | Remove the trailing whitespace from the specified String. |
34,467 | public void stopAutoHideTimer ( ) { autoHideTimer . stop ( ) ; } | draws the hole in the center of the chart |
34,468 | public static void correctLocation ( JSONObject map ) { String location = map . has ( "location" ) ? ( String ) map . get ( "location" ) : null ; if ( location != null && location . length ( ) > 0 ) { String location_country = map . has ( "location_country" ) ? ( String ) map . get ( "location_country" ) : null ; if ( location_country != null && location_country . length ( ) > 0 ) { if ( location . endsWith ( ", " + location_country ) ) { location = location . substring ( 0 , location . length ( ) - location_country . length ( ) - 2 ) ; map . put ( "location" , location ) ; } } } } | Removes wheel scrolling listener |
34,469 | int adjustTextWidth ( int width ) { maxTextWidth = Math . max ( maxTextWidth , width ) ; return maxTextWidth ; } | Return largest element in the array using helper method for divide and conquer. |
34,470 | public void testLotsOfBindings ( ) throws Exception { doTestLotsOfBindings ( Byte . MAX_VALUE - 1 ) ; doTestLotsOfBindings ( Byte . MAX_VALUE ) ; doTestLotsOfBindings ( Byte . MAX_VALUE + 1 ) ; } | Get a number of pseudo random bytes. |
34,471 | public AsyncServerRequest ( RequestType type , GeneratedMessage req , boolean requireCommonRequest ) { Request . Builder reqBuilder = Request . newBuilder ( ) ; reqBuilder . setRequestMessage ( req . toByteString ( ) ) ; reqBuilder . setRequestType ( type ) ; this . type = type ; this . request = reqBuilder . build ( ) ; this . requireCommonRequest = requireCommonRequest ; } | update TCP Port Number details |
34,472 | private void updateProgress ( String progressLabel , int progress ) { if ( myHost != null && ( ( progress != previousProgress ) || ( ! progressLabel . equals ( previousProgressLabel ) ) ) ) { myHost . updateProgress ( progressLabel , progress ) ; } previousProgress = progress ; previousProgressLabel = progressLabel ; } | Creates a temporary file in the specified location. Also creates the location if it does not exist. |
34,473 | public void increment ( int position , double weight ) { leftLabelWeights [ position ] += weight ; rightLabelWeights [ position ] -= weight ; leftWeight += weight ; rightWeight -= weight ; } | Tests whether the type parameter is upper bounded by BoundedGenericMethods. <T extends BoundedGenericMethods>. |
34,474 | private String sendStatusRequestWithRetry ( ModifiableSolrParams params , int maxCounter ) throws SolrServerException , IOException { String message = null ; while ( maxCounter -- > 0 ) { final NamedList r = sendRequest ( params ) ; final NamedList status = ( NamedList ) r . get ( "status" ) ; final RequestStatusState state = RequestStatusState . fromKey ( ( String ) status . get ( "state" ) ) ; message = ( String ) status . get ( "msg" ) ; if ( state == RequestStatusState . COMPLETED || state == RequestStatusState . FAILED ) { return message ; } try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { } } return message ; } | Converts a byte array to a hexadecimal String. Each byte is presented by its two digit hex-code; 0x0A -> "0a", 0x00 -> "00". No leading "0x" is included in the result. |
34,475 | private void enableDisableSpacingFields ( ) { if ( manuallySetNumColumns . isSelected ( ) ) { tfNumColumns . setEnabled ( true ) ; } else { tfNumColumns . setEnabled ( false ) ; } } | Lists all the files in this directory. |
34,476 | SparseArray ( Class < L > linearArrayType , int [ ] linearIndices , int [ ] rowIndices , int [ ] colIndices , L real , L imag , int numRows , int numCols ) { _numRows = numRows ; _numCols = numCols ; _baseComponentType = linearArrayType . getComponentType ( ) ; _outputArrayType = ( Class < L [ ] > ) ArrayUtils . getArrayClass ( _baseComponentType , 2 ) ; _linearIndices = linearIndices ; _rowIndices = rowIndices ; _colIndices = colIndices ; _realValues = linearArrayType . cast ( real ) ; _imagValues = linearArrayType . cast ( imag ) ; } | Puts a variable into tier i if its name is xxx:i for some xxx and some i. |
34,477 | public static Location fromTimeZone ( TimeZone timeZone ) { if ( timeZone == null ) { throw new IllegalArgumentException ( Logger . logMessage ( Logger . ERROR , "Location" , "fromTimeZone" , "The time zone is null" ) ) ; } double millisPerHour = 3.6e6 ; int offsetMillis = timeZone . getRawOffset ( ) ; int offsetHours = ( int ) ( offsetMillis / millisPerHour ) ; double lat = timeZoneLatitudes . get ( offsetHours , 0 ) ; double lon = 180 * offsetHours / 12 ; return new Location ( lat , lon ) ; } | Add quotation marks at the beginning and end of the string. |
34,478 | public MD5 ( Object ob ) { this ( ) ; Update ( ob . toString ( ) ) ; } | Update combo box with trains that will service this car |
34,479 | public static Map < String , Object > createDataResourceAndText ( DispatchContext dctx , Map < String , ? extends Object > rcontext ) { Map < String , Object > context = UtilMisc . makeMapWritable ( rcontext ) ; Map < String , Object > result = FastMap . newInstance ( ) ; Map < String , Object > thisResult = createDataResourceMethod ( dctx , context ) ; if ( thisResult . get ( ModelService . RESPONSE_MESSAGE ) != null ) { return ServiceUtil . returnError ( ( String ) thisResult . get ( ModelService . ERROR_MESSAGE ) ) ; } result . put ( "dataResourceId" , thisResult . get ( "dataResourceId" ) ) ; context . put ( "dataResourceId" , thisResult . get ( "dataResourceId" ) ) ; String dataResourceTypeId = ( String ) context . get ( "dataResourceTypeId" ) ; if ( dataResourceTypeId != null && dataResourceTypeId . equals ( "ELECTRONIC_TEXT" ) ) { thisResult = createElectronicText ( dctx , context ) ; if ( thisResult . get ( ModelService . RESPONSE_MESSAGE ) != null ) { return ServiceUtil . returnError ( ( String ) thisResult . get ( ModelService . ERROR_MESSAGE ) ) ; } } return result ; } | Take the current projection and the sourceImage, and make the image that gets displayed fit the projection. If the source image isn't over the map, then this OMGraphic is set to be invisible. If part of the image is on the map, only that part is used. The OMRaster bitmap variable is set with an image that is created from the source image, and the point1 variable is set to the point where the image should be placed. For instance, if the source image upper left corner is off the map to the NorthWest, then the OMRaster bitmap is set to a image, clipped from the source, that is entirely on the map. The OMRaster point1 is set to 0, 0, since that is where the clipped image should be placed. |
34,480 | public static ArrayList < String > matches ( String text ) { return matches ( text , ALL ) ; } | Creates a new random number generator. Its seed is initialized to a value based on the current time: public Random() { this(System.currentTimeMillis()); } See Also:System.currentTimeMillis() |
34,481 | public void addChild ( Job childJob ) { childJobs . add ( childJob ) ; } | Returns the number of symbols contained in this production. |
34,482 | public void testNextLongBounded2 ( ) { SplittableRandom sr = new SplittableRandom ( ) ; for ( long least = - 86028121 ; least < MAX_LONG_BOUND ; least += 982451653L ) { for ( long bound = least + 2 ; bound > least && bound < MAX_LONG_BOUND ; bound += Math . abs ( bound * 7919 ) ) { long f = sr . nextLong ( least , bound ) ; assertTrue ( least <= f && f < bound ) ; int i = 0 ; long j ; while ( i < NCALLS && ( j = sr . nextLong ( least , bound ) ) == f ) { assertTrue ( least <= j && j < bound ) ; ++ i ; } assertTrue ( i < NCALLS ) ; } } } | Add ONE to ONE |
34,483 | protected void prepareForFlush ( ) { doneLock = new ReentrantLock ( ) ; doneCondition = doneLock . newCondition ( ) ; doneLock . lock ( ) ; } | Shows a graphical representation of the provided map data. |
34,484 | private void recalculatPreferredSize ( ) { int maxX = 0 ; int maxY = 0 ; for ( GraphicalNode gn : myGraphicalNodes ) { int x = gn . x + NODE_WIDTH ; int y = gn . y + NODE_HEIGHT ; maxX = Math . max ( maxX , x ) ; maxY = Math . max ( maxY , y ) ; } setPreferredSize ( new Dimension ( maxX , maxY ) ) ; myMaxX = maxX ; myMaxY = maxY ; } | Recompose the top level variable and parameter declarations. |
34,485 | private String computeJavadocIndent ( IDocument document , int line , JavaHeuristicScanner scanner , ITypedRegion partition ) throws BadLocationException { if ( line == 0 ) return null ; final IRegion lineInfo = document . getLineInformation ( line ) ; final int lineStart = lineInfo . getOffset ( ) ; final int lineLength = lineInfo . getLength ( ) ; final int lineEnd = lineStart + lineLength ; int nonWS = scanner . findNonWhitespaceForwardInAnyPartition ( lineStart , lineEnd ) ; if ( nonWS == JavaHeuristicScanner . NOT_FOUND || document . getChar ( nonWS ) != '*' ) { if ( nonWS == JavaHeuristicScanner . NOT_FOUND ) return document . get ( lineStart , lineLength ) ; return document . get ( lineStart , nonWS - lineStart ) ; } IRegion previousLine = document . getLineInformation ( line - 1 ) ; int previousLineStart = previousLine . getOffset ( ) ; int previousLineLength = previousLine . getLength ( ) ; int previousLineEnd = previousLineStart + previousLineLength ; StringBuffer buf = new StringBuffer ( ) ; int previousLineNonWS = scanner . findNonWhitespaceForwardInAnyPartition ( previousLineStart , previousLineEnd ) ; if ( previousLineNonWS == JavaHeuristicScanner . NOT_FOUND || document . getChar ( previousLineNonWS ) != '*' ) { previousLine = document . getLineInformationOfOffset ( partition . getOffset ( ) ) ; previousLineStart = previousLine . getOffset ( ) ; previousLineLength = previousLine . getLength ( ) ; previousLineEnd = previousLineStart + previousLineLength ; previousLineNonWS = scanner . findNonWhitespaceForwardInAnyPartition ( previousLineStart , previousLineEnd ) ; if ( previousLineNonWS == JavaHeuristicScanner . NOT_FOUND ) previousLineNonWS = previousLineEnd ; buf . append ( ' ' ) ; } String indentation = document . get ( previousLineStart , previousLineNonWS - previousLineStart ) ; buf . insert ( 0 , indentation ) ; return buf . toString ( ) ; } | When zoom level is greater than zero, paints a small indicator at the bottom center of the screen showing the location of the zoom window within the overall DFT results window |
34,486 | void sendBit5Baud ( boolean bitValue ) throws IOException { SerialExt . setBreak ( bitValue ? 0 : 1 ) ; try { Thread . sleep ( 200 ) ; } catch ( InterruptedException e ) { log . error ( null , e ) ; } } | Maps a dataset to a particular range axis. |
34,487 | public static String removeFromEndOfString ( String source , String stringToRemove ) { if ( stringToRemove == null ) { return source ; } String result = source ; if ( source != null && source . endsWith ( stringToRemove ) ) { result = source . substring ( 0 , source . length ( ) - 1 ) ; } return result ; } | Registers a capabilities listener on a list of contacts |
34,488 | public void accept ( Context context ) { if ( null != callReference ) { RespokeCall call = callReference . get ( ) ; if ( null != call ) { call . directConnectionDidAccept ( context ) ; } } } | Removes the first occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously. |
34,489 | public void push ( final double value ) { long bits = Double . doubleToLongBits ( value ) ; if ( bits == 0L || bits == 0x3ff0000000000000L ) { mv . visitInsn ( Opcodes . DCONST_0 + ( int ) value ) ; } else { mv . visitLdcInsn ( new Double ( value ) ) ; } } | Constructs a ParsingException with the specified detail message. A detail message is a String that describes this particular exception, which may, for example, specify which algorithm is not available. |
34,490 | public mxHierarchicalLayout ( mxGraph graph ) { this ( graph , SwingConstants . NORTH ) ; } | Searches the receiver's list starting at the first column (index 0) until a column is found that is equal to the argument, and returns the index of that column. If no column is found, returns -1. |
34,491 | public void testRun ( ) throws Exception { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw , true ) ; final int MAX_DOCS = atLeast ( 225 ) ; doTest ( random ( ) , pw , false , MAX_DOCS ) ; pw . close ( ) ; sw . close ( ) ; String multiFileOutput = sw . toString ( ) ; sw = new StringWriter ( ) ; pw = new PrintWriter ( sw , true ) ; doTest ( random ( ) , pw , true , MAX_DOCS ) ; pw . close ( ) ; sw . close ( ) ; String singleFileOutput = sw . toString ( ) ; assertEquals ( multiFileOutput , singleFileOutput ) ; } | Creates an iterator of RecordID's whose keys are greater than or equal to the given start value key. |
34,492 | public void simulateMethod ( SootMethod method , ReferenceVariable thisVar , ReferenceVariable returnVar , ReferenceVariable params [ ] ) { String subSignature = method . getSubSignature ( ) ; if ( subSignature . equals ( "java.lang.Class[] getClassContext()" ) ) { java_util_ResourceBundle_getClassContext ( method , thisVar , returnVar , params ) ; return ; } else { defaultMethod ( method , thisVar , returnVar , params ) ; return ; } } | Get the string representation. |
34,493 | public final void addChangeListener ( ChangeListener listener ) { if ( ! listeners . contains ( listener ) ) listeners . add ( listener ) ; } | Creates distribution with only one bag by merging all bags of given distribution. |
34,494 | private static void decodeBase256Segment ( BitSource bits , StringBuilder result , Collection < byte [ ] > byteSegments ) throws FormatException { int codewordPosition = 1 + bits . getByteOffset ( ) ; int d1 = unrandomize255State ( bits . readBits ( 8 ) , codewordPosition ++ ) ; int count ; if ( d1 == 0 ) { count = bits . available ( ) / 8 ; } else if ( d1 < 250 ) { count = d1 ; } else { count = 250 * ( d1 - 249 ) + unrandomize255State ( bits . readBits ( 8 ) , codewordPosition ++ ) ; } if ( count < 0 ) { throw FormatException . getFormatInstance ( ) ; } byte [ ] bytes = new byte [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { if ( bits . available ( ) < 8 ) { throw FormatException . getFormatInstance ( ) ; } bytes [ i ] = ( byte ) unrandomize255State ( bits . readBits ( 8 ) , codewordPosition ++ ) ; } byteSegments . add ( bytes ) ; try { result . append ( new String ( bytes , "ISO8859_1" ) ) ; } catch ( UnsupportedEncodingException uee ) { throw new IllegalStateException ( "Platform does not support required encoding: " + uee ) ; } } | Reverse the ordering of the children in this layout. Note: bringChildToFront produced a non-deterministic ordering. |
34,495 | public float length ( int u , int v ) { if ( u == v ) return 0 ; else return 1f / ( v - u ) ; } | Tries to read the path |
34,496 | public static int executeUpdate ( String sql , Object [ ] params , boolean ignoreError , String trxName , int timeOut ) { if ( sql == null || sql . length ( ) == 0 ) throw new IllegalArgumentException ( "Required parameter missing - " + sql ) ; verifyTrx ( trxName , sql ) ; int no = - 1 ; CPreparedStatement cs = ProxyFactory . newCPreparedStatement ( ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_UPDATABLE , sql , trxName ) ; try { setParameters ( cs , params ) ; if ( timeOut > 0 ) cs . setQueryTimeout ( timeOut ) ; no = cs . executeUpdate ( ) ; if ( trxName == null ) { cs . commit ( ) ; } } catch ( Exception e ) { e = getSQLException ( e ) ; if ( ignoreError ) log . log ( Level . SEVERE , cs . getSql ( ) + " [" + trxName + "] - " + e . getMessage ( ) ) ; else { log . log ( Level . SEVERE , cs . getSql ( ) + " [" + trxName + "]" , e ) ; log . saveError ( "DBExecuteError" , e ) ; } } finally { try { cs . close ( ) ; } catch ( SQLException e2 ) { log . log ( Level . SEVERE , "Cannot close statement" ) ; } } return no ; } | Constructs a new set containing the same elements and using the same ordering as the specified sorted set. |
34,497 | public void test_commonTest_01 ( ) { SSLContextSpiImpl ssl = new SSLContextSpiImpl ( ) ; try { SSLSessionContext slsc = ssl . engineGetClientSessionContext ( ) ; fail ( "RuntimeException wasn't thrown" ) ; } catch ( RuntimeException re ) { String str = re . getMessage ( ) ; if ( ! str . equals ( "Not initialiazed" ) ) fail ( "Incorrect exception message: " + str ) ; } catch ( Exception e ) { fail ( "Incorrect exception " + e + " was thrown" ) ; } try { SSLSessionContext slsc = ssl . engineGetServerSessionContext ( ) ; fail ( "RuntimeException wasn't thrown" ) ; } catch ( RuntimeException re ) { String str = re . getMessage ( ) ; if ( ! str . equals ( "Not initialiazed" ) ) fail ( "Incorrect exception message: " + str ) ; } catch ( Exception e ) { fail ( "Incorrect exception " + e + " was thrown" ) ; } try { SSLServerSocketFactory sssf = ssl . engineGetServerSocketFactory ( ) ; fail ( "RuntimeException wasn't thrown" ) ; } catch ( RuntimeException re ) { String str = re . getMessage ( ) ; if ( ! str . equals ( "Not initialiazed" ) ) fail ( "Incorrect exception message: " + str ) ; } catch ( Exception e ) { fail ( "Incorrect exception " + e + " was thrown" ) ; } try { SSLSocketFactory ssf = ssl . engineGetSocketFactory ( ) ; fail ( "RuntimeException wasn't thrown" ) ; } catch ( RuntimeException re ) { String str = re . getMessage ( ) ; if ( ! str . equals ( "Not initialiazed" ) ) fail ( "Incorrect exception message: " + str ) ; } catch ( Exception e ) { fail ( "Incorrect exception " + e + " was thrown" ) ; } } | Writes a "long integer" in wsp format to the given output stream. |
34,498 | public static void reset ( ) { threadLocal . remove ( ) ; } | Register the extension namespace for an ElemExtensionDecl or ElemFunction, and prepare a support object to launch the appropriate ExtensionHandler at transformation runtime. |
34,499 | public BitArray resize ( long size ) { bytes . resize ( Math . max ( size / 8 + 8 , 8 ) ) ; this . size = size ; return this ; } | Creates a default policy manager configuration in the correct location |
Subsets and Splits