signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class UpgradableLock { /** * Attempt to acquire an upgrade lock , waiting a maximum amount of time .
* @ param locker object trying to become lock owner
* @ return true if acquired */
public final boolean tryLockForUpgrade ( L locker , long timeout , TimeUnit unit ) throws InterruptedException { } } | return tryLockForUpgrade_ ( locker , timeout , unit ) != Result . FAILED ; |
public class ByteCodeMachine { /** * USE _ INFINITE _ REPEAT _ MONOMANIAC _ MEM _ STATUS _ CHECK */
private void opNullCheckEndMemST ( ) { } } | int mem = code [ ip ++ ] ; /* mem : null check id */
int isNull = nullCheckMemSt ( mem , s ) ; if ( isNull != 0 ) { if ( Config . DEBUG_MATCH ) { Config . log . println ( "NULL_CHECK_END_MEMST: skip id:" + mem + ", s:" + s ) ; } if ( isNull == - 1 ) { opFail ( ) ; return ; } nullCheckFound ( ) ; } |
public class ProposalLineItem { /** * Gets the rateCardPricingModel value for this ProposalLineItem .
* @ return rateCardPricingModel * { @ link RateCard } pricing model for the { @ link ProposalLineItem } .
* When the pricing model is
* { @ link PricingModel # NET } refer to the { @ link netCost }
* and { @ li... | return rateCardPricingModel ; |
public class VirtualMachinesInner { /** * Retrieves information about the run - time state of a virtual machine .
* @ param resourceGroupName The name of the resource group .
* @ param vmName The name of the virtual machine .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ retur... | return instanceViewWithServiceResponseAsync ( resourceGroupName , vmName ) . map ( new Func1 < ServiceResponse < VirtualMachineInstanceViewInner > , VirtualMachineInstanceViewInner > ( ) { @ Override public VirtualMachineInstanceViewInner call ( ServiceResponse < VirtualMachineInstanceViewInner > response ) { return re... |
public class ClasspathPath { /** * Returns a read stream for a GET request . */
@ Override public StreamImpl openReadImpl ( ) throws IOException { } } | ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( loader == null ) { loader = ClassLoader . getSystemClassLoader ( ) ; } InputStream is = loader . getResourceAsStream ( getTrimPath ( ) ) ; if ( is == null ) { throw new FileNotFoundException ( getURL ( ) ) ; } return new VfsStreamOld ( i... |
public class FileAwareInputStreamDataWriter { /** * The method makes sure it always grants execute permissions for an owner if the < code > file < / code > passed is a
* directory . The publisher needs it to publish it to the final directory and list files under this directory . */
private static OwnerAndPermission a... | if ( ownerAndPermission . getFsPermission ( ) == null ) { return ownerAndPermission ; } if ( ! file . isDir ( ) ) { return ownerAndPermission ; } return new OwnerAndPermission ( ownerAndPermission . getOwner ( ) , ownerAndPermission . getGroup ( ) , addExecutePermissionToOwner ( ownerAndPermission . getFsPermission ( )... |
public class ELSupport { /** * Convert an object to Boolean .
* Null and empty string are false .
* @ param ctx the context in which this conversion is taking place
* @ param obj the object to convert
* @ return the Boolean value of the object
* @ throws ELException if object is not Boolean or String */
publi... | // previous el 2.2 implementation returned false if obj is null
// so pass in true for primitive to force the same behavior
return coerceToBoolean ( ctx , obj , true ) ; |
public class AutoTieWrapper { /** * Called whenever the appropriate interval has passed and the stats should be updated . */
public void update ( ) { } } | if ( tieable . isActivated ( ) ) { return ; } for ( IStats s : producer . getStats ( ) ) { if ( s . getName ( ) . equals ( tieable . getTargetStatName ( ) ) ) { tieable . tieToStats ( s ) ; tieable . update ( ) ; return ; } } |
public class CassandraDaemon { /** * Stop the daemon , ideally in an idempotent manner .
* Hook for JSVC / Procrun */
public void stop ( ) { } } | // On linux , this doesn ' t entirely shut down Cassandra , just the RPC server .
// jsvc takes care of taking the rest down
logger . info ( "Cassandra shutting down..." ) ; thriftServer . stop ( ) ; nativeServer . stop ( ) ; // On windows , we need to stop the entire system as prunsrv doesn ' t have the jsvc hooks
// ... |
public class SendMailAction { /** * The operation sends a smtp email .
* @ param hostname The hostname or ip address of the smtp server .
* @ param port The port of the smtp service .
* @ param htmlEmail The value should be true if the email is in rich text / html format .
* The value should be false if the ema... | @ Output ( RETURN_RESULT ) , @ Output ( RETURN_CODE ) , @ Output ( EXCEPTION ) } , responses = { @ Response ( text = SUCCESS , field = RETURN_CODE , value = SUCCESS_RETURN_CODE , matchType = MatchType . COMPARE_EQUAL , responseType = ResponseType . RESOLVED ) , @ Response ( text = FAILURE , field = RETURN_CODE , value ... |
public class SimonDataGenerator { /** * Generate a Simon of type " Stopwatch " and fill it with some Splits .
* @ param splitWidth Max number of splits per Stopwatch */
private void addStopwatchSplits ( Stopwatch stopwatch , int splitWidth ) { } } | final int splits = randomInt ( splitWidth / 2 , splitWidth ) ; try { lock . lock ( ) ; System . out . print ( stopwatch . getName ( ) + " " + splits + ": " ) ; for ( int i = 0 ; i < splits ; i ++ ) { System . out . print ( addStopwatchSplit ( stopwatch ) + "," ) ; } System . out . println ( ) ; } finally { lock . unloc... |
public class DataTypes { /** * Returns a deep copy of an object . */
public static < T > T copy ( final T object , final DataTypeDescriptor < T > descriptor ) { } } | if ( descriptor == null ) { throw new NullPointerException ( "descriptor" ) ; } return copy ( object , descriptor . getType ( ) ) ; |
public class DefaultListableProviderFactory { /** * / * ( non - Javadoc )
* @ see com . yiqiniu . easytrans . register . ServiceRegister # getServiceTransactionTypeSet ( java . lang . Class ) */
@ Override public Set < Class < ? > > getServiceTransactionTypeSet ( Class < ? > rootType ) { } } | Map < Class < ? > , List < Object > > map = mapBusinessProvider . get ( rootType ) ; if ( map != null ) { return Collections . unmodifiableSet ( map . keySet ( ) ) ; } else { return null ; } |
public class QueryRendererDelegateImpl { /** * Add ' group by ' criteria .
* @ param collateName optional collation name */
@ Override public void groupingValue ( String collateName ) { } } | // collationName is ignored for now
if ( groupBy == null ) { groupBy = new ArrayList < > ( ARRAY_INITIAL_LENGTH ) ; } groupBy . add ( resolveAlias ( propertyPath ) ) ; |
public class JSONTokener { /** * Reads a null , boolean , numeric or unquoted string literal value . Numeric
* values will be returned as an Integer , Long , or Double , in that order of
* preference . */
private Object readLiteral ( ) throws JSONException { } } | String literal = nextToInternal ( "{}[]/\\:,=;# \t\f" ) ; if ( literal . length ( ) == 0 ) { throw syntaxError ( "Expected literal value" ) ; } else if ( "null" . equalsIgnoreCase ( literal ) ) { return JSONObject . NULL ; } else if ( "true" . equalsIgnoreCase ( literal ) ) { return Boolean . TRUE ; } else if ( "false"... |
public class Label { /** * Computes the lines of text for this label given the specified target width . The overall size
* of the computed lines is stored into the < code > size < / code > parameter .
* @ return an { @ link List } or null if < code > keepWordsWhole < / code > was true and the lines could
* not be... | // start with a size of zero
double width = 0 , height = 0 ; List < Tuple < TextLayout , Rectangle2D > > layouts = new ArrayList < Tuple < TextLayout , Rectangle2D > > ( ) ; try { // obtain our new dimensions by using a line break iterator to lay out our text one
// line at a time
TextLayout layout ; int lastposition =... |
public class SagaEnvironment { /** * Creates a new SagaEnvironment instance . */
public static SagaEnvironment create ( final TimeoutManager timeoutManager , final StateStorage storage , final Provider < CurrentExecutionContext > contextProvider , final Set < SagaModule > modules , final Set < SagaLifetimeInterceptor >... | return new SagaEnvironment ( timeoutManager , storage , contextProvider , modules , interceptors , sagaInstanceResolver , coordinatorFactory ) ; |
public class SipServletMessageImpl { /** * ( non - Javadoc )
* @ see javax . servlet . sip . SipServletMessage # getAcceptLanguages ( ) */
public Iterator < Locale > getAcceptLanguages ( ) { } } | LinkedList < Locale > ll = new LinkedList < Locale > ( ) ; Iterator < Header > it = ( Iterator < Header > ) this . message . getHeaders ( AcceptLanguageHeader . NAME ) ; while ( it . hasNext ( ) ) { AcceptLanguageHeader alh = ( AcceptLanguageHeader ) it . next ( ) ; ll . add ( alh . getAcceptLanguage ( ) ) ; } return l... |
public class AbstractLRParser { /** * This method is called just before running the parser to reset all internal
* values and to clean all stacks . */
private final void reset ( ) { } } | backtrackStack . clear ( ) ; actionStack . clear ( ) ; stateStack . clear ( ) ; parserErrors . clear ( ) ; streamPosition = 0 ; stepCounter = 0 ; stateStack . push ( 0 ) ; maxPosition = 0 ; shiftIgnoredTokens ( ) ; |
public class AnalyticFormulas { /** * Calculated the approximation to the lognormal Black volatility using the
* standard SABR model and the standard Hagan approximation .
* @ param alpha initial value of the stochastic volatility process of the SABR model .
* @ param beta CEV parameter of the SABR model .
* @ ... | return sabrHaganLognormalBlackVolatilityApproximation ( alpha , beta , rho , nu , 0.0 , underlying , strike , maturity ) ; |
public class FlashPublisher { /** * ( non - Javadoc )
* @ see es . sandbox . ui . messages . Flash # warning ( java . lang . String , java . lang . Object [ ] ) */
@ Override public void warning ( String code , Object ... arguments ) throws NullPointerException , IllegalArgumentException { } } | this . store . add ( Level . WARNING , resolveMessage ( code , arguments ) ) ; |
public class GuildManager { /** * Sets the system { @ link net . dv8tion . jda . core . entities . TextChannel TextChannel } of this { @ link net . dv8tion . jda . core . entities . Guild Guild } .
* @ param systemChannel
* The new system channel for this { @ link net . dv8tion . jda . core . entities . Guild Guild... | Checks . check ( systemChannel == null || systemChannel . getGuild ( ) . equals ( getGuild ( ) ) , "Channel must be from the same guild" ) ; this . systemChannel = systemChannel == null ? null : systemChannel . getId ( ) ; set |= SYSTEM_CHANNEL ; return this ; |
public class TypedDataSet { /** * Add rows in a collection to the data set .
* @ param rows Collection of row objects .
* @ return The data set instance ( for possible chaining ) . */
public TypedDataSet < T > rows ( Collection < ? extends T > rows ) { } } | for ( T rowObj : rows ) { super . row ( conv . convert ( rowObj ) ) ; } return this ; |
public class StorageStatistics { /** * Returns the amount of free memory remaining .
* @ return the amount of free memory remaining if successful , - 1 return indicates failure . */
public long getFreeMemory ( ) { } } | try { return ( long ) mBeanServer . getAttribute ( new ObjectName ( "java.lang" , "type" , "OperatingSystem" ) , "FreePhysicalMemorySize" ) ; } catch ( Exception e ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "An exception occurred during memory check" , e ) ; } } return - 1 ; |
public class StoreFactory { /** * Execute store transaction based on provided { @ link ChatStore } implementation . Every transaction should begin with { @ link ChatStore # beginTransaction ( ) } and end with { @ link ChatStore # endTransaction ( ) }
* @ param transaction Store transaction based on provided { @ link ... | try { build ( transaction :: execute ) ; } catch ( Exception e ) { if ( log != null ) { log . f ( "Error executing external store transaction : " + e . getLocalizedMessage ( ) , e ) ; } } |
public class ArrayHelper { /** * Get a new array that combines the passed two arrays , maintaining the order .
* @ param aHeadArray
* The first array . May be < code > null < / code > .
* @ param aTailArray
* The second array . May be < code > null < / code > .
* @ return < code > null < / code > if both arra... | // If first array is invalid , simply
if ( isEmpty ( aHeadArray ) ) return getCopy ( aTailArray ) ; if ( isEmpty ( aTailArray ) ) return getCopy ( aHeadArray ) ; // Start concatenating
final int [ ] ret = new int [ aHeadArray . length + aTailArray . length ] ; System . arraycopy ( aHeadArray , 0 , ret , 0 , aHeadArray ... |
public class TeXHyphenator { /** * Loads custom hyphenation rules . You probably want to use
* loadDefault ( ) instead . */
public void load ( BufferedReader input ) throws IOException { } } | String line ; while ( ( line = input . readLine ( ) ) != null ) { if ( StringUtils . matches ( line , "\\s*(%.*)?" ) ) { // comment or blank line
System . err . println ( "Skipping: " + line ) ; continue ; } char [ ] linechars = line . toCharArray ( ) ; int [ ] pattern = new int [ linechars . length ] ; char [ ] chars ... |
public class HString { /** * Gets head .
* @ return the head */
public HString head ( ) { } } | return tokens ( ) . stream ( ) . filter ( t -> t . parent ( ) . isEmpty ( ) ) . map ( Cast :: < HString > as ) . findFirst ( ) . orElseGet ( ( ) -> tokens ( ) . stream ( ) . filter ( t -> ! this . overlaps ( t . parent ( ) ) ) . map ( Cast :: < HString > as ) . findFirst ( ) . orElse ( this ) ) ; |
public class ActivityTaskFailedEventAttributesMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes , ProtocolMarshaller protocolMarshaller ) { } } | if ( activityTaskFailedEventAttributes == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( activityTaskFailedEventAttributes . getReason ( ) , REASON_BINDING ) ; protocolMarshaller . marshall ( activityTaskFailedEventAttributes . getDetails (... |
public class ConfigurationPropertySources { /** * Attach a { @ link ConfigurationPropertySource } support to the specified
* { @ link Environment } . Adapts each { @ link PropertySource } managed by the environment
* to a { @ link ConfigurationPropertySource } and allows classic
* { @ link PropertySourcesProperty... | Assert . isInstanceOf ( ConfigurableEnvironment . class , environment ) ; MutablePropertySources sources = ( ( ConfigurableEnvironment ) environment ) . getPropertySources ( ) ; PropertySource < ? > attached = sources . get ( ATTACHED_PROPERTY_SOURCE_NAME ) ; if ( attached != null && attached . getSource ( ) != sources... |
public class SynchroReader { /** * Map Synchro constraints to MPXJ constraints .
* @ param task task
* @ param row Synchro constraint data */
private void setConstraints ( Task task , MapRow row ) { } } | ConstraintType constraintType = null ; Date constraintDate = null ; Date lateDate = row . getDate ( "CONSTRAINT_LATE_DATE" ) ; Date earlyDate = row . getDate ( "CONSTRAINT_EARLY_DATE" ) ; switch ( row . getInteger ( "CONSTRAINT_TYPE" ) . intValue ( ) ) { case 2 : // Cannot Reschedule
{ constraintType = ConstraintType .... |
public class SvdImplicitQrAlgorithm_DDRM { /** * Performs a similar transform on B < sup > T < / sup > B - pI */
protected void createBulge ( int x1 , double p , double scale , boolean byAngle ) { } } | double b11 = diag [ x1 ] ; double b12 = off [ x1 ] ; double b22 = diag [ x1 + 1 ] ; if ( byAngle ) { c = Math . cos ( p ) ; s = Math . sin ( p ) ; } else { // normalize to improve resistance to overflow / underflow
double u1 = ( b11 / scale ) * ( b11 / scale ) - p ; double u2 = ( b12 / scale ) * ( b11 / scale ) ; doubl... |
public class Misc { /** * Convert a UTF - 8 byte array into a string . */
public static String toStringUTF8 ( byte [ ] bytes ) { } } | if ( bytes == null ) { return null ; } return toStringUTF8 ( bytes , 0 , bytes . length ) ; |
public class LoadBalancedRSocketMono { /** * Update the aperture value and ensure its value stays in the right range .
* @ param newValue new aperture value
* @ param now time of the change ( for rate limiting purposes ) */
private void updateAperture ( int newValue , long now ) { } } | int previous = targetAperture ; targetAperture = newValue ; targetAperture = Math . max ( minAperture , targetAperture ) ; int maxAperture = Math . min ( this . maxAperture , activeSockets . size ( ) + pool . poolSize ( ) ) ; targetAperture = Math . min ( maxAperture , targetAperture ) ; lastApertureRefresh = now ; pen... |
public class AbstractListCommandWithoutFurnace { /** * Print the given values after displaying the provided message . */
protected static void printValuesSorted ( String message , Set < String > values ) { } } | System . out . println ( ) ; System . out . println ( message + ":" ) ; List < String > sorted = new ArrayList < > ( values ) ; Collections . sort ( sorted ) ; for ( String value : sorted ) { System . out . println ( "\t" + value ) ; } |
public class WSRdbManagedConnectionImpl { /** * Copy from replaceCRI : Replace the CRI of this ManagedConnection with the new CRI for
* CCI interface
* @ param newCRI the new CRI .
* @ throws ResourceException if handles already exist on the ManagedConnection or if the
* requested CRI contains a different user ... | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "replaceCRIForCCI" , "Current:" , cri , "New:" , newCRI ) ; if ( numHandlesInUse > 0 ) { if ( ! supportIsolvlSwitching ) { ResourceException resX = new DataStoreAdapterException ( "W... |
public class CustomerFeedOperation { /** * Gets the operand value for this CustomerFeedOperation .
* @ return operand * < span class = " constraint Required " > This field is required and
* should not be { @ code null } . < / span > */
public com . google . api . ads . adwords . axis . v201809 . cm . CustomerFeed g... | return operand ; |
public class MongoDBClient { /** * Find GFS entity .
* @ param entityMetadata
* the entity metadata
* @ param entityClass
* the entity class
* @ param key
* the key
* @ return the object */
private Object findGFSEntity ( EntityMetadata entityMetadata , Class entityClass , Object key ) { } } | GridFSDBFile outputFile = findGridFSDBFile ( entityMetadata , key ) ; return outputFile != null ? handler . getEntityFromGFSDBFile ( entityMetadata . getEntityClazz ( ) , instantiateEntity ( entityClass , null ) , entityMetadata , outputFile , kunderaMetadata ) : null ; |
public class Setting { /** * set the value requesttimeout
* @ param requesttimeout value to set */
public void setRequesttimeout ( double requesttimeout ) { } } | long rt ; if ( requesttimeout <= 0 ) rt = Long . MAX_VALUE ; else rt = ( long ) ( requesttimeout * 1000 ) ; pageContext . setRequestTimeout ( rt ) ; |
public class Stylesheet { /** * Get the stylesheet at the given in index in " include " list
* @ see < a href = " http : / / www . w3 . org / TR / xslt # include " > include in XSLT Specification < / a >
* @ param i Index of stylesheet to get
* @ return Stylesheet at the given index
* @ throws ArrayIndexOutOfBo... | if ( null == m_includes ) throw new ArrayIndexOutOfBoundsException ( ) ; return ( Stylesheet ) m_includes . elementAt ( i ) ; |
public class SpatialKeyAlgo { /** * Take latitude and longitude as input .
* @ return the spatial key */
@ Override public final long encode ( double lat , double lon ) { } } | // PERFORMANCE : int operations would be faster than double ( for further comparison etc )
// but we would need ' long ' because ' int factorForPrecision ' is not enough ( problem : coord ! = decode ( encode ( coord ) ) see testBijection )
// and ' long ' - ops are more expensive than double ( at least on 32bit systems... |
public class JsDocInfoParser { /** * Looks for a type expression at the current token and if found ,
* returns it . Note that this method consumes input .
* @ param token The current token .
* @ param lineno The line of the type expression .
* @ param startCharno The starting character position of the type expr... | return parseAndRecordTypeNode ( token , lineno , startCharno , matchingLC , true ) ; |
public class SwingBrowser { /** * This method initializes jButton
* @ return javax . swing . JButton */
private JButton getOkButton ( ) { } } | if ( okButton == null ) { okButton = new JButton ( ) ; okButton . setText ( "Go!" ) ; okButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent e ) { displayURL ( urlText . getText ( ) ) ; } } ) ; } return okButton ; |
public class GeneralValidator { /** * Removes the specified result collector from the triggers and data providers .
* @ param resultCollector Result collector to be removed . */
public void removeResultCollector ( ResultCollector < ? , DPO > resultCollector ) { } } | if ( resultCollector != null ) { removeTrigger ( resultCollector ) ; removeDataProvider ( resultCollector ) ; } |
public class GenerateEntityFileNameTask { /** * / * ( non - Javadoc )
* @ see org . danann . cernunnos . Bootstrappable # init ( org . danann . cernunnos . EntityConfig ) */
@ Override public void init ( EntityConfig config ) { } } | // Lock & load reagents
this . entityElement = ( Phrase ) config . getValue ( ENTITY_ELEMENT ) ; this . layoutStore = ( Phrase ) config . getValue ( LAYOUT_STORE ) ; |
public class PolymorphicDispatcher { /** * returns & gt ; 0 when o1 is more specific than o2,
* returns = = 0 when o1 and o2 are equal or unrelated ,
* returns & lt ; 0 when o2 is more specific than o1, */
protected int compare ( MethodDesc o1 , MethodDesc o2 ) { } } | final Class < ? > [ ] paramTypes1 = o1 . getParameterTypes ( ) ; final Class < ? > [ ] paramTypes2 = o2 . getParameterTypes ( ) ; // sort by parameter types from left to right
for ( int i = 0 ; i < paramTypes1 . length ; i ++ ) { final Class < ? > class1 = paramTypes1 [ i ] ; final Class < ? > class2 = paramTypes2 [ i ... |
public class BytecodeUtils { /** * Returns an expression that returns a new { @ code ImmutableList } containing the given items .
* < p > NOTE : { @ code ImmutableList } rejects null elements . */
public static Expression asImmutableList ( Iterable < ? extends Expression > items ) { } } | ImmutableList < Expression > copy = ImmutableList . copyOf ( items ) ; if ( copy . size ( ) < MethodRef . IMMUTABLE_LIST_OF . size ( ) ) { return MethodRef . IMMUTABLE_LIST_OF . get ( copy . size ( ) ) . invoke ( copy ) ; } ImmutableList < Expression > explicit = copy . subList ( 0 , MethodRef . IMMUTABLE_LIST_OF . siz... |
public class Options { /** * Loads the options from the command line .
* @ param options The command line options .
* @ param errorReporter The error reporter for printing messages .
* @ return The options to be forwarded to the standard doclet . */
public String [ ] [ ] load ( String [ ] [ ] options , DocErrorRe... | LinkedList < String [ ] > optionsList = new LinkedList < > ( Arrays . asList ( options ) ) ; Iterator < String [ ] > optionsIter = optionsList . iterator ( ) ; while ( optionsIter . hasNext ( ) ) { String [ ] opt = optionsIter . next ( ) ; if ( ! handleOption ( optionsIter , opt , errorReporter ) ) { return null ; } } ... |
public class PrimitivePropertyEditor { /** * - - - - - OTHER METHODS - - - - - */
@ Override protected R parseValueFromString ( String s ) { } } | Class < R > range = this . getRange ( ) ; R value = null ; try { if ( range . equals ( double . class ) ) { value = ( R ) Double . valueOf ( s ) ; } else if ( range . equals ( float . class ) ) { value = ( R ) Float . valueOf ( s ) ; } else if ( range . equals ( int . class ) ) { value = ( R ) Integer . valueOf ( s ) ;... |
public class TranManagerImpl { /** * that this class is managing . */
public boolean enlist ( XAResource xaRes , int recoveryId ) throws RollbackException , IllegalStateException , SystemException { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlist" , new Object [ ] { xaRes , recoveryId } ) ; if ( tx == null ) { final String msg = "No transaction associated with this thread" ; final IllegalStateException ise = new IllegalStateException ( msg ) ; FFDCFilter . processException ( ise , "com.ibm.tx.jta.impl.Tra... |
public class ProvidenceJdbi { /** * With column mapped to field .
* @ param name Name of column .
* @ param field Field it is mapped to .
* @ param < F > The message field type .
* @ return The mapped field . */
public static < F extends PField > MappedField < F > withColumn ( String name , F field ) { } } | return new MappedField < > ( name , field ) ; |
public class DoubleTuples { /** * Returns whether the given tuple contains an element that
* is Not A Number
* @ param tuple The tuple
* @ return Whether the tuple contains a NaN element */
public static boolean containsNaN ( DoubleTuple tuple ) { } } | for ( int i = 0 ; i < tuple . getSize ( ) ; i ++ ) { if ( Double . isNaN ( tuple . get ( i ) ) ) { return true ; } } return false ; |
public class StringTextStream { /** * ( non - Javadoc )
* @ see com . github . maven _ nar . TextStream # println ( java . lang . String ) */
@ Override public final void println ( final String text ) { } } | this . sb . append ( text ) ; this . sb . append ( this . lineSeparator ) ; |
public class ProcessManagerImpl { /** * If we already have an instance of a process with this name , auto increment ports to avoid a conflict */
private void incrementPortsIfDuplicateName ( String configName , ProcessConfigBean config ) { } } | int startedCount = getNumberOfInstancesStarted ( configName ) ; int debugPort = config . getDebugPort ( ) ; if ( debugPort != - 1 ) { config . setDebugPort ( debugPort + startedCount ) ; } int remotingPort = config . getRemotingPort ( ) ; if ( remotingPort != - 1 ) { config . setRemotingPort ( remotingPort + startedCou... |
public class LdapConnection { /** * Returns a hash key for the name | filterExpr | filterArgs | cons tuple used in the search
* query - results cache .
* @ param name The name of the context or object to search
* @ param filterExpr the filter expression used in the search .
* @ param filterArgs the filter argum... | int length = name . length ( ) + filterExpr . length ( ) + filterArgs . length + 200 ; StringBuffer key = new StringBuffer ( length ) ; key . append ( name ) ; key . append ( "|" ) ; key . append ( filterExpr ) ; String [ ] attrIds = cons . getReturningAttributes ( ) ; for ( int i = 0 ; i < filterArgs . length ; i ++ )... |
public class AWSDatabaseMigrationServiceWaiters { /** * Builds a ReplicationTaskDeleted waiter by using custom parameters waiterParameters and other parameters defined
* in the waiters specification , and then polls until it determines whether the resource entered the desired state
* or not , where polling criteria... | return new WaiterBuilder < DescribeReplicationTasksRequest , DescribeReplicationTasksResult > ( ) . withSdkFunction ( new DescribeReplicationTasksFunction ( client ) ) . withAcceptors ( new ReplicationTaskDeleted . IsReadyMatcher ( ) , new ReplicationTaskDeleted . IsCreatingMatcher ( ) , new ReplicationTaskDeleted . Is... |
public class ChunkedInputStream { /** * Expects the stream to start with a chunksize in hex with optional
* comments after a semicolon . The line must end with a CRLF : " a3 ; some
* comment \ r \ n " Positions the stream at the start of the next line .
* @ param stream The new input stream .
* @ return The chu... | final ByteArrayOutputStream baos = ChunkedInputStream . sizeLine ( stream ) ; final int result ; final String data = baos . toString ( Charset . defaultCharset ( ) . name ( ) ) ; final int separator = data . indexOf ( ';' ) ; try { // @ checkstyle MagicNumberCheck ( 10 lines )
if ( separator > 0 ) { result = Integer . ... |
public class Binder { /** * Drop from the given index a number of arguments .
* @ param index the index at which to start dropping
* @ param count the number of arguments to drop
* @ return a new Binder */
public Binder drop ( int index , int count ) { } } | return new Binder ( this , new Drop ( index , Arrays . copyOfRange ( type ( ) . parameterArray ( ) , index , index + count ) ) ) ; |
public class SSLUtils { /** * Helper method to create an { @ link SSLSocketFactory } which trusts only given certificate
* @ return created specific factory */
public static SSLSocketFactory getPinnedCertSslSocketFactory ( Context context , int keyStoreRawResId , String keyStorePassword ) { } } | InputStream in = null ; try { // Get an instance of the Bouncy Castle KeyStore format
KeyStore trusted = KeyStore . getInstance ( "BKS" ) ; // Get the keystore from raw resource
in = context . getResources ( ) . openRawResource ( keyStoreRawResId ) ; // Initialize the keystore with the provided trusted certificates
// ... |
public class CliTablePrinter { /** * Generates a simple row format string given a set of widths
* @ param widths A list of widths for each column in the table
* @ return A row format for each row in the table */
private String getRowFormat ( List < Integer > widths ) { } } | StringBuilder rowFormat = new StringBuilder ( spaces ( this . indentation ) ) ; for ( int i = 0 ; i < widths . size ( ) ; i ++ ) { rowFormat . append ( "%" ) ; rowFormat . append ( this . flags != null ? this . flags . get ( i ) : "" ) ; rowFormat . append ( widths . get ( i ) . toString ( ) ) ; rowFormat . append ( "s... |
public class CmsCmisTypeManager { /** * Adds CMIS property definitions for documents . < p >
* @ param type the document type */
private static void addDocumentPropertyDefinitions ( DocumentTypeDefinitionImpl type ) { } } | type . addPropertyDefinition ( createPropDef ( PropertyIds . IS_IMMUTABLE , "Is Immutable" , "Is Immutable" , PropertyType . BOOLEAN , Cardinality . SINGLE , Updatability . READONLY , false , false ) ) ; type . addPropertyDefinition ( createPropDef ( PropertyIds . IS_LATEST_VERSION , "Is Latest Version" , "Is Latest Ve... |
public class MultipleAddresses { /** * Returns the list of addresses that matches the specified type . Examples of address
* type are : TO , CC , BCC , etc . .
* @ param type Examples of address type are : TO , CC , BCC , etc .
* @ return the list of addresses that matches the specified type . */
public List < Ad... | List < Address > answer = new ArrayList < > ( addresses . size ( ) ) ; for ( Address address : addresses ) { if ( address . getType ( ) . equals ( type ) ) { answer . add ( address ) ; } } return answer ; |
public class GenJsCodeVisitor { /** * Generate code to verify the runtime types of the input params . Also typecasts the input
* parameters and assigns them to local variables for use in the template .
* @ param node the template node . */
@ CheckReturnValue protected Statement genParamTypeChecks ( TemplateNode nod... | ImmutableList . Builder < Statement > declarations = ImmutableList . builder ( ) ; for ( TemplateParam param : node . getAllParams ( ) ) { String paramName = param . name ( ) ; SoyType paramType = param . type ( ) ; CodeChunk . Generator generator = templateTranslationContext . codeGenerator ( ) ; Expression paramChunk... |
public class JsHdrsImpl { /** * Set the value of the ExceptionTimestamp in the message header .
* Javadoc description supplied by JsMessage interface . */
public final void setExceptionTimestamp ( long value ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setExceptionTimestamp" , Long . valueOf ( value ) ) ; boolean wasEmpty = ( getHdr2 ( ) . getChoiceField ( JsHdr2Access . EXCEPTION ) == JsHdr2Access . IS_EXCEPTION_EMPTY ) ; getHdr2 ( ) . setLongField ( JsHdr2Access ... |
public class Vector2i { /** * / * ( non - Javadoc )
* @ see org . joml . Vector2ic # mul ( int , int , org . joml . Vector2i ) */
public Vector2i mul ( int x , int y , Vector2i dest ) { } } | dest . x = this . x * x ; dest . y = this . y * y ; return dest ; |
public class JSTypeRegistry { /** * Registers template types on the given scope root . This takes a Node rather than a
* StaticScope because at the time it is called , the scope has not yet been created . */
public void registerTemplateTypeNamesInScope ( Iterable < TemplateType > keys , Node scopeRoot ) { } } | for ( TemplateType key : keys ) { scopedNameTable . put ( scopeRoot , key . getReferenceName ( ) , key ) ; } |
public class PresentationManager { /** * Returns the internacionalized string for the given key */
public String message ( String key , Object ... params ) { } } | if ( key == null ) { return null ; } try { String string = ( getResourceBundle ( ) . containsKey ( key ) ) ? getResourceBundle ( ) . getString ( key ) : key ; if ( params != null ) { for ( int i = 0 ; i < params . length ; i ++ ) { String param = ( params [ i ] == null ) ? "" : params [ i ] . toString ( ) ; string = st... |
public class Condition { /** * One or more values to evaluate against the supplied attribute . The number of values in the list depends on the
* < code > ComparisonOperator < / code > being used .
* For type Number , value comparisons are numeric .
* String value comparisons for greater than , equals , or less th... | if ( this . attributeValueList == null ) { setAttributeValueList ( new java . util . ArrayList < AttributeValue > ( attributeValueList . length ) ) ; } for ( AttributeValue ele : attributeValueList ) { this . attributeValueList . add ( ele ) ; } return this ; |
public class DateTimeParserBucket { /** * Restores the state of this bucket from a previously saved state . The
* state object passed into this method is not consumed , and it can be used
* later to restore to that state again .
* @ param savedState opaque saved state , returned from saveState
* @ return true s... | if ( savedState instanceof SavedState ) { if ( ( ( SavedState ) savedState ) . restoreState ( this ) ) { iSavedState = savedState ; return true ; } } return false ; |
public class ApiOvhDbaaslogs { /** * Display specified offer
* REST : GET / dbaas / logs / offer / { reference }
* @ param reference [ required ] Reference */
public OvhPublicOffer offer_reference_GET ( String reference ) throws IOException { } } | String qPath = "/dbaas/logs/offer/{reference}" ; StringBuilder sb = path ( qPath , reference ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhPublicOffer . class ) ; |
public class ContainerRegistry { /** * Looks up a Collection of Containers by their identifiers .
* The returned Collection preserves the iteration order of the passed - in Collection .
* @ return Collection of Containers . */
public Collection < C > getAll ( Collection < String > ids ) { } } | Set < C > list = new LinkedHashSet < C > ( ) ; for ( String id : ids ) { C container = get ( id ) ; if ( container != null ) { list . add ( container ) ; } } return list ; |
public class HelpView { /** * Initialize the topic tree . Converts the Oracle help TopicTreeNode - based tree to a
* HelpTopicNode - based tree .
* @ param htnParent Current help topic node .
* @ param children List of child nodes . */
private void initTopicTree ( HelpTopicNode htnParent , List < ? > children ) {... | if ( children != null ) { for ( Object node : children ) { TopicTreeNode ttnChild = ( TopicTreeNode ) node ; Topic topic = ttnChild . getTopic ( ) ; Target target = topic . getTarget ( ) ; String source = view . getBook ( ) . getBookTitle ( ) ; URL url = null ; try { url = target == null ? null : target . getURL ( ) ; ... |
public class DeviceProxyDAODefaultImpl { public DeviceDataHistory [ ] command_history ( final DeviceProxy deviceProxy , final String cmdname , final int nb ) throws DevFailed { } } | checkIfTango ( deviceProxy , "command_history" ) ; build_connection ( deviceProxy ) ; if ( DeviceProxy . isCheck_idl ( ) && get_idl_version ( deviceProxy ) < 2 ) { Except . throw_non_supported_exception ( "TangoApi_IDL_NOT_SUPPORTED" , "Not supported by the IDL version used by device" , deviceProxy . getFull_class_name... |
public class ApacheUtils { /** * Returns a new instance of NTCredentials used for proxy authentication . */
private static Credentials newNTCredentials ( HttpClientSettings settings ) { } } | return new NTCredentials ( settings . getProxyUsername ( ) , settings . getProxyPassword ( ) , settings . getProxyWorkstation ( ) , settings . getProxyDomain ( ) ) ; |
public class KnowledgePackageImpl { /** * Add a rule flow to this package . */
public void addProcess ( Process process ) { } } | ResourceTypePackageRegistry rtps = getResourceTypePackages ( ) ; ProcessPackage rtp = ProcessPackage . getOrCreate ( rtps ) ; rtp . add ( process ) ; |
public class PrivilegeImpl { /** * Tests given privilege .
* @ param p the given privilege .
* @ return true if this privilege equals or aggregates given privilege . */
public boolean contains ( Privilege p ) { } } | if ( p . getName ( ) . equalsIgnoreCase ( this . getName ( ) ) ) { return true ; } Privilege [ ] list = getAggregatePrivileges ( ) ; for ( Privilege privilege : list ) { if ( privilege . getName ( ) . equalsIgnoreCase ( p . getName ( ) ) ) { return true ; } } return false ; |
public class SecureUtil { /** * 加密除pin之外的其他信息
* @ param publicKey
* @ param plainData
* @ return
* @ throws Exception */
private static byte [ ] encryptData ( PublicKey publicKey , byte [ ] plainData ) throws Exception { } } | try { Cipher cipher = Cipher . getInstance ( "RSA/ECB/PKCS1Padding" , "BC" ) ; cipher . init ( Cipher . ENCRYPT_MODE , publicKey ) ; return cipher . doFinal ( plainData ) ; } catch ( Exception e ) { throw new Exception ( e . getMessage ( ) ) ; } |
public class AWSAppSyncClient { /** * Get a < code > Function < / code > .
* @ param getFunctionRequest
* @ return Result of the GetFunction operation returned by the service .
* @ throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make ... | request = beforeClientExecution ( request ) ; return executeGetFunction ( request ) ; |
public class ShareableResource { /** * Set the resource consumption of a VM .
* @ param vm the VM
* @ param val the value to set
* @ return the current resource */
public ShareableResource setConsumption ( VM vm , int val ) { } } | if ( val < 0 ) { throw new IllegalArgumentException ( String . format ( "The '%s' consumption of VM '%s' must be >= 0" , rcId , vm ) ) ; } vmsConsumption . put ( vm , val ) ; return this ; |
public class Element { /** * Add element Attributes .
* The attributes are added to the Element attributes ( separated with
* a space ) . The attributes are available to the derived class in the
* protected member String < I > attributes < / I >
* @ deprecated Use attribute ( String ) .
* @ param attributes S... | if ( log . isDebugEnabled ( ) && attributes != null && attributes . indexOf ( '=' ) >= 0 ) log . debug ( "Set attribute with old method: " + attributes + " on " + getClass ( ) . getName ( ) ) ; if ( attributes == null ) { this . attributes = null ; return this ; } if ( attributes == noAttributes ) return this ; if ( th... |
public class GradientDef { /** * < pre >
* The gradient function ' s name .
* < / pre >
* < code > optional string gradient _ func = 2 ; < / code > */
public com . google . protobuf . ByteString getGradientFuncBytes ( ) { } } | java . lang . Object ref = gradientFunc_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; gradientFunc_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; } |
public class URI { /** * Resolve the base and relative path .
* @ param basePath a character array of the basePath
* @ param relPath a character array of the relPath
* @ return the resolved path
* @ throws URIException no more higher path level to be resolved */
protected char [ ] resolvePath ( char [ ] basePat... | // REMINDME : paths are never null
String base = ( basePath == null ) ? "" : new String ( basePath ) ; // _ path could be empty
if ( relPath == null || relPath . length == 0 ) { return normalize ( basePath ) ; } else if ( relPath [ 0 ] == '/' ) { return normalize ( relPath ) ; } else { int at = base . lastIndexOf ( '/'... |
public class Strings { /** * Utility to figure out if a character is printable to the console as
* a character . Returns false if one of :
* < ul >
* < li > The character is a control character .
* < li > The character is not defined .
* < li > The character does not have a known representation .
* < / ul >... | return ( cp >= 0x20 && cp < 0x7F ) || // main printable ascii
Character . isDefined ( cp ) && ! ( ( cp < 0x0020 && cp != '\n' ) || ( 0x007F <= cp && cp < 0x00A0 ) || Character . isIdentifierIgnorable ( cp ) || ( 0x07e8 <= cp && cp <= 0x07f3 ) || ( 0x07f6 <= cp && cp <= 0x0900 ) || cp == 0x0ac6 || ( 0x0bfc <= cp && cp <... |
public class ForkedJvm { /** * Gets the JAR file or directory that contains the specified resource .
* @ param resource
* The absolute name of the resource to find , may be < code > null < / code > .
* @ param loader
* The class loader to use for searching the resource , may be
* < code > null < / code > .
... | if ( resource != null ) { URL url ; if ( loader != null ) { url = loader . getResource ( resource ) ; } else { url = ClassLoader . getSystemResource ( resource ) ; } return UrlUtils . getResourceRoot ( url , resource ) ; } return null ; |
public class Files { /** * Appends a character sequence ( such as a string ) to a file using the given character set .
* @ param from the character sequence to append
* @ param to the destination file
* @ param charset the charset used to encode the output stream ; see { @ link StandardCharsets } for
* helpful ... | write ( from , to , charset , true ) ; |
public class PingManager { /** * Cancels any existing periodic ping task if there is one and schedules a new ping task if
* pingInterval is greater then zero .
* @ param delta the delta to the last received stanza in seconds */
private synchronized void maybeSchedulePingServerTask ( int delta ) { } } | maybeStopPingServerTask ( ) ; if ( pingInterval > 0 ) { int nextPingIn = pingInterval - delta ; LOGGER . fine ( "Scheduling ServerPingTask in " + nextPingIn + " seconds (pingInterval=" + pingInterval + ", delta=" + delta + ")" ) ; nextAutomaticPing = schedule ( pingServerRunnable , nextPingIn , TimeUnit . SECONDS ) ; } |
public class IndexBuilder { /** * Put all the members ( fields , methods and constructors ) in the te
* to the indexmap .
* @ param te TypeElement whose members will be added to the indexmap . */
protected void putMembersInIndexMap ( TypeElement te ) { } } | adjustIndexMap ( utils . getAnnotationFields ( te ) ) ; adjustIndexMap ( utils . getFields ( te ) ) ; adjustIndexMap ( utils . getMethods ( te ) ) ; adjustIndexMap ( utils . getConstructors ( te ) ) ; adjustIndexMap ( utils . getEnumConstants ( te ) ) ; |
public class PopupCallback { /** * from AsyncCallback < T > */
public void onFailure ( Throwable cause ) { } } | if ( _errorNear == null ) { Popups . error ( formatError ( cause ) ) ; } else { Popups . errorBelow ( formatError ( cause ) , _errorNear ) ; } Console . log ( "Service request failed" , cause ) ; |
public class RemoteServiceChannel { /** * Configures the RemoteServiceChannel with given properties . */
protected void configure ( Properties p ) { } } | _properties = p ; _host = ( String ) p . remove ( HOST ) ; if ( _host == null ) throw new NoSuchElementException ( HOST ) ; _path = ( String ) p . remove ( PATH ) ; if ( _path == null ) throw new NoSuchElementException ( PATH ) ; |
public class CMStatefulBeanO { /** * Inform this < code > SessionBeanO < / code > that the transaction
* it was enlisted with has rolled back . < p > */
@ Override public final synchronized void rollback ( ContainerTx tx ) throws RemoteException { } } | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollback: " + StateStrs [ state ] , tx ) ; if ( removed ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback: removed" ) ; return ; } switch ( state ) { // These are ... |
public class CPMeasurementUnitPersistenceImpl { /** * Returns the first cp measurement unit in the ordered set where groupId = & # 63 ; and primary = & # 63 ; and type = & # 63 ; .
* @ param groupId the group ID
* @ param primary the primary
* @ param type the type
* @ param orderByComparator the comparator to ... | List < CPMeasurementUnit > list = findByG_P_T ( groupId , primary , type , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class ConsumerMonitorRegistrar { /** * Method retrieveCallbackFromConnectionIndex
* Retrieves an existing callback from the callback index .
* @ param topicExpression
* @ param isWildcarded
* @ param callback
* @ return */
public TopicRecord retrieveCallbackFromConnectionIndex ( ConnectionImpl connecti... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "retrieveCallbackFromConnectionIndex" , new Object [ ] { connection , callback } ) ; TopicRecord tRecord = null ; if ( _callbackIndex . containsKey ( connection ) ) { // Have found registered callbacks for this connection
Ma... |
public class Iterables { /** * Returns an iterable that provides an iterator that only returns the
* elements provided by the iterator of the given iterable to which
* the given predicate applies .
* @ param < T > The element type
* @ param iterable The delegate iterable
* @ param predicate The predicate
* ... | Objects . requireNonNull ( iterable , "The iterable is null" ) ; Objects . requireNonNull ( predicate , "The predicate is null" ) ; return new Iterable < T > ( ) { @ Override public Iterator < T > iterator ( ) { return new FilteringIterator < T > ( iterable . iterator ( ) , predicate ) ; } } ; |
public class DBQuery { /** * The field is equal to the given value
* @ param field The field to compare
* @ param value The value to compare to
* @ return the query */
public static Query is ( String field , Object value ) { } } | return new Query ( ) . is ( field , value ) ; |
public class CommerceAddressUtil { /** * Returns the first commerce address in the ordered set where commerceCountryId = & # 63 ; .
* @ param commerceCountryId the commerce country ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matchi... | return getPersistence ( ) . fetchByCommerceCountryId_First ( commerceCountryId , orderByComparator ) ; |
public class EsMarshalling { /** * Marshals the given bean into the given map .
* @ param bean the bean
* @ return the content builder
* @ throws StorageException when a storage problem occurs while storing a bean */
public static XContentBuilder marshall ( RoleMembershipBean bean ) throws StorageException { } } | try ( XContentBuilder builder = XContentFactory . jsonBuilder ( ) ) { preMarshall ( bean ) ; builder . startObject ( ) . field ( "id" , bean . getId ( ) ) . field ( "organizationId" , bean . getOrganizationId ( ) ) . field ( "roleId" , bean . getRoleId ( ) ) . field ( "userId" , bean . getUserId ( ) ) . field ( "create... |
public class MethodInfo { /** * JAXB用のアノテーション情報を設定するメソッド 。
* < p > XMLの読み込み時に呼ばれます 。
* < br > ただし 、 Java8からはこのメソッドは呼ばれず 、 { @ link # getAnnotationInfos ( ) } で取得したインスタンスに対して要素が追加されます 。
* < p > 既存の情報はクリアされます 。 < / p >
* @ since 1.1
* @ param annotationInfos アノテーション情報 。 */
@ XmlElement ( name = "annotat... | if ( annotationInfos == this . annotationInfos ) { // Java7の場合 、 getterで取得したインスタンスをそのまま設定するため 、 スキップする 。
return ; } this . annotationInfos . clear ( ) ; for ( AnnotationInfo item : annotationInfos ) { addAnnotationInfo ( item ) ; } |
public class Mapper { /** * Create a new Map by mapping all keys from the original map and maintaining the original value .
* @ param mapper a Mapper to map the keys
* @ param map a Map
* @ return a new Map with keys mapped */
public static Map mapKeys ( Mapper mapper , Map map ) { } } | return mapKeys ( mapper , map , false ) ; |
public class CPInstanceLocalServiceBaseImpl { /** * Returns the cp instance matching the UUID and group .
* @ param uuid the cp instance ' s UUID
* @ param groupId the primary key of the group
* @ return the matching cp instance , or < code > null < / code > if a matching cp instance could not be found */
@ Overr... | return cpInstancePersistence . fetchByUUID_G ( uuid , groupId ) ; |
public class WhileyFileParser { /** * Attempt to match a given sequence of tokens in the given order , whilst
* ignoring any whitespace in between . Note that , in any case , the index
* will be unchanged !
* @ param terminated
* Indicates whether or not this function should be concerned
* with new lines . Th... | int next = index ; for ( Token . Kind k : kinds ) { next = terminated ? skipWhiteSpace ( next ) : skipLineSpace ( next ) ; if ( next >= tokens . size ( ) || tokens . get ( next ++ ) . kind != k ) { return false ; } } return true ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.