signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class RuntimeJavadoc { /** * Gets the Javadoc of the given enum constant . * The return value is always non - null . If no Javadoc is available , the returned object ' s * { @ link BaseJavadoc # isEmpty isEmpty ( ) } method will return { @ code true } . * Implementation note : this method first retrieves t...
ClassJavadoc javadoc = getJavadoc ( enumValue . getDeclaringClass ( ) ) ; return findFieldJavadoc ( javadoc . getEnumConstants ( ) , enumValue . name ( ) ) ;
public class UCharacterName { /** * Sets up the name sets and the calculation of the maximum lengths . * Equivalent to calcNameSetsLengths . */ private boolean initNameSetsLengths ( ) { } }
if ( m_maxNameLength_ > 0 ) { return true ; } String extra = "0123456789ABCDEF<>-" ; // set hex digits , used in various names , and < > - , used in extended // names for ( int i = extra . length ( ) - 1 ; i >= 0 ; i -- ) { add ( m_nameSet_ , extra . charAt ( i ) ) ; } // set sets and lengths from algorithmic names m_m...
public class PathElement { /** * Determine whether the given property matches this element . * A property matches this element when property name and this key are equal , * values are equal or this element value is a wildcard . * @ param property the property to check * @ return { @ code true } if the property ...
return property . getName ( ) . equals ( key ) && ( value == WILDCARD_VALUE || property . getValue ( ) . asString ( ) . equals ( value ) ) ;
public class DefaultLocalPersistenceService { /** * { @ inheritDoc } */ @ Override public void createSafeSpace ( SafeSpaceIdentifier safeSpaceId ) throws CachePersistenceException { } }
if ( safeSpaceId == null || ! ( safeSpaceId instanceof DefaultSafeSpaceIdentifier ) ) { // this cannot happen . . if identifier created before creating physical space . . throw new AssertionError ( "Invalid safe space identifier. Identifier not created" ) ; } SafeSpace ss = ( ( DefaultSafeSpaceIdentifier ) safeSpaceId ...
public class StatementBuilder { /** * set ( varName ) . { expression } . endSet ( ) * @ return an expression builder */ final public SetExpressionBuilder < T > set ( final String to ) { } }
final int sourceLineNumber = builder . getSourceLineNumber ( ) ; return new SetExpressionBuilder < T > ( new ExpressionHandler < T > ( ) { public T handleExpression ( Expression e ) { return statementHandler ( ) . handleStatement ( new SetStatement ( sourceLineNumber , to , e ) ) ; } } ) ;
public class CatalogMetadataBuilder { /** * Set the options . Any options previously created are removed . * @ param opts the opts * @ return the catalog metadata builder */ @ TimerJ public CatalogMetadataBuilder withOptions ( Map < Selector , Selector > opts ) { } }
options = new HashMap < Selector , Selector > ( opts ) ; return this ;
public class JimfsFileStore { /** * Looks up the file at the given path using the given link options . If the path is relative , the * lookup is relative to the given working directory . * @ throws NoSuchFileException if an element of the path other than the final element does not * resolve to a directory or symb...
state . checkOpen ( ) ; return tree . lookUp ( workingDirectory , path , options ) ;
public class MwsUtl { /** * Calculate String to Sign for SignatureVersion 2 * @ param serviceUri * @ param parameters * request parameters * @ return String to Sign */ static String calculateStringToSignV2 ( URI serviceUri , Map < String , String > parameters ) { } }
StringBuilder data = new StringBuilder ( ) ; data . append ( "POST" ) ; data . append ( "\n" ) ; data . append ( serviceUri . getHost ( ) . toLowerCase ( ) ) ; if ( ! usesStandardPort ( serviceUri ) ) { data . append ( ":" ) ; data . append ( serviceUri . getPort ( ) ) ; } data . append ( "\n" ) ; String uri = serviceU...
public class ImgUtil { /** * 更改图片alpha值 * @ param oldPath 图片本地路径 * @ param newPath 更改alpha值后的图片保存路径 * @ param alpha 要设置的alpha值 * @ throws IOException IOException */ public static void changeAlpha ( String oldPath , String newPath , byte alpha ) throws IOException { } }
changeAlpha ( new FileInputStream ( oldPath ) , new FileOutputStream ( newPath ) , alpha ) ;
public class AbstractSupplier { /** * Void for most suppliers */ @ Override public void setParentKey ( WV value , Mapper mapper , String column , K parentKey , Object Entity ) { } }
public class NonBlockingBufferedReader { /** * Reads characters into a portion of an array , reading from the underlying * stream if necessary . * @ param aBuf * The buffer to be filled * @ param nOfs * The offset to start reading * @ param nLen * The number of bytes to read * @ return The number of byt...
if ( m_nNextCharIndex >= m_nChars ) { /* * If the requested length is at least as large as the buffer , and if * there is no mark / reset activity , and if line feeds are not being * skipped , do not bother to copy the characters into the local buffer . In * this way buffered streams will cascade harmlessly . */ ...
public class AbstractNamedInputHandler { /** * Creates new empty Bean instance * @ param clazz Class description which would be instantiated * @ return empty Bean instance */ private T createEmpty ( Class < ? > clazz ) { } }
T emptyInstance = null ; if ( clazz . isInterface ( ) ) { throw new IllegalArgumentException ( "Specified class is an interface: " + clazz . getName ( ) ) ; } try { emptyInstance = ( T ) clazz . newInstance ( ) ; } catch ( InstantiationException ex ) { throw new IllegalArgumentException ( clazz . getName ( ) + ". Is it...
public class AbstractRedG { /** * Searches through the list of entities to insert into the database and returns all of the specified type that match the passed { @ link Predicate } . * @ param type The class of the entities that should be searched for * @ param filter A predicate that gets called for every entity t...
return this . entities . stream ( ) . filter ( obj -> Objects . equals ( type , obj . getClass ( ) ) ) . map ( type :: cast ) . filter ( filter ) . collect ( Collectors . toList ( ) ) ;
public class HsqlProperties { /** * Choice limited to values list , defaultValue must be in the values list . */ public int getIntegerProperty ( String key , int defaultValue , int [ ] values ) { } }
String prop = getProperty ( key ) ; int value = defaultValue ; try { if ( prop != null ) { value = Integer . parseInt ( prop ) ; } } catch ( NumberFormatException e ) { } if ( ArrayUtil . find ( values , value ) == - 1 ) { return defaultValue ; } return value ;
public class OrphanedEvent { /** * Gets id of the updated message . * @ return Id of the updated message . */ public String getMessageId ( ) { } }
return ( data != null && data . payload != null ) ? data . payload . messageId : null ;
public class ArrayConverter { /** * 数组对数组转换 * @ param array 被转换的数组值 * @ return 转换后的数组 */ private Object convertArrayToArray ( Object array ) { } }
final Class < ? > valueComponentType = ArrayUtil . getComponentType ( array ) ; if ( valueComponentType == targetComponentType ) { return array ; } final int len = ArrayUtil . length ( array ) ; final Object result = Array . newInstance ( targetComponentType , len ) ; final ConverterRegistry converter = ConverterRegist...
public class PeriodFormatterBuilder { /** * Append a field prefix which applies only to the next appended field . If * the field is not printed , neither is the prefix . * @ param prefix custom prefix * @ return this PeriodFormatterBuilder * @ see # appendSuffix */ private PeriodFormatterBuilder appendPrefix ( ...
if ( prefix == null ) { throw new IllegalArgumentException ( ) ; } if ( iPrefix != null ) { prefix = new CompositeAffix ( iPrefix , prefix ) ; } iPrefix = prefix ; return this ;
public class ExecutorMetrics { /** * Calling this twice will not actually overwrite the gauge * @ param collectionSizeGauge */ public void registerCollectionSizeGauge ( CollectionSizeGauge collectionSizeGauge ) { } }
String name = createMetricName ( LocalTaskExecutorService . class , "queue-size" ) ; metrics . register ( name , collectionSizeGauge ) ;
public class AdvancedRecyclerArrayAdapter { /** * Called by the DiffUtil to decide whether two object represent the same Item . * For example , if your items have unique ids , this method should check their id equality . * @ param oldItem The position of the item in the old list * @ param newItem The position of ...
if ( oldItem == null && newItem == null ) { return true ; } if ( oldItem == null || newItem == null ) { return false ; } final Object oldId = getItemId ( oldItem ) ; final Object newId = getItemId ( newItem ) ; return ( oldId == newId ) || ( oldId != null && oldId . equals ( newId ) ) ;
public class RequestBuilder { /** * POST */ private static HttpRequestBase addParamsPost ( AsyncRequest asyncRequest ) { } }
HttpPost post = new HttpPost ( asyncRequest . getUrl ( ) ) ; Headers header = asyncRequest . getHeader ( ) ; if ( header != null ) { post . setHeaders ( header . toHeaderArray ( ) ) ; } Parameters parameter = asyncRequest . getParameter ( ) ; if ( parameter != null ) { if ( parameter . getNameValuePair ( ) != null ) { ...
public class JLocationScreen { /** * The init ( ) method is called by the AWT when an applet is first loaded or * reloaded . Override this method to perform whatever initialization your * applet needs , such as initializing data structures , loading images or * fonts , creating frame windows , setting the layout ...
super . init ( parent , null ) ; BaseApplet applet = ( BaseApplet ) parent ; JTreePanel panelLeft = new JTreePanel ( this , applet ) ; if ( strLocationParam instanceof String ) panelLeft . setLocationParamName ( ( String ) strLocationParam ) ; panelLeft . addPropertyChangeListener ( this ) ; // So I can pass it down JP...
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertUserTypeToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class MathUtils { /** * Determines the maximum numerical value in an array of values . * @ param values an array of numerical values from which to determine the maximum value . * @ return the maximum numerical value in the array of numerical values . Returns Double . NaN * if the array of values is null . ...
double maxValue = Double . NaN ; if ( values != null ) { for ( double value : values ) { maxValue = ( Double . isNaN ( maxValue ) ? value : Math . max ( maxValue , value ) ) ; } } return maxValue ;
public class BatchExtractor { /** * Main entry * @ param args * command line parameters : the path of the PDF directory , the path of the output , the PDF parser types , the debug mode , and the test mode . * @ throws IOException */ public static void main ( String [ ] args ) throws IOException { } }
if ( args . length == 3 ) { String pdfDirPath = args [ 0 ] ; String outputDirPath = args [ 1 ] ; String parserType = args [ 2 ] ; extractTables ( pdfDirPath , outputDirPath , parserType ) ; } else if ( args . length == 4 ) { String pdfDirPath = args [ 0 ] ; String outputDirPath = args [ 1 ] ; String parserType = args [...
public class ImagePipeline { /** * Returns whether the image is stored in the disk cache . * @ param imageRequest the imageRequest for the image to be looked up . * @ return true if the image was found in the disk cache , false otherwise . */ public DataSource < Boolean > isInDiskCache ( final ImageRequest imageReq...
final CacheKey cacheKey = mCacheKeyFactory . getEncodedCacheKey ( imageRequest , null ) ; final SimpleDataSource < Boolean > dataSource = SimpleDataSource . create ( ) ; mMainBufferedDiskCache . contains ( cacheKey ) . continueWithTask ( new Continuation < Boolean , Task < Boolean > > ( ) { @ Override public Task < Boo...
public class Streams { /** * Attempt to close an array of < tt > OutputStream < / tt > s . * @ param streams Array of < tt > OutputStream < / tt > s to attempt to close . * @ return < tt > True < / tt > if all streams were closed , or < tt > false < / tt > if an * exception was thrown . */ public static boolean c...
boolean success = true ; for ( OutputStream stream : streams ) { boolean rv = close ( stream ) ; if ( ! rv ) success = false ; } return success ;
public class AbstractListPreference { /** * Sets the entries of the list , which is shown by the preference . * @ param entries * The entries , which should be set , as an { @ link CharSequence } array . The entries may * not be null */ public final void setEntries ( @ NonNull final CharSequence [ ] entries ) { }...
Condition . INSTANCE . ensureNotNull ( entries , "The entries may not be null" ) ; this . entries = entries ;
public class StatsEntity { /** * Request the Active Users Count ( logged in during the last 30 days ) . A token with scope read : stats is needed . * See https : / / auth0 . com / docs / api / management / v2 # ! / Stats / get _ active _ users * @ return a Request to execute . */ public Request < Integer > getActiv...
String url = baseUrl . newBuilder ( ) . addPathSegments ( "api/v2/stats/active-users" ) . build ( ) . toString ( ) ; CustomRequest < Integer > request = new CustomRequest < > ( client , url , "GET" , new TypeReference < Integer > ( ) { } ) ; request . addHeader ( "Authorization" , "Bearer " + apiToken ) ; return reques...
public class Providers { /** * Instantiates the dagger module associated with the provider reflectively . Use this when * building { @ link DNSApiManager } via Dagger when looking up a provider by name . * ex . * < pre > * provider = withUrl ( getByName ( providerName ) , overrideUrl ) ; * module = getByName ...
String moduleClassName ; if ( in . getClass ( ) . isAnonymousClass ( ) ) { moduleClassName = in . getClass ( ) . getSuperclass ( ) . getName ( ) + "$Module" ; } else { moduleClassName = in . getClass ( ) . getName ( ) + "$Module" ; } Class < ? > moduleClass ; try { moduleClass = Class . forName ( moduleClassName ) ; } ...
public class HostsResource { /** * Returns the current { @ link Deployment } of { @ code job } on { @ code host } if it is deployed . * @ param host The host where the job is deployed . * @ param jobId The ID of the job . * @ return The response . */ @ GET @ Path ( "/{host}/jobs/{job}" ) @ Produces ( APPLICATION_...
if ( ! jobId . isFullyQualified ( ) ) { throw badRequest ( ) ; } return Optional . fromNullable ( model . getDeployment ( host , jobId ) ) ;
public class MatrixVectorReader { /** * Reads a line , and trims it of surrounding whitespace * @ throws IOException * If either I / O errors occur , or there was nothing to read */ private String readTrimmedLine ( ) throws IOException { } }
String line = readLine ( ) ; if ( line != null ) return line . trim ( ) ; else throw new EOFException ( ) ;
public class DefaultXMLFactoriesConfig { /** * { @ inheritDoc } */ @ Override public DocumentBuilderFactory createDocumentBuilderFactory ( ) { } }
DocumentBuilderFactory instance = DocumentBuilderFactory . newInstance ( ) ; instance . setXIncludeAware ( this . isXIncludeAware ) ; instance . setExpandEntityReferences ( this . isExpandEntityReferences ) ; // for ( String featureDefault : FEATURE _ DEFAULTS ) { // String [ ] featureValue = featureDefault . split ( "...
public class SQLiteExecutor { /** * Insert one record into database . * To exclude the some properties or default value , invoke { @ code com . landawn . abacus . util . N # entity2Map ( Object , boolean , Collection , NamingPolicy ) } * @ param table * @ param record can be < code > Map < / code > or < code > en...
table = formatName ( table ) ; return insert ( table , record , SQLiteDatabase . CONFLICT_NONE ) ;
public class ResolvedTypes { /** * / * @ Nullable */ @ Override public IConstructorLinkingCandidate getLinkingCandidate ( /* @ Nullable */ XConstructorCall constructorCall ) { } }
if ( ! shared . allLinking . contains ( constructorCall ) ) { return null ; } return ( IConstructorLinkingCandidate ) doGetCandidate ( constructorCall ) ;
public class MapWithProtoValuesSubject { /** * Excludes the top - level message fields with the given tag numbers from the comparison . * < p > This method adds on any previous { @ link FieldScope } related settings , overriding previous * changes to ensure the specified fields are ignored recursively . All sub - f...
return usingConfig ( config . ignoringFields ( fieldNumbers ) ) ;
public class Reflect { /** * Call a constructor . * This is roughly equivalent to { @ link Constructor # newInstance ( Object . . . ) } . If the wrapped object is a * { @ link Class } , then this will create a new object of that class . If the wrapped object is any other * { @ link Object } , then this will creat...
Class < ? > [ ] types = types ( args ) ; // Try invoking the " canonical " constructor , i . e . the one with exact // matching argument types try { Constructor < ? > constructor = type ( ) . getDeclaredConstructor ( types ) ; return on ( constructor , args ) ; } // If there is no exact match , try to find one that has...
public class CmsSetupBean { /** * Returns the html code for component selection . < p > * @ return html code */ public String htmlComponents ( ) { } }
StringBuffer html = new StringBuffer ( 1024 ) ; Iterator < CmsSetupComponent > itComponents = CmsCollectionsGenericWrapper . < CmsSetupComponent > list ( m_components . elementList ( ) ) . iterator ( ) ; while ( itComponents . hasNext ( ) ) { CmsSetupComponent component = itComponents . next ( ) ; html . append ( htmlC...
public class ScreenCapture { /** * < p > Provide an easy to use index . html file for viewing the screenshots . * < p > The base directory is expected to exist at this point . * @ throws IOException */ private void updateIndexFile ( int stepNumber , File file , String methodName , String [ ] values ) throws IOExcep...
File indexFile = initializeIndexIfNeeded ( ) ; BufferedWriter w = new BufferedWriter ( new FileWriter ( indexFile , stepNumber > INITIAL_STEP_NUMBER ) ) ; try { String title = "| " + methodName + " | " + ( values . length > 0 ? values [ 0 ] : "" ) + " | " + ( values . length > 1 ? values [ 1 ] : "" ) + " |" ; w . write...
public class Optionals { /** * Sequence operation , take a Collection of Optionals and turn it into a Optional with a Collection * By constrast with { @ link Optionals # sequencePresent ( IterableX ) } , if any Optionals are zero the result * is an zero Optional * < pre > * { @ code * Optional < Integer > jus...
return sequence ( opts . stream ( ) ) ;
public class FontBuilder { /** * Build a real font with name and size . * @ param rFont the real font enum * @ return the javafx font */ private Font buildRealFont ( final RealFont rFont ) { } }
checkFontStatus ( rFont ) ; return Font . font ( transformFontName ( rFont . name ( ) . name ( ) ) , rFont . size ( ) ) ;
public class ValueStack { /** * popString . * @ return a { @ link java . lang . String } object . * @ throws java . text . ParseException if any . */ public String popString ( ) throws ParseException { } }
final Object popped = super . pop ( ) ; if ( popped instanceof String ) return ( String ) popped ; /* * This is probably an unquoted single word literal . */ if ( popped instanceof TokVariable ) return ( ( TokVariable ) popped ) . getName ( ) ; throw new ParseException ( "Literal required, found " + popped . getClass (...
public class BackendServiceClient { /** * Retrieves the list of BackendService resources available to the specified project . * < p > Sample code : * < pre > < code > * try ( BackendServiceClient backendServiceClient = BackendServiceClient . create ( ) ) { * ProjectName project = ProjectName . of ( " [ PROJECT ...
ListBackendServicesHttpRequest request = ListBackendServicesHttpRequest . newBuilder ( ) . setProject ( project == null ? null : project . toString ( ) ) . build ( ) ; return listBackendServices ( request ) ;
public class EclipselinkIntrospection { /** * DatabaseField */ private void processDatabaseFieldCollection ( final Object databaseFieldCollection ) { } }
if ( databaseFieldCollection == null || ! isCastable ( "java.util.Collection" , databaseFieldCollection . getClass ( ) ) ) { return ; } final Collection < ? > c = ( Collection < ? > ) databaseFieldCollection ; for ( Object descriptor : c ) { processDatabaseFieldObject ( descriptor ) ; }
public class ConfigDocumentFactory { /** * Parses a file into a ConfigDocument instance . * @ param file * the file to parse * @ param options * parse options to control how the file is interpreted * @ return the parsed configuration * @ throws com . typesafe . config . ConfigException on IO or parse errors...
return Parseable . newFile ( file , options ) . parseConfigDocument ( ) ;
public class IncludedResponse { /** * PQ97429 */ public void sendRedirect303 ( String location ) { } }
// throw new IllegalStateException ( nls . getString ( " Illegal . from . included . servlet " , " Illegal from included servlet " ) ) ; logger . logp ( Level . FINE , CLASS_NAME , "sendRedirect303" , nls . getString ( "Illegal.from.included.servlet" , "Illegal from included servlet" ) , "sendRedirect303" ) ;
public class HttpUtil { /** * Fetch charset from Content - Type header value . * @ param contentTypeValue Content - Type header value to parse * @ param defaultCharset result to use in case of empty , incorrect or doesn ' t contain required part header value * @ return the charset from message ' s Content - Type ...
if ( contentTypeValue != null ) { CharSequence charsetCharSequence = getCharsetAsSequence ( contentTypeValue ) ; if ( charsetCharSequence != null ) { try { return Charset . forName ( charsetCharSequence . toString ( ) ) ; } catch ( UnsupportedCharsetException ignored ) { return defaultCharset ; } } else { return defaul...
public class TimeParametersImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetValidationTime ( Parameter newValidationTime , NotificationChain msgs ) { } }
Parameter oldValidationTime = validationTime ; validationTime = newValidationTime ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , BpsimPackage . TIME_PARAMETERS__VALIDATION_TIME , oldValidationTime , newValidationTime ) ; if ( msgs == null ) msgs...
public class QueueName { /** * Constructs this class from byte array of queue URI . * @ param bytes respresenting URI * @ return An instance of { @ link QueueName } */ public static QueueName from ( byte [ ] bytes ) { } }
return new QueueName ( URI . create ( new String ( bytes , Charsets . US_ASCII ) ) ) ;
public class CrsUtilities { /** * Fill the prj file with the actual map projection . * @ param filePath the path to the regarding data or prj file . * @ param extention the extention of the data file . If < code > null < / code > , the crs is written to filePath directly . * @ param crs the { @ link CoordinateRef...
/* * fill a prj file */ String prjPath = null ; if ( extention != null && filePath . toLowerCase ( ) . endsWith ( "." + extention ) ) { int dotLoc = filePath . lastIndexOf ( "." ) ; prjPath = filePath . substring ( 0 , dotLoc ) ; prjPath = prjPath + ".prj" ; } else { if ( ! filePath . endsWith ( ".prj" ) ) { prjPath = ...
public class Weight { /** * Creates a new weight with value equal to the sum of both weights . Note * that + inf and - inf cannot be added . If you try , an * IllegalArgumentException will be thrown . * @ param w * a weight . * @ return a new weight . */ public Weight add ( Weight w ) { } }
if ( w == null ) { return new Weight ( this ) ; } else { boolean wIsInfinity = w . isInfinity ; boolean wPosOrNeg = w . posOrNeg ; if ( ( isInfinity && posOrNeg && wIsInfinity && ! wPosOrNeg ) || ( isInfinity && ! posOrNeg && wIsInfinity && wPosOrNeg ) ) { throw new IllegalArgumentException ( "+inf - inf!" ) ; } else i...
public class ContentKeyPoliciesInner { /** * List Content Key Policies . * Lists the Content Key Policies in the account . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observa...
return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ContentKeyPolicyInner > > , Page < ContentKeyPolicyInner > > ( ) { @ Override public Page < ContentKeyPolicyInner > call ( ServiceResponse < Page < ContentKeyPolicyInner > > response ) { return response . body ( ) ; } ...
public class CmsXmlGroupContainer { /** * Adds the given container page to the given element . < p > * @ param cms the current CMS object * @ param parent the element to add it * @ param groupContainer the container page to add * @ throws CmsException if something goes wrong */ protected void saveGroupContainer...
parent . clearContent ( ) ; Element groupContainerElem = parent . addElement ( XmlNode . GroupContainers . name ( ) ) ; groupContainerElem . addElement ( XmlNode . Title . name ( ) ) . addCDATA ( groupContainer . getTitle ( ) ) ; groupContainerElem . addElement ( XmlNode . Description . name ( ) ) . addCDATA ( groupCon...
public class DocumentSpecies { /** * setter for familyName - sets e . g . Homo _ sapiens , or None * @ generated * @ param v value to set into the feature */ public void setFamilyName ( String v ) { } }
if ( DocumentSpecies_Type . featOkTst && ( ( DocumentSpecies_Type ) jcasType ) . casFeat_familyName == null ) jcasType . jcas . throwFeatMissing ( "familyName" , "ch.epfl.bbp.uima.types.DocumentSpecies" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( DocumentSpecies_Type ) jcasType ) . casFeatCode_familyName , v...
public class VaultExtendedInfosInner { /** * Get the vault extended info . * @ param resourceGroupName The name of the resource group where the recovery services vault is present . * @ param vaultName The name of the recovery services vault . * @ throws IllegalArgumentException thrown if parameters fail the valid...
return getWithServiceResponseAsync ( resourceGroupName , vaultName ) . map ( new Func1 < ServiceResponse < VaultExtendedInfoResourceInner > , VaultExtendedInfoResourceInner > ( ) { @ Override public VaultExtendedInfoResourceInner call ( ServiceResponse < VaultExtendedInfoResourceInner > response ) { return response . b...
public class TempByteHolder { /** * Returns buffered data as String using given character encoding . * @ param character _ encoding Name of character encoding to use for * converting bytes to String . * @ return Buffered data as String . * @ throws IllegalStateException when data is too large to be read this wa...
if ( _file_mode ) throw new IllegalStateException ( "data too large" ) ; return new String ( _memory_buffer , 0 , _write_pos , character_encoding ) ;
public class FaunusPipeline { /** * Emit or deny the current element based upon the provided boolean - based closure . * @ param closure return true to emit and false to remove . * @ return the extended FaunusPipeline */ public FaunusPipeline filter ( final String closure ) { } }
this . state . assertNotLocked ( ) ; this . state . assertNoProperty ( ) ; this . compiler . addMap ( FilterMap . Map . class , NullWritable . class , FaunusVertex . class , FilterMap . createConfiguration ( this . state . getElementType ( ) , this . validateClosure ( closure ) ) ) ; makeMapReduceString ( FilterMap . c...
public class BitsUtil { /** * Convert bitset to a string consisting of " 0 " and " 1 " , in low - endian order . * @ param v Value to process * @ return String representation */ public static String toStringLow ( long [ ] v ) { } }
if ( v == null ) { return "null" ; } final int mag = magnitude ( v ) ; if ( mag == 0 ) { return "0" ; } char [ ] digits = new char [ mag ] ; int pos = 0 ; outer : for ( int w = 0 ; w < v . length ; w ++ ) { long f = 1L ; for ( int i = 0 ; i < Long . SIZE ; i ++ ) { digits [ pos ] = ( ( v [ w ] & f ) == 0 ) ? '0' : '1' ...
public class EnvironmentReferenceService { /** * Finds a { @ link EnvironmentReferenceModel } by name and type . */ public EnvironmentReferenceModel findEnvironmentReference ( String name , EnvironmentReferenceTagType type ) { } }
Traversal < ? , ? > query = findAllQuery ( ) . getRawTraversal ( ) . has ( EnvironmentReferenceModel . NAME , name ) . has ( EnvironmentReferenceModel . TAG_TYPE , type ) ; return getUnique ( query ) ;
public class XSLTLayout { /** * { @ inheritDoc } */ public synchronized String format ( final LoggingEvent event ) { } }
if ( ! activated ) { activateOptions ( ) ; } if ( templates != null && encoding != null ) { outputStream . reset ( ) ; try { TransformerHandler transformer = transformerFactory . newTransformerHandler ( templates ) ; transformer . setResult ( new StreamResult ( outputStream ) ) ; transformer . startDocument ( ) ; // ev...
public class Keys { /** * Creates { @ code Key } with the specified parent , kind name and key . * @ param parent The { @ code Key } of the parent . * @ param kind The kind name of the entity . * @ param key The key of the entity . * @ return { @ code Key } created with the specified parent , kind name and key ...
if ( key instanceof String ) { return ( parent == null ) ? KeyFactory . createKey ( kind , ( String ) key ) : KeyFactory . createKey ( parent , kind , ( String ) key ) ; } else if ( key instanceof Long ) { return ( parent == null ) ? KeyFactory . createKey ( kind , ( Long ) key ) : KeyFactory . createKey ( parent , kin...
public class JpaRepositoryConfig { /** * Shortcut for builder ( entityClass ) . build ( ) . * @ param entityClass to directly expose * @ return config */ public static < E > JpaRepositoryConfig < E > create ( Class < E > entityClass ) { } }
return builder ( entityClass ) . build ( ) ;
public class HTODInvalidationBuffer { /** * Call this method to clear the invalidation buffers . * @ param forEventAlreadyFired * - true to clear invalidation buffer which is used for event already fired . * @ param forEventNotFired * - true to clear invalidation buffer which is used for event not fired . */ pr...
final String methodName = "clear()" ; if ( bufferType == HTODInvalidationBuffer . EXPLICIT_BUFFER ) { this . explicitBuffer . clear ( ) ; } else if ( bufferType == HTODInvalidationBuffer . SCAN_BUFFER ) { this . scanBuffer . clear ( ) ; } else if ( bufferType == HTODInvalidationBuffer . GC_BUFFER ) { // todo : return G...
public class BaseRecordOwner { /** * Add this database to my database list . < br / > * Do not call these directly , used in database init . * @ param database The database to add . */ public void addDatabase ( Database database ) { } }
if ( m_databaseCollection == null ) m_databaseCollection = new DatabaseCollection ( this ) ; m_databaseCollection . addDatabase ( database ) ;
public class NumericHistogram { /** * Dump the entries in the queue back into the bucket arrays * The values are guaranteed to be sorted in increasing order after this method completes */ private void store ( PriorityQueue < Entry > queue ) { } }
nextIndex = 0 ; for ( Entry entry : queue ) { if ( entry . isValid ( ) ) { values [ nextIndex ] = entry . getValue ( ) ; weights [ nextIndex ] = entry . getWeight ( ) ; nextIndex ++ ; } } sort ( values , weights , nextIndex ) ;
public class StartApplicationRequest { /** * Identifies the specific input , by ID , that the application starts consuming . Amazon Kinesis Analytics starts * reading the streaming source associated with the input . You can also specify where in the streaming source you * want Amazon Kinesis Analytics to start read...
if ( inputConfigurations == null ) { this . inputConfigurations = null ; return ; } this . inputConfigurations = new java . util . ArrayList < InputConfiguration > ( inputConfigurations ) ;
public class Matrix4f { /** * Set < code > this < / code > matrix to < code > ( T * R * S ) < sup > - 1 < / sup > < / code > , where < code > T < / code > is a translation by the given < code > ( tx , ty , tz ) < / code > , * < code > R < / code > is a rotation transformation specified by the quaternion < code > ( qx...
boolean one = Math . abs ( sx ) == 1.0f && Math . abs ( sy ) == 1.0f && Math . abs ( sz ) == 1.0f ; if ( one ) return translationRotateScale ( tx , ty , tz , qx , qy , qz , qw , sx , sy , sz ) . invertOrthonormal ( this ) ; float nqx = - qx , nqy = - qy , nqz = - qz ; float dqx = nqx + nqx ; float dqy = nqy + nqy ; flo...
public class Parsing { /** * Converts the given token stream into a rendered output evaluating each expression * against the provided context object which may be a regular Java POJO with getters * and setters or a map of string / value pairs . */ public static String render ( List < Token > tokens , Map < String , ...
StringBuilder builder = new StringBuilder ( ) ; for ( Token token : tokens ) { builder . append ( token . render ( arguments ) ) ; } return builder . toString ( ) ;
public class MessageControllerManager { /** * Get jstopic message controller from JsTopicControl * @ param topic * @ return */ JsTopicMessageController getJsTopicMessageControllerFromJsTopicControl ( String topic ) { } }
logger . debug ( "Looking for messageController for topic '{}' from JsTopicControl annotation" , topic ) ; Instance < JsTopicMessageController < ? > > select = topicMessageController . select ( new JsTopicCtrlAnnotationLiteral ( topic ) ) ; if ( ! select . isUnsatisfied ( ) ) { logger . debug ( "Found messageController...
public class ByteBufUtil { /** * Compares the two specified buffers as described in { @ link ByteBuf # compareTo ( ByteBuf ) } . * This method is useful when implementing a new buffer type . */ public static int compare ( ByteBuf bufferA , ByteBuf bufferB ) { } }
final int aLen = bufferA . readableBytes ( ) ; final int bLen = bufferB . readableBytes ( ) ; final int minLength = Math . min ( aLen , bLen ) ; final int uintCount = minLength >>> 2 ; final int byteCount = minLength & 3 ; int aIndex = bufferA . readerIndex ( ) ; int bIndex = bufferB . readerIndex ( ) ; if ( uintCount ...
public class IntStream { /** * Returns the single element of stream . * If stream is empty , throws { @ code NoSuchElementException } . * If stream contains more than one element , throws { @ code IllegalStateException } . * < p > This is a short - circuiting terminal operation . * < p > Example : * < pre > ...
if ( iterator . hasNext ( ) ) { int singleCandidate = iterator . nextInt ( ) ; if ( iterator . hasNext ( ) ) { throw new IllegalStateException ( "IntStream contains more than one element" ) ; } else { return singleCandidate ; } } else { throw new NoSuchElementException ( "IntStream contains no element" ) ; }
public class HtmlPolicyBuilder { /** * Like { @ link # build } but can be reused to create many different policies * each backed by a different output channel . */ public PolicyFactory toFactory ( ) { } }
ImmutableSet . Builder < String > textContainerSet = ImmutableSet . builder ( ) ; for ( Map . Entry < String , Boolean > textContainer : this . textContainers . entrySet ( ) ) { if ( Boolean . TRUE . equals ( textContainer . getValue ( ) ) ) { textContainerSet . add ( textContainer . getKey ( ) ) ; } } CompiledState co...
public class OtpMbox { /** * Send a message to a named mailbox created from the same node as this * mailbox . * @ param aname * the registered name of recipient mailbox . * @ param msg * the body of the message to send . */ public void send ( final String aname , final OtpErlangObject msg ) { } }
home . deliver ( new OtpMsg ( self , aname , ( OtpErlangObject ) msg . clone ( ) ) ) ;
public class GoogleDriveFileSystem { /** * Build query for Google drive . * @ see https : / / developers . google . com / drive / v3 / web / search - parameters * @ param folderId * @ param fileName * @ return Query */ @ VisibleForTesting Optional < String > buildQuery ( String folderId , String fileName ) { } ...
if ( StringUtils . isEmpty ( folderId ) && StringUtils . isEmpty ( fileName ) ) { return Optional . absent ( ) ; } StringBuilder query = new StringBuilder ( ) ; if ( StringUtils . isNotEmpty ( folderId ) ) { query . append ( "'" ) . append ( folderId ) . append ( "'" ) . append ( " in parents" ) ; } if ( StringUtils . ...
public class WardenNotifier { /** * From warden alert name , de - constructs the user for whom this warden alert is associated with . * @ param wardenAlertName Name of warden alert * @ return User associated with the warden alert */ protected PrincipalUser getWardenUser ( String wardenAlertName ) { } }
assert ( wardenAlertName != null ) : "Warden alert name cannot be null." ; int beginIndex = wardenAlertName . indexOf ( "-" ) + 1 ; int endIndex = wardenAlertName . lastIndexOf ( "-" ) ; return PrincipalUser . findByUserName ( emf . get ( ) , wardenAlertName . substring ( beginIndex , endIndex ) ) ;
public class JdbcDatabase { /** * Open the physical database . * @ exception DBException On open errors . */ public void setupJDBCConnection ( String strJdbcDriver ) throws DBException { } }
if ( m_JDBCConnection != null ) return ; if ( firstTime == null ) firstTime = new Date ( ) ; if ( m_classDB == null ) { synchronized ( firstTime ) { if ( m_classDB == null ) m_classDB = ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( strJdbcDriver ) ; } } Utility . getLogger ( ) . info ( "Driver f...
public class Log { /** * Logs debug message . < br > * No - op if the debugging mode ( { @ link # debug } ) is disabled . * @ param msg Message * @ author vvakame */ public static void d ( String msg ) { } }
if ( ! debug ) { return ; } if ( messager == null ) { return ; } messager . printMessage ( Diagnostic . Kind . NOTE , msg ) ;
public class Precedence { /** * Instantiate discrete constraints to force a set of VMs to migrate after an other set of VMs . * @ param vmsBefore the VMs to migrate before the others { @ see vmsAfter } * @ param vmsAfter the VMs to migrate after the others { @ see vmsBefore } * @ return the associated list of con...
List < Precedence > l = new ArrayList < > ( vmsBefore . size ( ) * vmsAfter . size ( ) ) ; for ( VM vmb : vmsBefore ) { for ( VM vma : vmsAfter ) { l . add ( new Precedence ( vmb , vma ) ) ; } } return l ;
public class SgClass { /** * Find an inner class by it ' s name . * @ param name * Full qualified name of the class to find - Cannot be null . * @ return Class or null if it ' s not found . */ public final SgClass findClassByName ( final String name ) { } }
if ( name == null ) { throw new IllegalArgumentException ( "The argument 'name' cannot be null!" ) ; } for ( int i = 0 ; i < classes . size ( ) ; i ++ ) { final SgClass clasz = classes . get ( i ) ; if ( clasz . getName ( ) . equals ( name ) ) { return clasz ; } } return null ;
public class BlockTree { /** * void write ( MaukaDatabase db , WriteStream os , int index ) * throws IOException * byte [ ] buffer = getBuffer ( ) ; * int keyLength = db . getKeyLength ( ) ; * int len = 2 * keyLength + 5; * for ( int ptr = index ; ptr < BLOCK _ SIZE ; ptr + = len ) { * int code = buffer [ p...
byte [ ] buffer = getBuffer ( ) ; int keyLength = table . getKeyLength ( ) ; int len = table . row ( ) . getTreeItemLength ( ) ; for ( int ptr = index ; ptr < BLOCK_SIZE ; ptr += len ) { int code = buffer [ ptr ] & 0xff ; int min = ptr + 1 ; int max = min + keyLength ; int valueOffset = max + keyLength ; byte [ ] minKe...
public class InternalXbaseParser { /** * InternalXbase . g : 952:1 : ruleOpOther returns [ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ] : ( kw = ' - > ' | kw = ' . . < ' | ( kw = ' > ' kw = ' . . ' ) | kw = ' . . ' | kw = ' = > ' | ( kw = ' > ' ( ( ( ( ' > ' ' > ' ) ) = > ( kw = ' > ' kw = ' > ' ) ...
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ; Token kw = null ; enterRule ( ) ; try { // InternalXbase . g : 958:2 : ( ( kw = ' - > ' | kw = ' . . < ' | ( kw = ' > ' kw = ' . . ' ) | kw = ' . . ' | kw = ' = > ' | ( kw = ' > ' ( ( ( ( ' > ' ' > ' ) ) = > ( kw = ' > ' kw = ' > ' ) ) | kw = ' > ' ) ) |...
public class ReadStreamOld { /** * Writes < code > len < code > bytes to the output stream from this stream . * @ param os destination stream . * @ param len bytes to write . */ public void writeToStream ( OutputStream os , int len ) throws IOException { } }
while ( len > 0 ) { if ( _readLength <= _readOffset ) { if ( ! readBuffer ( ) ) return ; } int sublen = Math . min ( len , _readLength - _readOffset ) ; os . write ( _readBuffer , _readOffset , sublen ) ; _readOffset += sublen ; len -= sublen ; }
public class RunService { /** * checkAllContainers : false = only running containers are considered */ private String findContainerId ( String imageNameOrAlias , boolean checkAllContainers ) throws DockerAccessException { } }
String id = lookupContainer ( imageNameOrAlias ) ; // check for external container . The image name is interpreted as a * container name * for that case . . . if ( id == null ) { Container container = queryService . getContainer ( imageNameOrAlias ) ; if ( container != null && ( checkAllContainers || container . isRunn...
public class LiteralExpr { /** * Object expr support . */ @ Override public String toObjectExpr ( String columnName ) { } }
if ( _value == null ) { return "null" ; } else if ( _value instanceof String ) { return "'" + _value + "'" ; } else { return String . valueOf ( _value ) ; }
public class SimpleLoader { /** * Adds the class of this resource . */ @ Override protected void buildClassPath ( ArrayList < String > pathList ) { } }
String path = null ; if ( _path instanceof JarPath ) path = ( ( JarPath ) _path ) . getContainer ( ) . getNativePath ( ) ; else if ( _path . isDirectory ( ) ) path = _path . getNativePath ( ) ; if ( path != null && ! pathList . contains ( path ) ) pathList . add ( path ) ;
public class CreateEndpointRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateEndpointRequest createEndpointRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createEndpointRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createEndpointRequest . getEndpointIdentifier ( ) , ENDPOINTIDENTIFIER_BINDING ) ; protocolMarshaller . marshall ( createEndpointRequest . getEndpointType ( ) , EN...
public class Viennet3 { /** * Evaluate ( ) method */ @ Override public void evaluate ( DoubleSolution solution ) { } }
int numberOfVariables = getNumberOfVariables ( ) ; double [ ] f = new double [ getNumberOfObjectives ( ) ] ; double [ ] x = new double [ numberOfVariables ] ; for ( int i = 0 ; i < numberOfVariables ; i ++ ) { x [ i ] = solution . getVariableValue ( i ) ; } f [ 0 ] = 0.5 * ( x [ 0 ] * x [ 0 ] + x [ 1 ] * x [ 1 ] ) + Ma...
public class SQLite { /** * Get the name that the column was { @ link # alias ( String ) aliased } to . */ public static String aliased ( String column ) { } }
int i = column . lastIndexOf ( '.' ) ; return i >= 0 ? column . substring ( i + 1 ) : column ;
public class GraphiteHttpWriter { /** * Send given metrics to the Graphite server . */ @ Override public void write ( Iterable < QueryResult > results ) { } }
logger . debug ( "Export to '{}' results {}" , graphiteHttpUrl , results ) ; HttpURLConnection urlConnection = null ; OutputStreamWriter urlWriter ; try { StringBuilder sbUrlWriter = new StringBuilder ( "" ) ; for ( QueryResult result : results ) { String msg = metricPathPrefix + result . getName ( ) + " " + result . g...
public class DNSInput { /** * Reads a byte array of a specified length from the stream . * @ return The byte array . * @ throws WireParseException The end of the stream was reached . */ public byte [ ] readByteArray ( int len ) throws WireParseException { } }
require ( len ) ; byte [ ] out = new byte [ len ] ; System . arraycopy ( array , pos , out , 0 , len ) ; pos += len ; return out ;
public class JasperUtil { /** * ( a subreport can also have subreports , not just the master ! ) */ public static void renameSubreportsInMaster ( List < JcrFile > jasperFiles , String id ) { } }
if ( jasperFiles . size ( ) > 1 ) { JcrFile masterFile = jasperFiles . get ( 0 ) ; try { String masterContent = new String ( masterFile . getDataProvider ( ) . getBytes ( ) , "UTF-8" ) ; List < String > subreportsContent = new ArrayList < String > ( ) ; for ( int i = 1 , size = jasperFiles . size ( ) ; i < size ; i ++ ...
public class FastStringComparator { /** * Compares two strings ( not lexicographically ) . */ @ Override public int compare ( String s1 , String s2 ) { } }
if ( s1 == s2 ) { // NOSONAR false - positive : Compare Objects With Equals return 0 ; } int h1 = s1 . hashCode ( ) ; int h2 = s2 . hashCode ( ) ; if ( h1 < h2 ) { return - 1 ; } else if ( h1 > h2 ) { return 1 ; } else { return s1 . compareTo ( s2 ) ; }
public class AWSCognitoIdentityProviderClient { /** * Updates the specified user pool app client with the specified attributes . If you don ' t provide a value for an * attribute , it will be set to the default value . You can get a list of the current user pool app client settings * with . * @ param updateUserPo...
request = beforeClientExecution ( request ) ; return executeUpdateUserPoolClient ( request ) ;
public class CommonG { /** * Generates the request based on the type of request , the end point , the data and type passed * @ param requestType type of request to be sent * @ param secure type of protocol * @ param user user to be used in request * @ param password password to be used in request * @ param en...
String protocol = this . getRestProtocol ( ) ; Future < Response > response = null ; BoundRequestBuilder request ; Realm realm = null ; if ( this . getRestHost ( ) == null ) { throw new Exception ( "Rest host has not been set" ) ; } if ( this . getRestPort ( ) == null ) { throw new Exception ( "Rest port has not been s...
public class NumberUtils { /** * < p > Gets the minimum of three < code > int < / code > values . < / p > * @ param a value 1 * @ param b value 2 * @ param c value 3 * @ return the smallest of the values */ public static int min ( int a , final int b , final int c ) { } }
if ( b < a ) { a = b ; } if ( c < a ) { a = c ; } return a ;
public class A_CmsSelectWidget { /** * Gets the resource path for the given dialog . < p > * @ param cms TODO * @ param dialog the dialog * @ return the resource path */ protected String getResourcePath ( CmsObject cms , I_CmsWidgetDialog dialog ) { } }
String result = null ; if ( dialog instanceof CmsDummyWidgetDialog ) { result = ( ( CmsDummyWidgetDialog ) dialog ) . getResource ( ) . getRootPath ( ) ; } else if ( dialog instanceof CmsDialog ) { result = ( ( CmsDialog ) dialog ) . getParamResource ( ) ; if ( result != null ) { result = cms . getRequestContext ( ) . ...
public class WSubordinateControlRenderer { /** * Helper method to determine the action name . * @ param type the enumerated ActionType * @ return the name of the action */ private String getActionTypeName ( final ActionType type ) { } }
String action = null ; switch ( type ) { case SHOW : action = "show" ; break ; case SHOWIN : action = "showIn" ; break ; case HIDE : action = "hide" ; break ; case HIDEIN : action = "hideIn" ; break ; case ENABLE : action = "enable" ; break ; case ENABLEIN : action = "enableIn" ; break ; case DISABLE : action = "disabl...
public class WakeUpSbb { /** * ( non - Javadoc ) * @ see javax . slee . Sbb # setSbbContext ( javax . slee . SbbContext ) */ public void setSbbContext ( SbbContext context ) { } }
// save the sbb context in a field this . sbbContext = context ; // get the tracer if needed this . tracer = context . getTracer ( WakeUpSbb . class . getSimpleName ( ) ) ; // get jndi environment stuff try { final Context myEnv = ( Context ) new InitialContext ( ) ; // slee facilities this . timerFacility = ( TimerFac...
public class ReservedDBInstance { /** * The recurring price charged to run this reserved DB instance . * @ param recurringCharges * The recurring price charged to run this reserved DB instance . */ public void setRecurringCharges ( java . util . Collection < RecurringCharge > recurringCharges ) { } }
if ( recurringCharges == null ) { this . recurringCharges = null ; return ; } this . recurringCharges = new com . amazonaws . internal . SdkInternalList < RecurringCharge > ( recurringCharges ) ;
public class KubernetesMessage { /** * Response generating instantiation . * @ param command * @ param action * @ param result * @ return */ public static KubernetesMessage response ( String command , Watcher . Action action , KubernetesResource < ? > result ) { } }
KubernetesResponse response = new KubernetesResponse ( ) ; response . setCommand ( command ) ; response . setResult ( result ) ; response . setAction ( action . name ( ) ) ; return new KubernetesMessage ( response ) ;
public class BusItinerary { /** * Replies the halt at the specified index . * @ param index the index . * @ return a bus halt */ @ Pure public BusItineraryHalt getBusHaltAt ( int index ) { } }
if ( index < this . validHalts . size ( ) ) { return this . validHalts . get ( index ) ; } return this . invalidHalts . get ( index - this . validHalts . size ( ) ) ;