signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class InterceptorService { /** * Only call this when assertions are enabled , it ' s expensive */ boolean haveAppropriateParams ( Pointcut thePointcut , HookParams theParams ) { } }
Validate . isTrue ( theParams . getParamsForType ( ) . values ( ) . size ( ) == thePointcut . getParameterTypes ( ) . size ( ) , "Wrong number of params for pointcut %s - Wanted %s but found %s" , thePointcut . name ( ) , toErrorString ( thePointcut . getParameterTypes ( ) ) , theParams . getParamsForType ( ) . values ...
public class ConnecClient { /** * Fetch an entity by id * @ param entity * name * @ param groupId * customer group id * @ param entityId * id of the entity to retrieve * @ return entity * @ throws MnoException */ public Map < String , Object > retrieve ( String entityName , String groupId , String entit...
return retrieve ( entityName , groupId , entityId , getAuthenticatedClient ( ) ) ;
public class Predicates { /** * Creates a { @ link Predicate } that returns { @ code true } for any string that matches the * specified regular expression . * @ param regex * The pattern * @ return { @ code true } for any string that matches its given regular expression */ public static Predicate < String > mat...
final Pattern pattern = Pattern . compile ( regex ) ; return matchesRegex ( pattern ) ;
public class FaceletCompositionContextImpl { /** * Remove the last component level from the components marked to be deleted . The components are removed * from this list because they are deleted from the tree . This is done in ComponentSupport . finalizeForDeletion . * @ return the array of components that are remo...
// The common case is this co if ( ! _componentsMarkedForDeletion . get ( _deletionLevel ) . isEmpty ( ) ) { _componentsMarkedForDeletion . get ( _deletionLevel ) . clear ( ) ; } _deletionLevel -- ;
public class CPOptionUtil { /** * Returns all the cp options where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ return the matching cp options */ public static List < CPOption > findByUuid_C ( String uuid , long companyId ) { } }
return getPersistence ( ) . findByUuid_C ( uuid , companyId ) ;
public class UserBS { /** * Requisição do usuário para recuperar a senha . * @ param user * Usuário para recuperar a senha . * @ return UserRecoverRequest Requisição relizada . */ public UserRecoverRequest requestRecover ( User user ) { } }
if ( user == null ) return null ; UserRecoverRequest req = new UserRecoverRequest ( ) ; req . setUser ( user ) ; req . setCreation ( new Date ( ) ) ; req . setCreationIp ( this . request . getRemoteAddr ( ) ) ; req . setExpiration ( new Date ( System . currentTimeMillis ( ) + 1800000L ) ) ; req . setToken ( CryptManage...
public class InternalXbaseParser { /** * InternalXbase . g : 1317:1 : ruleXNullLiteral : ( ( rule _ _ XNullLiteral _ _ Group _ _ 0 ) ) ; */ public final void ruleXNullLiteral ( ) throws RecognitionException { } }
int stackSize = keepStackSize ( ) ; try { // InternalXbase . g : 1321:2 : ( ( ( rule _ _ XNullLiteral _ _ Group _ _ 0 ) ) ) // InternalXbase . g : 1322:2 : ( ( rule _ _ XNullLiteral _ _ Group _ _ 0 ) ) { // InternalXbase . g : 1322:2 : ( ( rule _ _ XNullLiteral _ _ Group _ _ 0 ) ) // InternalXbase . g : 1323:3 : ( rule...
public class GenericCollectionTypeResolver { /** * Determine the generic element type of the given Collection field . * @ param collectionField the collection field to introspect * @ param nestingLevel the nesting level of the target type * ( typically 1 ; e . g . in case of a List of Lists , 1 would indicate the...
return ResolvableType . forField ( collectionField ) . getNested ( nestingLevel ) . asCollection ( ) . resolveGeneric ( ) ;
public class FileManagerImpl { /** * / * Read block sizes from cached area on disk */ private void read_block_sizes_from_cache ( long cache_end ) throws IOException { } }
int block_size ; long block_address ; ByteArrayInputStream bis ; byte [ ] buf ; long cache_cursor ; DataInputStream dis ; int list_index ; buf = new byte [ ( int ) ( cache_end - tail_ptr ) ] ; seek ( tail_ptr ) ; read ( buf ) ; bis = new ByteArrayInputStream ( buf ) ; dis = new DataInputStream ( bis ) ; allocated_block...
public class ServerAddress { /** * Resolves a hostname . If the hostname is a loopback address ( e . g . 127.0.0.1 or localhost ) , it * will be converted to the fully - qualified domain - name of the local address . If the hostname is * < em > not < / em > a loopback address , the original hostName parameter will ...
Boolean knownLoopback = null ; try { knownLoopback = InetAddress . getByName ( hostName ) . isLoopbackAddress ( ) ; } catch ( UnknownHostException ex ) { knownLoopback = ( hostName . equals ( "127.0.0.1" ) || hostName . equals ( "localhost" ) ) ; } if ( knownLoopback ) { try { return InetAddress . getLocalHost ( ) . ge...
public class ExtensionScript { /** * This extension supports any number of writers to be registered which all get written to for * ever script . It also supports script specific writers . */ private Writer getWriters ( ScriptWrapper script ) { } }
Writer delegatee = this . writers ; Writer writer = script . getWriter ( ) ; if ( writer != null ) { // Use the script specific writer in addition to the std one MultipleWriters scriptWriters = new MultipleWriters ( ) ; scriptWriters . addWriter ( writer ) ; scriptWriters . addWriter ( writers ) ; delegatee = scriptWri...
public class MultiGetOperationImpl { /** * Add a key ( and return its new opaque value ) . */ protected int addKey ( String k ) { } }
Integer rv = rkeys . get ( k ) ; if ( rv == null ) { rv = generateOpaque ( ) ; keys . put ( rv , k ) ; bkeys . put ( rv , KeyUtil . getKeyBytes ( k ) ) ; rkeys . put ( k , rv ) ; synchronized ( vbmap ) { vbmap . put ( k , new Short ( ( short ) 0 ) ) ; } } return rv ;
public class EventConsumerUtil { public static boolean isZmqLoadable ( ) { } }
if ( ! zmqTested ) { String zmqEnable = System . getenv ( "ZMQ_DISABLE" ) ; if ( zmqEnable == null ) zmqEnable = System . getProperty ( "ZMQ_DISABLE" ) ; if ( zmqEnable == null || ! zmqEnable . equals ( "true" ) ) { try { ZMQutils . getInstance ( ) ; System . out . println ( "========== ZMQ (" + ZMQutils . getZmqVersio...
public class CacheConfig { /** * Read config objects stored in JSON format from < code > String < / code > * @ param content of config * @ return config * @ throws IOException error */ public static Map < String , ? extends CacheConfig > fromJSON ( String content ) throws IOException { } }
return new CacheConfigSupport ( ) . fromJSON ( content ) ;
public class ImportSet { /** * Replaces inner class imports ( those with a ' $ ' ) with an import of the parent class . */ public void swapInnerClassesForParents ( ) { } }
ImportSet declarers = new ImportSet ( ) ; Iterator < String > i = _imports . iterator ( ) ; while ( i . hasNext ( ) ) { String name = i . next ( ) ; int dollar = name . indexOf ( '$' ) ; if ( dollar >= 0 ) { i . remove ( ) ; declarers . add ( name . substring ( 0 , dollar ) ) ; } } addAll ( declarers ) ;
public class AbstractRegisteredControlAdapter { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . ControlAdapter # runtimeEventOccurred ( com . ibm . ws . sib . admin . RuntimeEvent ) */ public synchronized void runtimeEventOccurred ( RuntimeEvent event ) { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "runtimeEventOccurred" , new Object [ ] { event , this } ) ; if ( _isRegistered ) { // Check that we have a RuntimeEventListener if ( _runtimeEventListener != null ) { // Fire a Notification if Eventing is enabled if ( _messageProcessor . getMessagingEngine ( ) . isEv...
public class AmazonElasticTranscoderClient { /** * The ReadJob operation returns detailed information about a job . * @ param readJobRequest * The < code > ReadJobRequest < / code > structure . * @ return Result of the ReadJob operation returned by the service . * @ throws ValidationException * One or more re...
request = beforeClientExecution ( request ) ; return executeReadJob ( request ) ;
public class KnapsackDecorator { /** * remove all candidate items from a bin that is full * then synchronize potentialLoad and sup ( binLoad ) accordingly * if an item becomes instantiated then propagate the newly assigned bin * @ param bin the full bin * @ throws ContradictionException */ @ SuppressWarnings ( ...
for ( int i = candidate . get ( bin ) . nextSetBit ( 0 ) ; i >= 0 ; i = candidate . get ( bin ) . nextSetBit ( i + 1 ) ) { if ( prop . iSizes [ dim ] [ i ] == 0 ) { continue ; } // ISSUE 86 : the event ' i removed from bin ' can already been in the propagation stack but not yet considered // ie . ! prop . bins [ i ] . ...
public class BufferUtils { /** * Creates a buffer for the given number of elements and * native byte ordering * @ param elements The number of elements in the buffer * @ return The buffer */ public static FloatBuffer createFloatBuffer ( int elements ) { } }
ByteBuffer byteBuffer = ByteBuffer . allocateDirect ( elements * 4 ) ; byteBuffer . order ( ByteOrder . nativeOrder ( ) ) ; return byteBuffer . asFloatBuffer ( ) ;
public class MeasureUnitUtil { /** * Convert the given value expressed in meters per second to the given unit . * @ param value is the value to convert * @ param outputUnit is the unit of result . * @ return the result of the convertion . */ @ Pure public static double fromMetersPerSecond ( double value , SpeedUn...
switch ( outputUnit ) { case KILOMETERS_PER_HOUR : return value / 3.6 ; case MILLIMETERS_PER_SECOND : return value * 1000. ; case METERS_PER_SECOND : default : } return value ;
public class PageInBrowserStats { /** * Returns the average DOM load time for given interval and { @ link TimeUnit } . * @ param intervalName name of the interval * @ param unit { @ link TimeUnit } * @ return average DOM load time */ public double getAverageDOMLoadTime ( final String intervalName , final TimeUnit...
return unit . transformMillis ( totalDomLoadTime . getValueAsLong ( intervalName ) ) / numberOfLoads . getValueAsDouble ( intervalName ) ;
public class ChineseDateFormat { /** * { @ inheritDoc } * @ deprecated ICU 50 */ @ Deprecated @ Override protected int subParse ( String text , int start , char ch , int count , boolean obeyCount , boolean allowNegative , boolean [ ] ambiguousYear , Calendar cal ) { } }
// Logic to handle numeric ' G ' eras for chinese calendar , and to skip special 2 - digit year // handling for chinese calendar , is moved into SimpleDateFormat , so delete here . // Obsolete pattern char ' l ' is now ignored for parsing in SimpleDateFormat , no handling // needed here . // So just use SimpleDateForma...
public class StartDocumentClassificationJobRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StartDocumentClassificationJobRequest startDocumentClassificationJobRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( startDocumentClassificationJobRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startDocumentClassificationJobRequest . getJobName ( ) , JOBNAME_BINDING ) ; protocolMarshaller . marshall ( startDocumentClassificationJobRequest ...
public class GqSessionFactoryImpl { /** * / * ( non - Javadoc ) * @ see org . jdiameter . api . auth . ServerAuthSessionListener # doAuthRequestEvent ( org . jdiameter . api . auth . ServerAuthSession , org . jdiameter . api . app . AppRequestEvent ) */ @ Override public void doAuthRequestEvent ( ServerAuthSession ap...
logger . info ( "Diameter Gq AuthorizationSessionFactory :: doAuthRequestEvent :: appSession[{}], Request[{}]" , appSession , request ) ;
public class NetworkInterfaceTapConfigurationsInner { /** * Get the specified tap configuration on a network interface . * @ param resourceGroupName The name of the resource group . * @ param networkInterfaceName The name of the network interface . * @ param tapConfigurationName The name of the tap configuration ...
return getWithServiceResponseAsync ( resourceGroupName , networkInterfaceName , tapConfigurationName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class RunIdMigrator { /** * Delete the record of a build . * @ param dir as in { @ link Job # getBuildDir } * @ param id a { @ link Run # getId } */ public synchronized void delete ( File dir , String id ) { } }
if ( idToNumber . remove ( id ) != null ) { save ( dir ) ; }
public class AccountsInner { /** * Updates the specified Data Lake Store account information . * @ param resourceGroupName The name of the Azure resource group . * @ param accountName The name of the Data Lake Store account . * @ param parameters Parameters supplied to update the Data Lake Store account . * @ t...
return updateWithServiceResponseAsync ( resourceGroupName , accountName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class ThreadContextBuilderImpl { /** * Fail with error identifying unknown context type ( s ) that were specified . * @ param unknown set of unknown context types ( s ) that were specified . * @ param contextProviders */ static void failOnUnknownContextTypes ( HashSet < String > unknown , ArrayList < ThreadC...
Set < String > known = new TreeSet < > ( ) ; // alphabetize for readability of message known . addAll ( Arrays . asList ( ThreadContext . ALL_REMAINING , ThreadContext . APPLICATION , ThreadContext . CDI , ThreadContext . SECURITY , ThreadContext . TRANSACTION ) ) ; for ( ThreadContextProvider provider : contextProvide...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcSymbolStyleSelect ( ) { } }
if ( ifcSymbolStyleSelectEClass == null ) { ifcSymbolStyleSelectEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 975 ) ; } return ifcSymbolStyleSelectEClass ;
public class SimpleTimeZone { /** * Sets the daylight saving time end rule . For example , if daylight saving time * ends on the last Sunday in October at 2 am in wall clock time , * you can set the end rule by calling : * < code > setEndRule ( Calendar . OCTOBER , - 1 , Calendar . SUNDAY , 2*60*60*1000 ) ; < / c...
this . endMonth = endMonth ; this . endDay = endDay ; this . endDayOfWeek = endDayOfWeek ; this . endTime = endTime ; this . endTimeMode = WALL_TIME ; decodeEndRule ( ) ; invalidateCache ( ) ;
public class GraphitePickleWriter { /** * Load settings , initialize the { @ link SocketWriter } pool and test the connection to the graphite server . * a { @ link Logger # warn ( String ) } message is emitted if the connection to the graphite server fails . */ @ Override public void start ( ) { } }
int port = getIntSetting ( SETTING_PORT , DEFAULT_GRAPHITE_SERVER_PORT ) ; String host = getStringSetting ( SETTING_HOST ) ; graphiteServerHostAndPort = new HostAndPort ( host , port ) ; logger . info ( "Start Graphite Pickle writer connected to '{}'..." , graphiteServerHostAndPort ) ; metricPathPrefix = getStringSetti...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcPhysicalOrVirtualEnum ( ) { } }
if ( ifcPhysicalOrVirtualEnumEEnum == null ) { ifcPhysicalOrVirtualEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1029 ) ; } return ifcPhysicalOrVirtualEnumEEnum ;
public class ICalParameters { /** * Sets the RANGE parameter value . * This parameter is used by the { @ link RecurrenceId } property . It defines * the effective range of recurrence instances that the property references . * @ param range the range or null to remove * @ see < a href = " http : / / tools . ietf...
replace ( RANGE , ( range == null ) ? null : range . getValue ( ) ) ;
public class AbstractJSBlock { /** * Create an If statement and add it to this block * @ param aTest * { @ link IJSExpression } to be tested to determine branching * @ param aThen * " then " block content . May be < code > null < / code > . * @ return Newly generated conditional statement */ @ Nonnull public ...
return addStatement ( new JSConditional ( aTest , aThen ) ) ;
public class VersionNumber { /** * Replaces all { @ code null } values in the given list of groups with { @ code VersionNumber # EMPTY _ GROUP } . * @ param groups * list of numbers of a version number * @ return a new list of groups without { @ code null } values */ public static List < String > replaceNullValue...
Check . notNull ( groups , "groups" ) ; final List < String > result = new ArrayList < String > ( groups . size ( ) ) ; for ( final String group : groups ) { if ( group == null ) { result . add ( EMPTY_GROUP ) ; } else { result . add ( group ) ; } } for ( int i = result . size ( ) ; i < MIN_GROUP_SIZE ; i ++ ) { result...
public class AbstractTileFactory { /** * Set the User agent that will be used when making a tile request . * Some tile server usage policies requires application to identify itself , * so please make sure that it is set properly . * @ param userAgent User agent to be used . */ public void setUserAgent ( String us...
if ( userAgent == null || userAgent . isEmpty ( ) ) { throw new IllegalArgumentException ( "User agent can't be null or empty." ) ; } this . userAgent = userAgent ;
public class GameIndenter { /** * Returns null if the indentation fails . */ public static String reindentGameDescription ( String gameRules ) throws Exception { } }
List < Symbol > tokens = ParserHelper . scan ( gameRules , true ) ; tokens = collapseWhitespaceTokens ( tokens ) ; StringBuilder result = new StringBuilder ( ) ; int parensLevel = 0 ; // " ( so far " minus " ) so far " int nestingLevel = 0 ; // " < = " and " or " level ; when = = parens level , use newlines for ( int i...
public class MetadataContext { /** * Invokes { @ link DatabaseMetaData # getColumns ( java . lang . String , java . lang . String , java . lang . String , * java . lang . String ) } with given arguments and returns bound information . * @ param catalog the value for { @ code catalog } parameter * @ param schemaPa...
final List < Column > list = new ArrayList < > ( ) ; try ( ResultSet results = databaseMetadata . getColumns ( catalog , schemaPattern , tableNamePattern , columnNamePattern ) ) { if ( results != null ) { bind ( results , Column . class , list ) ; } } return list ;
public class ExternalServiceAlertConditionService { /** * Returns the set of alert conditions for the given query parameters . * @ param queryParams The query parameters * @ return The set of alert conditions */ public Collection < ExternalServiceAlertCondition > list ( List < String > queryParams ) { } }
return HTTP . GET ( "/v2/alerts_external_service_conditions.json" , null , queryParams , EXTERNAL_SERVICE_ALERT_CONDITIONS ) . get ( ) ;
public class CommerceDiscountRelPersistenceImpl { /** * Returns the commerce discount rel with the primary key or throws a { @ link com . liferay . portal . kernel . exception . NoSuchModelException } if it could not be found . * @ param primaryKey the primary key of the commerce discount rel * @ return the commerc...
CommerceDiscountRel commerceDiscountRel = fetchByPrimaryKey ( primaryKey ) ; if ( commerceDiscountRel == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchDiscountRelException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } return commer...
public class RdfListUtils { /** * Tries to get the items of an rdf : List and throws an { @ link IllegalArgumentException } if it is not a list */ public static Collection < RDFNode > getListItemsOrFail ( RDFNode node ) { } }
if ( ! isList ( node ) ) { throw new IllegalArgumentException ( "Resource not an rdf:List" ) ; } return getListItemsOrEmpty ( node ) ;
public class SPDateTimeUtil { /** * Get time zone id . ZoneId . SHORT _ IDS used get id if time zone is * abbreviated like ' IST ' . * @ param tz * @ return ZoneId */ public static ZoneId getTimeZoneId ( final TimeZone tz ) { } }
return ZoneId . of ( tz . getID ( ) , ZoneId . SHORT_IDS ) ;
public class Miscellaneous { /** * Determines whether the specified file is a Symbolic Link rather than an * actual file . * Will not return true if there is a Symbolic Link anywhere in the path , * only if the specific file is . * < b > Note : < / b > the current implementation always returns { @ code false } ...
if ( file == null ) { throw new NullPointerException ( "File must not be null" ) ; } if ( File . separatorChar == '\\' ) { return false ; } File fileInCanonicalDir ; if ( file . getParent ( ) == null ) { fileInCanonicalDir = file ; } else { File canonicalDir = file . getParentFile ( ) . getCanonicalFile ( ) ; fileInCan...
public class Datamodel { /** * Creates a { @ link GlobeCoordinatesValue } . * @ param latitude * the latitude of the coordinates in degrees * @ param longitude * the longitude of the coordinates in degrees * @ param precision * the precision of the coordinates in degrees * @ param globeIri * IRI specify...
return factory . getGlobeCoordinatesValue ( latitude , longitude , precision , globeIri ) ;
public class ByteConverter { /** * Encodes a int value to the byte array . * @ param target The byte array to encode to . * @ param idx The starting index in the byte array . * @ param value The value to encode . */ public static void float4 ( byte [ ] target , int idx , float value ) { } }
int4 ( target , idx , Float . floatToRawIntBits ( value ) ) ;
public class ViewControlsLayer { /** * Get the control type associated with the given object or null if unknown . * @ param control the control object * @ return the control type . Can be one of { @ link AVKey # VIEW _ PAN } , { @ link AVKey # VIEW _ LOOK } , { @ link * AVKey # VIEW _ HEADING _ LEFT } , { @ link ...
if ( control == null || ! ( control instanceof ScreenAnnotation ) ) return null ; if ( showPanControls && controlPan . equals ( control ) ) return AVKey . VIEW_PAN ; else if ( showLookControls && controlLook . equals ( control ) ) return AVKey . VIEW_LOOK ; else if ( showHeadingControls && controlHeadingLeft . equals (...
public class MavenGABaseImpl { /** * Valid form : < code > groupId : artifactId < / code > * @ see org . jboss . shrinkwrap . resolver . api . Coordinate # toCanonicalForm ( ) */ @ Override public String toCanonicalForm ( ) { } }
return new StringBuilder ( groupId ) . append ( SEPARATOR_COORDINATE ) . append ( artifactId ) . toString ( ) ;
public class AbstractDockerMojo { /** * Common method for re - throwing a { @ link DockerException } as a { @ link MojoFailureException } with a more specific * error message . Extract into a common , template method in this base class to allow pre " verify " Mojos to handle * errors differently . * @ param messa...
Optional < String > apiResponse = e . getApiResponse ( ) ; String exceptionMessage = apiResponse . isPresent ( ) ? ( message + "\nApi response:\n" + apiResponse . get ( ) ) : message ; throw new MojoFailureException ( exceptionMessage , e ) ;
public class BatchPredictionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BatchPrediction batchPrediction , ProtocolMarshaller protocolMarshaller ) { } }
if ( batchPrediction == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchPrediction . getBatchPredictionId ( ) , BATCHPREDICTIONID_BINDING ) ; protocolMarshaller . marshall ( batchPrediction . getMLModelId ( ) , MLMODELID_BINDING ) ; pro...
public class CompositePropertySource { /** * Add the given { @ link PropertySource } to the start of the chain . * @ param propertySource the PropertySource to add * @ since 4.1 */ public void addFirstPropertySource ( PropertySource < ? > propertySource ) { } }
List < PropertySource < ? > > existing = new ArrayList < PropertySource < ? > > ( this . propertySources ) ; this . propertySources . clear ( ) ; this . propertySources . add ( propertySource ) ; this . propertySources . addAll ( existing ) ;
public class MonthSheetView { /** * Sets the value of { @ link # cellFactoryProperty ( ) } . * @ param factory the cell factory */ public final void setCellFactory ( Callback < DateParameter , DateCell > factory ) { } }
requireNonNull ( factory ) ; cellFactoryProperty ( ) . set ( factory ) ;
public class KeyVaultClientBaseImpl { /** * List all versions of the specified secret . * The full secret identifier and attributes are provided in the response . No values are returned for the secrets . This operations requires the secrets / list permission . * @ param nextPageLink The NextLink from the previous s...
ServiceResponse < Page < SecretItem > > response = getSecretVersionsNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) ; return new PagedList < SecretItem > ( response . body ( ) ) { @ Override public Page < SecretItem > nextPage ( String nextPageLink ) { return getSecretVersionsNextSinglePageAsync ( ne...
public class Version { /** * Creates a new object of type Version * This method extracts the values for the object parameters from vStr * @ param vStr - string input */ public static Version createVersion ( String vStr ) { } }
if ( vStr == null || vStr . isEmpty ( ) ) return null ; int major = 0 ; int minor = 0 ; int micro = 0 ; String qualifier = "" ; String v [ ] = vStr . split ( "\\." , 4 ) ; try { if ( v . length > 0 ) { major = Integer . valueOf ( v [ 0 ] ) . intValue ( ) ; } if ( v . length > 1 ) { minor = Integer . valueOf ( v [ 1 ] )...
public class CLI { /** * Generate Properties objects for CLI usage . * @ param model the model to perform the annotation * @ param language the language * @ param multiwords whether multiwords are to be detected * @ param dictag whether tagging from a dictionary is activated * @ return a properties object */ ...
final Properties annotateProperties = new Properties ( ) ; annotateProperties . setProperty ( "model" , model ) ; annotateProperties . setProperty ( "lemmatizerModel" , lemmatizerModel ) ; annotateProperties . setProperty ( "language" , language ) ; annotateProperties . setProperty ( "multiwords" , multiwords ) ; annot...
public class VfsOld { /** * Creates new ReadStream from an InputStream */ public static ReadStreamOld openRead ( InputStream is ) { } }
if ( is instanceof ReadStreamOld ) return ( ReadStreamOld ) is ; VfsStreamOld s = new VfsStreamOld ( is , null ) ; return new ReadStreamOld ( s ) ;
public class GridDialects { /** * Returns the given dialect , narrowed down to the given dialect facet in case it is implemented by the dialect . * @ param gridDialect the dialect of interest * @ param facetType the dialect facet type of interest * @ return the given dialect , narrowed down to the given dialect f...
if ( hasFacet ( gridDialect , facetType ) ) { @ SuppressWarnings ( "unchecked" ) T asFacet = ( T ) gridDialect ; return asFacet ; } return null ;
public class AnyGene { /** * Create a new { @ code AnyGene } instance with the given parameters . New * ( random ) genes are created with the given allele { @ code supplier } . * @ param < A > the allele type * @ param allele the actual allele instance the created gene represents . * { @ code null } values are ...
return new AnyGene < > ( allele , supplier , validator ) ;
public class EventSubscriptionsInner { /** * Update an event subscription . * Asynchronously updates an existing event subscription . * @ param scope The scope of existing event subscription . The scope can be a subscription , or a resource group , or a top level resource belonging to a resource provider namespace ...
return ServiceFuture . fromResponse ( beginUpdateWithServiceResponseAsync ( scope , eventSubscriptionName , eventSubscriptionUpdateParameters ) , serviceCallback ) ;
public class ByteCodeGenerator { /** * Creates a Javassist class from a given model class . * @ param modelClass * Model class to convert into a Javassist class . * @ return Javassist class . * @ throws NotFoundException * A class or interface from the model was not found . * @ throws CannotCompileException...
// Create class final CtClass clasz = pool . makeClass ( modelClass . getName ( ) ) ; clasz . setModifiers ( SgUtils . toModifiers ( modelClass . getModifiers ( ) ) ) ; // Add superclass if ( modelClass . getSuperClass ( ) != null ) { clasz . setSuperclass ( pool . get ( modelClass . getSuperClass ( ) . getName ( ) ) )...
public class InstructionView { /** * Inflates this layout needed for this view and initializes the locale as the device locale . */ private void initialize ( ) { } }
LocaleUtils localeUtils = new LocaleUtils ( ) ; String language = localeUtils . inferDeviceLanguage ( getContext ( ) ) ; String unitType = localeUtils . getUnitTypeForDeviceLocale ( getContext ( ) ) ; int roundingIncrement = NavigationConstants . ROUNDING_INCREMENT_FIFTY ; distanceFormatter = new DistanceFormatter ( ge...
public class CompressionUtil { /** * Extract a file using the given { @ link CompressionMethod } . * @ param _ method * @ param _ compressedFile * @ param _ outputFileName * @ return file object which represents the uncompressed file or null on error */ public static File decompress ( CompressionMethod _method ...
if ( _method == null || _compressedFile == null ) { return null ; } File inputFile = new File ( _compressedFile ) ; if ( ! inputFile . exists ( ) ) { return null ; } try { Constructor < ? extends InputStream > constructor = _method . getInputStreamClass ( ) . getConstructor ( InputStream . class ) ; if ( constructor !=...
public class TeamDataClient { /** * Explicitly updates queries for the source system , and initiates the * update to MongoDB from those calls . */ public void updateTeamInformation ( ) throws HygieiaException { } }
// super . objClass = ScopeOwnerCollectorItem . class ; String returnDate = getFeatureSettings ( ) . getDeltaCollectorItemStartDate ( ) ; if ( ! StringUtils . isEmpty ( getMaxChangeDate ( ) ) ) { returnDate = getMaxChangeDate ( ) ; } returnDate = DateUtil . getChangeDateMinutePrior ( returnDate , getFeatureSettings ( )...
public class NettyProtocol { /** * Returns the client channel handlers . * < pre > * | Remote input channel | | request client | * | | ( 1 ) write * | | CLIENT CHANNEL PIPELINE | | * | | Request handler + | Message encoder | | * | | Message + Frame decoder | | | * | | ( 3 ) server response \ | / ( 2 ) cli...
NetworkClientHandler networkClientHandler = creditBasedEnabled ? new CreditBasedPartitionRequestClientHandler ( ) : new PartitionRequestClientHandler ( ) ; return new ChannelHandler [ ] { messageEncoder , new NettyMessage . NettyMessageDecoder ( ! creditBasedEnabled ) , networkClientHandler } ;
public class OrganizationSnippets { /** * [ START update _ organization _ settings ] */ static OrganizationSettings updateOrganizationSettings ( OrganizationName organizationName ) { } }
try ( SecurityCenterClient client = SecurityCenterClient . create ( ) ) { // Start setting up a request to update OrganizationSettings for . // OrganizationName organizationName = OrganizationName . of ( / * organizationId = * / " 123234324 " ) ; OrganizationSettings organizationSettings = OrganizationSettings . newBui...
public class ImportHelpers { /** * Adds an import to an instance ( provided this import was not already set ) . * @ param instance the instance whose imports must be updated * @ param componentOrFacetName the component or facet name associated with the import * @ param imp the import to add */ public static void ...
Collection < Import > imports = instance . getImports ( ) . get ( componentOrFacetName ) ; if ( imports == null ) { imports = new LinkedHashSet < Import > ( ) ; instance . getImports ( ) . put ( componentOrFacetName , imports ) ; } if ( ! imports . contains ( imp ) ) imports . add ( imp ) ;
public class LogHistogram { /** * Approximates log _ 2 ( value ) by abusing floating point hardware . The floating point exponent * is used to get the integer part of the log . The mantissa is then adjusted with a second order * polynomial to get a better approximation . The error is bounded to be less than ± 0.01 ...
final long valueBits = Double . doubleToRawLongBits ( value ) ; final long exponent = ( ( valueBits & 0x7ff0_0000_0000_0000L ) >>> 52 ) - 1024 ; final double m = Double . longBitsToDouble ( ( valueBits & 0x800fffffffffffffL ) | 0x3ff0000000000000L ) ; return ( m * ( 2 - ( 1.0 / 3 ) * m ) + exponent - ( 2.0 / 3.0 ) ) ;
public class PutRecordRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PutRecordRequest putRecordRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( putRecordRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( putRecordRequest . getDeliveryStreamName ( ) , DELIVERYSTREAMNAME_BINDING ) ; protocolMarshaller . marshall ( putRecordRequest . getRecord ( ) , RECORD_BINDING ) ; } ca...
public class SpliteratorBasedStream { /** * TODO use spliterators and createSeq */ @ Override public ReactiveSeq < T > append ( final T other ) { } }
return ReactiveSeq . concat ( get ( ) , new SingleSpliterator < T > ( other ) ) ;
public class EmbedVaadinServerBuilder { /** * Specifies the context to use to deploy the web application . An empty * string or < tt > / < / tt > means the root context . * @ param contextPath the context path to use * @ return this */ public B withContextPath ( String contextPath ) { } }
assertNotNull ( contextPath , "contextPath could not be null." ) ; getConfig ( ) . setContextPath ( contextPath ) ; return self ( ) ;
public class SimpleAssetResolver { /** * Attempt to find the specified image file in the < code > assets < / code > folder and return a decoded Bitmap . */ @ Override public Bitmap resolveImage ( String filename ) { } }
Log . i ( TAG , "resolveImage(" + filename + ")" ) ; try { InputStream istream = assetManager . open ( filename ) ; return BitmapFactory . decodeStream ( istream ) ; } catch ( IOException e1 ) { return null ; }
public class ObjectWrapper { /** * Internal : Static version of { @ link ObjectWrapper # setMappedValue ( Property , Object , Object ) } . */ @ SuppressWarnings ( "unchecked" ) private static void setMappedValue ( Object obj , Property property , Object key , Object value , ObjectWrapper options ) { } }
if ( property == null ) { throw new IllegalArgumentException ( "Cannot set a new mapped value to a 'null' property." ) ; } if ( Map . class . isAssignableFrom ( property . getType ( ) ) ) { Map map = ( Map ) property . get ( obj ) ; if ( map == null ) { if ( options . isAutoInstancing ) { map = new LinkedHashMap ( ) ; ...
public class DirectoryClient { /** * { @ inheritDoc } */ @ Override public InputStream getAttachment ( final Asset asset , final Attachment attachment ) throws IOException , BadVersionException , RequestFailureException { } }
String attachmentId = attachment . get_id ( ) ; if ( attachmentId . contains ( "#" ) ) { // new funky code to get an input stream to the license * inside * the main attachment . The start of // the assetId will point to the main attachment file . String assetId = asset . get_id ( ) ; File zipFile = new File ( _root , a...
public class MethodSignatureKeyServiceLocator { /** * 根据服务标示获取服务方法的描述 * @ param key * @ return 服务方法的描述 * @ see com . baidu . beidou . navi . server . locator . ServiceLocator # getServiceDescriptor ( java . lang . Object ) */ @ Override public MethodDescriptor < String > getServiceDescriptor ( String key ) { } }
Preconditions . checkNotNull ( key , "Key cannot be null" ) ; return serviceRegistry . getServiceDescriptorByKey ( key ) ;
public class AmazonMTurkClient { /** * The < code > ListWorkersBlocks < / code > operation retrieves a list of Workers who are blocked from working on your * HITs . * @ param listWorkerBlocksRequest * @ return Result of the ListWorkerBlocks operation returned by the service . * @ throws ServiceException * Ama...
request = beforeClientExecution ( request ) ; return executeListWorkerBlocks ( request ) ;
public class DateTimeUtil { /** * 给定时间 , 获取一月中的第几天 。 * @ param date 时间 ( { @ link Date } ) * @ return ( Integer ) , 如果date is null , 将返回null */ public static Integer getDayOfMonth ( Date date ) { } }
if ( date == null ) return null ; Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( date ) ; return calendar . get ( Calendar . DAY_OF_MONTH ) ;
public class RowSeq { /** * Extracts the value of a cell containing a data point . * @ param value The contents of a cell in HBase . * @ param value _ idx The offset inside { @ code values } at which the value * starts . * @ param flags The flags for this value . * @ return The value of the cell . * @ throw...
switch ( flags & Const . LENGTH_MASK ) { case 7 : return Bytes . getLong ( values , value_idx ) ; case 3 : return Bytes . getInt ( values , value_idx ) ; case 1 : return Bytes . getShort ( values , value_idx ) ; case 0 : return values [ value_idx ] ; } throw new IllegalDataException ( "Integer value @ " + value_idx + "...
public class MyProxy { /** * Retrieves delegated credentials from MyProxy server Anonymously * ( without local credentials ) * Notes : Performs simple verification of private / public keys of * the delegated credential . Should be improved later . * And only checks for RSA keys . * @ param username * The us...
return get ( null , username , passphrase , lifetime ) ;
public class IOUtil { /** * Fills the buffer based from the varint32 read from the input stream . * The buffer ' s read offset is not set if the data ( varint32 size + message size ) is too large to fit in the buffer . * @ return the delimited size read . */ static int fillBufferWithDelimitedMessageFrom ( InputStre...
final byte [ ] buf = lb . buffer ; int offset = lb . start , len = buf . length - offset , read = in . read ( buf , offset , len ) ; if ( read < 1 ) throw new EOFException ( "fillBufferWithDelimitedMessageFrom" ) ; int last = offset + read , size = buf [ offset ++ ] ; if ( 0 != ( size & 0x80 ) ) { size = size & 0x7f ; ...
public class CmsExportHelper { /** * Writes the OpenCms manifest . xml file to the ZIP export . < p > * In case of the ZIP export the manifest is written to an internal StringBuffer * first , which is then stored in the ZIP file when this method is called . < p > * @ param xmlSaxWriter the SAX writer to use * @...
// close the document xmlSaxWriter . endDocument ( ) ; xmlSaxWriter . getWriter ( ) . close ( ) ; // create ZIP entry for the manifest XML document ZipEntry entry = new ZipEntry ( CmsImportExportManager . EXPORT_MANIFEST ) ; m_exportZipStream . putNextEntry ( entry ) ; // complex substring operation is required to ensu...
public class CmsListMetadata { /** * Returns the csv output for the header of the list . < p > * @ return csv output */ public String csvHeader ( ) { } }
if ( m_csvItemFormatter != null ) { return m_csvItemFormatter . csvHeader ( ) ; } else { StringBuffer csv = new StringBuffer ( 1024 ) ; Iterator < CmsListColumnDefinition > itCols = m_columns . elementList ( ) . iterator ( ) ; while ( itCols . hasNext ( ) ) { CmsListColumnDefinition col = itCols . next ( ) ; if ( ! col...
public class JQMListItem { /** * Adds a paragraph element containing the given text . * @ param html - the value to set as the inner html of the p element . */ public JQMListItem addText ( String html ) { } }
Element e = Document . get ( ) . createPElement ( ) ; e . setInnerHTML ( html ) ; attachChild ( e ) ; return this ;
public class ClassPathResource { /** * Get the input stream for the specified path using automatic class loader * handling . The class loaders are iterated in the following order : * < ol > * < li > Default class loader ( usually the context class loader ) < / li > * < li > The class loader of this class < / li...
final URL aURL = URLHelper . getClassPathURL ( sPath ) ; return _getInputStream ( sPath , aURL , ( ClassLoader ) null ) ;
public class ConsumerSessionProxy { /** * This call will turn this asynchronous consumer into a synchronous consumer once * again and message delivery will only be able to be done through the explicit * receive methods . * @ throws com . ibm . wsspi . sib . core . exception . SISessionUnavailableException * @ t...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deregisterAsynchConsumerCallback" ) ; _deregisterAsynchConsumerCallback ( false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "deregisterAsynchConsumerCallb...
public class Box { /** * Obtains the containing block bounds . * @ return the containing block bounds . */ public Rectangle getContainingBlock ( ) { } }
if ( cbox instanceof Viewport ) // initial containing block { Rectangle visible = ( ( Viewport ) cbox ) . getVisibleRect ( ) ; return new Rectangle ( 0 , 0 , visible . width , visible . height ) ; } else // static or relative position return cbox . getContentBounds ( ) ;
public class RandomDateUtils { /** * Returns a random { @ link ZonedDateTime } that is after the given { @ link ZonedDateTime } . * @ param after the value that returned { @ link ZonedDateTime } must be after * @ return the random { @ link ZonedDateTime } * @ throws IllegalArgumentException if after is null or if...
checkArgument ( after != null , "After must be non-null" ) ; Instant instant = randomInstantAfter ( after . toInstant ( ) ) ; return ZonedDateTime . ofInstant ( instant , UTC ) ;
public class ListRecoveryPointsByBackupVaultResult { /** * An array of objects that contain detailed information about recovery points saved in a backup vault . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRecoveryPoints ( java . util . Collection ) } o...
if ( this . recoveryPoints == null ) { setRecoveryPoints ( new java . util . ArrayList < RecoveryPointByBackupVault > ( recoveryPoints . length ) ) ; } for ( RecoveryPointByBackupVault ele : recoveryPoints ) { this . recoveryPoints . add ( ele ) ; } return this ;
public class IndexWriter { /** * Generates an AttributeUpdate that removes a Backpointer , whether it exists or not . * @ param fromOffset The offset at which the Backpointer originates . */ private AttributeUpdate generateBackpointerRemoval ( long fromOffset ) { } }
return new AttributeUpdate ( getBackpointerAttributeKey ( fromOffset ) , AttributeUpdateType . Replace , Attributes . NULL_ATTRIBUTE_VALUE ) ;
public class SubCommandMetaCheck { /** * Initializes parser * @ return OptionParser object with all available options */ protected static OptionParser getParser ( ) { } }
OptionParser parser = new OptionParser ( ) ; // help options AdminParserUtils . acceptsHelp ( parser ) ; // required options parser . accepts ( OPT_HEAD_META_CHECK , "metadata keys to be checked" ) . withOptionalArg ( ) . describedAs ( "meta-key-list" ) . withValuesSeparatedBy ( ',' ) . ofType ( String . class ) ; Admi...
public class SeaGlassInternalShadowEffect { /** * Create the gradient for a rounded shadow . * @ param s the shape of the gradient . This is only used for its bounds . * @ return the gradient . */ public Paint getRoundedShadowGradient ( Shape s ) { } }
Rectangle r = s . getBounds ( ) ; int x = r . x + r . width / 2 ; int y1 = r . y ; float frac = 1.0f / r . height ; int y2 = r . y + r . height ; return new LinearGradientPaint ( x , y1 , x , y2 , ( new float [ ] { 0f , frac , 1f } ) , new Color [ ] { innerShadow . top , innerShadow . bottom , innerShadow . bottom } ) ...
public class VirtualMachineImagesInner { /** * Gets a list of virtual machine image publishers for the specified Azure location . * @ param location The name of a supported Azure region . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the List & lt ; Virt...
return listPublishersWithServiceResponseAsync ( location ) . map ( new Func1 < ServiceResponse < List < VirtualMachineImageResourceInner > > , List < VirtualMachineImageResourceInner > > ( ) { @ Override public List < VirtualMachineImageResourceInner > call ( ServiceResponse < List < VirtualMachineImageResourceInner > ...
public class DSClientUtilities { /** * Sets the basic value . * @ param entity * the entity * @ param member * the member * @ param columnName * the column name * @ param row * the row * @ param dataType * the data type * @ param metamodel * the metamodel */ private static void setBasicValue ( O...
if ( row . isNull ( columnName ) ) { return ; } Object retVal = null ; switch ( dataType ) { case BYTES : // case CUSTOM : retVal = row . getBytes ( columnName ) ; if ( retVal != null ) { setFieldValue ( entity , member , ( ( ByteBuffer ) retVal ) . array ( ) ) ; } break ; case BOOLEAN : retVal = row . getBool ( column...
public class nssimpleacl_stats { /** * Use this API to fetch the statistics of all nssimpleacl _ stats resources that are configured on netscaler . */ public static nssimpleacl_stats get ( nitro_service service ) throws Exception { } }
nssimpleacl_stats obj = new nssimpleacl_stats ( ) ; nssimpleacl_stats [ ] response = ( nssimpleacl_stats [ ] ) obj . stat_resources ( service ) ; return response [ 0 ] ;
public class CharacterConverter { /** * Converts an { @ link Object } of { @ link Class type S } into an { @ link Object } of { @ link Class type T } . * @ param value { @ link Object } of { @ link Class type S } to convert . * @ return the converted { @ link Object } of { @ link Class type T } . * @ throws Conve...
if ( value instanceof Character ) { return ( Character ) value ; } else if ( value instanceof String ) { String valueString = value . toString ( ) ; return valueString . length ( ) > 0 ? valueString . charAt ( 0 ) : '\0' ; } else { return super . convert ( value ) ; }
public class SFResultSet { /** * Advance to next row * @ return true if next row exists , false otherwise */ @ Override public boolean next ( ) throws SFException , SnowflakeSQLException { } }
if ( isClosed ( ) ) { return false ; } // otherwise try to fetch again if ( fetchNextRow ( ) ) { row ++ ; if ( isLast ( ) ) { long timeConsumeLastResult = System . currentTimeMillis ( ) - this . firstChunkTime ; logMetric ( TelemetryField . TIME_CONSUME_LAST_RESULT , timeConsumeLastResult ) ; } return true ; } else { l...
public class RelationalJMapper { /** * This method verifies that the destinationClass exists . * @ param exception exception to handle * @ param clazz class to check * @ return a new instance of Class given as input */ private < I > I destinationClassControl ( Exception exception , Class < I > clazz ) { } }
try { if ( clazz == null ) throw new IllegalArgumentException ( "it's mandatory define the destination class" ) ; } catch ( Exception e ) { JmapperLog . error ( e ) ; return null ; } return logAndReturnNull ( exception ) ;
public class MapperScannerConfigurer { /** * { @ inheritDoc } * @ since 1.0.2 */ @ Override public void postProcessBeanDefinitionRegistry ( BeanDefinitionRegistry registry ) { } }
if ( this . processPropertyPlaceHolders ) { processPropertyPlaceHolders ( ) ; } ClassPathMapperScanner scanner = new ClassPathMapperScanner ( registry ) ; scanner . setAddToConfig ( this . addToConfig ) ; scanner . setAnnotationClass ( this . annotationClass ) ; scanner . setMarkerInterface ( this . markerInterface ) ;...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcRelAssignsToProduct ( ) { } }
if ( ifcRelAssignsToProductEClass == null ) { ifcRelAssignsToProductEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 524 ) ; } return ifcRelAssignsToProductEClass ;
public class GenericCollectionTypeResolver { /** * Determine the generic element type of the given Collection field . * @ param collectionField the collection field to introspect * @ param nestingLevel the nesting level of the target type * ( typically 1 ; e . g . in case of a List of Lists , 1 would indicate the...
return getGenericFieldType ( collectionField , Collection . class , 0 , typeIndexesPerLevel , nestingLevel ) ;
public class Rollbar { /** * Record a warning message with extra information attached . * @ param message the message * @ param custom the extra information */ public void warning ( String message , Map < String , Object > custom ) { } }
log ( null , custom , message , Level . WARNING ) ;
public class StandardRequest { /** * Destroys current session . * @ see Request # destroySession ( ) */ public void destroySession ( ) { } }
if ( entryPoint != null ) { entryPoint . onSessionDestruction ( this , session ) ; } if ( accessManager != null ) { accessManager . destroyCurrentSession ( ) ; } session = null ;