signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class AsyncFile { /** * Reads all bytes from this channel into the given buffer .
* @ param path the path of the file to read */
public static Promise < ByteBuf > readFile ( Executor executor , Path path ) { } } | return openAsync ( executor , path , set ( READ ) ) . then ( file -> file . read ( ) . then ( buf -> file . close ( ) . whenException ( $ -> buf . recycle ( ) ) . map ( $ -> buf ) ) ) ; |
public class BigDecimalParser { /** * returns the instance .
* @ return CurrencyDoubleRenderer */
public static final Parser < BigDecimal > instance ( ) { } } | // NOPMD it ' s thread save !
if ( BigDecimalParser . instanceParser == null ) { synchronized ( BigDecimalParser . class ) { if ( BigDecimalParser . instanceParser == null ) { BigDecimalParser . instanceParser = new BigDecimalParser ( ) ; } } } return BigDecimalParser . instanceParser ; |
public class S3CryptoModuleBase { /** * Takes the position of the rightmost desired byte of a user specified
* range and returns the position of the end of the following cipher block ;
* or { @ value Long # MAX _ VALUE } if the resultant position has a value that
* exceeds { @ value Long # MAX _ VALUE } . */
priv... | long cipherBlockSize = JceEncryptionConstants . SYMMETRIC_CIPHER_BLOCK_SIZE ; long offset = cipherBlockSize - ( rightmostBytePosition % cipherBlockSize ) ; long upperBound = rightmostBytePosition + offset + cipherBlockSize ; return upperBound < 0 ? Long . MAX_VALUE : upperBound ; |
public class AmazonKinesisAsyncClient { /** * Simplified method form for invoking the ListStreams operation .
* @ see # listStreamsAsync ( ListStreamsRequest ) */
@ Override public java . util . concurrent . Future < ListStreamsResult > listStreamsAsync ( Integer limit , String exclusiveStartStreamName ) { } } | return listStreamsAsync ( new ListStreamsRequest ( ) . withLimit ( limit ) . withExclusiveStartStreamName ( exclusiveStartStreamName ) ) ; |
public class ShuffleSecretManager { /** * Register an application with its secret .
* Executors need to first authenticate themselves with the same secret before
* fetching shuffle files written by other executors in this application . */
public void registerApp ( String appId , String shuffleSecret ) { } } | // Always put the new secret information to make sure it ' s the most up to date .
// Otherwise we have to specifically look at the application attempt in addition
// to the applicationId since the secrets change between application attempts on yarn .
shuffleSecretMap . put ( appId , shuffleSecret ) ; logger . info ( "... |
public class SarlEnumerationBuilderImpl { /** * Initialize the Ecore element when inside a script . */
public void eInit ( SarlScript script , String name , IJvmTypeProvider context ) { } } | setTypeResolutionContext ( context ) ; if ( this . sarlEnumeration == null ) { this . container = script ; this . sarlEnumeration = SarlFactory . eINSTANCE . createSarlEnumeration ( ) ; script . getXtendTypes ( ) . add ( this . sarlEnumeration ) ; this . sarlEnumeration . setAnnotationInfo ( XtendFactory . eINSTANCE . ... |
public class AmazonMacieClient { /** * Removes the specified member account from Amazon Macie .
* @ param disassociateMemberAccountRequest
* @ return Result of the DisassociateMemberAccount operation returned by the service .
* @ throws InvalidInputException
* The request was rejected because an invalid or out ... | request = beforeClientExecution ( request ) ; return executeDisassociateMemberAccount ( request ) ; |
public class FirstElement { /** * Consumes the first element from the passed iterator .
* @ param consumable the iterator to be consumed
* @ throws IllegalArgumentException if the passed iterator is empty
* @ return the consumed value */
@ Override public E apply ( Iterator < E > consumable ) { } } | dbc . precondition ( consumable != null , "consuming a null iterator" ) ; dbc . precondition ( consumable . hasNext ( ) , "no element to consume" ) ; return consumable . next ( ) ; |
public class Token { /** * Determines if this token is a special identifier with the given trigger .
* If a list of < tt > contents < / tt > is given , this method checks that the content matches one of them .
* @ param trigger the trigger of the special id
* @ param contents the content to check for . If the lis... | if ( ! matches ( TokenType . SPECIAL_ID , trigger ) ) { return false ; } if ( contents . length == 0 ) { return true ; } for ( String content : contents ) { if ( content != null && content . equals ( getContents ( ) ) ) { return true ; } } return false ; |
public class ApiOvhCloud { /** * Activate private network in a new region
* REST : POST / cloud / project / { serviceName } / network / private / { networkId } / region
* @ param networkId [ required ] Network id
* @ param region [ required ] Region to active on your network
* @ param serviceName [ required ] S... | String qPath = "/cloud/project/{serviceName}/network/private/{networkId}/region" ; StringBuilder sb = path ( qPath , serviceName , networkId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "region" , region ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; retur... |
public class DynamoDBService { /** * Perform a scan request and retry if ProvisionedThroughputExceededException occurs . */
private ScanResult scan ( ScanRequest scanRequest ) { } } | m_logger . debug ( "Performing scan() request on table {}" , scanRequest . getTableName ( ) ) ; Timer timer = new Timer ( ) ; boolean bSuccess = false ; ScanResult scanResult = null ; for ( int attempts = 1 ; ! bSuccess ; attempts ++ ) { try { scanResult = m_ddbClient . scan ( scanRequest ) ; if ( attempts > 1 ) { m_lo... |
public class ValueOfTag { /** * This method is used to determine whether the parameter whose name is
* stored in { @ code mParameterName } exists within the { @ code
* PageContext . REQUEST _ SCOPE } scope . If the parameter does exist ,
* then this method will return { @ code true } , otherwise it returns
* { ... | parameterValue = pageContext . getAttribute ( parameterName , PageContext . REQUEST_SCOPE ) ; // - - Harald K 20020726
if ( parameterValue == null ) { parameterValue = pageContext . getRequest ( ) . getParameter ( parameterName ) ; } return ( parameterValue != null ) ; |
public class Link { /** * Parses the links attributes from the given source { @ link String } .
* @ param source
* @ return */
private static Map < String , String > getAttributeMap ( String source ) { } } | if ( ! StringUtils . hasText ( source ) ) { return Collections . emptyMap ( ) ; } Map < String , String > attributes = new HashMap < > ( ) ; Matcher matcher = KEY_AND_VALUE_PATTERN . matcher ( source ) ; while ( matcher . find ( ) ) { attributes . put ( matcher . group ( 1 ) , matcher . group ( 2 ) ) ; } return attribu... |
public class Entities { /** * Gets a random entity from the container ( if there is one ) .
* @ param container
* Source container .
* @ return Random entity ( if found ) . */
public static Optional < Entity > randomEntity ( final EntityContainer container ) { } } | return randomEntity0 ( container . streamEntities ( ) , container . getEntityCount ( ) ) ; |
public class ApplicationUpdateMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ApplicationUpdate applicationUpdate , ProtocolMarshaller protocolMarshaller ) { } } | if ( applicationUpdate == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( applicationUpdate . getInputUpdates ( ) , INPUTUPDATES_BINDING ) ; protocolMarshaller . marshall ( applicationUpdate . getApplicationCodeUpdate ( ) , APPLICATIONCODEUP... |
public class MetadataSet { /** * Search all the given expressions and return the first one that matches the
* given property and value ( if present ) .
* If < code > value < / code > is { @ link Optional # absent ( ) }
* , only the property is used in the lookup .
* @ param metas
* A set of metadata expressio... | Preconditions . checkNotNull ( metas ) ; Preconditions . checkNotNull ( property ) ; Preconditions . checkNotNull ( value ) ; return Iterables . tryFind ( metas , new Predicate < Metadata > ( ) { @ Override public boolean apply ( Metadata meta ) { return property . equals ( meta . getProperty ( ) ) && ( ! value . isPre... |
public class UserController { /** * GET 获取
* @ param
* @ return */
@ NoAuth @ RequestMapping ( value = "/session" , method = RequestMethod . GET ) @ ResponseBody public JsonObjectBase get ( ) { } } | VisitorVo visitorVo = userMgr . getCurVisitor ( ) ; if ( visitorVo != null ) { return buildSuccess ( "visitor" , visitorVo ) ; } else { // 没有登录啊
return buildGlobalError ( "syserror.inner" , ErrorCode . GLOBAL_ERROR ) ; } |
public class CustomerArtifactPaths { /** * Comma - separated list of paths in the test execution environment where the artifacts generated by the customer ' s
* tests will be pulled from .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setDeviceHostPaths (... | if ( this . deviceHostPaths == null ) { setDeviceHostPaths ( new java . util . ArrayList < String > ( deviceHostPaths . length ) ) ; } for ( String ele : deviceHostPaths ) { this . deviceHostPaths . add ( ele ) ; } return this ; |
public class Strings { /** * Gets the string representation of the submitted object and never returns { @ code null } .
* @ param o the object to get the string representation of .
* @ return the string representation of the submitted object ( never { @ code null } ) . */
@ SuppressWarnings ( "null" ) public static... | return String . valueOf ( String . valueOf ( o ) ) ; |
public class NetworkWatchersInner { /** * Configures flow log on a specified resource .
* @ param resourceGroupName The name of the network watcher resource group .
* @ param networkWatcherName The name of the network watcher resource .
* @ param parameters Parameters that define the configuration of flow log .
... | return ServiceFuture . fromResponse ( setFlowLogConfigurationWithServiceResponseAsync ( resourceGroupName , networkWatcherName , parameters ) , serviceCallback ) ; |
public class JspRuntimeLibrary { /** * Decode an URL formatted string .
* @ param s The string to decode .
* @ return The decoded string . */
public static String decode ( String encoded ) { } } | // speedily leave if we ' re not needed
if ( encoded == null ) return null ; if ( encoded . indexOf ( '%' ) == - 1 && encoded . indexOf ( '+' ) == - 1 ) return encoded ; // allocate the buffer - use byte [ ] to avoid calls to new .
byte holdbuffer [ ] = new byte [ encoded . length ( ) ] ; char holdchar ; int bufcount =... |
public class RESTParameter { /** * Add a new child parameter with the given name and type to this parameter . The child
* parameter will not be marked as required . This parameter is returned to support
* builder syntax .
* @ param childParamName Name of new child parameter .
* @ param childParamType Type of ne... | return add ( new RESTParameter ( childParamName , childParamType ) ) ; |
public class JSSEProviderFactory { /** * Insert a provider into Security at the provided slot number .
* @ param newProvider
* @ param slot */
public static void insertProviderAt ( Provider newProvider , int slot ) { } } | Provider [ ] provider_list = Security . getProviders ( ) ; if ( null == provider_list || 0 == provider_list . length ) { return ; } // add the new provider to the new list at the correct slot # .
Provider [ ] newList = new Provider [ provider_list . length + 2 ] ; newList [ slot ] = newProvider ; int newListIndex = 1 ;... |
public class OAuth2SessionManager { /** * Refreshes access token after expiration ( before sending request ) thanks to the refresh token . The bew access
* token is then stored in this manager .
* Method is synchronized so that no two threads will attempt to refresh at the same time . If a locked thread sees
* th... | if ( refreshTokenUrl == null ) { throw new CStorageException ( "Provider does not support token refresh" ) ; } OAuth2Credentials currentCredentials = userCredentials . getCredentials ( ) ; synchronized ( refreshLock ) { OAuth2Credentials afterLockCredentials = userCredentials . getCredentials ( ) ; if ( afterLockCreden... |
public class GzipInputHandler { /** * Parse the gzip header information , if it exists , from the input buffer .
* This handles running out of data at any point in the gzip header sequence
* and picking up with future buffers .
* @ param data
* @ throws DataFormatException
* if the header data is corrupt */
p... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Parsing gzip header; state=" + this . state ) ; } int pos = 0 ; for ( ; pos < data . length && PARSE_STATE . DONE != this . state ; ) { byte b = data [ pos ++ ] ; if ( PARSE_STATE . ID1 == this . state ) { if ( ( byte ) 0x1F... |
public class Sql { /** * Performs the given SQL query and return a " page " of rows from the result set . A page is defined as starting at
* a 1 - based offset , and containing a maximum number of rows .
* In addition , the < code > metaClosure < / code > will be called once passing in the
* < code > ResultSetMet... | AbstractQueryCommand command = createPreparedQueryCommand ( sql , params ) ; // for efficiency set maxRows ( adjusted for the first offset rows we are going to skip the cursor over )
command . setMaxRows ( offset + maxRows ) ; try { return asList ( sql , command . execute ( ) , offset , maxRows , metaClosure ) ; } fina... |
public class PlannerReader { /** * This method extracts calendar data from a Planner file .
* @ param project Root node of the Planner file */
private void readCalendars ( Project project ) throws MPXJException { } } | Calendars calendars = project . getCalendars ( ) ; if ( calendars != null ) { for ( net . sf . mpxj . planner . schema . Calendar cal : calendars . getCalendar ( ) ) { readCalendar ( cal , null ) ; } Integer defaultCalendarID = getInteger ( project . getCalendar ( ) ) ; m_defaultCalendar = m_projectFile . getCalendarBy... |
public class CrawlController { /** * Adds a new seed URL . A seed URL is a URL that is fetched by the crawler
* to extract new URLs in it and follow them for crawling . You can also
* specify a specific document id to be assigned to this seed URL . This
* document id needs to be unique . Also , note that if you a... | String canonicalUrl = URLCanonicalizer . getCanonicalURL ( pageUrl ) ; if ( canonicalUrl == null ) { logger . error ( "Invalid seed URL: {}" , pageUrl ) ; } else { if ( docId < 0 ) { docId = docIdServer . getDocId ( canonicalUrl ) ; if ( docId > 0 ) { logger . trace ( "This URL is already seen." ) ; return ; } docId = ... |
public class CRFClassifier { /** * Convert an ObjectBank to arrays of data features and labels .
* @ return A Pair , where the first element is an int [ ] [ ] [ ] [ ] representing the
* data and the second element is an int [ ] [ ] representing the labels . */
public Pair < int [ ] [ ] [ ] [ ] , int [ ] [ ] > docum... | // first index is the number of the document
// second index is position in the document also the index of the
// clique / factor table
// third index is the number of elements in the clique / window these features
// are for ( starting with last element )
// fourth index is position of the feature in the array that ho... |
public class ORBManager { /** * Check if the checkORBgiopMaxMsgSize has been set . This environment
* variable should be set in Mega bytes . */
private static String checkORBgiopMaxMsgSize ( ) { } } | /* * JacORB definition ( see jacorb . properties file ) :
* This is NOT the maximum buffer size that can be used , but just the
* largest size of buffers that will be kept and managed . This value
* will be added to an internal constant of 5 , so the real value in
* bytes is 2 * * ( 5 + maxManagedBufSize - 1 ) ... |
public class QueryImpl { /** * sorts a query by a column
* @ param strColumn column to sort
* @ param order sort type ( Query . ORDER _ ASC or Query . ORDER _ DESC )
* @ throws PageException */
@ Override public synchronized void sort ( String strColumn , int order ) throws PageException { } } | // disconnectCache ( ) ;
sort ( getColumn ( strColumn ) , order ) ; |
public class AbstractHibernateDao { /** * Setup a query with parameters and other configurations .
* @ param query
* @ param paramValues
* @ param paramTypes
* @ param offset
* @ param limit */
private void setupQuery ( Query query , Object [ ] paramValues , Type [ ] paramTypes , Integer offset , Integer limi... | if ( paramValues != null && paramTypes != null ) { query . setParameters ( paramValues , paramTypes ) ; } if ( offset != null ) { query . setFirstResult ( offset ) ; } if ( limit != null ) { query . setMaxResults ( limit ) ; } |
public class ZoneOperationId { /** * Returns a zone operation identity given project , zone and operation names . */
public static ZoneOperationId of ( String project , String zone , String operation ) { } } | return new ZoneOperationId ( project , zone , operation ) ; |
public class MaterialValueBox { /** * Updates the style of the field label according to the field value if the
* field value is empty - null or " " - removes the label ' active ' style else
* will add the ' active ' style to the field label . */
protected void updateLabelActiveStyle ( ) { } } | if ( this . valueBoxBase . getText ( ) != null && ! this . valueBoxBase . getText ( ) . isEmpty ( ) ) { label . addStyleName ( CssName . ACTIVE ) ; } else { label . removeStyleName ( CssName . ACTIVE ) ; } |
public class I18nLoader { /** * looks for a file named cukedoctor . properties using @ baseDir as starting point */
private InputStream findCukedoctorProperties ( String baseDir ) { } } | List < String > files = FileUtil . findFiles ( baseDir , "cukedoctor.properties" , true ) ; if ( files != null && ! files . isEmpty ( ) ) { String path = files . get ( 0 ) ; log . fine ( "Loading cukedoctor resource bundle from: " + path ) ; File file = new File ( path ) ; try { return new FileInputStream ( file ) ; } ... |
public class Coordination { /** * setter for resolved - sets
* @ generated
* @ param v value to set into the feature */
public void setResolved ( String v ) { } } | if ( Coordination_Type . featOkTst && ( ( Coordination_Type ) jcasType ) . casFeat_resolved == null ) jcasType . jcas . throwFeatMissing ( "resolved" , "de.julielab.jules.types.Coordination" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Coordination_Type ) jcasType ) . casFeatCode_resolved , v ) ; |
public class IntObjectHashMap { /** * Get the stored value associated with the given key
* @ param key key associated with the data
* @ return data associated with the key */
public T get ( final int key ) { } } | final int hash = hashOf ( key ) ; int index = hash & mask ; if ( containsKey ( key , index ) ) { return ( T ) values [ index ] ; } if ( states [ index ] == FREE ) { return missingEntries ; } int j = index ; for ( int perturb = perturb ( hash ) ; states [ index ] != FREE ; perturb >>= PERTURB_SHIFT ) { j = probe ( pertu... |
public class MtasRequestHandler { /** * Finish status .
* @ param item
* the item
* @ throws IOException
* Signals that an I / O exception has occurred . */
public void finishStatus ( MtasSolrStatus item ) throws IOException { } } | running . remove ( item ) ; if ( item . error ( ) ) { error . add ( item ) ; } |
public class ContainerDefinition { /** * The dependencies defined for container startup and shutdown . A container can contain multiple dependencies . When
* a dependency is defined for container startup , for container shutdown it is reversed .
* Your Amazon ECS container instances require at least version 1.26.0 ... | if ( dependsOn == null ) { this . dependsOn = null ; return ; } this . dependsOn = new com . amazonaws . internal . SdkInternalList < ContainerDependency > ( dependsOn ) ; |
public class ClientRequestExecutor { /** * Null out current clientRequest before calling complete . timeOut and
* complete must * not * be within a synchronized block since both eventually
* check in the client request executor . Such a check in can trigger
* additional synchronized methods deeper in the stack . ... | ClientRequest < ? > local = atomicNullOutClientRequest ( ) ; if ( local == null ) { return null ; } if ( isExpired ) { local . timeOut ( ) ; } else { local . complete ( ) ; } if ( logger . isTraceEnabled ( ) ) logger . trace ( "Marked client associated with " + socketChannel . socket ( ) + " as complete" ) ; return loc... |
public class WSJdbcResultSet { /** * @ param runtimeX a RuntimeException which occurred , indicating the wrapper may be closed .
* @ throws SQLRecoverableException if the wrapper is closed and exception mapping is disabled .
* @ return the RuntimeException to throw if it isn ' t . */
final protected RuntimeExceptio... | if ( state == State . CLOSED ) throw createClosedException ( "ResultSet" ) ; return runtimeX ; |
public class Disruptor { /** * Publish an event to the ring buffer .
* @ param < A > Class of the user supplied argument .
* @ param eventTranslator the translator that will load data into the event .
* @ param arg A single argument to load into the event */
public < A > void publishEvent ( final EventTranslatorO... | ringBuffer . publishEvent ( eventTranslator , arg ) ; |
public class InhibitAnyPolicyExtension { /** * Delete the attribute value .
* @ param name name of attribute to delete . Must be SKIP _ CERTS .
* @ throws IOException on error . In this case , IOException will always be
* thrown , because the only attribute , SKIP _ CERTS , is
* required . */
public void delete... | if ( name . equalsIgnoreCase ( SKIP_CERTS ) ) throw new IOException ( "Attribute " + SKIP_CERTS + " may not be deleted." ) ; else throw new IOException ( "Attribute name not recognized by " + "CertAttrSet:InhibitAnyPolicy." ) ; |
public class DefaultGroovyMethods { /** * Support the subscript operator with a range for a byte array
* @ param array a byte array
* @ param range a range indicating the indices for the items to retrieve
* @ return list of the retrieved bytes
* @ since 1.0 */
@ SuppressWarnings ( "unchecked" ) public static Li... | return primitiveArrayGet ( array , range ) ; |
public class ApiImplementor { /** * Override if implementing one or more ' persistent connection ' operations .
* These are operations that maintain long running connections , potentially staying alive
* as long as the client holds them open .
* @ param msg the HTTP message containing the API request
* @ param ... | throw new ApiException ( ApiException . Type . BAD_PCONN , name ) ; |
public class GenericSorting { /** * Sorts the specified sub - array into ascending order . */
private static void quickSort1 ( int off , int len , IntComparator comp , Swapper swapper ) { } } | // Insertion sort on smallest arrays
if ( len < SMALL ) { for ( int i = off ; i < len + off ; i ++ ) for ( int j = i ; j > off && ( comp . compare ( j - 1 , j ) > 0 ) ; j -- ) { swapper . swap ( j , j - 1 ) ; } return ; } // Choose a partition element , v
int m = off + len / 2 ; // Small arrays , middle element
if ( le... |
public class PlannerWriter { /** * Process the standard working hours for a given day .
* @ param mpxjCalendar MPXJ Calendar instance
* @ param uniqueID unique ID sequence generation
* @ param day Day instance
* @ param typeList Planner list of days */
private void processWorkingHours ( ProjectCalendar mpxjCale... | if ( isWorkingDay ( mpxjCalendar , day ) ) { ProjectCalendarHours mpxjHours = mpxjCalendar . getCalendarHours ( day ) ; if ( mpxjHours != null ) { OverriddenDayType odt = m_factory . createOverriddenDayType ( ) ; typeList . add ( odt ) ; odt . setId ( getIntegerString ( uniqueID . next ( ) ) ) ; List < Interval > inter... |
public class Base64Coder { /** * Encodes a string into Base64 format .
* No blanks or line breaks are inserted .
* @ param string a String to be encoded .
* @ return A String with the Base64 encoded data . */
@ Pure @ Inline ( value = "new String(Base64Coder.encode(($1).getBytes()))" , imported = { } } | Base64Coder . class } ) public static String encodeString ( String string ) { return new String ( encode ( string . getBytes ( ) ) ) ; |
public class JCusolverDn { /** * generates one of the unitary matrices Q or P * * T determined by GEBRD */
public static int cusolverDnSorgbr_bufferSize ( cusolverDnHandle handle , int side , int m , int n , int k , Pointer A , int lda , Pointer tau , int [ ] lwork ) { } } | return checkResult ( cusolverDnSorgbr_bufferSizeNative ( handle , side , m , n , k , A , lda , tau , lwork ) ) ; |
public class EntityPropertyDescFactory { /** * カラム名を表示するかどうかを処理します 。
* @ param entityDesc エンティティ記述
* @ param propertyDesc エンティティプロパティ記述
* @ param columnMeta カラムメタデータ */
protected void handleShowColumnName ( EntityDesc entityDesc , EntityPropertyDesc propertyDesc , ColumnMeta columnMeta ) { } } | if ( showColumnName || isNameDifferentBetweenPropertyAndColumn ( entityDesc , propertyDesc ) ) { propertyDesc . setShowColumnName ( true ) ; } |
public class MapBasedDataMaster { /** * Returns list ( null safe ) of elements for desired key from dataSource files
* @ param key desired node key
* @ return list of elements for desired key
* @ throws IllegalArgumentException if no element for key has been found */
@ SuppressWarnings ( "unchecked" ) @ Override ... | return getData ( key , List . class ) ; |
public class Probe { /** * Create and return a LinkedList of a combination of both scids and siids .
* This is a method that is used primarily in the creation of split packets .
* @ return combined LikedList */
public LinkedList < ProbeIdEntry > getCombinedIdentifierList ( ) { } } | LinkedList < ProbeIdEntry > combinedList = new LinkedList < ProbeIdEntry > ( ) ; for ( String id : this . getProbeWrapper ( ) . getServiceContractIDs ( ) ) { combinedList . add ( new ProbeIdEntry ( "scid" , id ) ) ; } for ( String id : this . getProbeWrapper ( ) . getServiceInstanceIDs ( ) ) { combinedList . add ( new ... |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcBlobTexture ( ) { } } | if ( ifcBlobTextureEClass == null ) { ifcBlobTextureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 41 ) ; } return ifcBlobTextureEClass ; |
public class BatchMeterUsageResult { /** * Contains all UsageRecords processed by BatchMeterUsage . These records were either honored by AWS Marketplace
* Metering Service or were invalid .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setResults ( java .... | if ( this . results == null ) { setResults ( new java . util . ArrayList < UsageRecordResult > ( results . length ) ) ; } for ( UsageRecordResult ele : results ) { this . results . add ( ele ) ; } return this ; |
public class CacheProviderWrapper { /** * Adds an alias for the given key in the cache ' s mapping table . If the alias is already
* associated with another key , it will be changed to associate with the new key .
* @ param key the key assoicated with alias
* @ param aliasArray the alias to use for lookups
* @ ... | final String methodName = "addAlias()" ; if ( this . featureSupport . isAliasSupported ( ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet" ) ; } } else { Tr . error ( tc , "DYNA1063E" , new Object [ ] { methodName , cacheName , t... |
public class LdiSrl { /** * Adjust initial character ( s ) as beans property . < br >
* Basically same as initUncap ( ) method except only when
* it starts with two upper case character , for example , ' EMecha '
* @ param capitalizedName The capitalized name for beans property . ( NotNull )
* @ return The name... | // according to Java Beans rule
assertObjectNotNull ( "capitalizedName" , capitalizedName ) ; if ( is_Null_or_TrimmedEmpty ( capitalizedName ) ) { return capitalizedName ; } if ( isInitTwoUpperCase ( capitalizedName ) ) { // for example , ' EMecha '
return capitalizedName ; } return initUncap ( capitalizedName ) ; |
public class TransactionSignature { /** * Returns a decoded signature .
* @ param requireCanonicalEncoding if the encoding of the signature must
* be canonical .
* @ param requireCanonicalSValue if the S - value must be canonical ( below half
* the order of the curve ) .
* @ throws SignatureDecodeException if... | // Bitcoin encoding is DER signature + sighash byte .
if ( requireCanonicalEncoding && ! isEncodingCanonical ( bytes ) ) throw new VerificationException . NoncanonicalSignature ( ) ; ECKey . ECDSASignature sig = ECKey . ECDSASignature . decodeFromDER ( bytes ) ; if ( requireCanonicalSValue && ! sig . isCanonical ( ) ) ... |
public class CommandExecutionSpec { /** * Check the exitStatus of previous command execution matches the expected one
* @ param expectedExitStatus
* @ deprecated Success exit status is directly checked in the " execute remote command " method , so this is not
* needed anymore . */
@ Deprecated @ Then ( "^the comm... | assertThat ( commonspec . getCommandExitStatus ( ) ) . as ( "Is equal to " + expectedExitStatus + "." ) . isEqualTo ( expectedExitStatus ) ; |
public class ListQualificationRequestsResult { /** * The Qualification request . The response includes one QualificationRequest element for each Qualification request
* returned by the query .
* @ param qualificationRequests
* The Qualification request . The response includes one QualificationRequest element for ... | if ( qualificationRequests == null ) { this . qualificationRequests = null ; return ; } this . qualificationRequests = new java . util . ArrayList < QualificationRequest > ( qualificationRequests ) ; |
public class DescribeClusterTracksResult { /** * A list of maintenance tracks output by the < code > DescribeClusterTracks < / code > operation .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setMaintenanceTracks ( java . util . Collection ) } or { @ link #... | if ( this . maintenanceTracks == null ) { setMaintenanceTracks ( new com . amazonaws . internal . SdkInternalList < MaintenanceTrack > ( maintenanceTracks . length ) ) ; } for ( MaintenanceTrack ele : maintenanceTracks ) { this . maintenanceTracks . add ( ele ) ; } return this ; |
public class CrsWktExtension { /** * Remove the extension . Leaves the column and values .
* @ since 3.2.0 */
public void removeExtension ( ) { } } | try { if ( extensionsDao . isTableExists ( ) ) { extensionsDao . deleteByExtension ( EXTENSION_NAME ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to delete CRS WKT extension. GeoPackage: " + geoPackage . getName ( ) , e ) ; } |
public class Importer { /** * Check whether a file with given path and checksum already exists */
private File fileExists ( final String path , final long checksum ) throws FrameworkException { } } | final PropertyKey < Long > checksumKey = StructrApp . key ( File . class , "checksum" ) ; final PropertyKey < String > pathKey = StructrApp . key ( File . class , "path" ) ; return app . nodeQuery ( File . class ) . and ( pathKey , path ) . and ( checksumKey , checksum ) . getFirst ( ) ; |
public class ImageScale3x { /** * Retrieve the scaled image . Note this is the method that actually
* does the work so it may take some time to return
* @ return The newly scaled image */
public BufferedImage getScaledImage ( ) { } } | RawScale3x scaler = new RawScale3x ( srcData , width , height ) ; BufferedImage image = new BufferedImage ( width * 3 , height * 3 , BufferedImage . TYPE_INT_ARGB ) ; image . setRGB ( 0 , 0 , width * 3 , height * 3 , scaler . getScaledData ( ) , 0 , width * 3 ) ; return image ; |
public class BadAlias { /** * syck _ badalias _ cmp */
@ JRubyMethod ( name = "<=>" ) public static IRubyObject cmp ( IRubyObject alias1 , IRubyObject alias2 ) { } } | IRubyObject str1 = ( IRubyObject ) ( ( RubyObject ) alias1 ) . fastGetInstanceVariable ( "@name" ) ; IRubyObject str2 = ( IRubyObject ) ( ( RubyObject ) alias2 ) . fastGetInstanceVariable ( "@name" ) ; return str1 . callMethod ( alias1 . getRuntime ( ) . getCurrentContext ( ) , "<=>" , str2 ) ; |
public class Utils { /** * Append the second pathString to the first . The result will not end with a / .
* In case two absolute paths are given , e . g . / A / B / , and / C / D / , then the result
* will be / A / B / C / D
* Multiple slashes will be shortened to a single slash , so / A / / / B is equivalent to ... | String result = first + SEP + second ; while ( result . contains ( "//" ) ) { result = result . replaceAll ( "//" , "/" ) ; } if ( result . length ( ) > 1 && result . endsWith ( SEP ) ) { return result . substring ( 0 , result . length ( ) - 1 ) ; } else { return result ; } |
public class KeyVaultClientBaseImpl { /** * List certificate issuers for a specified key vault .
* The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault . This operation requires the certificates / manageissuers / getissuers permission .
* @ param nextPageLin... | return getCertificateIssuersNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < CertificateIssuerItem > > , Page < CertificateIssuerItem > > ( ) { @ Override public Page < CertificateIssuerItem > call ( ServiceResponse < Page < CertificateIssuerItem > > response ) { return respons... |
public class CompositeType { /** * Returns the flat field descriptors for the given field expression .
* @ param fieldExpression The field expression for which the flat field descriptors are computed .
* @ return The list of descriptors for the flat fields which are specified by the field expression . */
@ PublicEv... | List < FlatFieldDescriptor > result = new ArrayList < FlatFieldDescriptor > ( ) ; this . getFlatFields ( fieldExpression , 0 , result ) ; return result ; |
public class ScalarFieldUpdater { /** * Add all Terms columns needed for our scalar field . */
private void addTermColumns ( String fieldValue ) { } } | Set < String > termSet = tokenize ( fieldValue ) ; indexTerms ( termSet ) ; addFieldTermReferences ( termSet ) ; addFieldReference ( ) ; |
public class CPDefinitionOptionValueRelUtil { /** * Returns the first cp definition option value rel in the ordered set where uuid = & # 63 ; .
* @ param uuid the uuid
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matching cp definition... | return getPersistence ( ) . fetchByUuid_First ( uuid , orderByComparator ) ; |
public class UpdateTeamMemberRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateTeamMemberRequest updateTeamMemberRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateTeamMemberRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateTeamMemberRequest . getProjectId ( ) , PROJECTID_BINDING ) ; protocolMarshaller . marshall ( updateTeamMemberRequest . getUserArn ( ) , USERARN_BINDING ) ;... |
public class DeleteInstanceSnapshotRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DeleteInstanceSnapshotRequest deleteInstanceSnapshotRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( deleteInstanceSnapshotRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteInstanceSnapshotRequest . getInstanceSnapshotName ( ) , INSTANCESNAPSHOTNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Un... |
public class AtomContainer { /** * { @ inheritDoc } */
@ Override public Iterable < IAtom > atoms ( ) { } } | return new Iterable < IAtom > ( ) { @ Override public Iterator < IAtom > iterator ( ) { return new AtomIterator ( ) ; } } ; |
public class GreenPepperXmlRpcClient { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) public void createRunner ( Runner runner , String identifier ) throws GreenPepperServerException { } } | Vector params = CollectionUtil . toVector ( runner . marshallize ( ) ) ; log . debug ( "Creating runner: " + runner . getName ( ) ) ; execute ( XmlRpcMethodName . createRunner , params , identifier ) ; |
public class ManagedExecutorServiceImpl { /** * { @ inheritDoc } */
@ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) @ Override public < T > List < Future < T > > invokeAll ( Collection < ? extends Callable < T > > tasks ) throws InterruptedException { Entry < Collection < ? extends Callable < T > > , TaskLifeCycleCallback [ ] > entry = createCallbacks ( tasks ) ; tasks = entry . getKey ( ) ; TaskLifeCycl... |
public class MicrosoftSQLServerHelper { /** * This returns a < code > PrintWriter < / code > for a specific
* backend . The order of printwriter lookup is as follows :
* first , the returned value from the < code > externalhelper . getPrintWriter ( ) < / code > ,
* which also can be overwritten by extending the h... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getPrintWriter" ) ; // not synchronizing here since there will be one helper
// and most likely the setting will be serially , even if it ' s not ,
// it shouldn ' t matter here ( tracing ) .
if ( jdbcTraceWriter == nul... |
public class PutPipelineDefinitionRequest { /** * The parameter values used with the pipeline .
* @ return The parameter values used with the pipeline . */
public java . util . List < ParameterValue > getParameterValues ( ) { } } | if ( parameterValues == null ) { parameterValues = new com . amazonaws . internal . SdkInternalList < ParameterValue > ( ) ; } return parameterValues ; |
public class LoggerUtils { /** * 打印日志
* @ param logLevel 日志级别
* @ param clazz 指定类
* @ param message 消息
* @ param values 格式化参数
* @ since 1.0.9 */
public static void log ( LogLevel logLevel , Class < ? > clazz , String message , String ... values ) { } } | switch ( logLevel ) { case WARN : warn ( clazz , message , values ) ; break ; case ERROR : error ( clazz , message , values ) ; break ; case FATAL : fatal ( clazz , message , values ) ; break ; default : info ( clazz , message , values ) ; break ; } |
public class ValidateSecurityProfileBehaviorsResult { /** * The list of any errors found in the behaviors .
* @ param validationErrors
* The list of any errors found in the behaviors . */
public void setValidationErrors ( java . util . Collection < ValidationError > validationErrors ) { } } | if ( validationErrors == null ) { this . validationErrors = null ; return ; } this . validationErrors = new java . util . ArrayList < ValidationError > ( validationErrors ) ; |
public class KunderaCriteriaBuilder { /** * ( non - Javadoc )
* @ see
* javax . persistence . criteria . CriteriaBuilder # lt ( javax . persistence . criteria
* . Expression , javax . persistence . criteria . Expression ) */
@ Override public Predicate lt ( Expression < ? extends Number > arg0 , Expression < ? ex... | // TODO Auto - generated method stub
return null ; |
public class LoadBalancerProbesInner { /** * Gets load balancer probe .
* @ param resourceGroupName The name of the resource group .
* @ param loadBalancerName The name of the load balancer .
* @ param probeName The name of the probe .
* @ param serviceCallback the async ServiceCallback to handle successful and... | return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , loadBalancerName , probeName ) , serviceCallback ) ; |
public class PullerInternal { /** * This is compatible with CouchDB , but it only works for revs of generation 1 without attachments . */
protected void pullBulkWithAllDocs ( final List < RevisionInternal > bulkRevs ) { } } | // http : / / wiki . apache . org / couchdb / HTTP _ Bulk _ Document _ API
++ httpConnectionCount ; final RevisionList remainingRevs = new RevisionList ( bulkRevs ) ; Collection < String > keys = CollectionUtils . transform ( bulkRevs , new CollectionUtils . Functor < RevisionInternal , String > ( ) { public String inv... |
public class StandardDdlParser { /** * Method which extracts the table element string from a CREATE TABLE statement .
* @ param tokens the { @ link DdlTokenStream } representing the tokenized DDL content ; may not be null
* @ param useTerminator
* @ return the parsed table elements String .
* @ throws ParsingEx... | assert tokens != null ; StringBuilder sb = new StringBuilder ( 100 ) ; if ( useTerminator ) { while ( ! isTerminator ( tokens ) ) { sb . append ( SPACE ) . append ( tokens . consume ( ) ) ; } } else { // Assume we start with open parenthesis ' ( ' , then we can count on walking through ALL tokens until we find the clos... |
public class SoyGeneralOptions { /** * Sets the file containing compile - time globals .
* < p > Each line of the file should have the format
* < pre >
* & lt ; global _ name & gt ; = & lt ; primitive _ data & gt ;
* < / pre >
* where primitive _ data is a valid Soy expression literal for a primitive type ( n... | setCompileTimeGlobalsInternal ( SoyUtils . parseCompileTimeGlobals ( Files . asCharSource ( compileTimeGlobalsFile , UTF_8 ) ) ) ; return this ; |
public class AWSCertificateManagerClient { /** * Resends the email that requests domain ownership validation . The domain owner or an authorized representative
* must approve the ACM certificate before it can be issued . The certificate can be approved by clicking a link in
* the mail to navigate to the Amazon cert... | request = beforeClientExecution ( request ) ; return executeResendValidationEmail ( request ) ; |
public class RemoteJTProxy { /** * Start corona job tracker on the machine provided by using the corona
* task tracker API .
* @ param jobConf The job configuration .
* @ param grant The grant that specifies the remote machine .
* @ return A boolean indicating success .
* @ throws InterruptedException */
priv... | org . apache . hadoop . corona . InetAddress ttAddr = Utilities . appInfoToAddress ( grant . appInfo ) ; CoronaTaskTrackerProtocol coronaTT = null ; try { coronaTT = jt . getTaskTrackerClient ( ttAddr . getHost ( ) , ttAddr . getPort ( ) ) ; } catch ( IOException e ) { LOG . error ( "Error while trying to connect to TT... |
public class MapMaker { /** * Builds a thread - safe map , without on - demand computation of values . This method does not alter
* the state of this { @ code MapMaker } instance , so it can be invoked again to create multiple
* independent maps .
* < p > The bulk operations { @ code putAll } , { @ code equals } ... | if ( ! useCustomMap ) { return new ConcurrentHashMap < K , V > ( getInitialCapacity ( ) , 0.75f , getConcurrencyLevel ( ) ) ; } return ( nullRemovalCause == null ) ? new MapMakerInternalMap < K , V > ( this ) : new NullConcurrentMap < K , V > ( this ) ; |
public class SubjectReference { /** * Formats an IPTC string for this reference using information obtained from
* Subject Reference System .
* @ param srs
* reference subject reference system
* @ return IPTC formatted reference */
public String toIPTC ( SubjectReferenceSystem srs ) { } } | StringBuffer b = new StringBuffer ( ) ; b . append ( "IPTC:" ) ; b . append ( getNumber ( ) ) ; b . append ( ":" ) ; if ( getNumber ( ) . endsWith ( "000000" ) ) { b . append ( toIPTCHelper ( srs . getName ( this ) ) ) ; b . append ( "::" ) ; } else if ( getNumber ( ) . endsWith ( "000" ) ) { b . append ( toIPTCHelper ... |
public class SingleThreadStage { /** * Closes the stage .
* @ throws Exception */
@ Override public void close ( ) throws Exception { } } | if ( closed . compareAndSet ( false , true ) ) { interrupted . set ( true ) ; thread . interrupt ( ) ; } |
public class TableResult { /** * Callback method used while the query is executed . */
public boolean newrow ( String rowdata [ ] ) { } } | if ( rowdata != null ) { if ( maxrows > 0 && nrows >= maxrows ) { atmaxrows = true ; return true ; } rows . addElement ( rowdata ) ; nrows ++ ; } return false ; |
public class DateFormat { /** * Creates a { @ link DateFormat } object for the default locale that can be used
* to format dates in the calendar system specified by < code > cal < / code > .
* @ param cal The calendar system for which a date format is desired .
* @ param dateStyle The type of date format desired ... | return getDateInstance ( cal , dateStyle , ULocale . getDefault ( Category . FORMAT ) ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link GenericMetaDataType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link GenericMetaDataType } { @ co... | return new JAXBElement < GenericMetaDataType > ( _GenericMetaData_QNAME , GenericMetaDataType . class , null , value ) ; |
public class WRadioButtonSelectExample { /** * adds a WRadioButtonSelect with LAYOUT _ COLUMN in 1 column simply by not setting the number of columns . This is
* superfluous as you should use LAYOUT _ STACKED ( the default ) instead . */
private void addSingleColumnSelectExample ( ) { } } | add ( new WHeading ( HeadingLevel . H3 , "WRadioButtonSelect laid out in a single column" ) ) ; add ( new ExplanatoryText ( "When layout is COLUMN, setting the layoutColumnCount property to one, or forgetting to set it at all (default is " + "one) is a little bit pointless." ) ) ; final WRadioButtonSelect select = new ... |
public class CassandraDeepJobConfig { /** * { @ inheritDoc } */
@ Override public CassandraDeepJobConfig < T > createTableOnWrite ( Boolean createTableOnWrite ) { } } | this . createTableOnWrite = createTableOnWrite ; this . isWriteConfig = createTableOnWrite ; return this ; |
public class Client { /** * Returns a cursor of datapoints specified by series with multiple rollups .
* < p > The system default timezone is used for the returned DateTimes .
* @ param series The series
* @ param interval An interval of time for the query ( start / end datetimes )
* @ param rollup The MultiRol... | return readMultiRollupDataPoints ( series , interval , DateTimeZone . getDefault ( ) , rollup , null ) ; |
public class StunAttributeFactory { /** * Create a UsernameAttribute .
* @ param username
* username value
* @ return newly created UsernameAttribute */
public static UsernameAttribute createUsernameAttribute ( byte username [ ] ) { } } | UsernameAttribute attribute = new UsernameAttribute ( ) ; attribute . setUsername ( username ) ; return attribute ; |
public class CmsJspDeviceSelectorDesktopMobileTablet { /** * Checks if a template context is compatible with this device selector . < p >
* @ param templateContext the template context to check
* @ return true if the template context is compatible */
protected boolean isTemplateContextCompatible ( CmsTemplateContex... | Set < String > contextKeys = new HashSet < String > ( templateContext . getProvider ( ) . getAllContexts ( ) . keySet ( ) ) ; return contextKeys . equals ( new HashSet < String > ( TYPES ) ) ; |
public class Postcard { /** * Inserts a SparceArray of Parcelable values into the mapping of this
* Bundle , replacing any existing value for the given key . Either key
* or value may be null .
* @ param key a String , or null
* @ param value a SparseArray of Parcelable objects , or null
* @ return current */... | mBundle . putSparseParcelableArray ( key , value ) ; return this ; |
public class vpnsessionaction { /** * Use this API to fetch all the vpnsessionaction resources that are configured on netscaler . */
public static vpnsessionaction [ ] get ( nitro_service service ) throws Exception { } } | vpnsessionaction obj = new vpnsessionaction ( ) ; vpnsessionaction [ ] response = ( vpnsessionaction [ ] ) obj . get_resources ( service ) ; return response ; |
public class ClassUtil { /** * loads a class from a String classname
* @ param clazz class to load
* @ param args
* @ return matching Class */
public static Object loadInstance ( Class clazz , Object [ ] args , Object defaultValue ) { } } | if ( args == null || args . length == 0 ) return loadInstance ( clazz , defaultValue ) ; try { Class [ ] cArgs = new Class [ args . length ] ; for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] == null ) cArgs [ i ] = Object . class ; else cArgs [ i ] = args [ i ] . getClass ( ) ; } Constructor c = clazz . ... |
public class AbstractJsonArray { /** * Adds a value to the receiver ' s collection
* @ param value the new value */
public void add ( V value ) { } } | values . add ( value ) ; if ( value instanceof JsonEntity ) { ( ( JsonEntity ) value ) . addPropertyChangeListener ( propListener ) ; } firePropertyChange ( "#" + ( values . size ( ) - 1 ) , null , value ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.