signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Validator { /** * Validates that an enum of the given type with the given value exists , and that this enum is * contained in the given list of permitted choices ; finally returns that enum object . */ public < T extends Enum < T > > T validateEnum ( Config config , String value , Class < T > type , T .....
if ( choices . length == 0 ) { choices = type . getEnumConstants ( ) ; } Preconditions . checkArgument ( choices . length > 0 ) ; try { T result = Enum . valueOf ( type , value ) ; if ( ! Arrays . asList ( choices ) . contains ( result ) ) { throw new IllegalArgumentException ( ) ; } return result ; } catch ( IllegalAr...
public class SelendroidCapabilities { /** * Returns the application under test in the format of " appName : appVersion " , or " appName " if the supported application * does not have any version associated with it , or returns null if the requested app is not in the apps store . If the * launch activity is also spe...
String defaultApp = getAut ( ) ; // if the launch activity is specified , just return . if ( getLaunchActivity ( ) != null ) { return defaultApp ; } // App version is not specified . Get the latest version from the apps store . if ( ! defaultApp . contains ( ":" ) ) { return getDefaultVersion ( supportedApps , defaultA...
public class Extension { /** * Returns a new map of all resources corresponding to the map of resource * paths provided . Each resource will be associated with the mimetype * stored in the given map using its path as the key . * @ param resourceTypes * A map of all paths to their corresponding mimetypes . * @...
// If no paths are provided , just return an empty map if ( resourceTypes == null ) return Collections . < String , Resource > emptyMap ( ) ; // Add classpath resource for each path / mimetype pair provided Map < String , Resource > resources = new HashMap < String , Resource > ( resourceTypes . size ( ) ) ; for ( Map ...
public class Configuration { /** * Creates a new Configuration based on the given { @ link com . jayway . jsonpath . spi . mapper . MappingProvider } * @ param newMappingProvider mapping provider to use in new configuration * @ return a new configuration */ public Configuration mappingProvider ( MappingProvider new...
return Configuration . builder ( ) . jsonProvider ( jsonProvider ) . mappingProvider ( newMappingProvider ) . options ( options ) . evaluationListener ( evaluationListeners ) . build ( ) ;
public class FunctionTypeBuilder { /** * Infer parameters from the params list and info . Also maybe add extra templates . */ FunctionTypeBuilder inferConstructorParameters ( Node argsParent , @ Nullable JSDocInfo info ) { } }
// Look for template parameters in ' info ' : these will be added to anything from the class . if ( info != null ) { setConstructorTemplateTypeNames ( buildTemplateTypesFromJSDocInfo ( info , true ) , argsParent . getParent ( ) ) ; } inferParameterTypes ( argsParent , info ) ; return this ;
public class PluginMergeToolImpl { /** * Removes all nodes contained in the NodeList from the Element . * Convenience method because NodeList objects in the DOM are live . * @ param xEml * @ param nodes */ public static void nodeListRemoveAll ( Element xEml , NodeList nodes ) { } }
int cnt = nodes . getLength ( ) ; for ( int i = 0 ; i < cnt ; i ++ ) xEml . removeChild ( nodes . item ( 0 ) ) ;
public class AbstractMapFragment { /** * Calling this before super . oncreate ( ) when you try to use a toolbar and the view contains a map * https : / / code . google . com / p / android / issues / detail ? id = 175140 */ public static void doMapToolbarWorkaround ( Bundle savedInstanceState ) { } }
// FIXME This is just a workaround to the following error : ClassNotFoundException when unmarshalling android . support . v7 . widget . Toolbar $ SavedState // It seems to be a problem with the SupportMapFragment implementation // https : / / code . google . com / p / android / issues / detail ? id = 175140 if ( savedI...
public class TextCache { /** * Closes the source file and deletes it if it is not read - only . */ void purge ( ) { } }
uncommittedCache . clear ( ) ; try { if ( cacheReadonly ) { close ( false ) ; } else { if ( dataFile != null ) { dataFile . close ( ) ; dataFile = null ; } FileUtil . getDefaultInstance ( ) . delete ( fileName ) ; } } catch ( Exception e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , ErrorCode . M_TextCache_purg...
public class AmazonCloudWatchEventsClient { /** * Adds the specified targets to the specified rule , or updates the targets if they are already associated with the * rule . * Targets are the resources that are invoked when a rule is triggered . * You can configure the following as targets for CloudWatch Events : ...
request = beforeClientExecution ( request ) ; return executePutTargets ( request ) ;
public class DialogFragmentUtils { /** * Dismiss { @ link android . app . DialogFragment } for the tag on the loader callbacks with the specified { @ link android . os . Handler } . * @ param handler the handler , in most case , this handler is the main handler . * @ param manager the manager . * @ param tag the ...
handler . post ( new Runnable ( ) { @ Override public void run ( ) { android . app . DialogFragment fragment = ( android . app . DialogFragment ) manager . findFragmentByTag ( tag ) ; if ( fragment != null ) { fragment . dismiss ( ) ; } } } ) ;
public class TypeToken { /** * Return true if any of the following conditions is met : * < ul > * < li > ' this ' and { @ code formalType } are equal * < li > { @ code formalType } is { @ code < ? extends Foo > } and ' this ' is a subtype of { @ code Foo } * < li > { @ code formalType } is { @ code < ? super Fo...
if ( runtimeType . equals ( formalType ) ) { return true ; } if ( formalType instanceof WildcardType ) { // if " formalType " is < ? extends Foo > , " this " can be : // Foo , SubFoo , < ? extends Foo > , < ? extends SubFoo > , < T extends Foo > or // < T extends SubFoo > . // if " formalType " is < ? super Foo > , " t...
public class CheckSignInApi { /** * 帐号登录请求 , 非强制登录 * @ param handler 登录结果回调 */ public void checkSignIn ( final SignInHandler handler ) { } }
HMSAgentLog . i ( "checkSignIn:handler=" + StrUtils . objDesc ( handler ) ) ; if ( this . handler != null ) { HMSAgentLog . e ( "has already a signIn to dispose" ) ; new Handler ( Looper . getMainLooper ( ) ) . post ( new CallbackResultRunnable < SignInHuaweiId > ( handler , HMSAgent . AgentResultCode . REQUEST_REPEATE...
public class ProxyPathValidator { /** * Sets a restricted proxy policy handler . * @ param id the Oid of the proxy policy to install the handler for . * @ param handler the proxy policy handler . * @ return < code > ProxyPolicyHandler < / code > the previous handler * installed under the specified id . Usually ...
if ( id == null ) { throw new IllegalArgumentException ( i18n . getMessage ( "proxyPolicyId" ) ) ; } if ( handler == null ) { throw new IllegalArgumentException ( i18n . getMessage ( "proxyPolicyHandler" ) ) ; } if ( this . proxyPolicyHandlers == null ) { this . proxyPolicyHandlers = new Hashtable ( ) ; } return ( Prox...
public class ClustersInner { /** * Checks that the cluster name is valid and is not already in use . * @ param location Azure location . * @ param name Cluster name . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if par...
return ServiceFuture . fromResponse ( checkNameAvailabilityWithServiceResponseAsync ( location , name ) , serviceCallback ) ;
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns the cp definition option value rels before and after the current cp definition option value rel in the ordered set where companyId = & # 63 ; . * @ param CPDefinitionOptionValueRelId the primary key of the current cp definition option value rel ...
CPDefinitionOptionValueRel cpDefinitionOptionValueRel = findByPrimaryKey ( CPDefinitionOptionValueRelId ) ; Session session = null ; try { session = openSession ( ) ; CPDefinitionOptionValueRel [ ] array = new CPDefinitionOptionValueRelImpl [ 3 ] ; array [ 0 ] = getByCompanyId_PrevAndNext ( session , cpDefinitionOption...
public class BackboneGeneration { /** * Computes the backbone for a given collection of formulas w . r . t . a collection of variables and a backbone type . * @ param formulas the given collection of formulas * @ param variables the given collection of relevant variables for the backbone computation * @ param typ...
solver . reset ( ) ; solver . add ( formulas ) ; return solver . compute ( variables , type ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getTileSetColor ( ) { } }
if ( tileSetColorEClass == null ) { tileSetColorEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 396 ) ; } return tileSetColorEClass ;
public class Builder { /** * This method is not called " parse " to avoid confusion with file parsing methods */ public Document parseString ( String text ) throws SAXException { } }
try { return parse ( new InputSource ( new StringReader ( text ) ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "unexpected world exception while reading memory stream" , e ) ; }
public class AbstractValidateableDialogBuilder { /** * Adds all validators , which are contained by a specific collection and should be executed when * the positive button of the dialog , which is created by the builder , is clicked . * @ param validators * A collection , which contains all validators , which sho...
Condition . INSTANCE . ensureNotNull ( validators , "The collection may not be null" ) ; getProduct ( ) . addAllDialogValidators ( validators ) ; return self ( ) ;
public class HttpConnection { /** * / * Exception reporting policy method . * @ param e the Throwable to report . */ private void exception ( Throwable e ) { } }
try { _persistent = false ; int error_code = HttpResponse . __500_Internal_Server_Error ; if ( e instanceof HttpException ) { error_code = ( ( HttpException ) e ) . getCode ( ) ; if ( _request == null ) log . warn ( e . toString ( ) ) ; else log . warn ( _request . getRequestLine ( ) + " " + e . toString ( ) ) ; log . ...
public class InternalXtextParser { /** * InternalXtext . g : 1429:1 : ruleEnumLiterals : ( ( rule _ _ EnumLiterals _ _ Group _ _ 0 ) ) ; */ public final void ruleEnumLiterals ( ) throws RecognitionException { } }
int stackSize = keepStackSize ( ) ; try { // InternalXtext . g : 1433:2 : ( ( ( rule _ _ EnumLiterals _ _ Group _ _ 0 ) ) ) // InternalXtext . g : 1434:2 : ( ( rule _ _ EnumLiterals _ _ Group _ _ 0 ) ) { // InternalXtext . g : 1434:2 : ( ( rule _ _ EnumLiterals _ _ Group _ _ 0 ) ) // InternalXtext . g : 1435:3 : ( rule...
public class ApiRetryStrategyManager { /** * Get the { @ link ApiRetryStrategy } for the specified AdWords API service / utility name . * @ param name the specified AdWords API service / utility name * @ param isUtility whether this is for some AdWords API utility , i . e . , from calling { @ link * com . google ...
ApiRateLimitBucket bucket = getRateLimitBucket ( name , isUtility ) ; return bucket == null ? null : bucketToStrategy . get ( bucket ) ;
public class CmsSearchIndex { /** * Returns the Lucene document with the given root path from the index . < p > * @ param rootPath the root path of the document to get * @ return the Lucene document with the given root path from the index * @ deprecated Use { @ link # getDocument ( String , String ) } instead and...
if ( getDocument ( CmsSearchField . FIELD_PATH , rootPath ) != null ) { return ( Document ) getDocument ( CmsSearchField . FIELD_PATH , rootPath ) . getDocument ( ) ; } return null ;
public class EnableUserRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EnableUserRequest enableUserRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( enableUserRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( enableUserRequest . getUserName ( ) , USERNAME_BINDING ) ; protocolMarshaller . marshall ( enableUserRequest . getAuthenticationType ( ) , AUTHENTICATIONTYPE_BINDING )...
public class MsvcProjectWriter { /** * Writes compiler options . * @ param writer * Writer writer * @ param isDebug * true if debug . * @ param baseDir * String base directory * @ param compilerConfig * compiler configuration * @ throws IOException * if error on writing project */ private void write...
final StringBuffer baseOptions = new StringBuffer ( 50 ) ; baseOptions . append ( "# ADD BASE CPP" ) ; final StringBuffer options = new StringBuffer ( 50 ) ; options . append ( "# ADD CPP" ) ; final File [ ] includePath = compilerConfig . getIncludePath ( ) ; for ( final File element : includePath ) { options . append ...
public class JsonSchema { /** * Fetches the nested or primitive array items type from schema . * @ return * @ throws DataConversionException */ public Type getTypeOfArrayItems ( ) throws DataConversionException { } }
JsonSchema arrayValues = getItemsWithinDataType ( ) ; if ( arrayValues == null ) { throw new DataConversionException ( "Array types only allow values as primitive, null or JsonObject" ) ; } return arrayValues . getType ( ) ;
public class CreateQualificationTypeRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateQualificationTypeRequest createQualificationTypeRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createQualificationTypeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createQualificationTypeRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createQualificationTypeRequest . getKeywords ( ) , KEYWORD...
public class KernelDeviceProfile { /** * Elapsed time for all events { @ code from } through { @ code to } for the last thread that executed this KernelDeviceProfile * instance respective kernel and device . * @ param from the first event to consider that defines the elapsed period start * @ param to the last eve...
Accumulator acc = lastAccumulator . get ( ) ; return acc == null ? Double . NaN : ( acc . currentTimes [ to ] - acc . currentTimes [ from ] ) / MILLION ;
public class FelixGogoCommandsServiceGenerator { /** * Generate CommandProvider class and instance for this class based on parameters * @ param service commands service * @ param commands commands map ( name = help ) * @ param suffix unique class suffix * @ return generated CommandProvider instance * @ throws...
// generate class with unique name CtClass ctClass = POOL . makeClass ( AbstractFelixCommandsService . class . getName ( ) + suffix ) ; try { if ( ! ctClass . isFrozen ( ) ) { ClassFile ccFile = ctClass . getClassFile ( ) ; ccFile . setVersionToJava5 ( ) ; ConstPool constPool = ccFile . getConstPool ( ) ; // set superc...
public class ResetCacheParameterGroupRequest { /** * An array of parameter names to reset to their default values . If < code > ResetAllParameters < / code > is * < code > true < / code > , do not use < code > ParameterNameValues < / code > . If < code > ResetAllParameters < / code > is * < code > false < / code > ...
if ( this . parameterNameValues == null ) { setParameterNameValues ( new com . amazonaws . internal . SdkInternalList < ParameterNameValue > ( parameterNameValues . length ) ) ; } for ( ParameterNameValue ele : parameterNameValues ) { this . parameterNameValues . add ( ele ) ; } return this ;
public class CouchbaseSchemaManager { /** * Adds the bucket . * @ param name * the name */ private void addBucket ( String name ) { } }
String qouta = csmd . getBucketProperty ( "bucket.quota" ) ; int bucketQuota = qouta != null ? Integer . parseInt ( qouta ) : DEFAULT_RAM_SIZE_IN_MB ; BucketSettings bucketSettings = new DefaultBucketSettings . Builder ( ) . type ( BucketType . COUCHBASE ) . name ( name ) . quota ( bucketQuota ) . build ( ) ; try { clu...
public class TopLevelDomainsInner { /** * Gets all legal agreements that user needs to accept before purchasing a domain . * Gets all legal agreements that user needs to accept before purchasing a domain . * ServiceResponse < PageImpl < TldLegalAgreementInner > > * @ param nextPageLink The NextLink from the previou...
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listAgreementsNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( ne...
public class AbstractKTypeCollection { /** * Default implementation uses a predicate for removal . */ @ Override public int removeAll ( final KTypeLookupContainer < ? super KType > c ) { } }
// We know c holds sub - types of KType and we ' re not modifying c , so go unchecked . return this . removeAll ( new KTypePredicate < KType > ( ) { public boolean apply ( KType k ) { return c . contains ( k ) ; } } ) ;
public class ProviderContext { /** * Creates a new ProviderContext based on the provider id and rate type ( s ) . * @ param provider the provider id , not null . * @ return a new { @ link ProviderContext } instance . */ public static ProviderContext of ( String provider ) { } }
return ProviderContextBuilder . of ( provider , RateType . ANY ) . build ( ) ;
public class MountTargetDescriptionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( MountTargetDescription mountTargetDescription , ProtocolMarshaller protocolMarshaller ) { } }
if ( mountTargetDescription == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( mountTargetDescription . getOwnerId ( ) , OWNERID_BINDING ) ; protocolMarshaller . marshall ( mountTargetDescription . getMountTargetId ( ) , MOUNTTARGETID_BINDIN...
public class HintScanner { /** * Finds the JSON - HOME hints on the given method . * @ param method the method to scan * @ return the hints */ public Hints findHint ( Method method ) { } }
Hints hints = new Hints ( ) ; for ( Annotation annotation : method . getDeclaredAnnotations ( ) ) { findAllow ( hints , annotation ) ; findFormats ( hints , annotation ) ; } return hints ;
public class DescribeHsmClientCertificatesRequest { /** * A tag value or values for which you want to return all matching HSM client certificates that are associated with * the specified tag value or values . For example , suppose that you have HSM client certificates that are tagged * with values called < code > a...
if ( tagValues == null ) { this . tagValues = null ; return ; } this . tagValues = new com . amazonaws . internal . SdkInternalList < String > ( tagValues ) ;
public class HttpTracerUtils { /** * Parse tracer key * @ param tracerMap tracer map * @ param key tracer key * @ param value tracer value */ public static void parseTraceKey ( Map < String , String > tracerMap , String key , String value ) { } }
String lowKey = key . substring ( PREFIX . length ( ) ) ; String realKey = TRACER_KEY_MAP . get ( lowKey ) ; tracerMap . put ( realKey == null ? lowKey : realKey , value ) ;
public class HelloServiceImpl { /** * Sends a { @ link HelloReply } using { @ code blockingTaskExecutor } . * @ see < a href = " https : / / line . github . io / armeria / server - grpc . html # blocking - service - implementation " > Blocking * service implementation < / a > */ @ Override public void blockingHello...
// Unlike upstream gRPC - Java , Armeria does not run service logic in a separate thread pool by default . // Therefore , this method will run in the event loop , which means that you can suffer the performance // degradation if you call a blocking API in this method . In this case , you have the following options : //...
public class RenderVisitorAssistantForMsgs { /** * Private helper for visitMsgFallbackGroupNode ( ) to render a message from its translation . */ private void renderMsgFromTranslation ( MsgNode msg , ImmutableList < SoyMsgPart > msgParts , @ Nullable ULocale locale ) { } }
SoyMsgPart firstPart = msgParts . get ( 0 ) ; if ( firstPart instanceof SoyMsgPluralPart ) { new PlrselMsgPartsVisitor ( msg , locale ) . visitPart ( ( SoyMsgPluralPart ) firstPart ) ; } else if ( firstPart instanceof SoyMsgSelectPart ) { new PlrselMsgPartsVisitor ( msg , locale ) . visitPart ( ( SoyMsgSelectPart ) fir...
public class PropagateTransform { /** * ~ Methods * * * * * */ private void _propagateMetricTransform ( Metric metric , long windowSizeInSeconds , QueryContext queryContext ) { } }
// if the datapoint set is empty or has a single datapoint , return directly if ( metric . getDatapoints ( ) . isEmpty ( ) || metric . getDatapoints ( ) . size ( ) == 1 ) { return ; } Long [ ] startAndEndTimestamps = QueryUtils . getStartAndEndTimesWithMaxInterval ( queryContext ) ; Map < Long , Double > propagateDatap...
public class MithraAbstractDatabaseObject { /** * batchUpdateForSameSourceAttribute Start - - - - - */ protected void zBatchUpdateForSameSourceAttribute ( List < UpdateOperation > updateOperations , BatchUpdateOperation batchUpdateOperation ) { } }
UpdateOperation firstOperation = updateOperations . get ( 0 ) ; MithraDataObject firstData = this . getDataForUpdate ( firstOperation ) ; Object source = this . getSourceAttributeValueFromObjectGeneric ( firstData ) ; DatabaseType databaseType = this . getDatabaseTypeGenericSource ( source ) ; if ( databaseType . getUp...
public class BaseMessagingEngineImpl { /** * Will return null for liberty * ( non - Javadoc ) * @ see com . ibm . ws . sib . admin . JsMessagingEngine # getBus ( ) */ public final LWMConfig getBus ( ) { } }
String thisMethodName = "getBus" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , thisMethodName ) ; } return this . _bus ;
public class JScreen { /** * Add the screen controls to the second column of the grid . * @ param parent The container to add the control ( s ) to . * @ param gridbag The screen layout . * @ param c The constraint to use . */ public void addScreenControls ( Container parent ) { } }
GridBagConstraints c = this . getGBConstraints ( ) ; c . weightx = 1.0 ; // Grow edit and scroll pane but not label c . anchor = GridBagConstraints . NORTHWEST ; // Edit boxes left justified c . gridx = 1 ; // Column 1 c . gridy = GridBagConstraints . RELATIVE ; // Bump Row each time c . gridwidth = 3 ; // end column f...
public class MetricUtils { /** * make taskId = 0 and streamId empty and metricName remain the string after ` . ` . */ public static String task2MergeCompName ( String old ) { } }
String [ ] parts = old . split ( DELIM ) ; if ( parts . length >= 7 ) { parts [ 0 ] = MetaType . COMPONENT . getV ( ) + parts [ 0 ] . charAt ( 1 ) ; parts [ parts . length - 3 ] = EMPTY ; parts [ parts . length - 4 ] = "0" ; String metricName = getMergeMetricName ( parts [ parts . length - 1 ] ) ; parts [ parts . lengt...
public class FileDefinitionParser { /** * Reads a definition file . * @ return an instance of { @ link FileDefinition } ( never null ) * Parsing errors are stored in the result . < br > * See { @ link FileDefinition # getParsingErrors ( ) } . */ public FileDefinition read ( ) { } }
// Parse blocks try { fillIn ( ) ; mergeContiguousRegions ( this . definitionFile . getBlocks ( ) ) ; } catch ( IOException e ) { addModelError ( ErrorCode . P_IO_ERROR , this . currentLineNumber , exception ( e ) ) ; } // Determine file type boolean hasFacets = false , hasComponents = false , hasInstances = false , ha...
public class FastJsonKit { /** * json to Record * @ param json * @ return */ public static Record jsonToRecord ( String json ) { } }
Map < String , Object > map = jsonToMap ( json ) ; return new Record ( ) . setColumns ( map ) ;
public class S { /** * Escape for regular expression * @ param o * @ return Regex escaped data */ public static RawData escapeRegex ( Object o ) { } }
if ( null == o ) return RawData . NULL ; if ( o instanceof RawData ) return ( RawData ) o ; String s = o . toString ( ) ; return new RawData ( s . replaceAll ( "([\\/\\*\\{\\}\\<\\>\\-\\\\\\!])" , "\\\\$1" ) ) ;
public class MetadataService { /** * Removes { @ link Permission } s from the specified { @ code path } . */ private CompletableFuture < Revision > removePermissionAtPointer ( Author author , String projectName , JsonPointer path , String commitSummary ) { } }
final Change < JsonNode > change = Change . ofJsonPatch ( METADATA_JSON , new RemoveOperation ( path ) . toJsonNode ( ) ) ; return metadataRepo . push ( projectName , Project . REPO_DOGMA , author , commitSummary , change ) ;
public class AbstractStub { /** * Returns a new stub with a deadline that is after the given { @ code duration } from now . * @ since 1.0.0 * @ see CallOptions # withDeadlineAfter */ public final S withDeadlineAfter ( long duration , TimeUnit unit ) { } }
return build ( channel , callOptions . withDeadlineAfter ( duration , unit ) ) ;
public class Model { /** * Converts a named attribute to < code > java . sql . Timestamp < / code > if possible . * Acts as a validator if cannot make a conversion . * @ param attributeName name of attribute to convert to < code > java . sql . Timestamp < / code > . * @ param format format for conversion . Refer ...
return ModelDelegate . convertTimestamp ( modelClass ( ) , attributeName , format ) ;
public class CmsStaticExportRfsRule { /** * Returns the rfs name for the given locale , only used for multi - language export . < p > * @ param rfsName the original rfs name * @ param fileSeparator the file separator to use * @ return the rfs name for the given locale */ public String getLocalizedRfsName ( String...
String locRfsName = null ; // this might be too simple locRfsName = CmsStringUtil . substitute ( rfsName , fileSeparator + CmsLocaleManager . getDefaultLocale ( ) . toString ( ) + fileSeparator , fileSeparator + getName ( ) + fileSeparator ) ; return locRfsName ;
public class IdentityHashMap { /** * Reconstitutes the < tt > IdentityHashMap < / tt > instance from a stream ( i . e . , * deserializes it ) . */ private void readObject ( java . io . ObjectInputStream s ) throws java . io . IOException , ClassNotFoundException { } }
// Read in any hidden stuff s . defaultReadObject ( ) ; // Read in size ( number of Mappings ) int size = s . readInt ( ) ; if ( size < 0 ) throw new java . io . StreamCorruptedException ( "Illegal mappings count: " + size ) ; init ( capacity ( size ) ) ; // Read the keys and values , and put the mappings in the table ...
public class SignTask { /** * { @ inheritDoc } */ public File execute ( JnlpDependencyConfig config , File file ) throws JnlpDependencyTaskException { } }
SignConfig sign = config . getSign ( ) ; boolean signVerify = sign . isVerify ( ) ; File signedJar = new File ( file . getParentFile ( ) , file . getName ( ) + ".sign" ) ; try { ioUtil . deleteFile ( signedJar ) ; } catch ( MojoExecutionException e ) { throw new JnlpDependencyTaskException ( e . getMessage ( ) , e . ge...
public class DateFormatSymbols { /** * Returns time zone strings . * The array returned by this API is a two dimensional String array and * each row contains at least following strings : * < ul > * < li > ZoneStrings [ n ] [ 0 ] - System time zone ID * < li > ZoneStrings [ n ] [ 1 ] - Long standard time displ...
if ( zoneStrings != null ) { return duplicate ( zoneStrings ) ; } String [ ] tzIDs = TimeZone . getAvailableIDs ( ) ; TimeZoneNames tznames = TimeZoneNames . getInstance ( validLocale ) ; tznames . loadAllDisplayNames ( ) ; NameType types [ ] = { NameType . LONG_STANDARD , NameType . SHORT_STANDARD , NameType . LONG_DA...
public class StyledNamingConvention { @ Override public String fromClassNameToShortComponentName ( final String className ) { } }
if ( LdiStringUtil . isEmpty ( className ) ) { throw new EmptyRuntimeException ( "className" ) ; } String s = LdiStringUtil . decapitalize ( LdiClassUtil . getShortClassName ( className ) ) ; if ( s . endsWith ( implementationSuffix ) ) { return s . substring ( 0 , s . length ( ) - implementationSuffix . length ( ) ) ;...
public class WalkModFacade { /** * Removes a plugin from the configuration file . * @ param pluginConfig * Plugin configuration to remove . * @ param recursive * If it necessary to remove the plugin from all the submodules . * @ throws Exception * if the walkmod configuration file can ' t be read . */ publi...
long startTime = System . currentTimeMillis ( ) ; Exception exception = null ; if ( ! cfg . exists ( ) ) { init ( ) ; } userDir = new File ( System . getProperty ( "user.dir" ) ) . getAbsolutePath ( ) ; System . setProperty ( "user.dir" , options . getExecutionDirectory ( ) . getAbsolutePath ( ) ) ; try { Configuration...
public class ReportingApi { /** * Subscribe to statistics ( asynchronously ) * Open a subscription for the specified set of statistics . The values are returned when you request them using [ / reporting / subscriptions / { subscriptionId } ] ( / reference / workspace / Reporting / index . html # peek ) . * @ param ...
ProgressResponseBody . ProgressListener progressListener = null ; ProgressRequestBody . ProgressRequestListener progressRequestListener = null ; if ( callback != null ) { progressListener = new ProgressResponseBody . ProgressListener ( ) { @ Override public void update ( long bytesRead , long contentLength , boolean do...
public class BcDSAKeyParameterGenerator { /** * Convert usage index to key usage . * @ param usage usage index . * @ return key usage . */ private static DSAKeyValidationParameters . Usage getUsage ( int usage ) { } }
if ( usage == DSAParameterGenerationParameters . DIGITAL_SIGNATURE_USAGE ) { return DSAKeyValidationParameters . Usage . DIGITAL_SIGNATURE ; } else if ( usage == DSAParameterGenerationParameters . KEY_ESTABLISHMENT_USAGE ) { return DSAKeyValidationParameters . Usage . KEY_ESTABLISHMENT ; } return DSAKeyValidationParame...
public class DistortImageOps { /** * Rescales the input image and writes the results into the output image . The scale * factor is determined independently of the width and height . * @ param input Input image . Not modified . * @ param output Rescaled input image . Modified . * @ param borderType Describes how...
PixelTransformAffine_F32 model = DistortSupport . transformScale ( output , input , null ) ; if ( input instanceof ImageGray ) { distortSingle ( ( ImageGray ) input , ( ImageGray ) output , model , interpType , borderType ) ; } else if ( input instanceof Planar ) { distortPL ( ( Planar ) input , ( Planar ) output , mod...
public class AbstractJSPExtensionFactory { public ExtensionProcessor createExtensionProcessor ( IServletContext webapp ) throws Exception { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . entering ( CLASS_NAME , "createExtensionProcessor" , " app contextPath --> " + webapp . getContextPath ( ) ) ; } // d651265 createGlobalTagLibraryCache ( ) ; JspXmlExtConfig webAppConfig = createCo...
public class AbcGrammar { /** * BarFly - style macros - do be defined better * field - macro : : = % x6D . 3A * WSP 1 * ( WSP / VCHAR ) header - eol < p > * < tt > m : < / tt > */ Rule FieldMacro ( ) { } }
return Sequence ( String ( "m:" ) , ZeroOrMore ( WSP ( ) ) . suppressNode ( ) , OneOrMore ( FirstOf ( WSP ( ) , VCHAR ( ) ) ) . label ( "Macro" ) . suppressSubnodes ( ) , HeaderEol ( ) ) . label ( FieldMacro ) ;
public class DefaultStorageService { /** * Audit methods */ private void auditPath ( String action , String path ) { } }
AuditEvent auditEvent = new AuditEvent ( action ) ; auditEvent . getContext ( ) . put ( "PATH" , path ) ; auditor . logEvent ( auditEvent ) ;
public class ConfigurationUpdate { /** * Return the value with the given path and key if it exists . * @ param path the path * @ param key the key * @ return the value */ public Optional < String > value ( String path , String key ) { } }
return Optional . ofNullable ( paths . get ( path ) ) . flatMap ( map -> Optional . ofNullable ( map . get ( key ) ) ) ;
public class RetouchedBloomFilter { /** * Adds a list of false positive information to < i > this < / i > retouched Bloom filter . * @ param keys The list of false positive . */ public void addFalsePositive ( List < Key > keys ) { } }
if ( keys == null ) { throw new NullPointerException ( "ArrayList<Key> can not be null" ) ; } for ( Key k : keys ) { addFalsePositive ( k ) ; }
public class JobContext { /** * Get the { @ link Reducer } class for the job . * @ return the { @ link Reducer } class for the job . */ @ SuppressWarnings ( "unchecked" ) public Class < ? extends Reducer < ? , ? , ? , ? > > getReducerClass ( ) throws ClassNotFoundException { } }
return ( Class < ? extends Reducer < ? , ? , ? , ? > > ) conf . getClass ( REDUCE_CLASS_ATTR , Reducer . class ) ;
public class DataTypeParser { /** * Parses SQL - 92 Character string data types . < character string type > : : = CHARACTER [ < left paren > < length > < right paren > ] | * CHAR [ < left paren > < length > < right paren > ] | CHARACTER VARYING < left paren > < length > < right paren > | CHAR VARYING < left * paren...
DataType dataType = null ; String typeName = null ; if ( tokens . matches ( DataTypes . DTYPE_VARCHAR ) ) { typeName = getStatementTypeName ( DataTypes . DTYPE_VARCHAR ) ; dataType = new DataType ( typeName ) ; consume ( tokens , dataType , false , DataTypes . DTYPE_VARCHAR ) ; long length = parseBracketedLong ( tokens...
public class RedisConnectionConfiguration { /** * Create a { @ link RedisClusterConfiguration } if necessary . * @ return { @ literal null } if no cluster settings are set . */ protected final RedisClusterConfiguration getClusterConfiguration ( ) { } }
if ( this . clusterConfiguration != null ) { return this . clusterConfiguration ; } if ( this . properties . getCluster ( ) == null ) { return null ; } RedisProperties . Cluster clusterProperties = this . properties . getCluster ( ) ; RedisClusterConfiguration config = new RedisClusterConfiguration ( clusterProperties ...
public class DefaultPivotModel { /** * @ SuppressWarnings ( " unchecked " ) * private MultiKeyMap getData2 ( PivotField dataField ) { * MultiKeyMap data = new MultiKeyMap ( ) ; * List < List < Object > > rowKeys = getRowKeys ( ) ; * System . out . println ( " rowKeys . size ( ) = " + rowKeys . size ( ) ) ; * ...
if ( columnsHeaderTree == null ) { Node root = new Node ( ) ; insertChildren ( root , getFields ( PivotField . Area . COLUMN ) ) ; columnsHeaderTree = new Tree ( root ) ; } return columnsHeaderTree ;
public class SimpleQueryExecutor { /** * Execute the query . */ public synchronized QueryResult execute ( ) throws QueryException , InterruptedException { } }
// create query string String queryString = query . getText ( ) ; System . out . println ( "queryString = " + queryString ) ; // count statement String countQueryString = "SELECT COUNT(*) FROM (" + queryString + ")" ; // set query ' s input wrapper synchronized ( inputWrapper ) { try { inputWrapper . statement = conn ....
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcConnectionCurveGeometry ( ) { } }
if ( ifcConnectionCurveGeometryEClass == null ) { ifcConnectionCurveGeometryEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 101 ) ; } return ifcConnectionCurveGeometryEClass ;
public class UnitConverter { /** * 转换毫秒为带时间单位的字符串 , 单位最大到day级别 , 四舍五入 * @ param scale 小数后的精度 */ public static String toTimeUnit ( long millis , int scale ) { } }
if ( millis < MILLIS_PER_SECOND ) { return String . format ( "%4dms" , millis ) ; } if ( millis < MILLIS_PER_MINUTE ) { return String . format ( "%" + ( scale == 0 ? 2 : 3 + scale ) + '.' + scale + "fs" , millis * 1d / MILLIS_PER_SECOND ) ; } if ( millis < MILLIS_PER_HOUR ) { return String . format ( "%" + ( scale == 0...
public class Ftp { /** * 初始化连接 * @ param host 域名或IP * @ param port 端口 * @ param user 用户名 * @ param password 密码 * @ param mode 模式 * @ return this */ public Ftp init ( String host , int port , String user , String password , FtpMode mode ) { } }
final FTPClient client = new FTPClient ( ) ; client . setControlEncoding ( this . charset . toString ( ) ) ; try { // 连接ftp服务器 client . connect ( host , port ) ; // 登录ftp服务器 client . login ( user , password ) ; } catch ( IOException e ) { throw new FtpException ( e ) ; } final int replyCode = client . getReplyCode ( ) ...
public class MolecularFormulaManipulator { /** * Returns the number of double bond equivalents in this molecule . * @ param formula The IMolecularFormula to calculate * @ return The number of DBEs * @ throws CDKException if DBE cannot be be evaluated * @ cdk . keyword DBE * @ cdk . keyword double bond equival...
int valencies [ ] = new int [ 5 ] ; IAtomContainer ac = getAtomContainer ( formula ) ; AtomTypeFactory factory = AtomTypeFactory . getInstance ( "org/openscience/cdk/config/data/structgen_atomtypes.xml" , ac . getBuilder ( ) ) ; for ( int f = 0 ; f < ac . getAtomCount ( ) ; f ++ ) { IAtomType [ ] types = factory . getA...
public class BitFileFilter { /** * Check the record locally . */ public boolean doLocalCriteria ( StringBuffer strbFilter , boolean bIncludeFileName , Vector < BaseField > vParamList ) { } }
Integer objTargetValue = ( Integer ) m_fldToCompare . getData ( ) ; if ( m_fldRecordTarget == null ) m_fldRecordTarget = this . getOwner ( ) . getField ( m_fsRecordTarget ) ; Integer objRecordValue = ( Integer ) m_fldRecordTarget . getData ( ) ; int iTargetValue = 0 ; if ( objTargetValue != null ) iTargetValue = objTar...
public class GlobalSyncRedis { /** * Get cache from memory . * @ param name * @ return */ public static Cache getSyncCache ( String name ) { } }
if ( StrKit . isBlank ( name ) || ! GlobalSyncRedis . caches . containsKey ( name ) ) { return Redis . use ( ) ; } return GlobalSyncRedis . caches . get ( name ) ;
public class CompilerDef { /** * Sets compiler type . * < table width = " 100 % " border = " 1 " > * < thead > Supported compilers < / thead > * < tr > * < td > gcc ( default ) < / td > * < td > GCC C + + compiler < / td > * < / tr > * < tr > * < td > g + + < / td > * < td > GCC C + + compiler < / td ...
if ( isReference ( ) ) { throw tooManyAttributes ( ) ; } final Compiler compiler = name . getCompiler ( ) ; setProcessor ( compiler ) ;
public class AutoTask { /** * Constructor . * @ param application The parent application . * @ param strParams The task properties . */ public void init ( App application , String strParams , Map < String , Object > properties ) { } }
m_application = ( App ) application ; if ( m_application != null ) m_application . addTask ( this , null ) ; // Add this task to the list if ( properties != null ) { if ( m_properties != null ) m_properties . putAll ( properties ) ; else m_properties = properties ; } if ( strParams != null ) { if ( m_properties == null...
public class MultipartContent { /** * Configures a field part with the given field name and value . * @ param fieldName the field name * @ param value the value * @ return a reference to this { @ link MultipartContent } instance */ public MultipartContent part ( String fieldName , String value ) { } }
return part ( fieldName , null , ContentTypes . TEXT . getAt ( 0 ) , value ) ;
public class FingerprintGenerator { /** * Generate a fingerprint for a given string * @ param str The string to fingerprint * @ return The fingerprint generated */ public static String fingerprint ( String str ) { } }
try { MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; return byteArrayToHexString ( md . digest ( str . getBytes ( ) ) ) ; } catch ( NoSuchAlgorithmException nsae ) { LOGGER . warning ( "Unable to calculate the fingerprint for string [" + str + "]." ) ; return null ; }
public class GVRVertexBuffer { /** * Retrieves a vertex attribute as a float buffer . * The attribute name must be one of the * attributes named in the descriptor passed to the constructor . * @ param attributeName name of the attribute to update * @ throws IllegalArgumentException if attribute name not in desc...
int size = getAttributeSize ( attributeName ) ; if ( size <= 0 ) { return null ; } size *= 4 * getVertexCount ( ) ; ByteBuffer buffer = ByteBuffer . allocateDirect ( size ) . order ( ByteOrder . nativeOrder ( ) ) ; FloatBuffer data = buffer . asFloatBuffer ( ) ; if ( ! NativeVertexBuffer . getFloatVec ( getNative ( ) ,...
public class Locations { /** * Set of { @ link Location locations } where the class file of the supplied class can be found . < br > * Note that this is really a set , since the same ( or in bad cases a different version of the same ) class * might be found within the classpath several times . * @ param clazz A {...
return getLocationsOf ( asResourceName ( clazz . getName ( ) ) + ".class" ) ;
public class AbcGrammar { /** * userdef : : = userdef - symbol * WSP " = " * WSP ( long - gracing / chord - or - text ) */ Rule Userdef ( ) { } }
return Sequence ( UserdefSymbol ( ) , ZeroOrMoreS ( WSP ( ) ) . suppressNode ( ) , String ( "=" ) , ZeroOrMoreS ( WSP ( ) ) . suppressNode ( ) , FirstOfS ( // SequenceS ( String ( " ! " ) , LongGracing ( ) , String ( " ! " ) ) , Gracing ( ) , ChordOrText ( ) ) ) . label ( Userdef ) ;
public class LeastRecentlyUsedCache { /** * Fetches an object from the cache . Synchronization at cache level is kept to minimum . The provider is called upon cache miss . * @ param key the identity of the object * @ param callable a callable to provide the object upon cache miss * @ return the object requested ...
return locate ( key ) . get ( callable ) ;
public class SessionCookieManager { /** * / * package */ List < Cookie > getCookies ( String domain ) { } }
cookieManager . removeExpiredCookie ( ) ; String cookies = cookieManager . getCookie ( domain ) ; List < Cookie > result = new LinkedList < Cookie > ( ) ; if ( cookies == null ) { return result ; } for ( String cookie : cookies . split ( COOKIE_SEPARATOR ) ) { String [ ] cookieValues = cookie . split ( "=" , 2 ) ; if (...
public class EventBuilder { /** * Sets the culprit in the event based on a { @ link StackTraceElement } . * @ param frame stack frame during which the event was captured . * @ return the current { @ code EventBuilder } for chained calls . * @ deprecated Culprit has been removed in favor of Transaction . */ @ Depr...
return withCulprit ( buildCulpritString ( frame . getClassName ( ) , frame . getMethodName ( ) , frame . getFileName ( ) , frame . getLineNumber ( ) ) ) ;
public class RTreeIndexExtension { /** * { @ inheritDoc } */ @ Override public void createIsEmptyFunction ( ) { } }
createFunction ( IS_EMPTY_FUNCTION , new GeometryFunction ( ) { @ Override public Object execute ( GeoPackageGeometryData data ) { return data == null || data . isEmpty ( ) || data . getGeometry ( ) == null ; } } ) ;
public class JmxTransformer { /** * Handy method which runs the JmxProcess */ public void executeStandalone ( JmxProcess process ) throws Exception { } }
this . masterServersList = process . getServers ( ) ; this . serverScheduler . start ( ) ; this . processServersIntoJobs ( ) ; // Sleep for 10 seconds to wait for jobs to complete . // There should be a better way , but it seems that way isn ' t working // right now . Thread . sleep ( MILLISECONDS . convert ( 10 , SECO...
public class GlobalTypeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setType ( String newType ) { } }
String oldType = type ; type = newType ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , DroolsPackage . GLOBAL_TYPE__TYPE , oldType , type ) ) ;
public class CreatorUtils { /** * Returns the first occurence of the annotation found on the types * @ param annotation the annotation * @ param hasAnnotationsList the types * @ return the first occurence of the annotation found on the types * @ param < T > a T object . */ public static < T extends Annotation >...
for ( HasAnnotations accessor : hasAnnotationsList ) { if ( accessor . isAnnotationPresent ( annotation ) ) { return Optional . of ( accessor . getAnnotation ( annotation ) ) ; } } return Optional . absent ( ) ;
public class ClusKernel { /** * Make this cluster older bei weighting it and add to this cluster the * given cluster . If we want to add somethin to the cluster , but don ' t * want to weight it , we should use the function < code > add ( Cluster ) < / code > . * @ param other The other cluster to be added to thi...
makeOlder ( timeDifference , negLambda ) ; add ( other ) ;
public class EthiopianCalendar { /** * / * [ deutsch ] * < p > Erzeugt ein neues & auml ; thiopisches Kalenderdatum . < / p > * @ param era Ethiopian era * @ param yearOfEra Ethiopian year of era in the range 1-9999 ( 1-15499 if amete alem ) * @ param month Ethiopian month * @ param dayOfMonth Ethiopian day o...
return EthiopianCalendar . of ( era , yearOfEra , month . getValue ( ) , dayOfMonth ) ;
public class AbstractCache { /** * Enable caching to the phone ' s internal storage or SD card . * @ param context * the current context * @ param storageDevice * where to store the cached files , either { @ link # DISK _ CACHE _ INTERNAL } or * { @ link # DISK _ CACHE _ SDCARD } ) * @ return */ public bool...
Context appContext = context . getApplicationContext ( ) ; String rootDir = null ; if ( storageDevice == DISK_CACHE_SDCARD && Environment . MEDIA_MOUNTED . equals ( Environment . getExternalStorageState ( ) ) ) { // SD - card available rootDir = Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) + "/An...
public class CmsWindowExtension { /** * Tries to open a new browser window . < p > * If openning the window fails , the given callback is called . < p > * @ param location the URL to open in the new window * @ param target the target window name * @ param onFailure the callback to call if opening the window fai...
String id = RandomStringUtils . randomAlphanumeric ( 16 ) ; m_callbackMap . put ( id , new FutureCallback < Boolean > ( ) { public void onFailure ( Throwable t ) { } public void onSuccess ( Boolean result ) { if ( ! result . booleanValue ( ) ) { onFailure . run ( ) ; } } } ) ; getRpcProxy ( I_CmsWindowClientRpc . class...
public class LogLog { /** * This method is used to output log4j internal debug * statements . Output goes to < code > System . out < / code > . */ public static void debug ( String msg ) { } }
if ( debugEnabled && ! quietMode ) { System . out . println ( PREFIX + msg ) ; }
public class ModelRegistry { /** * Adds the type [ ] - & t ; model relationship to the registry . * @ param types must not be < code > null < / code > . * @ param source must not be < code > null < / code > . */ public void add ( String [ ] types , OsgiModelSource < ? > source ) { } }
for ( String resourceType : types ) { this . typeNameToModelSourcesMap . put ( resourceType , source ) ; } clearLookupCaches ( ) ;
public class JobTracker { /** * lock " is under JobTracker lock to avoid deadlocks . */ synchronized public Collection < TaskTrackerStatus > blacklistedTaskTrackers ( ) { } }
Collection < TaskTrackerStatus > blacklistedTrackers = new ArrayList < TaskTrackerStatus > ( ) ; synchronized ( taskTrackers ) { for ( TaskTracker tt : taskTrackers . values ( ) ) { TaskTrackerStatus status = tt . getStatus ( ) ; if ( faultyTrackers . isBlacklisted ( status . getHost ( ) ) ) { blacklistedTrackers . add...
public class HtmlTool { /** * Transforms the given HTML content by adding IDs to all heading elements ( { @ code h1-6 } ) that * do not have one . * IDs on heading elements are used to indicate positions within a HTML page in HTML5 . If a * heading tag without an { @ code id } is found , its " slug " is generated...
Element body = parseContent ( content ) ; // first find all existing IDs ( to avoid generating duplicates ) List < Element > idElems = body . select ( "*[id]" ) ; Set < String > ids = new HashSet < String > ( ) ; boolean modified = false ; for ( Element idElem : idElems ) { // fix all existing IDs - remove colon and ot...
public class RebalanceUtils { /** * An interim cluster ought to be a super set of current cluster . I . e . , it * ought to either be the same as current cluster ( every partition is mapped * to the same node of current & interim ) , or it ought to have more nodes * ( possibly in new zones ) without partitions . ...
validateClusterPartitionCounts ( currentCluster , interimCluster ) ; validateClusterNodeState ( currentCluster , interimCluster ) ; validateClusterPartitionState ( currentCluster , interimCluster ) ; return ;
public class HashCalculator { /** * / * - - - Private static methods - - - */ private HashCalculationResult hashBuckets ( byte [ ] fileWithoutSpaces , double bucketSize ) throws IOException { } }
// int ( bucket _ size ) will round down the bucket _ size : IE : 1.2 - > 1.0 int bucketIntSize = ( int ) bucketSize ; // Get bytes and calculate sha1 byte [ ] mostSigBytes = Arrays . copyOfRange ( fileWithoutSpaces , 0 , bucketIntSize ) ; int length = fileWithoutSpaces . length ; byte [ ] leastSigBytes = Arrays . copy...