idx
int64
0
34.9k
question
stringlengths
12
26.4k
target
stringlengths
15
2.3k
34,500
public boolean isAveragePO ( ) { String cm = getCostingMethod ( ) ; return cm != null && cm . equals ( COSTINGMETHOD_AveragePO ) && COSTELEMENTTYPE_Material . equals ( getCostElementType ( ) ) ; }
Is Avg PO Costing Method
34,501
public static long toUnixTime ( Calendar timestamp ) { return timestamp . getTimeInMillis ( ) / 1000L ; }
Convert from a Java Calendar instance into a Unix Time stamp. Java Calendar instances contain timezone information. This will be lost in the conversion and no attempt will be made to reconcile the local timezone with the timezone information in the Calendar.
34,502
void loadTvShowsFromDatabase ( MVMap < UUID , String > tvShowMap , ObjectMapper objectMapper ) { ObjectReader tvShowObjectReader = objectMapper . readerFor ( TvShow . class ) ; for ( UUID uuid : tvShowMap . keyList ( ) ) { try { TvShow tvShow = tvShowObjectReader . readValue ( tvShowMap . get ( uuid ) ) ; tvShow . setDbId ( uuid ) ; tvShowList . add ( tvShow ) ; } catch ( Exception e ) { LOGGER . warn ( "problem decoding TV show json string: " , e ) ; } } LOGGER . info ( "found " + tvShowList . size ( ) + " TV shows in database" ) ; }
Load tv shows from database.
34,503
String checkString ( String s , int base ) { if ( s == null ) { throw new NullPointerException ( "s == null" ) ; } int charCount = s . length ( ) ; int i = 0 ; if ( charCount > 0 ) { char ch = s . charAt ( 0 ) ; if ( ch == '+' ) { s = s . substring ( 1 ) ; -- charCount ; } else if ( ch == '-' ) { ++ i ; } } if ( charCount - i == 0 ) { throw invalidBigInteger ( s ) ; } boolean nonAscii = false ; for ( ; i < charCount ; ++ i ) { char ch = s . charAt ( i ) ; if ( Character . digit ( ch , base ) == - 1 ) { throw invalidBigInteger ( s ) ; } if ( ch > 128 ) { nonAscii = true ; } } return nonAscii ? toAscii ( s , base ) : s ; }
Returns a string suitable for passing to OpenSSL. Throws if 's' doesn't match Java's rules for valid BigInteger strings. BN_dec2bn and BN_hex2bn do very little checking, so we need to manually ensure we comply with Java's rules. http://code.google.com/p/android/issues/detail?id=7036
34,504
public Fp ( ECCurve curve , ECFieldElement x , ECFieldElement y ) { this ( curve , x , y , false ) ; }
Create a point which encodes with point compression.
34,505
public PlogReaderThread . IncludePlog parseIncludePlogLCR ( PlogReaderThread parent ) { String filename = null ; for ( PlogLCRTag tag : rawTags ) { switch ( tag . id ) { case PlogLCRTag . TAG_PLOG_FILENAME : filename = tag . valueString ( ) ; break ; case PlogLCRTag . TAG_PLOGSEQ : case PlogLCRTag . TAG_RBA : case PlogLCRTag . TAG_APPLY_NAME : case PlogLCRTag . TAG_MINE_UUID : case PlogLCRTag . TAG_SCN : case PlogLCRTag . TAG_PLOGNAME : default : } } return parent . new IncludePlog ( filename ) ; }
Parse information about include plog = LOAD
34,506
private int parseStyleInWorkspace ( GeoServerRESTReader reader , Map < String , List < StyleWrapper > > styleMap , int count , String workspaceName ) { List < StyleWrapper > styleList ; if ( workspaceName != null ) { RESTStyleList geoServerWorkspaceStyleList = reader . getStyles ( workspaceName ) ; styleList = new ArrayList < StyleWrapper > ( ) ; for ( String style : geoServerWorkspaceStyleList . getNames ( ) ) { StyleWrapper newStyleWrapper = new StyleWrapper ( workspaceName , style ) ; styleList . add ( newStyleWrapper ) ; if ( parentObj != null ) { parentObj . readStylesProgress ( connection , count , count ) ; } count ++ ; } styleMap . put ( workspaceName , styleList ) ; } return count ; }
Parses the style in workspace.
34,507
private List < String > listToLowerCase ( List < String > l ) { List < String > result = new ArrayList < String > ( ) ; for ( String s : l ) { result . add ( s . toLowerCase ( ) ) ; } return result ; }
Converts a List of Strings to lower case Strings.
34,508
public void test_fill$FIIF ( ) { float val = Float . MAX_VALUE ; float d [ ] = new float [ 1000 ] ; Arrays . fill ( d , 400 , d . length , val ) ; for ( int i = 0 ; i < 400 ; i ++ ) assertTrue ( "Filled elements not in range" , ! ( d [ i ] == val ) ) ; for ( int i = 400 ; i < d . length ; i ++ ) assertTrue ( "Failed to fill float array correctly" , d [ i ] == val ) ; try { Arrays . fill ( d , 10 , 0 , val ) ; fail ( "IllegalArgumentException expected" ) ; } catch ( IllegalArgumentException e ) { } try { Arrays . fill ( d , - 10 , 0 , val ) ; fail ( "ArrayIndexOutOfBoundsException expected" ) ; } catch ( ArrayIndexOutOfBoundsException e ) { } try { Arrays . fill ( d , 10 , d . length + 1 , val ) ; fail ( "ArrayIndexOutOfBoundsException expected" ) ; } catch ( ArrayIndexOutOfBoundsException e ) { } }
java.util.Arrays#fill(float[], int, int, float)
34,509
public final HttpRequestFactory createRequestFactory ( ) { return createRequestFactory ( null ) ; }
Returns a new instance of an HTTP request factory based on this HTTP transport.
34,510
public AtomicReference ( V initialValue ) { value = initialValue ; }
Creates a new AtomicReference with the given initial value.
34,511
public void makeVisible ( int index ) { if ( index < 0 || index >= items . size ( ) ) { return ; } if ( isItemHidden ( index ) ) { if ( index < vsb . getValue ( ) ) { scrollVertical ( index - vsb . getValue ( ) ) ; } else if ( index > lastItemDisplayed ( ) ) { int val = index - lastItemDisplayed ( ) ; scrollVertical ( val ) ; } } }
ensure that the given index is visible, scrolling the List if necessary, or doing nothing if the item is already visible. The List must be repainted for changes to be visible.
34,512
public Spanned [ ] history ( ) { int i = 0 ; Spanned [ ] array = new Spanned [ history . size ( ) ] ; for ( String s : history ) { if ( s != null ) { array [ i ] = Html . fromHtml ( s ) ; i ++ ; } } return array ; }
Generate an array of Spanned items representing the history of this connection.
34,513
ConfigurationError ( String msg , Exception x ) { super ( msg ) ; this . exception = x ; }
Construct a new instance with the specified detail string and exception.
34,514
public static File saveFile ( String logData ) { File dir = getLogDir ( ) ; if ( dir == null ) { return null ; } FileWriter fileWriter = null ; File output = null ; try { output = new File ( dir , getLogFileName ( ) ) ; fileWriter = new FileWriter ( output , true ) ; fileWriter . write ( logData ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { if ( fileWriter != null ) { try { fileWriter . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } return output ; }
Save the current logs to disk.
34,515
public void animateThenRemove ( MarkerWithPosition marker , LatLng from , LatLng to ) { lock . lock ( ) ; AnimationTask animationTask = new AnimationTask ( marker , from , to ) ; animationTask . removeOnAnimationComplete ( mClusterManager . getMarkerManager ( ) ) ; mAnimationTasks . add ( animationTask ) ; lock . unlock ( ) ; }
Animates a markerWithPosition some time in the future, and removes it when the animation is complete.
34,516
public static File createTmpFile ( String pathToFile ) throws IOException { File file = new File ( pathToFile ) ; if ( file . exists ( ) ) { file . delete ( ) ; } if ( ! file . createNewFile ( ) ) { LOGGER . warn ( "Couldn't create new File! Maybe the file " + file . getAbsolutePath ( ) + " already exists!" ) ; } return file ; }
Create a new temporary file. If the file already exists it is replaced.
34,517
public Stream < T > reverseStream ( ) { return StreamSupport . stream ( Spliterators . spliterator ( reverseIterator ( ) , size ( ) , 0 ) , false ) ; }
Creates a stream in reverse order.
34,518
public static ArrayList < String > exportResultVariables ( long workerID , LocalVariableMap vars , ArrayList < String > resultVars ) throws DMLRuntimeException , IOException { ArrayList < String > ret = new ArrayList < String > ( ) ; for ( String rvar : resultVars ) { Data dat = vars . get ( rvar ) ; if ( dat != null && dat . getDataType ( ) == DataType . MATRIX ) { MatrixObject mo = ( MatrixObject ) dat ; if ( mo . isDirty ( ) ) { mo . exportData ( ) ; ret . add ( ProgramConverter . serializeDataObject ( rvar , mo ) ) ; } } } return ret ; }
For remote Spark parfor workers. This is a simplified version compared to MR.
34,519
public OnSetClause addAssignment ( Expression expression ) { assignments . add ( new Assignment ( expression ) ) ; return this ; }
Adds a variable to set to the clause.
34,520
private InterpreterResult processSearch ( String [ ] urlItems , String data , int size ) { if ( urlItems . length > 2 ) { return new InterpreterResult ( InterpreterResult . Code . ERROR , "Bad URL (it should be /index1,index2,.../type1,type2,...)" ) ; } final SearchResponse response = searchData ( urlItems , data , size ) ; return buildResponseMessage ( response ) ; }
Processes a "search" request.
34,521
public void testDelete4 ( ) throws SQLException { DatabaseCreator . fillFKCascadeTable ( conn ) ; statement . execute ( "DELETE FROM " + DatabaseCreator . PARENT_TABLE + " WHERE id = 3;" ) ; }
DeleteFunctionalityTest#testDelete4(). Deletes row with no referencing ones and CASCADE action
34,522
public static Array listToArrayTrim ( String list , String delimiter ) { if ( delimiter . length ( ) == 1 ) return listToArrayTrim ( list , delimiter . charAt ( 0 ) ) ; if ( list . length ( ) == 0 ) return new ArrayImpl ( ) ; char [ ] del = delimiter . toCharArray ( ) ; char c ; outer : while ( list . length ( ) > 0 ) { c = list . charAt ( 0 ) ; for ( int i = 0 ; i < del . length ; i ++ ) { if ( c == del [ i ] ) { list = list . substring ( 1 ) ; continue outer ; } } break ; } int len ; outer : while ( list . length ( ) > 0 ) { c = list . charAt ( list . length ( ) - 1 ) ; for ( int i = 0 ; i < del . length ; i ++ ) { if ( c == del [ i ] ) { len = list . length ( ) ; list = list . substring ( 0 , len - 1 < 0 ? 0 : len - 1 ) ; continue outer ; } } break ; } return listToArray ( list , delimiter ) ; }
casts a list to Array object, remove all empty items at start and end of the list
34,523
void restore ( ) { System . arraycopy ( registerSave , 0 , register , 0 , blockSize ) ; }
Restores the content of this cipher to the previous saved one.
34,524
public URI ( String scheme , String userInfo , String host , int port , String path , String query , String fragment ) throws URISyntaxException { if ( scheme == null && userInfo == null && host == null && path == null && query == null && fragment == null ) { this . path = "" ; return ; } if ( scheme != null && path != null && ! path . isEmpty ( ) && path . charAt ( 0 ) != '/' ) { throw new URISyntaxException ( path , "Relative path" ) ; } StringBuilder uri = new StringBuilder ( ) ; if ( scheme != null ) { uri . append ( scheme ) ; uri . append ( ':' ) ; } if ( userInfo != null || host != null || port != - 1 ) { uri . append ( "//" ) ; } if ( userInfo != null ) { USER_INFO_ENCODER . appendEncoded ( uri , userInfo ) ; uri . append ( '@' ) ; } if ( host != null ) { if ( host . indexOf ( ':' ) != - 1 && host . indexOf ( ']' ) == - 1 && host . indexOf ( '[' ) == - 1 ) { host = "[" + host + "]" ; } uri . append ( host ) ; } if ( port != - 1 ) { uri . append ( ':' ) ; uri . append ( port ) ; } if ( path != null ) { PATH_ENCODER . appendEncoded ( uri , path ) ; } if ( query != null ) { uri . append ( '?' ) ; ALL_LEGAL_ENCODER . appendEncoded ( uri , query ) ; } if ( fragment != null ) { uri . append ( '#' ) ; ALL_LEGAL_ENCODER . appendEncoded ( uri , fragment ) ; } parseURI ( uri . toString ( ) , true ) ; }
Creates a new URI instance of the given unencoded component parts.
34,525
public Iterator iterator ( ) { return objectList . iterator ( ) ; }
Returns an iterator of the DataType list.
34,526
private static void verifyMarkdownContainsFieldsInTables ( File doc , Map < String , Set < String > > fieldsByTable ) throws IOException { final List < String > lines = Files . readAllLines ( doc . toPath ( ) , Charset . defaultCharset ( ) ) ; final Map < String , Set < String > > fieldsLeftByTable = Maps . newHashMap ( ) ; for ( Map . Entry < String , Set < String > > entry : fieldsByTable . entrySet ( ) ) { fieldsLeftByTable . put ( entry . getKey ( ) , Sets . newHashSet ( entry . getValue ( ) ) ) ; } String inTable = null ; for ( String line : lines ) { if ( fieldsLeftByTable . isEmpty ( ) ) { return ; } final String currentHeader = getTableHeader ( line ) ; if ( inTable == null || currentHeader != null ) { inTable = currentHeader ; } if ( inTable != null && fieldsLeftByTable . containsKey ( inTable ) ) { String [ ] parts = line . split ( "\\|" ) ; if ( parts . length > 1 ) { final String fieldName = parts [ 1 ] ; final Set < String > fieldsLeft = fieldsLeftByTable . get ( inTable ) ; Iterator < String > fieldIt = fieldsLeft . iterator ( ) ; while ( fieldIt . hasNext ( ) ) { String fieldLeft = fieldIt . next ( ) ; if ( fieldName . contains ( fieldLeft ) ) fieldIt . remove ( ) ; } if ( fieldsLeft . isEmpty ( ) ) { fieldsLeftByTable . remove ( inTable ) ; } } } } if ( ! fieldsLeftByTable . isEmpty ( ) ) { fail ( String . format ( "Markdown file '%s' did not contain expected fields (by table): %s" , doc , fieldsLeftByTable ) ) ; } }
Given a markdown document to search, this checks to see if the specified tables have all of the expected fields listed. Match is a "search", and not an "equals" match.
34,527
public void addVideoFileTypes ( String type ) { if ( ! type . startsWith ( "." ) ) { type = "." + type ; } if ( ! videoFileTypes . contains ( type ) ) { videoFileTypes . add ( type ) ; firePropertyChange ( VIDEO_FILE_TYPE , null , videoFileTypes ) ; } }
Adds the video file types.
34,528
public E poll ( ) { if ( isEmpty ( ) ) { return null ; } E result = elements [ 0 ] ; removeAt ( 0 ) ; return result ; }
Gets and removes the head of the queue.
34,529
public static long unixTimestamp ( UUID uuid ) { if ( uuid . version ( ) != 1 ) { throw new IllegalArgumentException ( String . format ( "Can only retrieve the unix timestamp for version 1 uuid (provided version %d)" , uuid . version ( ) ) ) ; } else { return uuid . timestamp ( ) / 10000L + START_EPOCH ; } }
Get the unix timestamp encoded in a time-based (type 1) UUID.
34,530
private void parseBoldAndItalicSpans ( SpanManager sm , Span line , List < Span > boldSpans , List < Span > italicSpans ) { parseQuotedSpans ( sm , line , boldSpans , "'''" ) ; parseQuotedSpans ( sm , line , italicSpans , "''" ) ; int openTag = sm . indexOf ( "''" , line ) ; if ( openTag != - 1 ) { Span qs = new Span ( openTag , line . getEnd ( ) ) ; if ( calculateSrcSpans ) { qs . setSrcSpan ( new SrcSpan ( sm . getSrcPos ( openTag ) , sm . getSrcPos ( line . getEnd ( ) ) ) ) ; } if ( sm . indexOf ( "'''" , openTag , openTag + 3 ) != - 1 ) { boldSpans . add ( qs ) ; sm . delete ( openTag , openTag + 3 ) ; } else { italicSpans . add ( qs ) ; sm . delete ( openTag , openTag + 2 ) ; } } }
Searches a line for Bold and Italic quotations, this has to be done linewhise.
34,531
public void putAll ( Collection < V > c ) { ensureCapacity ( m_data . length + c . size ( ) ) ; for ( V e : c ) { put ( e . getOsmId ( ) , e ) ; } }
Add all elements from c
34,532
public static String toSystemDependentPath ( String path ) { if ( File . separatorChar != '/' ) { path = path . replace ( '/' , File . separatorChar ) ; } return path ; }
Converts a /-based path into a path using the system dependent separator.
34,533
private void fields ( Class type ) { Field [ ] list = type . getDeclaredFields ( ) ; for ( Field field : list ) { FieldDetail detail = new FieldDetail ( field ) ; fields . add ( detail ) ; } }
This is used to scan the type for its declared fields. Scanning of the fields in this way allows the detail to prepare a cache that can be used to acquire the fields and the associated annotations. This improves performance on some platforms.
34,534
private String findPropertiesFile ( final String directory ) { final File f = new File ( directory , DEFAULT_OPENDJ_PROPERTIES_FILE_NAME + DEFAULT_OPENDJ_PROPERTIES_FILE_EXTENSION ) ; if ( f . exists ( ) && f . canRead ( ) ) { return f . getAbsolutePath ( ) ; } return null ; }
Get the absolute path of the properties file.
34,535
private void closeInternal ( ) { final BigdataSailRepositoryConnection cxn = tlTx . get ( ) ; if ( cxn != null ) { close ( cxn ) ; } }
Release the unisolated connection.
34,536
public static Date stringToDate ( String datstr ) { SimpleDateFormat fmt = ComponentTime . makeInputFormatter ( ) ; ParsePosition zero = new ParsePosition ( 0 ) ; if ( datstr . length ( ) > 23 ) datstr = datstr . substring ( 0 , 23 ) ; return ( fmt . parse ( datstr , zero ) ) ; }
Convert a String to a Java Date
34,537
public JarListLoader ( ) { }
Creates a new jar list loader.
34,538
public Statement in ( Object ... values ) { statement . append ( " IN (" ) ; for ( int i = 0 ; i < values . length ; i ++ ) { if ( i > 0 ) statement . append ( ", " ) ; append ( values [ i ] ) ; } statement . append ( ')' ) ; return this ; }
Appending the IN operator clause.
34,539
public long elapsedTimeMillis ( ) { if ( this . stopTime == 0 ) { return System . currentTimeMillis ( ) - this . startTime ; } else { return this . stopTime - this . startTime ; } }
Returns the elapsed time in millis since starting. Value is final once stopped.
34,540
public void handleConfiguration ( Class < OpsType > opsType , Interface instance ) throws InstantiationException , IllegalAccessException { if ( mRetainedFragmentManager . firstTimeIn ( ) ) { Log . d ( TAG , "First time onCreate() call" ) ; initialize ( opsType , instance ) ; } else { Log . d ( TAG , "Second or subsequent onCreate() call" ) ; mOpsInstance = mRetainedFragmentManager . get ( opsType . getSimpleName ( ) ) ; if ( mOpsInstance == null ) initialize ( opsType , instance ) ; else mOpsInstance . onConfiguration ( instance , false ) ; } }
Handle hardware (re)configurations, such as rotating the display.
34,541
public static byte [ ] decode ( byte [ ] input , int offset , int len , int flags ) { Decoder decoder = new Decoder ( flags , new byte [ len * 3 / 4 ] ) ; if ( ! decoder . process ( input , offset , len , true ) ) { throw new IllegalArgumentException ( "bad base-64" ) ; } if ( decoder . op == decoder . output . length ) { return decoder . output ; } byte [ ] temp = new byte [ decoder . op ] ; System . arraycopy ( decoder . output , 0 , temp , 0 , decoder . op ) ; return temp ; }
Decode the Base64-encoded data in input and return the data in a new byte array. <p>The padding '=' characters at the end are considered optional, but if any are present, there must be the correct number of them.
34,542
public static final boolean isASCII ( Resources res , int resId ) throws IOException , NotFoundException { BufferedReader buffer = new BufferedReader ( new InputStreamReader ( res . openRawResource ( resId ) ) ) ; boolean isASCII = isASCII ( buffer ) ; buffer . close ( ) ; return isASCII ; }
Determine if a given resource appears to be in ASCII format.
34,543
public boolean hasPools ( ) { return _poolHashTable . size ( ) > 0 ; }
Used to determine if there are Pools at this location.
34,544
public synchronized void add ( String name , long threadId ) { if ( mFinished ) { throw new IllegalStateException ( "Marker added to finished log" ) ; } mMarkers . add ( new Marker ( name , threadId , SystemClock . elapsedRealtime ( ) ) ) ; }
Adds a marker to this log with the specified name.
34,545
public Zhqrd ( Zmat A ) throws JampackException { A . getProperties ( ) ; nrow = A . nr ; ncol = A . nc ; ntran = Math . min ( A . nr , A . nc ) ; U = new Z1 [ ntran ] ; R = new Zutmat ( A ) ; for ( int k = A . bx ; k < A . bx + ntran ; k ++ ) { U [ k - A . bx ] = House . genc ( R , k , A . rx , k ) ; House . ua ( U [ k - A . bx ] , R , k , A . rx , k + 1 , A . cx ) ; } if ( nrow > ncol ) { R = new Zutmat ( R . get ( R . bx , R . cx , R . bx , R . cx ) ) ; } }
Computes a Householder QR decomposition of a Zmat
34,546
public void fillPolygon ( int [ ] xPoints , int [ ] yPoints , int nPoints ) { int [ ] cX = xPoints ; int [ ] cY = yPoints ; if ( ( ! impl . isTranslationSupported ( ) ) && ( xTranslate != 0 || yTranslate != 0 ) ) { cX = new int [ nPoints ] ; cY = new int [ nPoints ] ; System . arraycopy ( xPoints , 0 , cX , 0 , nPoints ) ; System . arraycopy ( yPoints , 0 , cY , 0 , nPoints ) ; for ( int iter = 0 ; iter < nPoints ; iter ++ ) { cX [ iter ] += xTranslate ; cY [ iter ] += yTranslate ; } } impl . fillPolygon ( nativeGraphics , cX , cY , nPoints ) ; }
Fills a closed polygon defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point.
34,547
public boolean correctHeatSinks ( StringBuffer buff ) { if ( ( aero . getHeatType ( ) != Aero . HEAT_SINGLE ) && ( aero . getHeatType ( ) != Aero . HEAT_DOUBLE ) ) { buff . append ( "Invalid heatsink type! Valid types are " + Aero . HEAT_SINGLE + " and " + Aero . HEAT_DOUBLE + ". Found " + aero . getHeatType ( ) + "." ) ; } if ( aero . getEntityType ( ) == Entity . ETYPE_CONV_FIGHTER ) { int maxWeapHeat = countHeatEnergyWeapons ( ) ; int heatDissipation = 0 ; if ( aero . getHeatType ( ) == Aero . HEAT_DOUBLE ) { buff . append ( "Conventional fighters may only use single " + "heatsinks!" ) ; return false ; } heatDissipation = aero . getHeatSinks ( ) ; if ( maxWeapHeat > heatDissipation ) { buff . append ( "Conventional fighters must be able to " + "dissipate all heat from energy weapons! \n" + "Max energy heat: " + maxWeapHeat + ", max dissipation: " + heatDissipation ) ; return false ; } else { return true ; } } else { return true ; } }
Checks that the heatsink assignment is legal. Conventional fighters must have enough heatsinks to dissipate heat from all of their energy weapons and they may only mount standard heatsinks. Aerospace fighters must have at least 10 heatsinks.
34,548
public boolean acquire ( ) { int [ ] stamp = new int [ 1 ] ; while ( true ) { boolean undeployed = usage . get ( stamp ) ; int r = stamp [ 0 ] ; if ( undeployed && r == 0 ) return false ; if ( usage . compareAndSet ( undeployed , undeployed , r , r + 1 ) ) return true ; } }
Increments usage count for deployment. If deployment is undeployed, then usage count is not incremented.
34,549
public void init ( int size , int typeproc , SecureRandom random ) { this . size = size ; this . typeproc = typeproc ; this . init_random = random ; }
initialise the key generator.
34,550
public EventSourceImpl ( ) { LOG . entering ( CLASS_NAME , "<init>" ) ; }
EventSource provides a text-based stream abstraction for Java
34,551
public static BigInteger [ ] transformRawSignature ( byte [ ] raw ) throws IOException { BigInteger [ ] output = new BigInteger [ 2 ] ; output [ 0 ] = new BigInteger ( 1 , Arrays . copyOfRange ( raw , 0 , 32 ) ) ; output [ 1 ] = new BigInteger ( 1 , Arrays . copyOfRange ( raw , 32 , 64 ) ) ; return output ; }
From byte[] to Big Integers r,s UAF_ALG_SIGN_SECP256K1_ECDSA_SHA256_RAW 0x05 An ECDSA signature on the secp256k1 curve which must have raw R and S buffers, encoded in big-endian order. I.e.[R (32 bytes), S (32 bytes)]
34,552
public static boolean deleteRecursively ( File f ) { boolean done = false ; if ( f . isFile ( ) ) { f . delete ( ) ; return true ; } if ( f . isDirectory ( ) ) { File [ ] list = f . listFiles ( ) ; if ( list . length < 0 ) { Logger . appendLog ( "[FilesUtils][I] deleting " + f . getAbsolutePath ( ) ) ; return f . delete ( ) ; } else { for ( File file : list ) { deleteRecursively ( file ) ; } return f . delete ( ) ; } } return done ; }
deletes recursively a folder (USE WITH CARE)
34,553
private void initCircleCropWindow ( @ NonNull RectF bitmapRect ) { mOffset = 0.1f * Math . min ( bitmapRect . width ( ) , bitmapRect . height ( ) ) ; mDrawableWidth = bitmapRect . width ( ) ; mDrawableHeight = bitmapRect . height ( ) ; mCenterPointX = mDrawableWidth / 2.0f ; mCenterPointY = mDrawableHeight / 2.0f ; mRadius = ( Math . min ( mDrawableWidth , mDrawableHeight ) - mOffset ) / 2.0f ; }
Initialize the crop window by setting the proper values. <p/> If fixed aspect ratio is turned off, the initial crop window will be set to the displayed image with 10% margin.
34,554
public boolean hasChildren ( ) { for ( int i = 0 ; i < ( arguments != null ? arguments . size ( ) : 0 ) ; i ++ ) { if ( getArgument ( i ) instanceof MathContainer ) { return true ; } } return false ; }
Are there any arguments?
34,555
private void handleServerURLChange ( String newServerURL ) { this . coordinatorServerURL = newServerURL ; log . info ( "Server URL being set to " + newServerURL ) ; }
This method handle setConfig messages that want to change the url of the server the JobCoordinator has brought up.
34,556
public PacketOutputStream writeTimeLength ( final Calendar calendar , final boolean fractionalSeconds ) { if ( fractionalSeconds ) { assureBufferCapacity ( 13 ) ; buffer . put ( ( byte ) 12 ) ; buffer . put ( ( byte ) 0 ) ; buffer . putInt ( 0 ) ; buffer . put ( ( byte ) calendar . get ( Calendar . HOUR_OF_DAY ) ) ; buffer . put ( ( byte ) calendar . get ( Calendar . MINUTE ) ) ; buffer . put ( ( byte ) calendar . get ( Calendar . SECOND ) ) ; buffer . putInt ( calendar . get ( Calendar . MILLISECOND ) * 1000 ) ; } else { assureBufferCapacity ( 9 ) ; buffer . put ( ( byte ) 8 ) ; buffer . put ( ( byte ) 0 ) ; buffer . putInt ( 0 ) ; buffer . put ( ( byte ) calendar . get ( Calendar . HOUR_OF_DAY ) ) ; buffer . put ( ( byte ) calendar . get ( Calendar . MINUTE ) ) ; buffer . put ( ( byte ) calendar . get ( Calendar . SECOND ) ) ; } return this ; }
Write time in binary format.
34,557
public DAbout ( JFrame parent , String title , String licenseNotice , Image aboutImg , Object [ ] tickerItems ) { super ( parent , title , ModalityType . DOCUMENT_MODAL ) ; initComponents ( aboutImg , licenseNotice , tickerItems ) ; }
Creates new DAbout dialog.
34,558
public Criteria createCriteria ( ) { Criteria criteria = createCriteriaInternal ( ) ; if ( oredCriteria . size ( ) == 0 ) { oredCriteria . add ( criteria ) ; } return criteria ; }
This method was generated by MyBatis Generator. This method corresponds to the database table user_roles
34,559
public boolean contains ( long prefix_hash ) { if ( prefix_hash == 0 ) { return false ; } int idx = - 1 * Arrays . binarySearch ( hashes_idx , prefix_hash ) - 1 ; if ( idx == cache_size ) { return false ; } else { return ( hashes_idx [ idx ] & PREFIX_HASH_MASK ) == prefix_hash ; } }
Checks if there are any object in the cache generated on the base of encoding with prefix corresponding to the specified hash code.
34,560
public void closeIfNecessary ( ) { if ( jmdnsInstance != null ) { if ( jmdnsSubscriberCount . get ( ) <= 0 ) { close ( ) ; } } }
Closes the JmDNS instance if there are no longer any subscribers.
34,561
public void removeAnnotation ( int index ) { mAnnotations . remove ( index ) ; mStringXY . removeByIndex ( index ) ; }
Remove an String at index
34,562
protected void loadValue ( String sValue ) { value = new File ( sValue ) ; absolutePath = value . getAbsolutePath ( ) ; }
Load value from property string value
34,563
public void removeDebugger ( final IDebugger debugger ) { debuggers . remove ( debugger ) ; for ( final DebuggerProviderListener listener : m_listeners ) { try { listener . debuggerRemoved ( this , debugger ) ; } catch ( final Exception exception ) { CUtilityFunctions . logException ( exception ) ; } } }
Removes a debugger from the provider.
34,564
private int compareTemplates ( @ NotNull File file1 , @ NotNull File file2 ) { TemplateMetadata template1 = getTemplateMetadata ( file1 ) ; TemplateMetadata template2 = getTemplateMetadata ( file2 ) ; if ( template1 == null ) { return 1 ; } else if ( template2 == null ) { return - 1 ; } else { int delta = template2 . getRevision ( ) - template1 . getRevision ( ) ; if ( delta == 0 ) { delta = ( int ) ( file2 . lastModified ( ) - file1 . lastModified ( ) ) ; } return delta ; } }
Compare two files, and return the one with the HIGHEST revision, and if the same, most recently modified
34,565
public static byte [ ] decode ( byte [ ] data ) { int len = data . length / 4 * 3 ; ByteArrayOutputStream bOut = new ByteArrayOutputStream ( len ) ; try { encoder . decode ( data , 0 , data . length , bOut ) ; } catch ( Exception e ) { throw new DecoderException ( "unable to decode base64 data: " + e . getMessage ( ) , e ) ; } return bOut . toByteArray ( ) ; }
decode the base 64 encoded input data. It is assumed the input data is valid.
34,566
public synchronized Entry firstValue ( ) { if ( array . isEmpty ( ) ) return null ; else { return array . get ( 0 ) ; } }
First value Entry is returned. Iteration is organized in this manner: Iteration is organized in this manner: for(ConcurrentArrayHashMap<K, V>.Entry e = targets.firstValue(); e != null; e = targets.nextValue(e)) { V element = e.getValue();
34,567
public static Map < String , Collection < String > > groupFilesByMimeType ( Collection < String > attachments ) { Map < String , Collection < String > > attachmentsByMimeType = new HashMap < > ( ) ; for ( String url : attachments ) { String mimeType = getMimeType ( url ) ; if ( mimeType . length ( ) > 0 ) { Collection < String > mimeTypeList = attachmentsByMimeType . get ( mimeType ) ; if ( mimeTypeList == null ) { mimeTypeList = new ArrayList < > ( ) ; attachmentsByMimeType . put ( mimeType , mimeTypeList ) ; } mimeTypeList . add ( url ) ; } } return attachmentsByMimeType ; }
group given files (URLs) into hash by mime-type
34,568
private synchronized void deleteCommentInternal ( final CommentingStrategy strategy , final IComment comment ) { Preconditions . checkNotNull ( comment , "IE02542: comment argument can not be null" ) ; final List < IComment > currentComments = strategy . getComments ( ) ; if ( ! currentComments . remove ( comment ) ) { return ; } strategy . saveComments ( currentComments ) ; commentIdToComment . remove ( comment . getId ( ) ) ; for ( final CommentListener listener : listeners ) { try { strategy . sendDeletedCommentNotification ( listener , comment ) ; } catch ( final Exception exception ) { CUtilityFunctions . logException ( exception ) ; } } }
This function is used when notification from the database are received that a comment has been deleted. Therefore the comment only needs to be removed from the data structures in the comment manager as it has already been removed from the database.
34,569
void resume ( ) { paused . set ( false ) ; synchronized ( pauseLock ) { pauseLock . notifyAll ( ) ; } }
Resumes engine work. Paused "load&display" tasks will continue its work.
34,570
public long readLong ( ) throws IOException { return primitiveTypes . readLong ( ) ; }
Reads a long (64 bit) from the source stream.
34,571
private static JValueSlider createField ( Force f , int param ) { double value = f . getParameter ( param ) ; double min = f . getMinValue ( param ) ; double max = f . getMaxValue ( param ) ; String name = f . getParameterName ( param ) ; JValueSlider s = new JValueSlider ( name , min , max , value ) ; s . setBackground ( Color . WHITE ) ; s . putClientProperty ( "force" , f ) ; s . putClientProperty ( "param" , new Integer ( param ) ) ; s . setPreferredSize ( new Dimension ( 300 , 30 ) ) ; s . setMaximumSize ( new Dimension ( 300 , 30 ) ) ; return s ; }
Create an entry for configuring a single parameter.
34,572
private boolean zzRefill ( ) throws java . io . IOException { if ( zzStartRead > 0 ) { System . arraycopy ( zzBuffer , zzStartRead , zzBuffer , 0 , zzEndRead - zzStartRead ) ; zzEndRead -= zzStartRead ; zzCurrentPos -= zzStartRead ; zzMarkedPos -= zzStartRead ; zzStartRead = 0 ; } if ( zzCurrentPos >= zzBuffer . length ) { char newBuffer [ ] = new char [ zzCurrentPos * 2 ] ; System . arraycopy ( zzBuffer , 0 , newBuffer , 0 , zzBuffer . length ) ; zzBuffer = newBuffer ; } int numRead = zzReader . read ( zzBuffer , zzEndRead , zzBuffer . length - zzEndRead ) ; if ( numRead > 0 ) { zzEndRead += numRead ; return false ; } if ( numRead == 0 ) { int c = zzReader . read ( ) ; if ( c == - 1 ) { return true ; } else { zzBuffer [ zzEndRead ++ ] = ( char ) c ; return false ; } } return true ; }
Refills the input buffer.
34,573
public void saveAuthenticatedPrincipal ( String principalName ) { authenticatedPrincipals . add ( principalName ) ; requestMap . put ( ISAuthConstants . AUTHENTICATED_PRINCIPALS , StringUtils . join ( authenticatedPrincipals , "|" ) ) ; }
Saves the principals successfully created in the authentication process whether all modules or identity searches are successful or not. This differs from the principalList which is generated by the logincontext as that is only generated when all modules have been completed successfully.
34,574
public boolean isDisplayLogging ( ) { return this . logArea != null ; }
States whether the desktop is currently displaying log output.
34,575
public void removeOnceFromDamaged ( final Unit damagedUnit ) { m_damaged . remove ( damagedUnit ) ; }
Can have multiple of the same unit, to show multiple hits to that unit.
34,576
public Query appendIf ( final String name , final GitlabAccessLevel value ) throws UnsupportedEncodingException { if ( value != null ) { append ( name , Integer . toString ( value . accessValue ) ) ; } return this ; }
Conditionally append a parameter to the query if the value of the parameter is not null
34,577
public void incrStats ( Collection < GraphNode > nodes ) { totalCount += nodes . size ( ) ; for ( GraphNode node : nodes ) { ElementKindDescriptor descr = findDescriptor ( node ) ; if ( null == descr ) { otherCount ++ ; } else { int count = kindCounts . get ( descr ) ; kindCounts . put ( descr , count + 1 ) ; } } }
Update the current statistics for the new set of analysis nodes.
34,578
public TrainSchedule ( Element e ) { org . jdom2 . Attribute a ; if ( ( a = e . getAttribute ( Xml . ID ) ) != null ) { _id = a . getValue ( ) ; } else { log . warn ( "no id attribute in schedule element when reading operations" ) ; } if ( ( a = e . getAttribute ( Xml . NAME ) ) != null ) { _name = a . getValue ( ) ; } if ( ( a = e . getAttribute ( Xml . COMMENT ) ) != null ) { _comment = a . getValue ( ) ; } if ( ( a = e . getAttribute ( Xml . TRAIN_IDS ) ) != null ) { String ids = a . getValue ( ) ; String [ ] trainIds = ids . split ( "," ) ; for ( String id : trainIds ) { _trainIds . add ( id ) ; } } }
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-trains.xml
34,579
public WindowBeanshell ( BoardFrame p_board_frame ) { super ( p_board_frame ) ; stat = board_frame . stat ; workFrame = new JFrame ( "Ammi Client Beanshell" ) ; workPanel = ( JPanel ) workFrame . getContentPane ( ) ; bshConsole = new JConsole ( ) ; workPanel . add ( bshConsole , BorderLayout . CENTER ) ; workPanel . add ( newButtons ( ) , BorderLayout . NORTH ) ; workFrame . setSize ( 500 , 500 ) ; bshInterp = new Interpreter ( bshConsole ) ; }
What will be available is a panel where lanuages are managed.
34,580
protected void processBDDPLists ( ) { int count = 0 ; Set < NodePortTuple > nptList = new HashSet < NodePortTuple > ( ) ; while ( count < BDDP_TASK_SIZE && quarantineQueue . peek ( ) != null ) { NodePortTuple npt ; npt = quarantineQueue . remove ( ) ; if ( ! toRemoveFromQuarantineQueue . remove ( npt ) ) { sendDiscoveryMessage ( npt . getNodeId ( ) , npt . getPortId ( ) , false , false ) ; } nptList . add ( npt ) ; count ++ ; } count = 0 ; while ( count < BDDP_TASK_SIZE && maintenanceQueue . peek ( ) != null ) { NodePortTuple npt ; npt = maintenanceQueue . remove ( ) ; if ( ! toRemoveFromMaintenanceQueue . remove ( npt ) ) { sendDiscoveryMessage ( npt . getNodeId ( ) , npt . getPortId ( ) , false , false ) ; } count ++ ; } for ( NodePortTuple npt : nptList ) { generateSwitchPortStatusUpdate ( npt . getNodeId ( ) , npt . getPortId ( ) ) ; } }
This method processes the quarantine list in bursts. The task is at most once per BDDP_TASK_INTERVAL. One each call, BDDP_TASK_SIZE number of switch ports are processed. Once the BDDP packets are sent out through the switch ports, the ports are removed from the quarantine list.
34,581
public byte [ ] receiveSpecLenBytes ( int len ) { Log . d ( TAG , "receiveSpecLenBytes() entrance: len = " + len ) ; try { acquireLock ( ) ; mServerSocket . receive ( mReceivePacket ) ; byte [ ] recDatas = Arrays . copyOf ( mReceivePacket . getData ( ) , mReceivePacket . getLength ( ) ) ; Log . d ( TAG , "received len : " + recDatas . length ) ; for ( int i = 0 ; i < recDatas . length ; i ++ ) { Log . e ( TAG , "recDatas[" + i + "]:" + recDatas [ i ] ) ; } Log . e ( TAG , "receiveSpecLenBytes: " + new String ( recDatas ) ) ; if ( recDatas . length != len ) { Log . w ( TAG , "received len is different from specific len, return null" ) ; return null ; } return recDatas ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return null ; }
Receive specific length bytes from the port and convert it into String 21,24,-2,52,-102,-93,-60 15,18,fe,34,9a,a3,c4
34,582
private static void execute ( final String [ ] args ) throws Exception { List < String > instances ; if ( args . length > 0 ) { instances = Arrays . asList ( args ) ; } else { instances = ConfProxyHelper . availableInstances ( ) ; } for ( String instance : instances ) { try { ConfProxy proxy = new ConfProxy ( instance ) ; proxy . execute ( ) ; } catch ( Exception ex ) { log . error ( "Error when executing configuration-proxy '{}': {}" , instance , ex ) ; } } }
Executes all configuration proxy instances in sequence.
34,583
protected byte [ ] _readLastChunk ( long index ) throws IOException , InvalidKeyException , InvalidAlgorithmParameterException , IllegalBlockSizeException , BadPaddingException , FileEncryptionException , ShortBufferException { long nRemaining = backingRandomAccessFile . length ( ) - ( chunkOffset ( index ) ) ; if ( nRemaining > CHUNK_ENC_SIZE ) { throw new FileEncryptionException ( "Calculated size of size of last chunk bigger than default chunk size!" ) ; } else if ( nRemaining <= CHUNK_IV_SIZE ) { return new byte [ ] { } ; } long oldpos = backingRandomAccessFile . getFilePointer ( ) ; backingRandomAccessFile . seek ( chunkOffset ( index ) ) ; byte [ ] iv = new byte [ CHUNK_IV_SIZE ] ; int ret = backingRandomAccessFile . read ( iv ) ; if ( ret != CHUNK_IV_SIZE ) { throw new FileEncryptionException ( "Size mismatch reading chunk IV!" ) ; } IvParameterSpec spec = new IvParameterSpec ( iv ) ; lastChunkCipher . init ( Cipher . DECRYPT_MODE , getFileKey ( ) , spec ) ; nRemaining -= CHUNK_IV_SIZE ; byte [ ] buf = new byte [ ( int ) nRemaining ] ; byte [ ] res ; ret = backingRandomAccessFile . read ( buf ) ; backingRandomAccessFile . seek ( oldpos ) ; if ( ret != nRemaining ) { throw new FileEncryptionException ( "Size mismatch reading encrypted chunk data!" ) ; } res = lastChunkCipher . doFinal ( buf ) ; if ( ( res == null ) || ( res . length != ( nRemaining - CHUNK_TLEN ) ) ) { throw new FileEncryptionException ( "Decryption error or chunk size mismatch during decryption!" ) ; } else { return res ; } }
Helper method for reading and decrypting the last chunk of the file
34,584
public DeviceAutomator pressBack ( ) { mDevice . pressBack ( ) ; return this ; }
Simulates a short press on the BACK button.
34,585
private static StringBuilder escapeRegex ( final StringBuilder regex , final String value , final boolean unquote ) { regex . append ( "\\Q" ) ; for ( int i = 0 ; i < value . length ( ) ; ++ i ) { char c = value . charAt ( i ) ; switch ( c ) { case '\'' : if ( unquote ) { if ( ++ i == value . length ( ) ) { return regex ; } c = value . charAt ( i ) ; } break ; case '\\' : if ( ++ i == value . length ( ) ) { break ; } regex . append ( c ) ; c = value . charAt ( i ) ; if ( c == 'E' ) { regex . append ( "E\\\\E\\" ) ; c = 'Q' ; } break ; default : break ; } regex . append ( c ) ; } regex . append ( "\\E" ) ; return regex ; }
Escape constant fields into regular expression
34,586
public InputBuilder < T > emit ( T record ) { if ( record == null ) { throw new IllegalArgumentException ( "Record has too be not null!" ) ; } input . add ( record ) ; return this ; }
Adds a new element to the input
34,587
public void finish ( ) throws IOException { if ( ! this . wroteLastChunk ) { flushCache ( ) ; writeClosingChunk ( ) ; this . wroteLastChunk = true ; } }
Must be called to ensure the internal cache is flushed and the closing chunk is written.
34,588
public static void copy ( String in , Writer out ) throws IOException { Assert . notNull ( in , "No input String specified" ) ; Assert . notNull ( out , "No Writer specified" ) ; try { out . write ( in ) ; } finally { try { out . close ( ) ; } catch ( IOException ex ) { } } }
Copy the contents of the given String to the given output Writer. Closes the writer when done.
34,589
public String buildUnionQuery ( String [ ] subQueries , String sortOrder , String limit ) { StringBuilder query = new StringBuilder ( 128 ) ; int subQueryCount = subQueries . length ; String unionOperator = mDistinct ? " UNION " : " UNION ALL " ; for ( int i = 0 ; i < subQueryCount ; i ++ ) { if ( i > 0 ) { query . append ( unionOperator ) ; } query . append ( subQueries [ i ] ) ; } appendClause ( query , " ORDER BY " , sortOrder ) ; appendClause ( query , " LIMIT " , limit ) ; return query . toString ( ) ; }
Given a set of subqueries, all of which are SELECT statements, construct a query that returns the union of what those subqueries return.
34,590
public static String [ ] filterPermissions ( Context context , String [ ] permissions , int filter ) { final ArrayList < String > filtered = new ArrayList < > ( ) ; for ( String permission : permissions ) { if ( getPermissionGrant ( context , permission ) == filter ) { filtered . add ( permission ) ; } } return filtered . toArray ( new String [ filtered . size ( ) ] ) ; }
Filters all provided permissions and returns only granted or denied.
34,591
public void registerSkippedElements ( String URI , Set < String > skippedElements ) { init ( ) ; if ( skippedElementsByURI == null ) { skippedElementsByURI = new HashMap < String , Set < String > > ( 1 ) ; skippedElementsByURI . put ( URI , skippedElements ) ; } else { if ( skippedElementsByURI . containsKey ( URI ) ) { Set < String > value = skippedElementsByURI . get ( URI ) ; value . addAll ( skippedElements ) ; skippedElementsByURI . put ( URI , value ) ; } else { skippedElementsByURI . put ( URI , skippedElements ) ; } } }
Registers names of elements that are to be skipped by the scanner
34,592
public Object readCostMatrixOld ( Element node ) throws Exception { weka . classifiers . CostMatrix matrix ; weka . core . matrix . Matrix matrixNew ; StringWriter writer ; if ( DEBUG ) { trace ( new Throwable ( ) , node . getAttribute ( ATT_NAME ) ) ; } m_CurrentNode = node ; matrixNew = ( weka . core . matrix . Matrix ) readMatrix ( node ) ; writer = new StringWriter ( ) ; matrixNew . write ( writer ) ; matrix = new weka . classifiers . CostMatrix ( new StringReader ( writer . toString ( ) ) ) ; return matrix ; }
builds the Matrix (old) from the given DOM node.
34,593
public static String BooleanToString ( Boolean bool ) { if ( bool == null ) { return "" ; } return bool . booleanValue ( ) ? "1" : "0" ; }
Converts a Boolean object to a String representing XML boolean.
34,594
public static java . sql . Timestamp toTimestamp ( String monthStr , String dayStr , String yearStr , String hourStr , String minuteStr , String secondStr ) { java . util . Date newDate = toDate ( monthStr , dayStr , yearStr , hourStr , minuteStr , secondStr ) ; if ( newDate != null ) { return new java . sql . Timestamp ( newDate . getTime ( ) ) ; } else { return null ; } }
Makes a Timestamp from separate Strings for month, day, year, hour, minute, and second.
34,595
public Metadata . Builder clear ( ) { Metadata_Builder _defaults = new Metadata . Builder ( ) ; type = _defaults . type ; interfaceType = _defaults . interfaceType ; optionalBuilder = _defaults . optionalBuilder ; builderFactory = _defaults . builderFactory ; generatedBuilder = _defaults . generatedBuilder ; valueType = _defaults . valueType ; partialType = _defaults . partialType ; visibleNestedTypes . clear ( ) ; propertyEnum = _defaults . propertyEnum ; properties . clear ( ) ; standardMethodUnderrides . clear ( ) ; builderSerializable = _defaults . builderSerializable ; generatedBuilderAnnotations . clear ( ) ; valueTypeAnnotations . clear ( ) ; valueTypeVisibility = _defaults . valueTypeVisibility ; nestedClasses . clear ( ) ; _unsetProperties . clear ( ) ; _unsetProperties . addAll ( _defaults . _unsetProperties ) ; return ( Metadata . Builder ) this ; }
Resets the state of this builder.
34,596
public int find ( String string ) { if ( string == null ) { return - 1 ; } for ( int i = 0 ; i != m_stringOffsets . length ; ++ i ) { int offset = m_stringOffsets [ i ] ; int length = getShort ( m_strings , offset ) ; if ( length != string . length ( ) ) { continue ; } int j = 0 ; for ( ; j != length ; ++ j ) { offset += 2 ; if ( string . charAt ( j ) != getShort ( m_strings , offset ) ) { break ; } } if ( j == length ) { return i ; } } return - 1 ; }
Finds index of the string. Returns -1 if the string was not found.
34,597
public synchronized boolean contains ( Integer i ) { return value . contains ( i ) ; }
Returns true if the given file is contained in this array.
34,598
private static String makeFieldValue ( Object value ) { if ( value == null ) return "(null)" ; Class < ? > valueClass = value . getClass ( ) ; try { valueClass . getConstructor ( String . class ) ; } catch ( NoSuchMethodException e ) { final String msg = "Class " + valueClass + " does not have a public " + "constructor with a single string arg" ; final RuntimeException iae = new IllegalArgumentException ( msg ) ; throw new RuntimeOperationsException ( iae , "Cannot make XML descriptor" ) ; } catch ( SecurityException e ) { } final String quotedValueString = quote ( value . toString ( ) ) ; return "(" + valueClass . getName ( ) + "/" + quotedValueString + ")" ; }
Make the string that will go inside "..." for a value that is not a plain String.
34,599
private void startRecording ( ) { startNewRecording = true ; trackRecordingServiceConnection . startAndBind ( ) ; bindChangedCallback . run ( ) ; }
Starts a new recording.