idx
int64
0
34.9k
question
stringlengths
12
26.4k
target
stringlengths
15
2.15k
700
public void updatePacketSize ( final BigDecimal packetSize ) { mRepeatPacketSize = mRepeatPacketSize . add ( packetSize ) ; }
Shows the preferences window
701
private String base_phone_number ( ) throws ParseException { StringBuilder s = new StringBuilder ( ) ; if ( debug ) dbg_enter ( "base_phone_number" ) ; try { int lc = 0 ; while ( lexer . hasMoreChars ( ) ) { char w = lexer . lookAhead ( 0 ) ; if ( Lexer . isDigit ( w ) || w == '-' || w == '.' || w == '(' || w == ')' ) { lexer . consume ( 1 ) ; s . append ( w ) ; lc ++ ; } else if ( lc > 0 ) break ; else throw createParseException ( "unexpected " + w ) ; } return s . toString ( ) ; } finally { if ( debug ) dbg_leave ( "base_phone_number" ) ; } }
Report time statistic data.
702
public org . smpte_ra . schemas . st2067_2_2016 . ContentVersionType buildContentVersionType ( String id , org . smpte_ra . schemas . st2067_2_2016 . UserTextType value ) { ContentVersionType contentVersionType = new ContentVersionType ( ) ; contentVersionType . setId ( id ) ; contentVersionType . setLabelText ( value ) ; return contentVersionType ; }
Returns true if the mouse event specifies the right mouse button.
703
protected void refillBuffer ( ) { if ( pendinglen > 0 || eof ) return ; try { offset = 0 ; pendinglen = stream . read ( buf ) ; if ( pendinglen < 0 ) { close ( ) ; return ; } else return ; } catch ( IOException e ) { throw new PngjInputException ( e ) ; } }
Translate attributes that describe an attribute matching rule definition into the string description as defined in RFC 2252.
704
private static InputStream openSystemFile ( String filename ) throws FileNotFoundException { try { return new FileInputStream ( filename ) ; } catch ( FileNotFoundException e ) { String resname = filename . replace ( File . separatorChar , '/' ) ; InputStream result = ClassLoader . getSystemResourceAsStream ( resname ) ; if ( result == null ) { throw e ; } return result ; } }
Replaces an existing component with a new one.
705
static Pair < byte [ ] , Long > decomposeName ( Column column ) { ByteBuffer nameBuffer ; if ( column . isSetName ( ) ) { nameBuffer = column . bufferForName ( ) ; } else { nameBuffer = ByteBuffer . wrap ( column . getName ( ) ) ; } return decompose ( nameBuffer ) ; }
Popup a SaveDialog for saving the transformed data
706
public RequestHandle delete ( String url , ResponseHandlerInterface responseHandler ) { return delete ( null , url , responseHandler ) ; }
Add a static method call (bytecode instruction INVOKESTATIC) to the graph.
707
public void addLanguage ( String languageId ) { query . append ( " +languageId:" + languageId ) ; }
Runs the test case.
708
public static List < BaseMqttMessage > processMessageLog ( final List < LoggedMqttMessage > list , final ProgressUpdater progress , final long current , final long max ) { final List < BaseMqttMessage > mqttMessageList = new ArrayList < BaseMqttMessage > ( ) ; long item = 0 ; for ( final LoggedMqttMessage loggedMessage : list ) { if ( progress != null ) { if ( progress . isCancelled ( ) ) { logger . info ( "Task cancelled!" ) ; return null ; } item ++ ; if ( item % 1000 == 0 ) { progress . update ( current + item , max ) ; } } mqttMessageList . add ( convertToBaseMqttMessage ( loggedMessage ) ) ; } logger . info ( "Message audit log - processed {} MQTT messages" , list . size ( ) ) ; return mqttMessageList ; }
Sets the calendar to the last day of the given month.
709
public RequestHandle delete ( Context context , String url , Header [ ] headers , RequestParams params , ResponseHandlerInterface responseHandler ) { HttpDelete httpDelete = new HttpDelete ( getUrlWithQueryString ( isUrlEncodingEnabled , url , params ) ) ; if ( headers != null ) httpDelete . setHeaders ( headers ) ; return sendRequest ( httpClient , httpContext , httpDelete , null , responseHandler , context ) ; }
Play notification sound on highlight?
710
public int [ ] updateRemainingAttributes ( int [ ] selectedAttributes , int bestAttribute ) { int [ ] remainingAttributes ; if ( columnTable . representsNominalAttribute ( bestAttribute ) ) { remainingAttributes = removeAttribute ( bestAttribute , selectedAttributes ) ; } else { remainingAttributes = selectedAttributes ; } return remainingAttributes ; }
Check if the time that has been typed so far is completely legal, as is.
711
public final void addElement ( int value ) { if ( ( m_firstFree + 1 ) >= m_mapSize ) { m_mapSize += m_blocksize ; int newMap [ ] = new int [ m_mapSize ] ; System . arraycopy ( m_map , 0 , newMap , 0 , m_firstFree + 1 ) ; m_map = newMap ; } m_map [ m_firstFree ] = value ; m_firstFree ++ ; }
invokes the getInventoryAvailableByFacility service, returns true if specified quantity is available, else false this is only used in the related method that uses a ProductConfigWrapper, until that is refactored into a service as well...
712
int parseTrBlockContent ( int currentOffset , char openQuote , char closeQuote ) { int blockStartOffset = currentOffset ; CharSequence buffer = getBuffer ( ) ; int bufferEnd = getBufferEnd ( ) ; boolean isEscaped = false ; boolean isQuoteDiffers = openQuote != closeQuote ; int quotesLevel = 0 ; while ( currentOffset < bufferEnd ) { char currentChar = buffer . charAt ( currentOffset ) ; if ( ! isEscaped && quotesLevel == 0 && currentChar == closeQuote ) { if ( currentOffset > blockStartOffset ) { pushPreparsedToken ( blockStartOffset , currentOffset , STRING_CONTENT ) ; } break ; } if ( isQuoteDiffers && ! isEscaped ) { if ( currentChar == openQuote ) { quotesLevel ++ ; } else if ( currentChar == closeQuote ) { quotesLevel -- ; } } isEscaped = ( currentChar == '\\' && ! isEscaped ) ; currentOffset ++ ; } return currentOffset ; }
Use onSizeChanged instead of onAttachedToWindow to get the dimensions of the view, because this method is called after measuring the dimensions of MATCH_PARENT & WRAP_CONTENT. Use this dimensions to setup the bounds and paints.
713
public boolean itemExists ( String name ) throws JMSException { HashMap body = ( HashMap ) Body ; return body . containsKey ( name ) ; }
Creates a new DPrivateKeyUsagePeriod dialog.
714
@ Override public boolean eIsSet ( int featureID ) { switch ( featureID ) { case SexecPackage . STEP__COMMENT : return COMMENT_EDEFAULT == null ? comment != null : ! COMMENT_EDEFAULT . equals ( comment ) ; case SexecPackage . STEP__CALLER : return caller != null && ! caller . isEmpty ( ) ; } return super . eIsSet ( featureID ) ; }
Return a NameComponent given its stringified form.
715
public String toDisplayString ( ) { return toDisplayString ( Locale . getDefault ( ) ) ; }
Get the set of keys for resident entries.
716
public boolean orAndAndNot ( BitVector orset , BitVector andset , BitVector andnotset ) { boolean ret = false ; long [ ] a = null , b = null , c = null , d = null , e = null ; int al , bl , cl , dl ; a = this . bits ; al = a . length ; if ( orset == null ) { bl = 0 ; } else { b = orset . bits ; bl = b . length ; } if ( andset == null ) { cl = 0 ; } else { c = andset . bits ; cl = c . length ; } if ( andnotset == null ) { dl = 0 ; } else { d = andnotset . bits ; dl = d . length ; } if ( al < bl ) { e = new long [ bl ] ; System . arraycopy ( a , 0 , e , 0 , al ) ; this . bits = e ; } else { e = a ; } int i = 0 ; long l ; if ( c == null ) { if ( dl <= bl ) { while ( i < dl ) { l = b [ i ] & ~ d [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } while ( i < bl ) { l = b [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } } else { while ( i < bl ) { l = b [ i ] & ~ d [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } } } else if ( bl <= cl && bl <= dl ) { while ( i < bl ) { l = b [ i ] & c [ i ] & ~ d [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } } else if ( cl <= bl && cl <= dl ) { while ( i < cl ) { l = b [ i ] & c [ i ] & ~ d [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } } else { while ( i < dl ) { l = b [ i ] & c [ i ] & ~ d [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } int shorter = cl ; if ( bl < shorter ) shorter = bl ; while ( i < shorter ) { l = b [ i ] & c [ i ] ; if ( ( l & ~ e [ i ] ) != 0 ) ret = true ; e [ i ] |= l ; i ++ ; } } return ret ; }
Verifies that the specified file exists and can be read as a valid file.
717
private boolean conditionCH1 ( String value , int index ) { return ( ( contains ( value , 0 , 4 , "VAN " , "VON " ) || contains ( value , 0 , 3 , "SCH" ) ) || contains ( value , index - 2 , 6 , "ORCHES" , "ARCHIT" , "ORCHID" ) || contains ( value , index + 2 , 1 , "T" , "S" ) || ( ( contains ( value , index - 1 , 1 , "A" , "O" , "U" , "E" ) || index == 0 ) && ( contains ( value , index + 2 , 1 , L_R_N_M_B_H_F_V_W_SPACE ) || index + 1 == value . length ( ) - 1 ) ) ) ; }
Verifies the CRC value. This generates an exception if the exception is bad.
718
public void removeElements ( final int from , final int to ) { CharArrays . ensureFromTo ( size , from , to ) ; System . arraycopy ( a , to , a , from , size - to ) ; size -= ( to - from ) ; }
Clears all the entries of this node, and writes all the given entries into the node, starting from the first slot.
719
public synchronized void add ( Date x , double y ) { super . add ( x . getTime ( ) , y ) ; }
Returns the path to the root directory of a web application inside a JAR/WAR.
720
public void addChangeListener ( ChangeListener l ) { m_ChangeListeners . add ( l ) ; }
Executed after establishing web socket connection with streams api
721
public static String smartQuote ( String s ) { if ( s . contains ( " " ) ) { return dumbQuote ( s ) ; } else { return s ; } }
Issue a synchronization call.
722
public ReadInitialConnectPacket ( final ReadPacketFetcher packetFetcher ) throws IOException , QueryException { Buffer buffer = packetFetcher . getReusableBuffer ( ) ; if ( buffer . getByteAt ( 0 ) == Packet . ERROR ) { ErrorPacket errorPacket = new ErrorPacket ( buffer ) ; throw new QueryException ( errorPacket . getMessage ( ) ) ; } protocolVersion = buffer . readByte ( ) ; serverVersion = buffer . readString ( StandardCharsets . US_ASCII ) ; serverThreadId = buffer . readInt ( ) ; final byte [ ] seed1 = buffer . readRawBytes ( 8 ) ; buffer . skipByte ( ) ; int serverCapabilities2FirstBytes = buffer . readShort ( ) ; serverLanguage = buffer . readByte ( ) ; serverStatus = buffer . readShort ( ) ; int serverCapabilities4FirstBytes = serverCapabilities2FirstBytes + ( buffer . readShort ( ) << 16 ) ; int saltLength = 0 ; if ( ( serverCapabilities4FirstBytes & MariaDbServerCapabilities . PLUGIN_AUTH ) != 0 ) { saltLength = Math . max ( 12 , buffer . readByte ( ) - 9 ) ; } else { buffer . skipByte ( ) ; } buffer . skipBytes ( 6 ) ; long mariaDbAdditionalCapacities = buffer . readInt ( ) ; if ( ( serverCapabilities4FirstBytes & MariaDbServerCapabilities . SECURE_CONNECTION ) != 0 ) { final byte [ ] seed2 = buffer . readRawBytes ( saltLength ) ; seed = Utils . copyWithLength ( seed1 , seed1 . length + seed2 . length ) ; System . arraycopy ( seed2 , 0 , seed , seed1 . length , seed2 . length ) ; } else { seed = Utils . copyWithLength ( seed1 , seed1 . length ) ; } buffer . skipByte ( ) ; if ( ( serverCapabilities4FirstBytes & MariaDbServerCapabilities . PLUGIN_AUTH ) != 0 ) { pluginName = buffer . readString ( StandardCharsets . US_ASCII ) ; if ( serverVersion . startsWith ( MARIADB_RPL_HACK_PREFIX ) ) { serverCapabilities = ( serverCapabilities4FirstBytes & 0xffffffffL ) + ( mariaDbAdditionalCapacities << 32 ) ; serverVersion = serverVersion . substring ( MARIADB_RPL_HACK_PREFIX . length ( ) ) ; } else { serverCapabilities = serverCapabilities4FirstBytes & 0xffffffffL ; } } else { serverCapabilities = serverCapabilities4FirstBytes & 0xffffffffL ; } }
Paints the image at the specified location. This method assumes scaling has already been done, and simply paints the background image "as-is."
723
static boolean sleep ( final double howMuch ) { try { Thread . sleep ( ( int ) ( 1000 * howMuch ) ) ; return true ; } catch ( @ SuppressWarnings ( "unused" ) final InterruptedException __ ) { return false ; } }
Decrement the ledger's reference count. If the ledger is decremented to zero, this ledger should release its ownership back to the AllocationManager
724
public static Rectangle2D toAwtRectangle ( final Rectangle rect ) { final Rectangle2D rect2d = new Rectangle2D . Double ( ) ; rect2d . setRect ( rect . x , rect . y , rect . width , rect . height ) ; return rect2d ; }
Send a WARNING log message
725
private void testBug71396StatementMultiCheck ( Connection testConn , String [ ] queries , int [ ] expRowCount ) throws SQLException { if ( queries . length != expRowCount . length ) { fail ( "Bad arguments!" ) ; } Statement testStmt = testConn . createStatement ( ) ; testBug71396StatementMultiCheck ( testStmt , queries , expRowCount ) ; testStmt . close ( ) ; }
Creates an instance to contain the given string.
726
public String KNNTipText ( ) { return "How many neighbours are used to determine the width of the " + "weighting function (<= 0 means all neighbours)." ; }
Parses XML from the given Reader.
727
public void removeProtocols ( final Set < String > protocols ) { if ( protocols != null && _protocols != null ) { HashSet < String > removeProtocols = new HashSet < String > ( ) ; removeProtocols . addAll ( protocols ) ; _protocols . removeAll ( removeProtocols ) ; } }
Checks if a type is derived from another by any combination of restriction, list ir union. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
728
private List < File > findDuplicateFiles ( List < File > files ) { HashSet < File > sourceFileSet = new HashSet < > ( ) ; List < File > duplicateFiles = new ArrayList < > ( ) ; for ( File file : files ) { if ( ! sourceFileSet . contains ( file ) ) { sourceFileSet . add ( file ) ; } else { duplicateFiles . add ( file ) ; } } return duplicateFiles ; }
Returns true if the model contains the given file, and false otherwise.
729
public static byte [ ] bitmapToJpg ( final Bitmap image , final int quality ) { if ( image == null ) return null ; ByteArrayOutputStream ba = new ByteArrayOutputStream ( ) ; if ( image . compress ( CompressFormat . JPEG , quality , ba ) ) return ba . toByteArray ( ) ; else return null ; }
Returns true if the specified file extension exists in the \\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts in Windows 2000.
730
public Class < ? > loadClass ( String name ) throws ClassNotFoundException { return initClassLoader . loadClass ( name ) ; }
Sorts the given list in ascending natural order. The algorithm is stable which means equal elements don't get reordered.
731
public boolean addAll ( Collection c ) { Object [ ] a = c . toArray ( ) ; int numNew = a . length ; ensureCapacity ( size + numNew ) ; System . arraycopy ( a , 0 , elementData , size , numNew ) ; size += numNew ; return numNew != 0 ; }
Updates document structure as a result of text removal.
732
private void deleteFileIfEmpty ( ) throws IOException { if ( Files . size ( preferencesFilePath ) == 0 ) { Files . delete ( preferencesFilePath ) ; } }
Is the named quest in one of the listed states?
733
public static < T extends Throwable > T readStackTrace ( T throwable , StreamInput in ) throws IOException { final int stackTraceElements = in . readVInt ( ) ; StackTraceElement [ ] stackTrace = new StackTraceElement [ stackTraceElements ] ; for ( int i = 0 ; i < stackTraceElements ; i ++ ) { final String declaringClasss = in . readString ( ) ; final String fileName = in . readOptionalString ( ) ; final String methodName = in . readString ( ) ; final int lineNumber = in . readVInt ( ) ; stackTrace [ i ] = new StackTraceElement ( declaringClasss , methodName , fileName , lineNumber ) ; } throwable . setStackTrace ( stackTrace ) ; int numSuppressed = in . readVInt ( ) ; for ( int i = 0 ; i < numSuppressed ; i ++ ) { throwable . addSuppressed ( in . readThrowable ( ) ) ; } return throwable ; }
Creates a new map with the same mappings as the given map. The map is created with a capacity of 1.5 times the number of mappings in the given map or 16 (whichever is greater), and a default load factor (0.75) and concurrencyLevel (16).
734
public static int scan ( long v ) { if ( v == 0 ) { return - 1 ; } return Long . numberOfTrailingZeros ( v ) ; }
Constructs a new extractor that operates against the HTTP headers contained as part of the request.
735
public int outputSequenceCount ( ) { return outRegressionSeqs . size ( ) + outErrorSeqs . size ( ) ; }
Write string to stream
736
private void writeOutputFiles ( ) { if ( config . getOutputNetworkFile ( ) != null && config . getOutputScheduleFile ( ) != null ) { try { ScheduleTools . writeTransitSchedule ( schedule , config . getOutputScheduleFile ( ) ) ; NetworkTools . writeNetwork ( network , config . getOutputNetworkFile ( ) ) ; } catch ( Exception e ) { log . error ( "Cannot write to output directory! Trying to write schedule and network file in working directory" ) ; long t = System . nanoTime ( ) / 1000000 ; try { ScheduleTools . writeTransitSchedule ( schedule , t + "schedule.xml.gz" ) ; NetworkTools . writeNetwork ( network , t + "network.xml.gz" ) ; } catch ( Exception e1 ) { throw new RuntimeException ( "Files could not be written in working directory" ) ; } } if ( config . getOutputStreetNetworkFile ( ) != null ) { NetworkTools . writeNetwork ( NetworkTools . filterNetworkByLinkMode ( network , Collections . singleton ( TransportMode . car ) ) , config . getOutputStreetNetworkFile ( ) ) ; } } else { log . info ( "" ) ; log . info ( "No output paths defined, schedule and network are not written to files." ) ; } }
Removes the data source updated listener.
737
public static int valueOf ( String name ) { for ( int opcode = 0 ; opcode < nameArray . length ; ++ opcode ) { if ( name . equalsIgnoreCase ( nameArray [ opcode ] ) ) { return opcode ; } } throw new IllegalArgumentException ( "No opcode for " + name ) ; }
Unpacks the compressed character translation table.
738
public void fixupVariables ( java . util . Vector vars , int globalsSize ) { if ( null != m_argVec ) { int nArgs = m_argVec . size ( ) ; for ( int i = 0 ; i < nArgs ; i ++ ) { Expression arg = ( Expression ) m_argVec . elementAt ( i ) ; arg . fixupVariables ( vars , globalsSize ) ; } } }
Resets a custom language model by removing all corpora and words from the model. Resetting a custom model initializes the model to its state when it was first created. Metadata such as the name and language of the model are preserved.
739
public boolean cancelTask ( Task task ) { for ( ThreadRunnable threadRunnable : runableMap . keySet ( ) ) { if ( threadRunnable . task == task ) { Future future = runableMap . remove ( threadRunnable ) ; if ( future != null ) { future . cancel ( true ) ; } return true ; } } return false ; }
Handles cleanup when an upstream step disconnects
740
static String internalToBinaryClassName ( String className ) { if ( className == null ) { return null ; } else { return className . replace ( '/' , '.' ) ; } }
Most other rolls have a minimum value of zero.
741
public static String readString ( File file ) throws IOException { FileInputStream in = new FileInputStream ( file ) ; try { return readString ( in ) ; } finally { in . close ( ) ; } }
Creates a new instance of DrawShapes
742
private QueryExp buildOptionalQueryExp ( final String [ ] attributes , final Object [ ] values ) { QueryExp queryExp = null ; for ( int i = 0 ; i < attributes . length ; i ++ ) { if ( values [ i ] instanceof Boolean ) { if ( queryExp == null ) { queryExp = Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( ( Boolean ) values [ i ] ) ) ) ; } else { queryExp = Query . and ( queryExp , Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( ( Boolean ) values [ i ] ) ) ) ) ; } } else if ( values [ i ] instanceof Number ) { if ( queryExp == null ) { queryExp = Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( Number ) values [ i ] ) ) ; } else { queryExp = Query . and ( queryExp , Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( Number ) values [ i ] ) ) ) ; } } else if ( values [ i ] instanceof String ) { if ( queryExp == null ) { queryExp = Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( String ) values [ i ] ) ) ; } else { queryExp = Query . and ( queryExp , Query . eq ( Query . attr ( attributes [ i ] ) , Query . value ( ( String ) values [ i ] ) ) ) ; } } } return queryExp ; }
Creates a new instance.
743
public boolean hasValue ( ) { return ! values . isEmpty ( ) ; }
Verify that the width value is correct.
744
protected static CompareOp convertToHBaseCompareOp ( ComparisonOperator comp ) { if ( comp == ComparisonOperator . EQUAL || comp == ComparisonOperator . LIKE || comp == ComparisonOperator . CONTAINS || comp == ComparisonOperator . IN || comp == ComparisonOperator . IS ) { return CompareOp . EQUAL ; } else if ( comp == ComparisonOperator . LESS ) { return CompareOp . LESS ; } else if ( comp == ComparisonOperator . LESS_OR_EQUAL ) { return CompareOp . LESS_OR_EQUAL ; } else if ( comp == ComparisonOperator . GREATER ) { return CompareOp . GREATER ; } else if ( comp == ComparisonOperator . GREATER_OR_EQUAL ) { return CompareOp . GREATER_OR_EQUAL ; } else if ( comp == ComparisonOperator . NOT_EQUAL || comp == ComparisonOperator . NOT_LIKE || comp == ComparisonOperator . NOT_CONTAINS || comp == ComparisonOperator . IS_NOT || comp == ComparisonOperator . NOT_IN ) { return CompareOp . NOT_EQUAL ; } else { LOG . error ( "{} operation is not supported now\n" , comp ) ; throw new IllegalArgumentException ( "Illegal operation: " + comp + ", avaliable options: " + Arrays . toString ( ComparisonOperator . values ( ) ) ) ; } }
Fill field values to default values for this synapse type.
745
public TBase < TBase < ? , ? > , TFieldIdEnum > newArgs ( List < Object > args ) { requireNonNull ( args , "args" ) ; final TBase < TBase < ? , ? > , TFieldIdEnum > newArgs = newArgs ( ) ; final int size = args . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { newArgs . setFieldValue ( argFields [ i ] , args . get ( i ) ) ; } return newArgs ; }
Instantiates a new Index entry.
746
protected void doWrite ( HttpServletRequest request , HttpServletResponse response , String tunnelUUID ) throws GuacamoleException { GuacamoleTunnel tunnel = getTunnel ( tunnelUUID ) ; response . setContentType ( "application/octet-stream" ) ; response . setHeader ( "Cache-Control" , "no-cache" ) ; response . setContentLength ( 0 ) ; try { GuacamoleWriter writer = tunnel . acquireWriter ( ) ; Reader input = new InputStreamReader ( request . getInputStream ( ) , "UTF-8" ) ; try { int length ; char [ ] buffer = new char [ 8192 ] ; while ( tunnel . isOpen ( ) && ( length = input . read ( buffer , 0 , buffer . length ) ) != - 1 ) writer . write ( buffer , 0 , length ) ; } finally { input . close ( ) ; } } catch ( GuacamoleConnectionClosedException e ) { logger . debug ( "Connection to guacd closed." , e ) ; } catch ( IOException e ) { deregisterTunnel ( tunnel ) ; tunnel . close ( ) ; throw new GuacamoleServerException ( "I/O Error sending data to server: " + e . getMessage ( ) , e ) ; } finally { tunnel . releaseWriter ( ) ; } }
Starts up the Sender thread.
747
public final void testAddAllHelperTextsFromArray ( ) { CharSequence helperText1 = "helperText1" ; CharSequence helperText2 = "helperText2" ; CharSequence [ ] helperTexts1 = new CharSequence [ 2 ] ; helperTexts1 [ 0 ] = helperText1 ; helperTexts1 [ 1 ] = helperText2 ; PasswordEditText passwordEditText = new PasswordEditText ( getContext ( ) ) ; passwordEditText . addAllHelperTexts ( helperTexts1 ) ; passwordEditText . addAllHelperTexts ( helperTexts1 ) ; Collection < CharSequence > helperTexts2 = passwordEditText . getHelperTexts ( ) ; assertEquals ( helperTexts1 . length , helperTexts2 . size ( ) ) ; Iterator < CharSequence > iterator = helperTexts2 . iterator ( ) ; assertEquals ( helperText1 , iterator . next ( ) ) ; assertEquals ( helperText2 , iterator . next ( ) ) ; }
Is the current Row a Function Row
748
public static < T extends Object & Comparable < ? super T > > T min ( Collection < ? extends T > collection ) { Iterator < ? extends T > it = collection . iterator ( ) ; T min = it . next ( ) ; while ( it . hasNext ( ) ) { T next = it . next ( ) ; if ( min . compareTo ( next ) > 0 ) { min = next ; } } return min ; }
Creates new user undeclared exception given throwable as a cause and source of error message.
749
public static String join ( List < ? > things , String delim ) { StringBuilder builder = new StringBuilder ( ) ; boolean first = true ; for ( Object thing : things ) { if ( first ) { first = false ; } else { builder . append ( delim ) ; } builder . append ( thing . toString ( ) ) ; } return builder . toString ( ) ; }
Adds an unspecified amount of tabstop elements as properties to the Paragraph.
750
private void addURLToken ( String url , String text ) { addToken ( tokenForUrl ( url , text ) ) ; }
Writes the result set of a query to a file in the CSV format.
751
public void addSystemClass ( SootClass sc ) { allSystemClasses . add ( sc ) ; }
Remove all elements from the list.
752
public FloatBuffer put ( float [ ] src , int srcOffset , int floatCount ) { Arrays . checkOffsetAndCount ( src . length , srcOffset , floatCount ) ; if ( floatCount > remaining ( ) ) { throw new BufferOverflowException ( ) ; } for ( int i = srcOffset ; i < srcOffset + floatCount ; ++ i ) { put ( src [ i ] ) ; } return this ; }
This method was generated by MyBatis Generator. This method corresponds to the database table project_privilege
753
@ SuppressWarnings ( "cast" ) @ Override public boolean contains ( final Object obj ) { if ( null != obj ) { Iterator < E > it = new ArrayDequeIterator < E > ( ) ; while ( it . hasNext ( ) ) { if ( obj . equals ( ( E ) it . next ( ) ) ) { return true ; } } } return false ; }
Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously.
754
public IPv4AddrIV ( final IPv4Address value ) { super ( DTE . Extension ) ; this . value = value ; }
Compute the n-quantile boundaries for a set of values. The result is an n+1 size array holding the minimum value in the first entry and then n quantile boundaries in the subsequent entries.
755
public void logAndSystemOut ( String message ) { logAndSystemOut ( message , null ) ; }
append state info to StringBuilder
756
static char randomChar ( ) { return ( char ) TestUtil . nextInt ( random ( ) , 'a' , 'z' ) ; }
Reads a given file into a string .
757
public static void overScrollBy ( final PullToRefreshBase < ? > view , final int deltaX , final int scrollX , final int deltaY , final int scrollY , final int scrollRange , final int fuzzyThreshold , final float scaleFactor , final boolean isTouchEvent ) { final int deltaValue , currentScrollValue , scrollValue ; switch ( view . getPullToRefreshScrollDirection ( ) ) { case HORIZONTAL : deltaValue = deltaX ; scrollValue = scrollX ; currentScrollValue = view . getScrollX ( ) ; break ; case VERTICAL : default : deltaValue = deltaY ; scrollValue = scrollY ; currentScrollValue = view . getScrollY ( ) ; break ; } if ( view . isPullToRefreshOverScrollEnabled ( ) && ! view . isRefreshing ( ) ) { final Mode mode = view . getMode ( ) ; if ( mode . permitsPullToRefresh ( ) && ! isTouchEvent && deltaValue != 0 ) { final int newScrollValue = ( deltaValue + scrollValue ) ; if ( PullToRefreshBase . DEBUG ) { Log . d ( LOG_TAG , "OverScroll. DeltaX: " + deltaX + ", ScrollX: " + scrollX + ", DeltaY: " + deltaY + ", ScrollY: " + scrollY + ", NewY: " + newScrollValue + ", ScrollRange: " + scrollRange + ", CurrentScroll: " + currentScrollValue ) ; } if ( newScrollValue < ( 0 - fuzzyThreshold ) ) { if ( mode . showHeaderLoadingLayout ( ) ) { if ( currentScrollValue == 0 ) { view . setState ( State . OVERSCROLLING ) ; } view . setHeaderScroll ( ( int ) ( scaleFactor * ( currentScrollValue + newScrollValue ) ) ) ; } } else if ( newScrollValue > ( scrollRange + fuzzyThreshold ) ) { if ( mode . showFooterLoadingLayout ( ) ) { if ( currentScrollValue == 0 ) { view . setState ( State . OVERSCROLLING ) ; } view . setHeaderScroll ( ( int ) ( scaleFactor * ( currentScrollValue + newScrollValue - scrollRange ) ) ) ; } } else if ( Math . abs ( newScrollValue ) <= fuzzyThreshold || Math . abs ( newScrollValue - scrollRange ) <= fuzzyThreshold ) { view . setState ( State . RESET ) ; } } else if ( isTouchEvent && State . OVERSCROLLING == view . getState ( ) ) { view . setState ( State . RESET ) ; } } }
Write String using specified encoding When this is called multiple times, all but the last value has a trailing null
758
private static void attemptRetryOnException ( String logPrefix , Request < ? > request , VolleyError exception ) throws VolleyError { RetryPolicy retryPolicy = request . getRetryPolicy ( ) ; int oldTimeout = request . getTimeoutMs ( ) ; try { retryPolicy . retry ( exception ) ; } catch ( VolleyError e ) { request . addMarker ( String . format ( "%s-timeout-giveup [timeout=%s]" , logPrefix , oldTimeout ) ) ; throw e ; } request . addMarker ( String . format ( "%s-retry [timeout=%s]" , logPrefix , oldTimeout ) ) ; }
this one is specific for those cases where dimensions can be part of both the type and identifier i.e. private String[] matrix[]; //field public abstract String[] getMatrix[](); //method
759
protected int read ( ) throws IOException { if ( offset == buffer . length ) { throw new ASN1Exception ( "Unexpected end of encoding" ) ; } if ( in == null ) { return buffer [ offset ++ ] & 0xFF ; } else { int octet = in . read ( ) ; if ( octet == - 1 ) { throw new ASN1Exception ( "Unexpected end of encoding" ) ; } buffer [ offset ++ ] = ( byte ) octet ; return octet ; } }
Prints the contents of the constant pool table.
760
private void initializeKeyMap ( AccessProfile accessProfile ) { _keyMap . put ( Constants . dbClient , _dbClient ) ; _keyMap . put ( Constants . ACCESSPROFILE , accessProfile ) ; _keyMap . put ( Constants . PROPS , accessProfile . getProps ( ) ) ; _keyMap . put ( Constants . _serialID , accessProfile . getserialID ( ) ) ; _keyMap . put ( Constants . _nativeGUIDs , Sets . newHashSet ( ) ) ; }
Callback message that will be called on NFC activity and creates an NFC message containing our identity to be send out
761
public void removeClickingListener ( OnWheelClickedListener listener ) { clickingListeners . remove ( listener ) ; }
Inserts the specified node in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously. Insertion may be an EXPENSIVE operation!
762
public static BoundingBox create ( Vector coords ) { int length = coords . size ( ) ; if ( length <= 0 ) { throw new RuntimeException ( "There must be at least 1 coordinate." ) ; } Coord [ ] coordsArray = new Coord [ length ] ; coords . copyInto ( coordsArray ) ; return create ( coordsArray ) ; }
Removes the object at the top of enclosed list.
763
private static void decodeHanziSegment ( BitSource bits , StringBuilder result , int count ) throws FormatException { if ( count * 13 > bits . available ( ) ) { throw FormatException . getFormatInstance ( ) ; } byte [ ] buffer = new byte [ 2 * count ] ; int offset = 0 ; while ( count > 0 ) { int twoBytes = bits . readBits ( 13 ) ; int assembledTwoBytes = ( ( twoBytes / 0x060 ) << 8 ) | ( twoBytes % 0x060 ) ; if ( assembledTwoBytes < 0x003BF ) { assembledTwoBytes += 0x0A1A1 ; } else { assembledTwoBytes += 0x0A6A1 ; } buffer [ offset ] = ( byte ) ( ( assembledTwoBytes > > 8 ) & 0xFF ) ; buffer [ offset + 1 ] = ( byte ) ( assembledTwoBytes & 0xFF ) ; offset += 2 ; count -- ; } try { result . append ( new String ( buffer , StringUtils . GB2312 ) ) ; } catch ( UnsupportedEncodingException uee ) { throw FormatException . getFormatInstance ( ) ; } }
Encodes a text (using standard with).
764
public static boolean isEmpty ( CharSequence str ) { if ( str == null || str . length ( ) == 0 ) return true ; else return false ; }
Resolve stdout log destination.
765
public PercentEscaper ( String safeChars , boolean plusForSpace ) { if ( safeChars . matches ( ".*[0-9A-Za-z].*" ) ) { throw new IllegalArgumentException ( "Alphanumeric characters are always 'safe' and should not be " + "explicitly specified" ) ; } if ( plusForSpace && safeChars . contains ( " " ) ) { throw new IllegalArgumentException ( "plusForSpace cannot be specified when space is a 'safe' character" ) ; } if ( safeChars . contains ( "%" ) ) { throw new IllegalArgumentException ( "The '%' character cannot be specified as 'safe'" ) ; } this . plusForSpace = plusForSpace ; this . safeOctets = createSafeOctets ( safeChars ) ; }
to string prints a representation of every string contained in the gazetteer.
766
public FSFont resolveFont ( SharedContext ctx , String [ ] families , float size , IdentValue weight , IdentValue style , IdentValue variant ) { List < Font > fonts = new ArrayList < Font > ( 3 ) ; if ( families != null ) { for ( int i = 0 ; i < families . length ; i ++ ) { Font font = resolveFont ( ctx , families [ i ] , size , weight , style , variant ) ; if ( font != null ) { fonts . add ( font ) ; } } } String family = "SansSerif" ; if ( style == IdentValue . ITALIC ) { family = "Serif" ; } Font fnt = createFont ( ctx , availableFontsHash . get ( family ) , size , weight , style , variant ) ; instanceHash . put ( getFontInstanceHashName ( ctx , family , size , weight , style , variant ) , fnt ) ; fonts . add ( fnt ) ; return new AWTFSFont ( fonts , size ) ; }
checks if image file is image.
767
private int [ ] parseMonths ( String line ) { int [ ] months = new int [ 12 ] ; String [ ] numbers = line . split ( "\\s" ) ; if ( numbers . length != 12 ) { throw new IllegalArgumentException ( "wrong number of months on line: " + Arrays . toString ( numbers ) + "; count: " + numbers . length ) ; } for ( int i = 0 ; i < 12 ; i ++ ) { try { months [ i ] = Integer . valueOf ( numbers [ i ] ) ; } catch ( NumberFormatException nfe ) { throw new IllegalArgumentException ( "bad key: " + numbers [ i ] ) ; } } return months ; }
Creates an instance of the ContentFilterRule from its text format
768
private static int findClosest ( int desiredFactor , Set < Integer > factors ) { int bestFactor = 1 ; int bestDelta = desiredFactor ; for ( Integer factor : factors ) { int testDelta = Math . abs ( desiredFactor - factor ) ; if ( testDelta < bestDelta ) { bestDelta = testDelta ; bestFactor = factor ; } } return bestFactor ; }
Create aggregate at end window.
769
private static long dosToJavaTime ( long dtime ) { @ SuppressWarnings ( "deprecation" ) Date d = new Date ( ( int ) ( ( ( dtime > > 25 ) & 0x7f ) + 80 ) , ( int ) ( ( ( dtime > > 21 ) & 0x0f ) - 1 ) , ( int ) ( ( dtime > > 16 ) & 0x1f ) , ( int ) ( ( dtime > > 11 ) & 0x1f ) , ( int ) ( ( dtime > > 5 ) & 0x3f ) , ( int ) ( ( dtime << 1 ) & 0x3e ) ) ; return d . getTime ( ) ; }
Executes the Drawable's draw method. <p/> Note that the method can be called several times if there are more than one active layer.
770
private void overshadowRect ( final Rectangle2D rect , final Graphics2D g ) { Graphics2D g2 = ( Graphics2D ) g . create ( ) ; g2 . setColor ( GRAY_OUT ) ; g2 . fill ( rect ) ; g2 . dispose ( ) ; }
Create GlassPane component to block input on toplevel
771
private SecurityFunctionEntity createSecurityFunctionEntity ( String code ) { SecurityFunctionEntity securityFunctionEntity = new SecurityFunctionEntity ( ) ; securityFunctionEntity . setCode ( code ) ; return herdDao . saveAndRefresh ( securityFunctionEntity ) ; }
Returns this builder with the specified optional conditions.
772
public static < T > List < T > toList ( T obj1 ) { List < T > list = new LinkedList < T > ( ) ; list . add ( obj1 ) ; return list ; }
Deletes a resource and then matches some JSON test expressions against the response using the specified double delta tolerance.
773
public String toString ( final String name , final String header ) { final Map < String , Integer > items = contents . get ( name ) ; final StringBuilder sb = new StringBuilder ( header + "\n" ) ; for ( final Entry < String , Integer > entry : items . entrySet ( ) ) { sb . append ( entry . getKey ( ) + " \t" + entry . getValue ( ) + "\n" ) ; } return sb . toString ( ) ; }
construct a thread in the default ThreadGroup with a few options set
774
private void processEMail ( ) { }
Move Player concerning object with specific conditions
775
SpeedPredictor ( ) { times = new double [ VECTOR_LENGTH ] ; WtWindowManager wm = WtWindowManager . getInstance ( ) ; prediction = MathHelper . parseDoubleDefault ( wm . getProperty ( SPEED_PROPERTY , Double . toString ( INITIAL_PREDICTED_SPEED ) ) , INITIAL_PREDICTED_SPEED ) ; jitter = MathHelper . parseDouble ( wm . getProperty ( JITTER_PROPERTY , "0.0" ) ) ; double average = TURN_LENGTH / prediction ; for ( int i = 0 ; i < VECTOR_LENGTH ; i ++ ) { times [ i ] = average ; } }
Exposes the elasticsearch settings holder.
776
@ Deactivate public void deactivate ( ComponentContext context ) { logger . debug ( "OpenIDM Config for Authentication {} is deactivated." , config . get ( Constants . SERVICE_PID ) ) ; config = null ; authenticators . clear ( ) ; if ( authFilterWrapper != null ) { try { authFilterWrapper . reset ( ) ; } catch ( Exception ex ) { logger . warn ( "Failure reported during unregistering of authentication filter: {}" , ex . getMessage ( ) , ex ) ; } } }
Generates 32 bit hash from a substring.
777
public static String [ ] splitOptions ( String quotedOptionString ) throws Exception { Vector < String > optionsVec = new Vector < String > ( ) ; String str = new String ( quotedOptionString ) ; int i ; while ( true ) { i = 0 ; while ( ( i < str . length ( ) ) && ( Character . isWhitespace ( str . charAt ( i ) ) ) ) i ++ ; str = str . substring ( i ) ; if ( str . length ( ) == 0 ) break ; if ( str . charAt ( 0 ) == '"' ) { i = 1 ; while ( i < str . length ( ) ) { if ( str . charAt ( i ) == str . charAt ( 0 ) ) break ; if ( str . charAt ( i ) == '\\' ) { i += 1 ; if ( i >= str . length ( ) ) throw new Exception ( "String should not finish with \\" ) ; } i += 1 ; } if ( i >= str . length ( ) ) throw new Exception ( "Quote parse error." ) ; String optStr = str . substring ( 1 , i ) ; optStr = unbackQuoteChars ( optStr ) ; optionsVec . addElement ( optStr ) ; str = str . substring ( i + 1 ) ; } else { i = 0 ; while ( ( i < str . length ( ) ) && ( ! Character . isWhitespace ( str . charAt ( i ) ) ) ) i ++ ; String optStr = str . substring ( 0 , i ) ; optionsVec . addElement ( optStr ) ; str = str . substring ( i ) ; } } String [ ] options = new String [ optionsVec . size ( ) ] ; for ( i = 0 ; i < optionsVec . size ( ) ; i ++ ) { options [ i ] = ( String ) optionsVec . elementAt ( i ) ; } return options ; }
Creates a Choice from a DOM Element representing a Choice.
778
public void write ( ArrayList < KeyValue > metadata , long imageStart , Raster raster , DataType dataType ) throws IOException { OutputStream oStream = new FileOutputStream ( filePath ) ; if ( oStream != null ) { outputStream = new BufferedOutputStream ( oStream ) ; } LabelParser parser = new LabelParser ( ) ; BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( outputStream ) ) ; long size = parser . writeObject ( writer , metadata , "" ) ; long pad = imageStart - size ; for ( int i = 0 ; i < pad ; ++ i ) { writer . write ( ' ' ) ; } writer . flush ( ) ; dataStream = new DataOutputStream ( outputStream ) ; writeRaster ( raster , dataType ) ; }
Opens the dialog with the given currentChannel, positioning it correctly.
779
static void cleanUp ( IR ir ) { for ( Enumeration < Instruction > e = ir . forwardInstrEnumerator ( ) ; e . hasMoreElements ( ) ; ) { Instruction s = e . nextElement ( ) ; if ( s . operator ( ) == PI ) { RegisterOperand result = GuardedUnary . getResult ( s ) ; Operator mv = IRTools . getMoveOp ( result . getType ( ) ) ; Operand val = GuardedUnary . getVal ( s ) ; Move . mutate ( s , mv , result , val ) ; } } ir . actualSSAOptions = null ; }
Returns true if processorString, once transformed into fully-qualified form, is present in fullyQualifiedCheckerNames. Used by SourceChecker to determine whether a class is annotated for any processor that is being run.
780
public String generateFileName ( ) { return new UniqueTestId ( ) . id + "_" + getCurrentTestClassName ( ) + "_" + getCurrentTestMethodName ( ) + "_" + getCurrentTestMethodLineNumber ( ) ; }
Remove any pending Operations with token that are in OperationQueue
781
public BackupUploadStatus queryBackupUploadStatus ( ) { CoordinatorClient coordinatorClient = coordinator . getCoordinatorClient ( ) ; Configuration cfg = coordinatorClient . queryConfiguration ( coordinatorClient . getSiteId ( ) , BackupConstants . BACKUP_UPLOAD_STATUS , Constants . GLOBAL_ID ) ; Map < String , String > allItems = ( cfg == null ) ? new HashMap < String , String > ( ) : cfg . getAllConfigs ( false ) ; BackupUploadStatus uploadStatus = new BackupUploadStatus ( allItems ) ; log . info ( "Upload status is: {}" , uploadStatus ) ; return uploadStatus ; }
Constructs a new TrustedDevicesResource.
782
@ Override public int process ( Callback [ ] callbacks , int state ) throws LoginException { switch ( state ) { case ISAuthConstants . LOGIN_START : { setUserSessionProperty ( JwtSessionModule . TOKEN_IDLE_TIME_IN_MINUTES_CLAIM_KEY , tokenIdleTime . toString ( ) ) ; setUserSessionProperty ( JwtSessionModule . MAX_TOKEN_LIFE_IN_MINUTES_KEY , maxTokenLife . toString ( ) ) ; setUserSessionProperty ( ENFORCE_CLIENT_IP_SETTING_KEY , Boolean . toString ( enforceClientIP ) ) ; setUserSessionProperty ( SECURE_COOKIE_KEY , Boolean . toString ( secureCookie ) ) ; setUserSessionProperty ( HTTP_ONLY_COOKIE_KEY , Boolean . toString ( httpOnlyCookie ) ) ; if ( cookieName != null ) { setUserSessionProperty ( COOKIE_NAME_KEY , cookieName ) ; } String cookieDomainsString = "" ; for ( String cookieDomain : cookieDomains ) { cookieDomainsString += cookieDomain + "," ; } setUserSessionProperty ( COOKIE_DOMAINS_KEY , cookieDomainsString ) ; setUserSessionProperty ( HMAC_KEY , encryptedHmacKey ) ; final Subject clientSubject = new Subject ( ) ; MessageInfo messageInfo = persistentCookieModuleWrapper . prepareMessageInfo ( getHttpServletRequest ( ) , getHttpServletResponse ( ) ) ; if ( process ( messageInfo , clientSubject , callbacks ) ) { if ( principal != null ) { setAuthenticatingUserName ( principal . getName ( ) ) ; } return ISAuthConstants . LOGIN_SUCCEED ; } throw new AuthLoginException ( AUTH_RESOURCE_BUNDLE_NAME , "cookieNotValid" , null ) ; } default : { throw new AuthLoginException ( AUTH_RESOURCE_BUNDLE_NAME , "incorrectState" , null ) ; } } }
Start ViewActivity to update a Contact.
783
private int distance2 ( Point p0 , Point p1 ) { int d0 = Math . abs ( p0 . x - p1 . x ) ; int d1 = Math . abs ( p0 . y - p1 . y ) ; return d0 * d0 + d1 * d1 ; }
Notify the user of a card played/revealed/... by a player.
784
public JsonWriter ( ODataUri oDataUri , EntityDataModel entityDataModel ) { this . odataUri = checkNotNull ( oDataUri ) ; this . entityDataModel = checkNotNull ( entityDataModel ) ; expandedProperties . addAll ( asJavaList ( getSimpleExpandPropertyNames ( oDataUri ) ) ) ; }
Reads a byte of data. This method will block if no input is available.
785
protected static Die die ( String why ) { return new Die ( why ) ; }
Create New Shipment Cost Detail for SO Shipments. Called from Doc_MInOut - for SO Shipments
786
public Builder withSolrXml ( Path solrXml ) { try { this . solrxml = new String ( Files . readAllBytes ( solrXml ) , Charset . defaultCharset ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return this ; }
captureFromSocket attempts to connect to graphics interceptor on the specified address.
787
public double doubleValue ( ) { if ( val instanceof Long || val instanceof Integer ) { return ( double ) ( val . longValue ( ) ) ; } return val . doubleValue ( ) ; }
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
788
public static String encode ( String string ) { byte [ ] bytes ; try { bytes = string . getBytes ( PREFERRED_ENCODING ) ; } catch ( UnsupportedEncodingException e ) { bytes = string . getBytes ( ) ; } return encodeBytes ( bytes ) ; }
Reads the bytecode of a class.
789
public void prune ( ) { ConstPool cp = compact0 ( ) ; ArrayList newAttributes = new ArrayList ( ) ; AttributeInfo invisibleAnnotations = getAttribute ( AnnotationsAttribute . invisibleTag ) ; if ( invisibleAnnotations != null ) { invisibleAnnotations = invisibleAnnotations . copy ( cp , null ) ; newAttributes . add ( invisibleAnnotations ) ; } AttributeInfo visibleAnnotations = getAttribute ( AnnotationsAttribute . visibleTag ) ; if ( visibleAnnotations != null ) { visibleAnnotations = visibleAnnotations . copy ( cp , null ) ; newAttributes . add ( visibleAnnotations ) ; } AttributeInfo signature = getAttribute ( SignatureAttribute . tag ) ; if ( signature != null ) { signature = signature . copy ( cp , null ) ; newAttributes . add ( signature ) ; } ArrayList list = methods ; int n = list . size ( ) ; for ( int i = 0 ; i < n ; ++ i ) { MethodInfo minfo = ( MethodInfo ) list . get ( i ) ; minfo . prune ( cp ) ; } list = fields ; n = list . size ( ) ; for ( int i = 0 ; i < n ; ++ i ) { FieldInfo finfo = ( FieldInfo ) list . get ( i ) ; finfo . prune ( cp ) ; } attributes = newAttributes ; constPool = cp ; }
setIssuers(Collection <X500Principal> issuers) method testing. Tests if CRLs with any issuers match the selector in the case of null issuerNames criteria, if specified issuers match the selector, and if not specified issuer does not match the selector.
790
public void endGroup ( ) { stream . println ( "</group>" ) ; }
A utility to check to see if a region has been created on all of the VMs that host the regions this region is colocated with.
791
public void testFloatValueMinusZero ( ) { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400" ; BigDecimal aNumber = new BigDecimal ( a ) ; int minusZero = - 2147483648 ; float result = aNumber . floatValue ( ) ; assertTrue ( "incorrect value" , Float . floatToIntBits ( result ) == minusZero ) ; }
Create a Set from passed objX parameters
792
public static ParameterType makeFileParameterType ( ParameterHandler parameterHandler , String parameterName , String description , PortProvider portProvider , String ... fileExtensions ) { return makeFileParameterType ( parameterHandler , parameterName , description , portProvider , false , fileExtensions ) ; }
Draws a dot to represent an outlier.
793
public void save ( String key , Object data , boolean isEncrypted , String encryptKey ) { key = safetyKey ( key ) ; String wrapperJSONSerialized ; if ( data instanceof Record ) { Type type = jolyglot . newParameterizedType ( data . getClass ( ) , Object . class ) ; wrapperJSONSerialized = jolyglot . toJson ( data , type ) ; } else { wrapperJSONSerialized = jolyglot . toJson ( data ) ; } FileWriter fileWriter = null ; try { File file = new File ( cacheDirectory , key ) ; fileWriter = new FileWriter ( file , false ) ; fileWriter . write ( wrapperJSONSerialized ) ; fileWriter . flush ( ) ; fileWriter . close ( ) ; fileWriter = null ; if ( isEncrypted ) { fileEncryptor . encrypt ( encryptKey , new File ( cacheDirectory , key ) ) ; } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } finally { try { if ( fileWriter != null ) { fileWriter . flush ( ) ; fileWriter . close ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } }
This function should always be called under a lock on putGuard & permitMon obejct <p> author Asif
794
private void backupScreens ( BackupDataOutput data ) throws IOException { ContentResolver cr = mContext . getContentResolver ( ) ; Cursor cursor = cr . query ( LauncherSettings . WorkspaceScreens . CONTENT_URI , SCREEN_PROJECTION , null , null , null ) ; try { cursor . moveToPosition ( - 1 ) ; if ( DEBUG ) Log . d ( TAG , "dumping screens after: " + mLastBackupRestoreTime ) ; while ( cursor . moveToNext ( ) ) { final long id = cursor . getLong ( ID_INDEX ) ; final long updateTime = cursor . getLong ( ID_MODIFIED ) ; Key key = getKey ( Key . SCREEN , id ) ; mKeys . add ( key ) ; final String backupKey = keyToBackupKey ( key ) ; if ( ! mExistingKeys . contains ( backupKey ) || updateTime >= mLastBackupRestoreTime ) { writeRowToBackup ( key , packScreen ( cursor ) , data ) ; } else { if ( VERBOSE ) Log . v ( TAG , "screen already backup up " + id ) ; } } } finally { cursor . close ( ) ; } }
writes a single integer to the outputstream and increments the number of bytes written by one.
795
public static double simpleTest ( double [ ] test ) { double scale = 1. / ( test . length + 1. ) ; double maxdev = Double . NEGATIVE_INFINITY ; for ( int i = 0 ; i < test . length ; i ++ ) { double expected = ( i + 1. ) * scale ; double dev = Math . abs ( test [ i ] - expected ) ; if ( dev > maxdev ) { maxdev = dev ; } } return Math . abs ( maxdev ) ; }
Splits the given attribute name into the name of an attribute view and the attribute. If the attribute view is not identified then it assumed to be "basic".
796
private void openLine ( boolean firstEntry ) throws IOException { if ( firstEntry ) { out . append ( '\"' ) ; } }
Start a reactive flow from a Collection using an Iterator
797
private long [ ] convertToArray ( Map < String , Long > map , int size , boolean unitOffset ) { long [ ] values = new long [ size ] ; int arrayOffset = unitOffset ? - 1 : 0 ; for ( Map . Entry < String , Long > cursor : map . entrySet ( ) ) { int offset = Integer . parseInt ( cursor . getKey ( ) ) + arrayOffset ; values [ offset ] = cursor . getValue ( ) ; } return values ; }
Remove a CSS class from an Element.
798
private static void sortAnonymous ( List < IType > anonymous , IType anonType ) { SourceOffsetComparator sourceComparator = new SourceOffsetComparator ( ) ; final AnonymClassComparator classComparator = new AnonymClassComparator ( anonType , sourceComparator ) ; Collections . sort ( anonymous , classComparator ) ; }
Gets whether the su session is running
799
public static boolean isDefaultUseInternalBrowser ( ) { return BrowserUtil . canUseInternalWebBrowser ( ) ; }
Create the reveal effect animation