idx
int64
0
34.9k
question
stringlengths
12
26.4k
target
stringlengths
15
2.15k
500
@ Override public void reset ( ) throws IOException { fInputStream . reset ( ) ; }
Creates a file including parent directories if it does not yet exist.
501
public byte [ ] encode ( ) { char type = getAttributeType ( ) ; byte binValue [ ] = new byte [ HEADER_LENGTH + getDataLength ( ) + ( 4 - getDataLength ( ) % 4 ) % 4 ] ; binValue [ 0 ] = ( byte ) ( type > > 8 ) ; binValue [ 1 ] = ( byte ) ( type & 0x00FF ) ; binValue [ 2 ] = ( byte ) ( getDataLength ( ) > > 8 ) ; binValue [ 3 ] = ( byte ) ( getDataLength ( ) & 0x00FF ) ; System . arraycopy ( username , 0 , binValue , 4 , getDataLength ( ) ) ; return binValue ; }
Initializes coordinator since date (if needed).
502
public LongStreamEx prepend ( LongStream other ) { return new LongStreamEx ( LongStream . concat ( other , stream ( ) ) , context . combine ( other ) ) ; }
Restart bookie servers using new configuration settings. Also restart the respective auto recovery process, if isAutoRecoveryEnabled is true.
503
public void disconnect ( ) { connected = false ; synchronized ( connLostWait ) { connLostWait . notify ( ) ; } if ( mqtt != null ) { try { mqtt . disconnect ( ) ; } catch ( Exception ex ) { setTitleText ( "MQTT disconnect error !" ) ; ex . printStackTrace ( ) ; System . exit ( 1 ) ; } } if ( led . isFlashing ( ) ) { led . setFlash ( ) ; } led . setRed ( ) ; setConnected ( false ) ; synchronized ( this ) { writeLogln ( "WebSphere MQ Telemetry transport disconnected" ) ; } }
We only want the current page that is being shown to be focusable.
504
private void addCdataSectionElement ( String URI_and_localName , Vector v ) { StringTokenizer tokenizer = new StringTokenizer ( URI_and_localName , "{}" , false ) ; String s1 = tokenizer . nextToken ( ) ; String s2 = tokenizer . hasMoreTokens ( ) ? tokenizer . nextToken ( ) : null ; if ( null == s2 ) { v . addElement ( null ) ; v . addElement ( s1 ) ; } else { v . addElement ( s1 ) ; v . addElement ( s2 ) ; } }
Validates that a specified XML opening and closing set of tags are not present in the message.
505
private void checkPermissions ( ) { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { Enumeration < Permission > enum_ = permissions . elements ( ) ; while ( enum_ . hasMoreElements ( ) ) { sm . checkPermission ( enum_ . nextElement ( ) ) ; } } }
inject details needed for Scanning
506
public SpanManager delete ( int start , int end ) { sb . delete ( start , end ) ; adjustLists ( start , start - end ) ; if ( calculateSrcPositions ) for ( int i = 0 ; i < end - start ; i ++ ) ib . remove ( start ) ; return this ; }
On message received handler
507
@ OnError public void onError ( Session session , Throwable t ) { callInternal ( "onError" , session , t . getMessage ( ) ) ; logger . error ( t . getMessage ( ) , t ) ; }
Points in total document collection to draw queue from (for randomization without excessive seek time)
508
public void removeStrategy ( final WeightingStrategy strategy ) { strategies_ . remove ( strategy ) ; }
Assumption: server won't require credentials to access the protocol path.
509
public static GeneralPath cardinalSpline ( GeneralPath p , float pts [ ] , int start , int npoints , float slack , boolean closed , float tx , float ty ) { try { int len = 2 * npoints ; int end = start + len ; if ( len < 6 ) { throw new IllegalArgumentException ( "To create spline requires at least 3 points" ) ; } float dx1 , dy1 , dx2 , dy2 ; if ( closed ) { dx2 = pts [ start + 2 ] - pts [ end - 2 ] ; dy2 = pts [ start + 3 ] - pts [ end - 1 ] ; } else { dx2 = pts [ start + 4 ] - pts [ start ] ; dy2 = pts [ start + 5 ] - pts [ start + 1 ] ; } int i ; for ( i = start + 2 ; i < end - 2 ; i += 2 ) { dx1 = dx2 ; dy1 = dy2 ; dx2 = pts [ i + 2 ] - pts [ i - 2 ] ; dy2 = pts [ i + 3 ] - pts [ i - 1 ] ; p . curveTo ( tx + pts [ i - 2 ] + slack * dx1 , ty + pts [ i - 1 ] + slack * dy1 , tx + pts [ i ] - slack * dx2 , ty + pts [ i + 1 ] - slack * dy2 , tx + pts [ i ] , ty + pts [ i + 1 ] ) ; } if ( closed ) { dx1 = dx2 ; dy1 = dy2 ; dx2 = pts [ start ] - pts [ i - 2 ] ; dy2 = pts [ start + 1 ] - pts [ i - 1 ] ; p . curveTo ( tx + pts [ i - 2 ] + slack * dx1 , ty + pts [ i - 1 ] + slack * dy1 , tx + pts [ i ] - slack * dx2 , ty + pts [ i + 1 ] - slack * dy2 , tx + pts [ i ] , ty + pts [ i + 1 ] ) ; dx1 = dx2 ; dy1 = dy2 ; dx2 = pts [ start + 2 ] - pts [ end - 2 ] ; dy2 = pts [ start + 3 ] - pts [ end - 1 ] ; p . curveTo ( tx + pts [ end - 2 ] + slack * dx1 , ty + pts [ end - 1 ] + slack * dy1 , tx + pts [ 0 ] - slack * dx2 , ty + pts [ 1 ] - slack * dy2 , tx + pts [ 0 ] , ty + pts [ 1 ] ) ; p . closePath ( ) ; } else { p . curveTo ( tx + pts [ i - 2 ] + slack * dx2 , ty + pts [ i - 1 ] + slack * dy2 , tx + pts [ i ] - slack * dx2 , ty + pts [ i + 1 ] - slack * dy2 , tx + pts [ i ] , ty + pts [ i + 1 ] ) ; } } catch ( IllegalPathStateException ex ) { } return p ; }
Add to Actual Min Qty
510
public WildcardFileFilter ( String [ ] wildcards , IOCase caseSensitivity ) { if ( wildcards == null ) { throw new IllegalArgumentException ( "The wildcard array must not be null" ) ; } this . wildcards = new String [ wildcards . length ] ; System . arraycopy ( wildcards , 0 , this . wildcards , 0 , wildcards . length ) ; this . caseSensitivity = caseSensitivity == null ? IOCase . SENSITIVE : caseSensitivity ; }
Return the element at the current position, if present.
511
public static Pair < Integer , Boolean > parseInfoFromFilename ( String name ) { try { if ( name . startsWith ( SAVED_TAB_STATE_FILE_PREFIX_INCOGNITO ) ) { int id = Integer . parseInt ( name . substring ( SAVED_TAB_STATE_FILE_PREFIX_INCOGNITO . length ( ) ) ) ; return Pair . create ( id , true ) ; } else if ( name . startsWith ( SAVED_TAB_STATE_FILE_PREFIX ) ) { int id = Integer . parseInt ( name . substring ( SAVED_TAB_STATE_FILE_PREFIX . length ( ) ) ) ; return Pair . create ( id , false ) ; } } catch ( NumberFormatException ex ) { } return null ; }
Compute new replacement length for string replacement.
512
public byte [ ] decode ( String s ) { byte [ ] b = new byte [ ( s . length ( ) / 4 ) * 3 ] ; int cycle = 0 ; int combined = 0 ; int j = 0 ; int len = s . length ( ) ; int dummies = 0 ; for ( int i = 0 ; i < len ; i ++ ) { int c = s . charAt ( i ) ; int value = ( c <= 255 ) ? charToValue [ c ] : IGNORE ; switch ( value ) { case IGNORE : break ; case PAD : value = 0 ; dummies ++ ; default : switch ( cycle ) { case 0 : combined = value ; cycle = 1 ; break ; case 1 : combined <<= 6 ; combined |= value ; cycle = 2 ; break ; case 2 : combined <<= 6 ; combined |= value ; cycle = 3 ; break ; case 3 : combined <<= 6 ; combined |= value ; b [ j + 2 ] = ( byte ) combined ; combined >>>= 8 ; b [ j + 1 ] = ( byte ) combined ; combined >>>= 8 ; b [ j ] = ( byte ) combined ; j += 3 ; cycle = 0 ; break ; } break ; } } if ( cycle != 0 ) { throw new ArrayIndexOutOfBoundsException ( "Input to decode not an even multiple of 4 characters; pad with =." ) ; } j -= dummies ; if ( b . length != j ) { byte [ ] b2 = new byte [ j ] ; System . arraycopy ( b , 0 , b2 , 0 , j ) ; b = b2 ; } return b ; }
Establish the location of a mirror
513
protected void initializeConnection ( MQTTClientProvider provider ) throws Exception { if ( ! isUseSSL ( ) ) { provider . connect ( "tcp://localhost:" + port ) ; } else { SSLContext ctx = SSLContext . getInstance ( "TLS" ) ; ctx . init ( new KeyManager [ 0 ] , new TrustManager [ ] { new DefaultTrustManager ( ) } , new SecureRandom ( ) ) ; provider . setSslContext ( ctx ) ; provider . connect ( "ssl://localhost:" + port ) ; } }
Add an String at (x,y) coordinates
514
public void filterRows ( ) { if ( m_parent == null ) return ; CascadedRowManager rowman = ( CascadedRowManager ) m_rows ; IntIterator crows = m_rows . rows ( ) ; while ( crows . hasNext ( ) ) { int crow = crows . nextInt ( ) ; if ( ! m_rowFilter . getBoolean ( m_parent . getTuple ( rowman . getParentRow ( crow ) ) ) ) { removeCascadedRow ( crow ) ; } } Iterator ptuples = m_parent . tuples ( m_rowFilter ) ; while ( ptuples . hasNext ( ) ) { Tuple pt = ( Tuple ) ptuples . next ( ) ; int prow = pt . getRow ( ) ; if ( rowman . getChildRow ( prow ) == - 1 ) addCascadedRow ( prow ) ; } }
Stage two password hashing used in MySQL 4.1 password handling
515
public int versionPointNumber ( ) { return Integer . valueOf ( properties . getProperty ( "version.point" ) ) ; }
Finds the first occurrence of a character in the given source but within limited range (start, end].
516
private String [ ] splitSeparator ( String sep , String s ) { Vector v = new Vector ( ) ; int tokenStart = 0 ; int tokenEnd = 0 ; while ( ( tokenEnd = s . indexOf ( sep , tokenStart ) ) != - 1 ) { v . addElement ( s . substring ( tokenStart , tokenEnd ) ) ; tokenStart = tokenEnd + 1 ; } v . addElement ( s . substring ( tokenStart ) ) ; String [ ] retVal = new String [ v . size ( ) ] ; v . copyInto ( retVal ) ; return retVal ; }
Check whether the address is owned by IANA or is the broadcast address (FF:FF:FF:FF:FF:FF). TODO(lerner): Improve this check. We might want to reject all multicast/broadcast and such; addresses not assigned to anyone; or other reserved addresses that I might not have been able to find.
517
static boolean advanceToFirstFont ( AttributedCharacterIterator aci ) { for ( char ch = aci . first ( ) ; ch != CharacterIterator . DONE ; ch = aci . setIndex ( aci . getRunLimit ( ) ) ) { if ( aci . getAttribute ( TextAttribute . CHAR_REPLACEMENT ) == null ) { return true ; } } return false ; }
Invoked from the MouseWheelListener interface.
518
private static int count ( String pattern , String [ ] possibleValues ) { int count = 0 ; for ( String r : possibleValues ) { if ( pattern . contains ( r ) ) { count ++ ; } } return count ; }
Returns true or false depending on whether the great circle seg from point p1 to point p2 intersects the circle of radius (radians) around center.
519
private float interpolate ( ) { long currTime = System . currentTimeMillis ( ) ; float elapsed = ( currTime - startTime ) / ZOOM_TIME ; elapsed = Math . min ( 1f , elapsed ) ; return interpolator . getInterpolation ( elapsed ) ; }
Executes main() method of the given class in a separate system process.
520
public static Module load ( int id ) { return modules . get ( id ) ; }
Checks if a player has harvested a minimum number of an item
521
public Future < Void > updateTableEntityAsync ( TableEntity tableEntity , boolean commit ) { updateTableEntity ( tableEntity , commit ) ; return new AsyncResult < Void > ( null ) ; }
Atomically removes all of the elements from this queue. The queue will be empty after this call returns.
522
boolean hasNextSFeature ( ) { return ( sFeatureIdx < sFeatures . size ( ) ) ; }
Converts all separators to the Windows separator of backslash.
523
public void testValueOfLongPositive2 ( ) { long longVal = 58930018L ; BigInteger aNumber = BigInteger . valueOf ( longVal ) ; byte rBytes [ ] = { 3 , - 125 , 51 , 98 } ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = aNumber . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , aNumber . signum ( ) ) ; }
Returns the quadrants which the second rect contains in itself fully.
524
private boolean processSingleEvent ( ) { if ( eventBuffer . remaining ( ) < 20 ) { return false ; } try { eventBuffer . getInt ( ) ; final int bufferLength = eventBuffer . getInt ( ) ; final int padding = ( 4 - bufferLength ) & 3 ; if ( eventBuffer . remaining ( ) < bufferLength + padding + 12 ) return false ; final byte [ ] buffer = new byte [ bufferLength ] ; eventBuffer . get ( buffer ) ; eventBuffer . position ( eventBuffer . position ( ) + padding ) ; int eventCount = 0 ; if ( bufferLength > 4 ) { eventCount = iscVaxInteger ( buffer , bufferLength - 4 , 4 ) ; } eventBuffer . getLong ( ) ; int eventId = eventBuffer . getInt ( ) ; log . debug ( String . format ( "Received event id %d, eventCount %d" , eventId , eventCount ) ) ; channelListenerDispatcher . eventReceived ( this , new AsynchronousChannelListener . Event ( eventId , eventCount ) ) ; return true ; } catch ( BufferUnderflowException ex ) { return false ; } }
Check whether a peer exists.
525
@ Override public String toString ( ) { return name ; }
Main function entry point;
526
public static < T > GitNoteWriter < T > createNoteWriter ( String reviewCommitHash , final Repository db , PersonIdent author , String ref ) { return new GitNoteWriter < T > ( reviewCommitHash , db , ref , author ) ; }
Constructs a tokenizer splitting on space, tab, newline and formfeed as per StringTokenizer.
527
private Element toElement ( ScheduleTask task ) { Element el = doc . createElement ( "task" ) ; setAttributes ( el , task ) ; return el ; }
assumes the network cache is also up to date, if it's not, call scanNetwork
528
public static int intHash ( String ipString ) { int val = 0 ; String [ ] strs = ipString . split ( "[^\\p{XDigit}]" ) ; int len = strs . length ; if ( len >= 4 ) { val = intVal ( strs [ 0 ] ) ; val <<= 8 ; val |= intVal ( strs [ 1 ] ) ; val <<= 8 ; val |= intVal ( strs [ 2 ] ) ; val <<= 8 ; val |= intVal ( strs [ 3 ] ) ; } return val ; }
Returns all the foos where field2 = &#63;.
529
public FluentJdbcBuilder connectionProvider ( ConnectionProvider connectionProvider ) { checkNotNull ( connectionProvider , "connectionProvider" ) ; this . connectionProvider = Optional . of ( connectionProvider ) ; return this ; }
Create a new instance
530
public static void register ( String modelName , IWindModel model , int awesomeness ) { models . put ( modelName , model ) ; if ( modelName . equalsIgnoreCase ( userModelChoice ) ) { awesomeness = Integer . MAX_VALUE ; } if ( awesomeness > best ) { best = awesomeness ; activeModel = model ; } }
Or for zero and zero
531
public void notifyTransactionTerminated ( CompositeTransaction ct ) { boolean notifyOfTerminatedEvent = false ; synchronized ( this ) { boolean alreadyTerminated = isTerminated ( ) ; Iterator < TransactionContext > it = allContexts . iterator ( ) ; while ( it . hasNext ( ) ) { TransactionContext b = it . next ( ) ; b . transactionTerminated ( ct ) ; } if ( isTerminated ( ) && ! alreadyTerminated ) notifyOfTerminatedEvent = true ; } if ( notifyOfTerminatedEvent ) { if ( LOGGER . isTraceEnabled ( ) ) LOGGER . logTrace ( this + ": all contexts terminated, firing TerminatedEvent for " + this ) ; fireTerminatedEvent ( ) ; } }
javax.crypto.Cipher#init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
532
public JCDiagnostic create ( DiagnosticType kind , DiagnosticSource source , DiagnosticPosition pos , String key , Object ... args ) { return create ( kind , null , EnumSet . noneOf ( DiagnosticFlag . class ) , source , pos , key , args ) ; }
Removes all map event listeners.
533
public void exportTree ( Tree tree ) { Map < String , Integer > idMap = writeNexusHeader ( tree ) ; out . println ( "\t\t;" ) ; writeNexusTree ( tree , treePrefix + 1 , true , idMap ) ; out . println ( "End;" ) ; }
Send a WARNING log message
534
ArchivedDesktopComponent addDesktopComponent ( final org . simbrain . workspace . gui . GuiComponent < ? > dc ) { return desktopComponent = new ArchivedDesktopComponent ( this , dc ) ; }
Handles a 'mouse exited' event. This method resets the tooltip delays of ToolTipManager.sharedInstance() to their original values in effect before mouseEntered()
535
public static File createTempDir ( ) { return createTempDir ( new File ( System . getProperty ( "java.io.tmpdir" ) ) ) ; }
Filters the statistics using the specified filter.
536
private void extendColourMap ( int highest ) { for ( int i = m_colorList . size ( ) ; i < highest ; i ++ ) { Color pc = m_DefaultColors [ i % 10 ] ; int ija = i / 10 ; ija *= 2 ; for ( int j = 0 ; j < ija ; j ++ ) { pc = pc . brighter ( ) ; } m_colorList . add ( pc ) ; } }
Generate a remove animation for a child view.
537
protected void processResult ( final Operation operation , final Object result , final Command commandObj ) throws BaseCollectionException { Processor _processor = null ; _processor = operation . getProcessor ( ) ; if ( null != _processor ) { List < Object > argsList = new ArrayList < Object > ( ) ; argsList . add ( Util . normalizedReadArgs ( _keyMap , commandObj . retreiveArguments ( ) ) ) ; argsList . add ( commandObj . getCommandIndex ( ) ) ; _processor . setPrerequisiteObjects ( argsList ) ; _processor . processResult ( operation , result , _keyMap ) ; } else { _LOGGER . debug ( "No Processors found to execute. " ) ; } }
Get the value of property with specific key
538
public static String stringFilterStrict ( String searchText ) { return searchText . replaceAll ( "[^ a-zA-Z0-9\\u4e00-\\u9fa5]" , "" ) ; }
Check if we are dragging stack in a wrong direction.
539
public Enumeration enumurateQueue ( ) { Vector elements = new Vector ( ) ; synchronized ( LOCK ) { Enumeration e = pending . elements ( ) ; while ( e . hasMoreElements ( ) ) { elements . addElement ( e . nextElement ( ) ) ; } } return elements . elements ( ) ; }
Decodes a URL safe string into its original form using the specified encoding. Escaped characters are converted back to their original representation.
540
public boolean hasPrevious ( ) { return iterator . hasPrevious ( ) ; }
Indicates if the given period is valid for data entry for this data set. Returns true if the given period is null.
541
private void captionPut ( int value , String text ) { captionMap . put ( new Integer ( value ) , text ) ; }
Construct SchedulerStateManagerAdaptor providing only the interfaces used by scheduler.
542
public void sortLocations ( ) { if ( l_locations . isEmpty ( ) ) return ; Collections . sort ( l_locations ) ; PBLocation fst = l_locations . get ( 0 ) , loc ; if ( ! fst . isType ( StringConst . EMPTY ) ) { for ( int i = 1 ; i < l_locations . size ( ) ; i ++ ) { loc = l_locations . get ( i ) ; if ( loc . isType ( StringConst . EMPTY ) ) { loc . setType ( fst . getType ( ) ) ; break ; } } fst . setType ( StringConst . EMPTY ) ; } }
Paint a cached formula
543
private static int uarimaxGt ( double value , double [ ] bv , int bvi [ ] , BinaryOperator bOp ) throws DMLRuntimeException { int ixMax = bv . length ; if ( value <= bv [ 0 ] || value > bv [ bv . length - 1 ] ) return ixMax ; int ix = Arrays . binarySearch ( bv , value ) ; ix = Math . abs ( ix ) - 1 ; ixMax = bvi [ ix - 1 ] + 1 ; return ixMax ; }
generate array of n d-dimensional points whose coordinates are values in the range 0 .. scale
544
private void persistVolumeNativeID ( DbClient dbClient , URI volumeId , String nativeID , Calendar creationTime ) throws IOException { Volume volume = dbClient . queryObject ( Volume . class , volumeId ) ; volume . setCreationTime ( creationTime ) ; volume . setNativeId ( nativeID ) ; volume . setNativeGuid ( NativeGUIDGenerator . generateNativeGuid ( dbClient , volume ) ) ; dbClient . updateObject ( volume ) ; }
Prepares the data for RP volume tests.
545
public Whitelist ( ) { this . patterns = Collections . emptyList ( ) ; this . statusCode = - 1 ; this . enabled = false ; }
Deletes directory's content and then deletes directory itself. Deleting is not recursive.
546
protected Node conditionalExprPromotion ( Node node , TypeMirror destType ) { TypeMirror nodeType = node . getType ( ) ; if ( types . isSameType ( nodeType , destType ) ) { return node ; } if ( TypesUtils . isPrimitive ( nodeType ) && TypesUtils . isBoxedPrimitive ( destType ) ) { return box ( node ) ; } boolean isBoxedPrimitive = TypesUtils . isBoxedPrimitive ( nodeType ) ; TypeMirror unboxedNodeType = isBoxedPrimitive ? types . unboxedType ( nodeType ) : nodeType ; TypeMirror unboxedDestType = TypesUtils . isBoxedPrimitive ( destType ) ? types . unboxedType ( destType ) : destType ; if ( TypesUtils . isNumeric ( unboxedNodeType ) && TypesUtils . isNumeric ( unboxedDestType ) ) { if ( unboxedNodeType . getKind ( ) == TypeKind . BYTE && destType . getKind ( ) == TypeKind . SHORT ) { if ( isBoxedPrimitive ) { node = unbox ( node ) ; } return widen ( node , destType ) ; } TypeKind destKind = destType . getKind ( ) ; if ( destKind == TypeKind . BYTE || destKind == TypeKind . CHAR || destKind == TypeKind . SHORT ) { if ( isBoxedPrimitive ) { return unbox ( node ) ; } else if ( nodeType . getKind ( ) == TypeKind . INT ) { return narrow ( node , destType ) ; } } return binaryNumericPromotion ( node , destType ) ; } if ( TypesUtils . isPrimitive ( nodeType ) && ( destType . getKind ( ) == TypeKind . DECLARED || destType . getKind ( ) == TypeKind . UNION || destType . getKind ( ) == TypeKind . INTERSECTION ) ) { return box ( node ) ; } return node ; }
Add the certificates in certStore to the certificate set to be included with the generated SignedData message.
547
public void removeConnection ( Connection conn ) { int removalIndex = findConnection ( conn ) ; if ( removalIndex != - 1 ) { mConnections . remove ( removalIndex ) ; } }
Add a new pending lock to the manager. Throws an exception if the lock would overlap an existing lock. Once the lock is acquired it remains in this set as an acquired lock.
548
public AttrSet read ( java . security . Principal principal , Guid guid , String attrNames [ ] ) throws UMSException { String id = guid . getDn ( ) ; ConnectionEntryReader entryReader ; SearchRequest request = LDAPRequests . newSearchRequest ( id , SearchScope . BASE_OBJECT , "(objectclass=*)" , attrNames ) ; entryReader = readLDAPEntry ( principal , request ) ; if ( entryReader == null ) { throw new AccessRightsException ( id ) ; } Collection < Attribute > attrs = new ArrayList < > ( ) ; try ( ConnectionEntryReader reader = entryReader ) { while ( reader . hasNext ( ) ) { if ( reader . isReference ( ) ) { reader . readReference ( ) ; } SearchResultEntry entry = entryReader . readEntry ( ) ; for ( Attribute attr : entry . getAllAttributes ( ) ) { attrs . add ( attr ) ; } } if ( attrs . isEmpty ( ) ) { throw new EntryNotFoundException ( i18n . getString ( IUMSConstants . ENTRY_NOT_FOUND , new String [ ] { id } ) ) ; } return new AttrSet ( attrs ) ; } catch ( IOException e ) { throw new UMSException ( i18n . getString ( IUMSConstants . UNABLE_TO_READ_ENTRY , new String [ ] { id } ) , e ) ; } }
Read point data from a Reader
549
protected int selectOperator ( ) { lastUpdate ++ ; if ( ( lastUpdate >= UPDATE_WINDOW ) || ( probabilities == null ) ) { lastUpdate = 0 ; probabilities = getOperatorProbabilities ( ) ; } double rand = PRNG . nextDouble ( ) ; double sum = 0.0 ; for ( int i = 0 ; i < operators . size ( ) ; i ++ ) { sum += probabilities [ i ] ; if ( sum > rand ) { return i ; } } throw new IllegalStateException ( ) ; }
Check if Vitamio is initialized at this device
550
private Function < String , TagState > newTagRetriever ( TaggingClient client ) { return null ; }
Returns the index of the last directory separator character. <p> This method will handle a file in either Unix or Windows format. The position of the last forward or backslash is returned. <p> The output will be the same irrespective of the machine that the code is running on.
551
public static Map < String , List < DataFileFooter > > createDataFileFooterMappingForSegments ( List < TableBlockInfo > tableBlockInfoList ) throws IndexBuilderException { Map < String , List < DataFileFooter > > segmentBlockInfoMapping = new HashMap < > ( ) ; for ( TableBlockInfo blockInfo : tableBlockInfoList ) { List < DataFileFooter > eachSegmentBlocks = new ArrayList < > ( ) ; String segId = blockInfo . getSegmentId ( ) ; DataFileFooter dataFileMatadata = null ; List < DataFileFooter > metadataList = segmentBlockInfoMapping . get ( segId ) ; try { dataFileMatadata = CarbonUtil . readMetadatFile ( blockInfo . getFilePath ( ) , blockInfo . getBlockOffset ( ) , blockInfo . getBlockLength ( ) ) ; } catch ( CarbonUtilException e ) { throw new IndexBuilderException ( e ) ; } if ( null == metadataList ) { eachSegmentBlocks . add ( dataFileMatadata ) ; segmentBlockInfoMapping . put ( segId , eachSegmentBlocks ) ; } else { metadataList . add ( dataFileMatadata ) ; } } return segmentBlockInfoMapping ; }
Installs the editor for the kit.
552
public T add ( T e ) { T oldE = null ; while ( ! buffer . offerLast ( e ) ) { oldE = buffer . poll ( ) ; } return oldE ; }
Computes the length of the rhumb line between two locations. The return value gives the distance as the angular distance between the two positions on the pi radius circle. In radians, this angle is also the arc length of the segment between the two positions on that circle. To compute a distance in meters from this value, multiply it by the radius of the globe.
553
static ArrayList < String > loadImage ( File file ) throws FileNotFoundException , RuntimeException { if ( file == null ) return null ; Scanner sc ; sc = new Scanner ( file ) ; ArrayList < String > rows = new ArrayList < String > ( ) ; String s = sc . nextLine ( ) ; int len = s . length ( ) ; int idx = 1 ; rows . add ( s ) ; while ( sc . hasNext ( ) ) { idx ++ ; s = sc . nextLine ( ) ; if ( s . length ( ) != len ) { sc . close ( ) ; throw new RuntimeException ( "Line " + idx + " only has " + s . length ( ) + " characters (should have " + len + ")" ) ; } rows . add ( s ) ; } sc . close ( ) ; return rows ; }
Finds the index entry with closest matching resource name for a given resource name Known problem : if the resourceName happens to be a super resource of more than one top level entry, one top level entry is returned. Which top level entry is returned is indeterminate
554
public static String cutpointsToString ( double [ ] cutPoints , boolean [ ] cutAndLeft ) { StringBuffer text = new StringBuffer ( "" ) ; if ( cutPoints == null ) { text . append ( "\n# no cutpoints found - attribute \n" ) ; } else { text . append ( "\n#* " + cutPoints . length + " cutpoint(s) -\n" ) ; for ( int i = 0 ; i < cutPoints . length ; i ++ ) { text . append ( "# " + cutPoints [ i ] + " " ) ; text . append ( "" + cutAndLeft [ i ] + "\n" ) ; } text . append ( "# end\n" ) ; } return text . toString ( ) ; }
Unit test for WITH {subquery} AS "name" and INCLUDE. The WITH must be in the top-level query. This is specifically for Trac 746 which crashed out during optimize. So the test simply runs that far, and does not verify anything other than the ability to optimize without an exception
555
private static int capacity ( int expectedMaxSize ) { return ( expectedMaxSize > MAXIMUM_CAPACITY / 3 ) ? MAXIMUM_CAPACITY : ( expectedMaxSize <= 2 * MINIMUM_CAPACITY / 3 ) ? MINIMUM_CAPACITY : Integer . highestOneBit ( expectedMaxSize + ( expectedMaxSize << 1 ) ) ; }
Constructs the popupmenu & actionlistener associated with the table & model.
556
private void resizeNameColumn ( int diff , boolean resizeStatisticPanels ) { if ( diff != 0 ) { if ( nameDim == null ) { nameDim = new Dimension ( DIMENSION_HEADER_ATTRIBUTE_NAME . width + diff , DIMENSION_HEADER_ATTRIBUTE_NAME . height ) ; } else { int newWidth = nameDim . width + diff ; int minWidth = RESIZE_MARGIN_SHRINK ; int maxWidth = columnHeaderPanel . getWidth ( ) - ( DIMENSION_HEADER_MISSINGS . width + DIMENSION_HEADER_TYPE . width + DIMENSION_SEARCH_FIELD . width + RESIZE_MARGIN_ENLARGE ) ; if ( newWidth > maxWidth ) { newWidth = maxWidth ; } if ( newWidth < minWidth ) { newWidth = minWidth ; } nameDim = new Dimension ( newWidth , nameDim . height ) ; } sortingLabelAttName . setMinimumSize ( nameDim ) ; sortingLabelAttName . setPreferredSize ( nameDim ) ; columnHeaderPanel . revalidate ( ) ; columnHeaderPanel . repaint ( ) ; } if ( resizeStatisticPanels ) { revalidateAttributePanels ( ) ; } }
Loads a classifier builder from manifest in the training directory.
557
public void copyCheckpointsFromInstallationDirectory ( String destinationCheckpointsFilename ) throws IOException { if ( destinationCheckpointsFilename == null ) { return ; } File destinationCheckpoints = new File ( destinationCheckpointsFilename ) ; if ( ! destinationCheckpoints . exists ( ) ) { File directory = new File ( "." ) ; String currentWorkingDirectory = directory . getCanonicalPath ( ) ; String filePrefix = MultiBitService . getFilePrefix ( ) ; String checkpointsFilename = filePrefix + MultiBitService . CHECKPOINTS_SUFFIX ; String sourceCheckpointsFilename = currentWorkingDirectory + File . separator + checkpointsFilename ; File sourceBlockcheckpoints = new File ( sourceCheckpointsFilename ) ; if ( sourceBlockcheckpoints . exists ( ) && ! destinationCheckpointsFilename . equals ( sourceCheckpointsFilename ) ) { log . info ( "Copying checkpoints from '" + sourceCheckpointsFilename + "' to '" + destinationCheckpointsFilename + "'" ) ; copyFile ( sourceBlockcheckpoints , destinationCheckpoints ) ; long sourceLength = sourceBlockcheckpoints . length ( ) ; long destinationLength = destinationCheckpoints . length ( ) ; if ( sourceLength != destinationLength ) { String errorText = "Checkpoints were not copied to user's application data directory correctly.\nThe source checkpoints '" + sourceCheckpointsFilename + "' is of length " + sourceLength + "\nbut the destination checkpoints '" + destinationCheckpointsFilename + "' is of length " + destinationLength ; log . error ( errorText ) ; throw new FileHandlerException ( errorText ) ; } } } }
Checks if a given URI is a numeric datatype URI.
558
public static boolean isValidBedGraphLine ( String line ) { String [ ] bdg = line . split ( "\t" ) ; if ( bdg . length < 4 ) { return false ; } try { Integer . parseInt ( bdg [ 1 ] ) ; Integer . parseInt ( bdg [ 2 ] ) ; } catch ( NumberFormatException e ) { return false ; } return true ; }
Check target components and add components, which don't have no constraints
559
public boolean checkArguments ( List arguments ) { boolean validArgs = true ; if ( arguments != null && arguments . size ( ) > 0 ) { String specifiedArgs = formatArgs ( arguments ) ; Debug . log ( "MigrateHandler: invalid argument(s) specified - " + specifiedArgs ) ; printConsoleMessage ( LOC_HR_MSG_INVALID_OPTION , new Object [ ] { specifiedArgs } ) ; validArgs = false ; } return validArgs ; }
Declare a named in-memory cache.
560
public static final void initZK ( ZooKeeper zkc , String selfBrokerUrl ) { try { LocalZooKeeperConnectionService . checkAndCreatePersistNode ( zkc , OWNER_INFO_ROOT ) ; cleanupNamespaceNodes ( zkc , OWNER_INFO_ROOT , selfBrokerUrl ) ; } catch ( Exception e ) { LOG . error ( e . getMessage ( ) , e ) ; throw new RuntimeException ( e ) ; } }
Returns a descriptive string for an opcode.
561
public E peekForward ( ) { int nextPos = ( pos + 1 ) % size ; if ( nextPos >= data . size ( ) || pos == end ) { return null ; } return data . get ( nextPos ) ; }
Returns a hash code for this object.
562
public boolean addAll ( int index , Collection c ) { int numNew = c . size ( ) ; synchronized ( this ) { Object [ ] elements = getArray ( ) ; int len = elements . length ; if ( index > len || index < 0 ) throw new IndexOutOfBoundsException ( "Index: " + index + ", Size: " + len ) ; if ( numNew == 0 ) return false ; int numMoved = len - index ; Object [ ] newElements ; if ( numMoved == 0 ) newElements = copyOf ( elements , len + numNew ) ; else { newElements = new Object [ len + numNew ] ; System . arraycopy ( elements , 0 , newElements , 0 , index ) ; System . arraycopy ( elements , index , newElements , index + numNew , numMoved ) ; } for ( Iterator itr = c . iterator ( ) ; itr . hasNext ( ) ; ) { Object e = itr . next ( ) ; newElements [ index ++ ] = e ; } setArray ( newElements ) ; return true ; } }
Find the _Fields constant that matches fieldId, or null if its not found.
563
public boolean isCellEditable ( EventObject e ) { if ( e instanceof MouseEvent ) { for ( int counter = getColumnCount ( ) - 1 ; counter >= 0 ; counter -- ) { if ( getColumnClass ( counter ) == TreeTableModel . class ) { MouseEvent me = ( MouseEvent ) e ; MouseEvent newME = new MouseEvent ( tree , me . getID ( ) , me . getWhen ( ) , me . getModifiers ( ) , me . getX ( ) - getCellRect ( 0 , counter , true ) . x , me . getY ( ) , me . getClickCount ( ) , me . isPopupTrigger ( ) ) ; tree . dispatchEvent ( newME ) ; break ; } } } return false ; }
Parses the given bytes using writeRawLittleEndian64() and checks that the result matches the given value.
564
protected static boolean isValidClassname ( String classname ) { return ( classname . indexOf ( "$" ) == - 1 ) ; }
Computes the fast fourier transform
565
public static InternalDistributedMember readEssentialData ( DataInput in ) throws IOException , ClassNotFoundException { final InternalDistributedMember mbr = new InternalDistributedMember ( ) ; mbr . _readEssentialData ( in ) ; return mbr ; }
Runs the test case.
566
private boolean eval ( final int value , final int threshold ) { LOGGER . debug ( "eval: " + value + ", " + threshold ) ; if ( threshold < 0 ) { LOGGER . debug ( value < Math . abs ( threshold ) ) ; return value < Math . abs ( threshold ) ; } else { LOGGER . debug ( value >= Math . abs ( threshold ) ) ; return value >= threshold ; } }
Merges this rectangle with the other rectangle.
567
public String toString ( ) { long ncompleted ; int nworkers , nactive ; final ReentrantLock mainLock = this . mainLock ; mainLock . lock ( ) ; try { ncompleted = completedTaskCount ; nactive = 0 ; nworkers = workers . size ( ) ; for ( Worker w : workers ) { ncompleted += w . completedTasks ; if ( w . isLocked ( ) ) ++ nactive ; } } finally { mainLock . unlock ( ) ; } int c = ctl . get ( ) ; String rs = ( runStateLessThan ( c , SHUTDOWN ) ? "Running" : ( runStateAtLeast ( c , TERMINATED ) ? "Terminated" : "Shutting down" ) ) ; return super . toString ( ) + "[" + rs + ", pool size = " + nworkers + ", active threads = " + nactive + ", queued tasks = " + workQueue . size ( ) + ", completed tasks = " + ncompleted + "]" ; }
Returns the logs of the joint densities for a given instance.
568
public static String hex ( float f ) { return Integer . toHexString ( Float . floatToIntBits ( f ) ) ; }
Gets the IDs of the references, as a list of strings.
569
public synchronized Object remove ( int index ) { Object [ ] elements = getArray ( ) ; int len = elements . length ; Object oldValue = elements [ index ] ; int numMoved = len - index - 1 ; if ( numMoved == 0 ) setArray ( copyOf ( elements , len - 1 ) ) ; else { Object [ ] newElements = new Object [ len - 1 ] ; System . arraycopy ( elements , 0 , newElements , 0 , index ) ; System . arraycopy ( elements , index + 1 , newElements , index , numMoved ) ; setArray ( newElements ) ; } return oldValue ; }
Creates a RequestBody from a mediaType and gzip-ed body string
570
public void testCompositeAttributeCanBeNull ( ) throws Exception { HtmlPage page = getPage ( "/faces/composite/defaultAttributeValueExpression_1986.xhtml" ) ; assertElementAttributeEquals ( page , "WithValueNull:Input" , "value" , "" ) ; assertElementAttributeEquals ( page , "WithValueEmpty:Input" , "value" , "" ) ; }
Write the keystore password so the server will correctly start if the server is configured to enable ssl. This writes to the defaults directory so other definitions of the password override.
571
public static String doubleToString ( double d ) { if ( Double . isInfinite ( d ) || Double . isNaN ( d ) ) { return "null" ; } String string = Double . toString ( d ) ; if ( string . indexOf ( '.' ) > 0 && string . indexOf ( 'e' ) < 0 && string . indexOf ( 'E' ) < 0 ) { while ( string . endsWith ( "0" ) ) { string = string . substring ( 0 , string . length ( ) - 1 ) ; } if ( string . endsWith ( "." ) ) { string = string . substring ( 0 , string . length ( ) - 1 ) ; } } return string ; }
Escapes all " ' \ tabs and newlines
572
@ Override public Enumeration < Option > listOptions ( ) { Vector < Option > result = new Vector < Option > ( 11 ) ; result . addElement ( new Option ( "\tThe minimum threshold. (default -Double.MAX_VALUE)" , "min" , 1 , "-min <double>" ) ) ; result . addElement ( new Option ( "\tThe replacement for values smaller than the minimum threshold.\n" + "\t(default -Double.MAX_VALUE)" , "min-default" , 1 , "-min-default <double>" ) ) ; result . addElement ( new Option ( "\tThe maximum threshold. (default Double.MAX_VALUE)" , "max" , 1 , "-max <double>" ) ) ; result . addElement ( new Option ( "\tThe replacement for values larger than the maximum threshold.\n" + "\t(default Double.MAX_VALUE)" , "max-default" , 1 , "-max-default <double>" ) ) ; result . addElement ( new Option ( "\tThe number values are checked for closeness. (default 0)" , "closeto" , 1 , "-closeto <double>" ) ) ; result . addElement ( new Option ( "\tThe replacement for values that are close to '-closeto'.\n" + "\t(default 0)" , "closeto-default" , 1 , "-closeto-default <double>" ) ) ; result . addElement ( new Option ( "\tThe tolerance below which numbers are considered being close to \n" + "\tto each other. (default 1E-6)" , "closeto-tolerance" , 1 , "-closeto-tolerance <double>" ) ) ; result . addElement ( new Option ( "\tThe number of decimals to round to, -1 means no rounding at all.\n" + "\t(default -1)" , "decimals" , 1 , "-decimals <int>" ) ) ; result . addElement ( new Option ( "\tThe list of columns to cleanse, e.g., first-last or first-3,5-last.\n" + "\t(default first-last)" , "R" , 1 , "-R <col1,col2,...>" ) ) ; result . addElement ( new Option ( "\tInverts the matching sense." , "V" , 0 , "-V" ) ) ; result . addElement ( new Option ( "\tWhether to include the class in the cleansing.\n" + "\tThe class column will always be skipped, if this flag is not\n" + "\tpresent. (default no)" , "include-class" , 0 , "-include-class" ) ) ; result . addAll ( Collections . list ( super . listOptions ( ) ) ) ; return result . elements ( ) ; }
Creates an intent that when started will find all minidumps, and try to upload them.
573
public static Vector3 ceil ( Vector3 o ) { return new Vector3 ( Math . ceil ( o . x ) , Math . ceil ( o . y ) , Math . ceil ( o . z ) ) ; }
Determine if the Expression consists of prepositions.
574
static void importMap ( InputStream is , Map < String , String > m ) throws IOException , InvalidPreferencesFormatException { try { Document doc = loadPrefsDoc ( is ) ; Element xmlMap = doc . getDocumentElement ( ) ; String mapVersion = xmlMap . getAttribute ( "MAP_XML_VERSION" ) ; if ( mapVersion . compareTo ( MAP_XML_VERSION ) > 0 ) throw new InvalidPreferencesFormatException ( "Preferences map file format version " + mapVersion + " is not supported. This java installation can read" + " versions " + MAP_XML_VERSION + " or older. You may need" + " to install a newer version of JDK." ) ; NodeList entries = xmlMap . getChildNodes ( ) ; for ( int i = 0 , numEntries = entries . getLength ( ) ; i < numEntries ; i ++ ) { Element entry = ( Element ) entries . item ( i ) ; m . put ( entry . getAttribute ( "key" ) , entry . getAttribute ( "value" ) ) ; } } catch ( SAXException e ) { throw new InvalidPreferencesFormatException ( e ) ; } }
Builds the slope index map. This method is called when the ETOPO resolution changes and when the slope contrast changes. The slope of the terrain is clipped; slopes are between the range of +/- 45 deg. The calculated slope value is then linearly scaled to the range +/- 127.
575
public boolean merge ( final Frame < ? extends V > frame , final Interpreter < V > interpreter ) throws AnalyzerException { if ( top != frame . top ) { throw new AnalyzerException ( null , "Incompatible stack heights" ) ; } boolean changes = false ; for ( int i = 0 ; i < locals + top ; ++ i ) { V v = interpreter . merge ( values [ i ] , frame . values [ i ] ) ; if ( ! v . equals ( values [ i ] ) ) { values [ i ] = v ; changes = true ; } } return changes ; }
Refills the input buffer.
576
@ Deprecated protected void wait ( int duration , Runnable callBack ) { executor . schedule ( callBack , duration , TimeUnit . MILLISECONDS ) ; }
Close a writer without throwing an exception.
577
public synchronized void removeOFChannelHandler ( OFChannelHandler h ) { connectedChannelHandlers . remove ( h ) ; }
Subclassing this function is intended to provide custom open behaviour on a per-file basis.
578
public void clearPieSegments ( ) { mPieSegmentList . clear ( ) ; }
Iterates over the file tree of a directory. It receives a visitor and will call its methods for each file in the directory. preVisitDirectory (directory) visitFile (file) - recursively the same for every subdirectory postVisitDirectory (directory)
579
public void clearCache ( ) { clearMemoryCache ( ) ; clearDiskCache ( ) ; }
determines whether two byte arrays are equalOverShorterOfBoth over the whole minimum of their two lengths
580
public static boolean isBookSearchUrl ( String url ) { return url . startsWith ( "http://google.com/books" ) || url . startsWith ( "http://books.google." ) ; }
Instantiates a new movie set tree node.
581
public void removePropertyChangeListener ( PropertyChangeListener pcl ) { m_pcSupport . removePropertyChangeListener ( pcl ) ; }
Return yes if the last response is to be retransmitted.
582
@ SuppressWarnings ( "deprecation" ) protected boolean isFastClockTimeGE ( int hr , int min ) { Date now = fastClock . getTime ( ) ; nowHours = now . getHours ( ) ; nowMinutes = now . getMinutes ( ) ; if ( ( ( nowHours * 60 ) + nowMinutes ) >= ( ( hr * 60 ) + min ) ) { return true ; } return false ; }
This method loads the data for type Java API.
583
private ListResourceBundle loadResourceBundle ( String resourceBundle ) throws MissingResourceException { m_resourceBundleName = resourceBundle ; Locale locale = getLocale ( ) ; ListResourceBundle lrb ; try { ResourceBundle rb = ResourceBundle . getBundle ( m_resourceBundleName , locale ) ; lrb = ( ListResourceBundle ) rb ; } catch ( MissingResourceException e ) { try { lrb = ( ListResourceBundle ) ResourceBundle . getBundle ( m_resourceBundleName , new Locale ( "en" , "US" ) ) ; } catch ( MissingResourceException e2 ) { throw new MissingResourceException ( "Could not load any resource bundles." + m_resourceBundleName , m_resourceBundleName , "" ) ; } } m_resourceBundle = lrb ; return lrb ; }
Determines if a section with the given name exists
584
public void testNegPosSameLength ( ) { String numA = "-283746278342837476784564875684767" ; String numB = "293478573489347658763745839457637" ; String res = "-71412358434940908477702819237628" ; BigInteger aNumber = new BigInteger ( numA ) ; BigInteger bNumber = new BigInteger ( numB ) ; BigInteger result = aNumber . xor ( bNumber ) ; assertTrue ( res . equals ( result . toString ( ) ) ) ; }
Driving routine for RungeKutta integration
585
public void removeRenamingCallback ( OneSheeldRenamingCallback renamingCallback ) { if ( renamingCallback != null && renamingCallbacks . contains ( renamingCallback ) ) renamingCallbacks . remove ( renamingCallback ) ; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
586
public void dispose ( ) { logDebug ( "Disposing." ) ; mSetupDone = false ; if ( mServiceConn != null ) { logDebug ( "Unbinding from service." ) ; if ( mContext != null ) mContext . unbindService ( mServiceConn ) ; } mDisposed = true ; mContext = null ; mServiceConn = null ; mService = null ; mPurchaseListener = null ; }
Create the output stream
587
public boolean fillIfLive ( long timeout ) throws IOException { StreamImpl source = _source ; byte [ ] readBuffer = _readBuffer ; if ( readBuffer == null || source == null ) { _readOffset = 0 ; _readLength = 0 ; return false ; } if ( _readOffset > 0 ) { System . arraycopy ( readBuffer , _readOffset , readBuffer , 0 , _readLength - _readOffset ) ; _readLength -= _readOffset ; _readOffset = 0 ; } if ( _readLength == readBuffer . length ) return true ; int readLength = source . readTimeout ( _readBuffer , _readLength , _readBuffer . length - _readLength , timeout ) ; if ( readLength >= 0 ) { _readLength += readLength ; _position += readLength ; if ( _isEnableReadTime ) _readTime = CurrentTime . currentTime ( ) ; return true ; } else if ( readLength == READ_TIMEOUT ) { return true ; } else { return false ; } }
Parses the tree from root element. Please see RequestSet.java for the corresponding DTD of the RequestSet.
588
public ThreadData ( String threadName , String threadState , long cpuTimeInNanoSeconds ) { this . threadName = threadName ; this . threadState = threadState ; this . cpuTimeInNanoSeconds = cpuTimeInNanoSeconds ; }
Parses the input stream of content with a default encoding of UTF-8. <p/> Calls parse(InputStream stream, String encoding);
589
private List < int [ ] > prepareExpectedData ( ) { List < int [ ] > indexList = new ArrayList < > ( 2 ) ; int [ ] sortIndex = { 0 , 3 , 2 , 4 , 1 } ; int [ ] sortIndexInverted = { 0 , 2 , 4 , 1 , 2 } ; indexList . add ( 0 , sortIndex ) ; indexList . add ( 1 , sortIndexInverted ) ; return indexList ; }
Writes UTF8 into the given OutputStream by first writing to the given scratch array and then writing the contents of the scratch array to the OutputStream. The given scratch byte array is used to buffer intermediate data before it is written to the output stream.
590
protected JFreeChart createChart ( CategoryDataset dataset , String title , MUOM uom ) { JFreeChart chart = ChartFactory . createBarChart3D ( title , " " , " " , dataset , PlotOrientation . VERTICAL , true , true , false ) ; if ( uom == null || uom . isHour ( ) ) { chart = ChartFactory . createBarChart3D ( title , Msg . translate ( Env . getCtx ( ) , "Days" ) , Msg . translate ( Env . getCtx ( ) , "Hours" ) , dataset , PlotOrientation . VERTICAL , true , true , false ) ; } else { chart = ChartFactory . createBarChart3D ( title , Msg . translate ( Env . getCtx ( ) , "Days" ) , Msg . translate ( Env . getCtx ( ) , "Kilo" ) , dataset , PlotOrientation . VERTICAL , true , true , false ) ; } return chart ; }
Mute if not "unmuted" within the last 10 minutes.
591
private ValueGraphVertex findOrCreateVertex ( Register r ) { ValueGraphVertex v = getVertex ( r ) ; if ( v == null ) { v = new ValueGraphVertex ( r ) ; v . setLabel ( r , 0 ) ; graph . addGraphNode ( v ) ; nameMap . put ( r , v ) ; } return v ; }
Creates a decrypt method in a given method node.
592
public RadiusGraphElementAccessor ( ) { this ( Math . sqrt ( Double . MAX_VALUE - 1000 ) ) ; }
Check if mineshafter is present. If it is, we need to bypass it to send POST requests
593
public void removeLatestUpdate ( Password password ) throws PageException { _removeUpdate ( password , true ) ; }
check if the literal address string has %nn appended returns -1 if not, or the numeric value otherwise. %nn may also be a string that represents the displayName of a currently available NetworkInterface.
594
public void notifyQueryRunning ( final BoundEntity song ) { synchronized ( mRunningQueries ) { mRunningQueries . add ( song ) ; } }
Return String representation of Code item
595
public void testBooleanOptions ( ) throws Exception { DatabaseMetaData dbmd = con . getMetaData ( ) ; assertTrue ( "locatorsUpdateCopy" , dbmd . locatorsUpdateCopy ( ) ) ; assertTrue ( "supportsGetGeneratedKeys" , dbmd . supportsGetGeneratedKeys ( ) ) ; assertTrue ( "supportsMultipleOpenResults" , dbmd . supportsMultipleOpenResults ( ) ) ; assertTrue ( "supportsNamedParameters" , dbmd . supportsNamedParameters ( ) ) ; assertFalse ( "supportsResultSetHoldability" , dbmd . supportsResultSetHoldability ( ResultSet . HOLD_CURSORS_OVER_COMMIT ) ) ; assertFalse ( "supportsResultSetHoldability" , dbmd . supportsResultSetHoldability ( ResultSet . CLOSE_CURSORS_AT_COMMIT ) ) ; assertTrue ( "supportsSavepoints" , dbmd . supportsSavepoints ( ) ) ; assertTrue ( "supportsStatementPooling" , dbmd . supportsStatementPooling ( ) ) ; }
Parses the provided string as an attribute tag. Exactly one of the branch or template must be null, and the other must be non-null.
596
private static Properties createProperties1 ( ) { Properties props = new Properties ( ) ; props . setProperty ( MCAST_PORT , "0" ) ; props . setProperty ( LOCATORS , "" ) ; return props ; }
Adds view to specified cache. Creates a cache list if it is null.
597
public void connected ( ) { final String methodName = "connected" ; log . fine ( CLASS_NAME , methodName , "631" ) ; this . connected = true ; pingSender . start ( ) ; }
Tries to add a download object to the completed list.
598
protected final boolean tryAcquire ( int acquires ) { final Thread current = Thread . currentThread ( ) ; int c = getState ( ) ; if ( c == 0 ) { if ( ! hasQueuedPredecessors ( ) && compareAndSetState ( 0 , acquires ) ) { setExclusiveOwnerThread ( current ) ; return true ; } } else if ( current == getExclusiveOwnerThread ( ) ) { int nextc = c + acquires ; if ( nextc < 0 ) throw new Error ( "Maximum lock count exceeded" ) ; setState ( nextc ) ; return true ; } return false ; }
Creates a new executor object for spawning worker threads
599
static float rotateX ( float pX , float pY , float cX , float cY , float angleInDegrees ) { double angle = Math . toRadians ( angleInDegrees ) ; return ( float ) ( Math . cos ( angle ) * ( pX - cX ) - Math . sin ( angle ) * ( pY - cY ) + cX ) ; }
Enables drag-and-drop for chips.