signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DebugUtil { /** * Prints javadoc - like , the top wrapped class fields and methods of a { @ code java . lang . Object } to { @ code System . out } . * @ param pObject the { @ code java . lang . Object } to be analysed . * @ param pObjectName the name of the object instance , for identification purposes...
printClassDetails ( pObject , pObjectName , System . out ) ;
public class Locks { /** * Returns a new lock implementation depending on the platform support . */ public static OptimisticLock newOptimistic ( ) { } }
if ( optimisticLockImplementation == null ) { initializeOptimisticLock ( ) ; } try { return optimisticLockImplementation . newInstance ( ) ; } catch ( Exception ex ) { throw new Error ( ex ) ; }
public class DefaultGroovyMethods { /** * Returns the longest prefix of this array where each element * passed to the given closure evaluates to true . * < pre class = " groovyTestCase " > * def nums = [ 1 , 3 , 2 ] as Integer [ ] * assert nums . takeWhile { it { @ code < } 1 } = = [ ] as Integer [ ] * assert...
int num = 0 ; BooleanClosureWrapper bcw = new BooleanClosureWrapper ( condition ) ; while ( num < self . length ) { T value = self [ num ] ; if ( bcw . call ( value ) ) { num += 1 ; } else { break ; } } return take ( self , num ) ;
public class AdminCreateUserRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AdminCreateUserRequest adminCreateUserRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( adminCreateUserRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( adminCreateUserRequest . getUserPoolId ( ) , USERPOOLID_BINDING ) ; protocolMarshaller . marshall ( adminCreateUserRequest . getUsername ( ) , USERNAME_BINDING ) ...
public class PageParams { /** * 获取分页参数 * @ param parameterObject * @ param rowBounds * @ return */ public Page getPage ( Object parameterObject , RowBounds rowBounds ) { } }
Page page = PageHelper . getLocalPage ( ) ; if ( page == null ) { if ( rowBounds != RowBounds . DEFAULT ) { if ( offsetAsPageNum ) { page = new Page ( rowBounds . getOffset ( ) , rowBounds . getLimit ( ) , rowBoundsWithCount ) ; } else { page = new Page ( new int [ ] { rowBounds . getOffset ( ) , rowBounds . getLimit (...
public class BigMoney { /** * Obtains an instance of { @ code BigMoney } from a { @ code double } using a well - defined conversion . * This allows you to create an instance with a specific currency and amount . * The amount is converted via { @ link BigDecimal # valueOf ( double ) } which yields * the most expec...
MoneyUtils . checkNotNull ( currency , "Currency must not be null" ) ; return BigMoney . of ( currency , BigDecimal . valueOf ( amount ) . stripTrailingZeros ( ) ) ;
public class Model { /** * Loads a reference to the SharedPreferences for a given . . . * namespace . * @ param namespace The namespace to be used . * @ return The sharedPreferences object . * @ throws com . mauriciogiordano . easydb . exception . NoContextFoundException in case of null context . */ protected S...
if ( context == null ) { throw new NoContextFoundException ( ) ; } return context . getSharedPreferences ( clazz . getPackage ( ) . getName ( ) + "." + clazz . getName ( ) + "." + namespace , Context . MODE_PRIVATE ) ;
public class ESFilterBuilder { /** * Gets the filter . * @ param clause * the clause * @ param metadata * the metadata * @ param entityType * the entity type * @ return the filter */ private QueryBuilder getFilter ( FilterClause clause , final EntityMetadata metadata ) { } }
String condition = clause . getCondition ( ) ; Object value = condition . equals ( Expression . IN ) ? clause . getValue ( ) : clause . getValue ( ) . get ( 0 ) ; String name = ( ( AbstractAttribute ) ( ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( metadata . getPersistenceUnit ( ) ) )...
public class ConfigurationHelper { /** * Creates a list of configuration infos from the single location and if they are * optional . * @ param < T > the type of location . Only { @ code String } and { @ code URL } are * supported . */ public static < T > List < ConfigurationInfo < T > > newList ( boolean isOption...
if ( location == null ) { throw new IllegalArgumentException ( "location cannot be null" ) ; } return newList ( Collections . < T > singletonList ( location ) , isOptional ) ;
public class OIdentifiableIterator { /** * Tell to the iterator to use the same record for browsing . The record will be reset before every use . This improve the * performance and reduce memory utilization since it does not create a new one for each operation , but pay attention to copy the * data of the record on...
reusedRecord = ( ORecordInternal < ? > ) ( reuseSameRecord ? database . newInstance ( ) : null ) ; return this ;
public class StagePathUtils { /** * 返回对应的remedy root path */ public static String getRemedyRoot ( Long pipelineId ) { } }
// 根据channelId , pipelineId构造path return MessageFormat . format ( ArbitrateConstants . NODE_REMEDY_ROOT , getChannelId ( pipelineId ) , String . valueOf ( pipelineId ) ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcCommunicationsAppliance ( ) { } }
if ( ifcCommunicationsApplianceEClass == null ) { ifcCommunicationsApplianceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 107 ) ; } return ifcCommunicationsApplianceEClass ;
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns the first cp definition option value rel in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally...
List < CPDefinitionOptionValueRel > list = findByUuid_C ( uuid , companyId , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class Activator { /** * Track resources . * @ param bundleContext the BundleContext associated with this bundle */ private void trackResources ( final BundleContext bundleContext ) { } }
ServiceTracker < Object , ResourceWebElement > resourceTracker = ResourceTracker . createTracker ( extenderContext , bundleContext ) ; resourceTracker . open ( ) ; trackers . add ( 0 , resourceTracker ) ; final ServiceTracker < ResourceMapping , ResourceMappingWebElement > resourceMappingTracker = ResourceMappingTracke...
public class ResultExporter { /** * because there was no support for row span */ protected Set < CellElement > getIgnoredCellElementsForColSpan ( Band band ) { } }
Set < CellElement > result = new HashSet < CellElement > ( ) ; int rows = band . getRowCount ( ) ; int cols = band . getColumnCount ( ) ; for ( int i = 0 ; i < rows ; i ++ ) { for ( int j = 0 ; j < cols ; j ++ ) { BandElement element = band . getElementAt ( i , j ) ; if ( element == null ) { continue ; } // int rowSpan...
public class PoissonDistribution { /** * Computes the cumulative probability function and checks for { @ code NaN } * values returned . Throws { @ code MathInternalError } if the value is * { @ code NaN } . Rethrows any exception encountered evaluating the cumulative * probability function . Throws { @ code MathI...
double result = cumulativeProbability ( mean , argument ) ; if ( Double . isNaN ( result ) ) { throw new AssertionError ( "Discrete cumulative probability function returned NaN " + "for argument " + argument ) ; } return result ;
public class ConnectionMap { /** * Returns whether there is a connection between a and b . Unknown objects do * never have a connection . * @ param paramOrigin * origin object * @ param paramDestination * destination object * @ return true , iff there is a connection from a to b */ public boolean get ( fina...
assert paramOrigin != null ; assert paramDestination != null ; if ( ! mMap . containsKey ( paramOrigin ) ) { return false ; } final Boolean bool = mMap . get ( paramOrigin ) . get ( paramDestination ) ; return bool != null && bool ;
public class MethodWriterImpl { /** * { @ inheritDoc } */ protected static void addOverridden ( HtmlDocletWriter writer , TypeMirror overriddenType , ExecutableElement method , Content dl ) { } }
if ( writer . configuration . nocomment ) { return ; } Utils utils = writer . utils ; Contents contents = writer . contents ; TypeElement holder = utils . getEnclosingTypeElement ( method ) ; if ( ! ( utils . isPublic ( holder ) || utils . isLinkable ( holder ) ) ) { // This is an implementation detail that should not ...
public class OsUtil { /** * @ param src * @ param dest * @ return void * @ Description : 具有重试机制的 ATOM 转移文件 , 并且会校验文件是否一致 才替换 * @ author liaoqiqi * @ date 2013-6-20 */ public static void transferFileAtom ( File src , File dest , boolean isDeleteSource ) throws Exception { } }
// 文件锁所在文件 File lockFile = new File ( dest + ".lock" ) ; FileOutputStream outStream = null ; FileLock lock = null ; try { outStream = new FileOutputStream ( lockFile ) ; FileChannel channel = outStream . getChannel ( ) ; try { int tryTime = 0 ; while ( tryTime < 3 ) { lock = channel . tryLock ( ) ; if ( lock != null ) ...
public class JKDefaultTableModel { /** * Replaces the current < code > dataVector < / code > instance variable with the new * < code > Vector < / code > of rows , < code > dataVector < / code > . Each row is represented * in < code > dataVector < / code > as a < code > Vector < / code > of < code > Object < / code ...
this . dataVector = nonNullVector ( dataVector ) ; this . columnIdentifiers = nonNullVector ( columnIdentifiers ) ; justifyRows ( 0 , getRowCount ( ) ) ; fireTableStructureChanged ( ) ;
public class ComponentsInner { /** * Updates an existing component ' s tags . To update other fields use the CreateOrUpdate method . * @ param resourceGroupName The name of the resource group . * @ param resourceName The name of the Application Insights component resource . * @ param tags Resource tags * @ thro...
return updateTagsWithServiceResponseAsync ( resourceGroupName , resourceName , tags ) . map ( new Func1 < ServiceResponse < ApplicationInsightsComponentInner > , ApplicationInsightsComponentInner > ( ) { @ Override public ApplicationInsightsComponentInner call ( ServiceResponse < ApplicationInsightsComponentInner > res...
public class LoadableExtensionLoader { /** * Some environments need to handle their own ExtensionLoading and can ' t rely on Java ' s META - INF / services approach . * @ return configured ExtensionLoader if found or defaults to JavaSPIServiceLoader */ private ExtensionLoader locateExtensionLoader ( ) { } }
Collection < ExtensionLoader > loaders = Collections . emptyList ( ) ; if ( SecurityActions . getThreadContextClassLoader ( ) != null ) { loaders = serviceLoader . all ( SecurityActions . getThreadContextClassLoader ( ) , ExtensionLoader . class ) ; } if ( loaders . size ( ) == 0 ) { loaders = serviceLoader . all ( Loa...
public class FessMessages { /** * Add the created action message for the key ' errors . front _ prefix ' with parameters . * < pre > * message : & lt ; div class = " alert alert - warning " & gt ; * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ p...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_front_prefix ) ) ; return this ;
public class ColumnSerializer { /** * For counter columns , we must know when we deserialize them if what we * deserialize comes from a remote host . If it does , then we must clear * the delta . */ public Cell deserialize ( DataInput in , ColumnSerializer . Flag flag ) throws IOException { } }
return deserialize ( in , flag , Integer . MIN_VALUE ) ;
public class DescribeComputeEnvironmentsResult { /** * The list of compute environments . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setComputeEnvironments ( java . util . Collection ) } or { @ link # withComputeEnvironments ( java . util . Collection ) ...
if ( this . computeEnvironments == null ) { setComputeEnvironments ( new java . util . ArrayList < ComputeEnvironmentDetail > ( computeEnvironments . length ) ) ; } for ( ComputeEnvironmentDetail ele : computeEnvironments ) { this . computeEnvironments . add ( ele ) ; } return this ;
public class Group { /** * Equivalent to calling { @ code join ( null , onLoseMembership ) } . */ public final Membership join ( @ Nullable final Runnable onLoseMembership ) throws JoinException , InterruptedException { } }
return join ( NO_MEMBER_DATA , onLoseMembership ) ;
public class GetAllRoles { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to other errors . */ public static v...
// Get the UserService . UserServiceInterface userService = adManagerServices . get ( session , UserServiceInterface . class ) ; // Get all roles . Role [ ] roles = userService . getAllRoles ( ) ; int i = 0 ; for ( Role role : roles ) { System . out . printf ( "%d) Role with ID %d and name '%s' was found.%n" , i ++ , r...
public class StandardExpressions { /** * Obtain the conversion service ( implementation of { @ link IStandardConversionService } ) registered by * the Standard Dialect that is being currently used . * @ param configuration the configuration object for the current template execution environment . * @ return the co...
final Object conversionService = configuration . getExecutionAttributes ( ) . get ( STANDARD_CONVERSION_SERVICE_ATTRIBUTE_NAME ) ; if ( conversionService == null || ( ! ( conversionService instanceof IStandardConversionService ) ) ) { throw new TemplateProcessingException ( "No Standard Conversion Service has been regi...
public class AmazonEC2Client { /** * Deletes a VPC peering connection . Either the owner of the requester VPC or the owner of the accepter VPC can * delete the VPC peering connection if it ' s in the < code > active < / code > state . The owner of the requester VPC can * delete a VPC peering connection in the < cod...
request = beforeClientExecution ( request ) ; return executeDeleteVpcPeeringConnection ( request ) ;
public class ReflectionInvoker { /** * { @ inheritDoc } */ @ Override public void invoke ( final Saga saga , final Object message ) throws InvocationTargetException , IllegalAccessException { } }
if ( saga instanceof DescribesHandlers ) { ( ( DescribesHandlers ) saga ) . describeHandlers ( ) . handler ( ) . accept ( message ) ; } else { invokeUsingReflection ( saga , message ) ; }
public class BalanceBooks { /** * Validates the current state of the data stored at the end of the test . Each update by a client consists of two * parts : a withdrawal of a random amount from a randomly select other account , and a corresponding to deposit to * the client ' s own account . So , if all the updates ...
boolean success = false ; try { TransactionAwareHTable table = new TransactionAwareHTable ( conn . getTable ( TABLE ) ) ; TransactionContext context = new TransactionContext ( txClient , table ) ; LOG . info ( "VERIFYING BALANCES" ) ; context . start ( ) ; long totalBalance = 0 ; ResultScanner scanner = table . getScan...
public class Functions { /** * Runs create CData section function with arguments . * @ return */ public static String createCDataSection ( String content , TestContext context ) { } }
return new CreateCDataSectionFunction ( ) . execute ( Collections . singletonList ( content ) , context ) ;
public class SsmlBreak { /** * Attributes to set on the generated XML element * @ return A Map of attribute keys to values */ protected Map < String , String > getElementAttributes ( ) { } }
// Preserve order of attributes Map < String , String > attrs = new HashMap < > ( ) ; if ( this . getStrength ( ) != null ) { attrs . put ( "strength" , this . getStrength ( ) . toString ( ) ) ; } if ( this . getTime ( ) != null ) { attrs . put ( "time" , this . getTime ( ) ) ; } return attrs ;
public class Token { /** * Make the token and any ManagedObject it refers to invalid . * Used at shutdown to prevent accidental use of a ManagedObject in the ObjectManager that * instantiated it or any other Object Manager . */ void invalidate ( ) { } }
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "invalidate" ) ; // Prevent any attempt to load the object . objectStore = null ; // If the ManagedObject is already in memory access it , otherwise there is nothing // we need to do to it . if ( managedObjectReferenc...
public class CPAttachmentFileEntryLocalServiceBaseImpl { /** * Returns all the cp attachment file entries matching the UUID and company . * @ param uuid the UUID of the cp attachment file entries * @ param companyId the primary key of the company * @ return the matching cp attachment file entries , or an empty li...
return cpAttachmentFileEntryPersistence . findByUuid_C ( uuid , companyId ) ;
public class AbstractModelConverter { /** * TODO : download custom licenses content */ private ExtensionLicense getExtensionLicense ( License license ) { } }
if ( license . getName ( ) == null ) { return new ExtensionLicense ( "noname" , null ) ; } return createLicenseByName ( license . getName ( ) ) ;
public class FontResolutionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . FONT_RESOLUTION__MET_TECH : return getMetTech ( ) ; case AfplibPackage . FONT_RESOLUTION__RPU_BASE : return getRPuBase ( ) ; case AfplibPackage . FONT_RESOLUTION__RP_UNITS : return getRPUnits ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class BinarySet { /** * { @ inheritDoc } * @ param e * @ return */ @ Override public E ceiling ( E e ) { } }
int idx = indexOf ( e ) ; if ( idx >= 1 ) { return list . get ( idx ) ; } else { int ip = insertPoint ( idx ) ; if ( ip < list . size ( ) ) { return list . get ( ip ) ; } else { return null ; } }
import java . util . * ; class Main { /** * Function to eliminate the nested tuple from a given list . * Examples : * > > > eliminate _ nested ( Arrays . asList ( 1 , 5 , 7 , Arrays . asList ( 4 , 6 ) , 10 ) ) * [ 1 , 5 , 7 , 10] * > > > eliminate _ nested ( Arrays . asList ( 2 , 6 , 8 , Arrays . asList ( 5 , 7...
List result = new ArrayList ( ) ; for ( Object item : inputList ) { if ( item instanceof List ) { continue ; } result . add ( item ) ; } return result ;
public class GVRIndexBuffer { /** * Updates the indices in the index buffer from a Java int array . * All of the entries of the input int array are copied into * the storage for the index buffer . The new indices must be the * same size as the old indices - the index buffer size cannot be changed . * @ param da...
if ( data == null ) { throw new IllegalArgumentException ( "Input data for indices cannot be null" ) ; } if ( getIndexSize ( ) != 4 ) { throw new UnsupportedOperationException ( "Cannot update short indices with int array" ) ; } if ( ! NativeIndexBuffer . setIntArray ( getNative ( ) , data ) ) { throw new UnsupportedOp...
public class FontDialogSwing { /** * Create and display FontDialogSwing Dialog . */ public static void creatFontDialog ( DatabaseManagerSwing owner ) { } }
if ( isRunning ) { frame . setVisible ( true ) ; } else { CommonSwing . setSwingLAF ( frame , CommonSwing . Native ) ; fOwner = owner ; frame . setIconImage ( CommonSwing . getIcon ( "Frame" ) ) ; isRunning = true ; frame . setSize ( 600 , 100 ) ; CommonSwing . setFramePositon ( frame ) ; ckbitalic = new JCheckBox ( ne...
public class ClientBuilder { /** * Sets the * < a href = " https : / / console . bluemix . net / docs / services / Cloudant / guides / iam . html # ibm - cloud - identity - and - access - management " * target = " _ blank " > IAM < / a > API key for the client connection . Also allows a client ID and secret * to ...
this . iamApiKey = iamApiKey ; this . iamServerClientId = iamServerClientId ; this . iamServerClientSecret = iamServerClientSecret ; return this ;
public class AbstractWComponent { /** * Retrieves a short - lived map which can be used to cache data during request processing . This map will be * guaranteed to be cleared at the end of processing a request , but may also be cleared during request processing . * Do not rely on the contents of this map to exist at...
UIContext uic = UIContextHolder . getCurrent ( ) ; return uic == null ? null : uic . getScratchMap ( this ) ;
public class ResourceRelocationContext { /** * Loads and watches the respective resource and applies the relocation change . * Clients may usually rather call { @ link # addModification } to register their * side - effects . * @ param change the change to execute */ protected Resource loadAndWatchResource ( final...
try { Resource _switchResult = null ; final ResourceRelocationContext . ChangeType changeType = this . changeType ; if ( changeType != null ) { switch ( changeType ) { case MOVE : case RENAME : Resource _xblockexpression = null ; { final Resource original = this . resourceSet . getResource ( change . getFromURI ( ) , t...
public class XLog { /** * Log a message and a throwable with level { @ link LogLevel # ERROR } . * @ param msg the message to log * @ param tr the throwable to be log */ public static void e ( String msg , Throwable tr ) { } }
assertInitialization ( ) ; sLogger . e ( msg , tr ) ;
public class RunbookDraftsInner { /** * Replaces the runbook draft content . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param runbookName The runbook name . * @ param runbookContent The runbook draft content . * @ thro...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( automat...
public class InvocationManager { /** * Constructs a list of all bootstrap services registered in any of the supplied groups . */ public List < InvocationMarshaller < ? > > getBootstrapServices ( String [ ] bootGroups ) { } }
List < InvocationMarshaller < ? > > services = Lists . newArrayList ( ) ; for ( String group : bootGroups ) { services . addAll ( _bootlists . get ( group ) ) ; } return services ;
public class JMElasticsearchBulk { /** * Build update bulk request builder bulk request builder . * @ param updateRequestBuilderList the update request builder list * @ return the bulk request builder */ public BulkRequestBuilder buildUpdateBulkRequestBuilder ( List < UpdateRequestBuilder > updateRequestBuilderList...
BulkRequestBuilder bulkRequestBuilder = jmESClient . prepareBulk ( ) ; for ( UpdateRequestBuilder updateRequestBuilder : updateRequestBuilderList ) bulkRequestBuilder . add ( updateRequestBuilder ) ; return bulkRequestBuilder ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getFinishingFidelity ( ) { } }
if ( finishingFidelityEClass == null ) { finishingFidelityEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 507 ) ; } return finishingFidelityEClass ;
public class RecurlyClient { /** * Get Account Balance * Retrieves the remaining balance on the account * @ param accountCode recurly account id * @ return the updated AccountBalance if success , null otherwise */ public AccountBalance getAccountBalance ( final String accountCode ) { } }
return doGET ( Account . ACCOUNT_RESOURCE + "/" + accountCode + AccountBalance . ACCOUNT_BALANCE_RESOURCE , AccountBalance . class ) ;
public class BaseDependencyCheckMojo { /** * Checks if the current artifact is actually in the reactor projects . If * true a virtual dependency is created based on the evidence in the * project . * @ param engine a reference to the engine being used to scan * @ param artifact the artifact being analyzed in the...
getLog ( ) . debug ( String . format ( "Checking the reactor projects (%d) for %s:%s:%s" , reactorProjects . size ( ) , artifact . getGroupId ( ) , artifact . getArtifactId ( ) , artifact . getVersion ( ) ) ) ; for ( MavenProject prj : reactorProjects ) { getLog ( ) . debug ( String . format ( "Comparing %s:%s:%s to %s...
public class UsersBase { /** * Returns the user records for all users in the specified workspace or * organization . * @ param workspace The workspace in which to get users . * @ return Request object */ public CollectionRequest < User > findByWorkspace ( String workspace ) { } }
String path = String . format ( "/workspaces/%s/users" , workspace ) ; return new CollectionRequest < User > ( this , User . class , path , "GET" ) ;
public class WebApp { /** * Specific ) */ public void initialize ( WebAppConfiguration config , DeployedModule moduleConfig , // BEGIN : List extensionFactories ) throws ServletException , Throwable { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . entering ( CLASS_NAME , "Initialize WebApp -> [ " + this + " ]" ) ; this . loader = moduleConfig . getClassLoader ( ) ; // NEVER INVOKED BY // WEBSPHERE APPLICATION // SERVER ( Common Component // Sp...
public class WindowsRegistry { /** * Read value ( s ) and value name ( s ) form given key * @ param hk the HKEY * @ param key the key * @ param charsetName which charset to use * @ return the value name ( s ) plus the value ( s ) * @ throws RegistryException when something is not right */ public Map < String ...
try { return ReflectedMethods . readStringValues ( hk . root ( ) , hk . hex ( ) , key , charsetName ) ; } catch ( Exception e ) { throw new RegistryException ( "Cannot read values from key " + key , e ) ; }
public class AbstractArchivingMojo { /** * Hack to close input streams ( cleanUp ( ) method is protected ) */ protected void cleanUpArchiver ( AbstractArchiver archiver ) { } }
try { Method cleanUpMethod = AbstractArchiver . class . getDeclaredMethod ( "cleanUp" ) ; cleanUpMethod . setAccessible ( true ) ; cleanUpMethod . invoke ( archiver ) ; } catch ( Exception e ) { getLog ( ) . warn ( "\"" + e . getMessage ( ) + "\" exception while invoking AbstractArchiver.cleanUp() using reflection. Ign...
public class LongsSketch { /** * Returns a sketch instance of this class from the given String , * which must be a String representation of this sketch class . * @ param string a String representation of a sketch of this class . * @ return a sketch instance of this class . */ public static LongsSketch getInstance...
final String [ ] tokens = string . split ( "," ) ; if ( tokens . length < ( STR_PREAMBLE_TOKENS + 2 ) ) { throw new SketchesArgumentException ( "String not long enough: " + tokens . length ) ; } final int serVer = Integer . parseInt ( tokens [ 0 ] ) ; final int famID = Integer . parseInt ( tokens [ 1 ] ) ; final int lg...
public class ItemsSketch { /** * Updates this sketch with the given double data item * @ param dataItem an item from a stream of items . NaNs are ignored . */ public void update ( final T dataItem ) { } }
// this method only uses the base buffer part of the combined buffer if ( dataItem == null ) { return ; } if ( ( maxValue_ == null ) || ( comparator_ . compare ( dataItem , maxValue_ ) > 0 ) ) { maxValue_ = dataItem ; } if ( ( minValue_ == null ) || ( comparator_ . compare ( dataItem , minValue_ ) < 0 ) ) { minValue_ =...
public class TouchActionBuilder { /** * Pause for a given period of time ( in milliseconds ) . * If used in a MultiTouchAction all actions will pause for the longest pause in a given tick . * @ param ms Pause Time ( in ms ) * @ return this */ public TouchActionBuilder pause ( int ms ) { } }
Map < String , Object > params = Maps . newHashMap ( ) ; params . put ( "ms" , ms ) ; addAction ( TouchActionName . PAUSE , params ) ; return this ;
public class FeatureTypeStyleWrapper { /** * Add a { @ link RuleWrapper } to the list . * @ param addRule the { @ link Rule } to add . */ public void addRule ( RuleWrapper addRule ) { } }
Rule rule = addRule . getRule ( ) ; featureTypeStyle . rules ( ) . add ( rule ) ; rulesWrapperList . add ( addRule ) ;
public class JSONAssert { /** * Asserts that the json string provided does not match the expected string . If it is it throws an * { @ link AssertionError } . * @ param expectedStr Expected JSON string * @ param actualStr String to compare * @ param comparator Comparator * @ throws JSONException JSON parsing ...
assertNotEquals ( "" , expectedStr , actualStr , comparator ) ;
public class MoreValidate { /** * 校验为正数则返回该数字 , 否则抛出异常 . */ public static double positive ( @ Nullable String role , double x ) { } }
if ( ! ( x > 0 ) ) { // not x < 0 , to work with NaN . throw new IllegalArgumentException ( role + " (" + x + ") must be >= 0" ) ; } return x ;
public class InternalUtils { /** * Set the current { @ link ActionResolver } ( or { @ link PageFlowController } ) in the user session . * @ param resolver the { @ link ActionResolver } to set as the current one in the user session . * @ deprecated Will be removed in the next version . */ public static void setCurre...
StorageHandler sh = Handlers . get ( servletContext ) . getStorageHandler ( ) ; HttpServletRequest unwrappedRequest = PageFlowUtils . unwrapMultipart ( request ) ; RequestContext rc = new RequestContext ( unwrappedRequest , null ) ; String currentJpfAttrName = ScopedServletUtils . getScopedSessionAttrName ( CURRENT_JPF...
public class ReportingApi { /** * Get statistics * Get the statistics for the specified subscription IDs . * @ param ids The IDs of the subscriptions . ( required ) * @ return ApiResponse & lt ; InlineResponse2001 & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserializ...
com . squareup . okhttp . Call call = peekMultipleValidateBeforeCall ( ids , null , null ) ; Type localVarReturnType = new TypeToken < InlineResponse2001 > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class EnumMap { /** * Reconstitute the < tt > EnumMap < / tt > instance from a stream ( i . e . , * deserialize it ) . */ @ SuppressWarnings ( "unchecked" ) private void readObject ( java . io . ObjectInputStream s ) throws java . io . IOException , ClassNotFoundException { } }
// Read in the key type and any hidden stuff s . defaultReadObject ( ) ; keyUniverse = getKeyUniverse ( keyType ) ; vals = new Object [ keyUniverse . length ] ; // Read in size ( number of Mappings ) int size = s . readInt ( ) ; // Read the keys and values , and put the mappings in the HashMap for ( int i = 0 ; i < siz...
public class StrSubstitutor { /** * Internal method that resolves the value of a variable . * Most users of this class do not need to call this method . This method is * called automatically by the substitution process . * Writers of subclasses can override this method if they need to alter * how each substitut...
final StrLookup < ? > resolver = getVariableResolver ( ) ; if ( resolver == null ) { return null ; } return resolver . lookup ( variableName ) ;
public class Yank { /** * Handles exceptions and logs them * @ param e the SQLException */ private static void handleSQLException ( SQLException e , String poolName , String sql ) { } }
YankSQLException yankSQLException = new YankSQLException ( e , poolName , sql ) ; if ( throwWrappedExceptions ) { throw yankSQLException ; } else { logger . error ( yankSQLException . getMessage ( ) , yankSQLException ) ; }
public class NatsConnectionReader { /** * given to the message object */ void gatherMessageData ( int maxPos ) throws IOException { } }
try { while ( this . bufferPosition < maxPos ) { int possible = maxPos - this . bufferPosition ; int want = msgData . length - msgDataPosition ; // Grab all we can , until we get to the CR / LF if ( want > 0 && want <= possible ) { System . arraycopy ( this . buffer , this . bufferPosition , this . msgData , this . msg...
public class ConsistentColor { /** * Apply correction for color vision deficiencies to an angle in the CbCr plane . * @ see < a href = " https : / / xmpp . org / extensions / xep - 0392 . html # algorithm - cvd " > § 5.2 : Corrections for Color Vision Deficiencies < / a > * @ param angle angle in CbCr plane * @ p...
switch ( deficiency ) { case none : break ; case redGreenBlindness : angle %= Math . PI ; break ; case blueBlindness : angle -= Math . PI / 2 ; angle %= Math . PI ; angle += Math . PI / 2 ; break ; } return angle ;
public class InstanceGroupManagerClient { /** * Resizes the managed instance group . If you increase the size , the group creates new instances * using the current instance template . If you decrease the size , the group deletes instances . The * resize operation is marked DONE when the resize actions are scheduled...
ResizeInstanceGroupManagerHttpRequest request = ResizeInstanceGroupManagerHttpRequest . newBuilder ( ) . setSize ( size ) . setInstanceGroupManager ( instanceGroupManager ) . build ( ) ; return resizeInstanceGroupManager ( request ) ;
public class DefaultCumulatives { /** * Symmetry breaking for VMs that stay running , on the same node . * @ return { @ code true } iff the symmetry breaking does not lead to a problem without solutions */ private boolean symmetryBreakingForStayingVMs ( ReconfigurationProblem rp ) { } }
for ( VM vm : rp . getFutureRunningVMs ( ) ) { VMTransition a = rp . getVMAction ( vm ) ; Slice dSlice = a . getDSlice ( ) ; Slice cSlice = a . getCSlice ( ) ; if ( dSlice != null && cSlice != null ) { BoolVar stay = ( ( KeepRunningVM ) a ) . isStaying ( ) ; Boolean ret = strictlyDecreasingOrUnchanged ( vm ) ; if ( Boo...
public class Job { /** * Invoke this method from within the { @ code run } method of a < b > generator * job < / b > in order to specify a job node in the generated child job graph . * This version of the method is for child jobs that take four arguments . * @ param < T > The return type of the child job being sp...
return futureCallUnchecked ( settings , jobInstance , v1 , v2 , v3 , v4 ) ;
public class Cappuccino { /** * Returns a new { @ code CappuccinoResourceWatcher } , which will be associated internally with the name supplied . * @ param name The name of this { @ link CappuccinoResourceWatcher } . * @ return an { @ link CappuccinoResourceWatcher } . */ @ NonNull public static CappuccinoResourceW...
CappuccinoResourceWatcher watcher = new CappuccinoResourceWatcher ( ) ; mResourceWatcherRegistry . put ( name , watcher ) ; return watcher ;
public class CompatibleTypeUtils { /** * 兼容类型转换 。 * < ul > * < li > String - & gt ; char , enum , Date < / li > * < li > Number - & gt ; Number < / li > * < li > List - & gt ; Array < / li > * < / ul > * @ param value 原始值 * @ param type 目标类型 * @ return 目标值 */ @ SuppressWarnings ( { } }
"unchecked" , "rawtypes" } ) public static Object convert ( Object value , Class < ? > type ) { if ( value == null || type == null || type . isAssignableFrom ( value . getClass ( ) ) ) { return value ; } if ( value instanceof String ) { String string = ( String ) value ; if ( char . class . equals ( type ) || Character...
public class SQLite { /** * Get an { @ link # aliased ( String ) aliased } result column that applies the aggregate function to * the datetime column and converts the result to epoch milliseconds . * @ since 2.4.0 */ public static String millis ( String function , String column ) { } }
return millis ( function , column , aliased ( column ) ) ;
public class OidcUtil { /** * Encodes each parameter in the provided query . Expects the query argument to be the query string of a URL with parameters * in the format : param = value ( & param2 = value2 ) * * @ param query * @ return */ public static String encodeQuery ( String query ) { } }
if ( query == null ) { return null ; } StringBuilder rebuiltQuery = new StringBuilder ( ) ; // Encode parameters to mitigate XSS attacks String [ ] queryParams = query . split ( "&" ) ; for ( String param : queryParams ) { String rebuiltParam = encode ( param ) ; int equalIndex = param . indexOf ( "=" ) ; if ( equalInd...
public class HttpUtils { /** * Do a GET request on the provided URL and construct the Query String part * with the provided list of parameters . If the URL already contains * parameters ( already contains a ' ? ' character ) , then the parameters are * added to the existing parameters . The parameters are convert...
String fullUrl = url ; String paramsStr = URLEncodedUtils . format ( convert ( params ) , "UTF-8" ) ; fullUrl += ( fullUrl . contains ( "?" ) ? "&" : "?" ) + paramsStr ; // spaces are replaced by ' + ' but some servers doesn ' t handle it // correctly // = > convert space to ' % 20' fullUrl = fullUrl . replaceAll ( "\\...
public class TaskDetails { /** * Looks through the hbase result ' s map of task details * and populates fields of { @ link TaskDetails } * @ param taskValues */ public void populate ( Map < byte [ ] , byte [ ] > taskValues ) { } }
this . taskId = ByteUtil . getValueAsString ( JobHistoryKeys . KEYS_TO_BYTES . get ( JobHistoryKeys . TASKID ) , taskValues ) ; this . type = ByteUtil . getValueAsString ( JobHistoryKeys . KEYS_TO_BYTES . get ( JobHistoryKeys . TASK_TYPE ) , taskValues ) ; this . status = ByteUtil . getValueAsString ( JobHistoryKeys . ...
public class KNXnetIPRouter { /** * Sets the default hop count ( TTL ) used in the IP header of encapsulated cEMI * messages . * This value is used to limit the multicast geographically , although this is just a * rough estimation . The hop count value is forwarded to the underlying multicast * socket used for ...
if ( hopCount < 0 || hopCount > 255 ) throw new KNXIllegalArgumentException ( "hop count out of range" ) ; try { ( ( MulticastSocket ) socket ) . setTimeToLive ( hopCount ) ; } catch ( final IOException e ) { logger . error ( "failed to set hop count" , e ) ; }
public class WebUserDataPermission { /** * Returns a canonical String representation of the actions of this WebUserDataPermission . The canonical form of the * actions of a WebUserDataPermission is described by the following syntax description . * < pre > * ExtensionMethod : : = any token as defined by RFC 2616 ...
String actions = null ; if ( httpMethodsString != null ) { actions = httpMethodsString ; } else if ( httpExceptionString != null ) { actions = "!" + httpExceptionString ; } if ( transportType != null ) { actions = ( actions == null ) ? ":" + transportType : actions + ":" + transportType ; } return actions ;
public class SQLBuilder { /** * Only the dirty properties will be set into the result SQL if the specified entity is a dirty marker entity . * @ param entity * @ param excludedPropNames * @ return */ public SQLBuilder set ( final Object entity , final Set < String > excludedPropNames ) { } }
if ( entity instanceof String ) { return set ( N . asArray ( ( String ) entity ) ) ; } else if ( entity instanceof Map ) { if ( N . isNullOrEmpty ( excludedPropNames ) ) { return set ( ( Map < String , Object > ) entity ) ; } else { final Map < String , Object > props = new LinkedHashMap < > ( ( Map < String , Object >...
public class RTPDataChannel { /** * Checks whether the data channel is available for media exchange . * @ return */ public boolean isAvailable ( ) { } }
// The channel is available is is connected boolean available = this . rtpChannel != null && this . rtpChannel . isConnected ( ) ; // In case of WebRTC calls the DTLS handshake must be completed if ( this . isWebRtc ) { available = available && this . webRtcHandler . isHandshakeComplete ( ) ; } return available ;
public class CommittableFileLog { /** * This method appends a line to the file channel */ public void append ( byte [ ] toWrite ) throws BitsyException { } }
ByteBuffer buf = ByteBuffer . wrap ( toWrite ) ; append ( buf ) ;
public class JavaSoundPlayer { /** * On a spooling thread , */ protected void playSound ( SoundKey key ) { } }
if ( ! key . running ) { return ; } key . thread = Thread . currentThread ( ) ; SourceDataLine line = null ; try { // get the sound data from our LRU cache byte [ ] data = getClipData ( key ) ; if ( data == null ) { return ; // borked ! } else if ( key . isExpired ( ) ) { if ( _verbose . getValue ( ) ) { log . info ( "...
public class AbstractExecutableMemberWriter { /** * Add the inherited summary link for the member . * @ param te the type element that we should link to * @ param member the member being linked to * @ param linksTree the content tree to which the link will be added */ @ Override protected void addInheritedSummary...
linksTree . addContent ( writer . getDocLink ( MEMBER , te , member , name ( member ) , false ) ) ;
public class JobEnableOptions { /** * Set the time the request was issued . Client libraries typically set this to the current system clock time ; set it explicitly if you are calling the REST API directly . * @ param ocpDate the ocpDate value to set * @ return the JobEnableOptions object itself . */ public JobEnab...
if ( ocpDate == null ) { this . ocpDate = null ; } else { this . ocpDate = new DateTimeRfc1123 ( ocpDate ) ; } return this ;
public class CRFSegmenter { /** * Inits the . * @ param modelDir the model dir */ public void init ( String modelDir ) { } }
// Read feature template file String templateFile = modelDir + File . separator + "featuretemplate.xml" ; Vector < Element > nodes = BasicContextGenerator . readFeatureNodes ( templateFile ) ; for ( int i = 0 ; i < nodes . size ( ) ; ++ i ) { Element node = nodes . get ( i ) ; String cpType = node . getAttribute ( "val...
public class PackageUseWriter { /** * Add the list of packages that use the given package . * @ param contentTree the content tree to which the package list will be added */ protected void addPackageList ( Content contentTree ) { } }
Content caption = getTableCaption ( configuration . getContent ( "doclet.ClassUse_Packages.that.use.0" , getPackageLink ( packageElement , utils . getPackageName ( packageElement ) ) ) ) ; Content table = ( configuration . isOutputHtml5 ( ) ) ? HtmlTree . TABLE ( HtmlStyle . useSummary , caption ) : HtmlTree . TABLE ( ...
public class LinkedServersInner { /** * Gets the detailed information about a linked server of a redis cache ( requires Premium SKU ) . * @ param resourceGroupName The name of the resource group . * @ param name The name of the redis cache . * @ param linkedServerName The name of the linked server . * @ throws ...
return getWithServiceResponseAsync ( resourceGroupName , name , linkedServerName ) . map ( new Func1 < ServiceResponse < RedisLinkedServerWithPropertiesInner > , RedisLinkedServerWithPropertiesInner > ( ) { @ Override public RedisLinkedServerWithPropertiesInner call ( ServiceResponse < RedisLinkedServerWithPropertiesIn...
public class GuiRenderer { /** * Ends the clipping . * @ param area the area */ public void endClipping ( ClipArea area ) { } }
if ( area . noClip ( ) ) return ; next ( ) ; GL11 . glDisable ( GL11 . GL_SCISSOR_TEST ) ; GL11 . glPopAttrib ( ) ;
public class Flowable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the * other succeeds or fails , emits their success values and optionally delays errors * till both this { @ code Flowable } and all inner { @ code SingleSource } s terminate . * < img width = " 6...
ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new FlowableConcatMapSingle < T , R > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , prefetch ) ) ;
public class SessionStoreInterceptor { /** * Returns an object in session . * @ param session session . * @ param key Key under which object is saved . * @ return Object . * @ deprecated Use { @ link HttpSession # getAttribute ( String ) } instead . */ @ Deprecated public static Object getAttribute ( HttpSessio...
return session . getAttribute ( key ) ;
public class Const { /** * { @ inheritDoc } */ @ Override public < C , D > Const < C , D > biMap ( Function < ? super A , ? extends C > lFn , Function < ? super B , ? extends D > rFn ) { } }
return new Const < > ( lFn . apply ( a ) ) ;
public class JDBCClob { /** * Retrieves the < code > CLOB < / code > value designated by this < code > Clob < / code > * object as a < code > java . io . Reader < / code > object ( or as a stream of * characters ) . * @ return a < code > java . io . Reader < / code > object containing the * < code > CLOB < / co...
final String ldata = data ; checkValid ( ldata ) ; return new StringReader ( ldata ) ;
public class StreamEx { /** * Returns a stream consisting of the elements of this stream for which the * supplied mapper function returns the given value . * This is an < a href = " package - summary . html # StreamOps " > intermediate * operation < / a > . * This method behaves like * { @ code filter ( t - >...
return value == null ? filter ( t -> mapper . apply ( t ) == null ) : filter ( t -> value . equals ( mapper . apply ( t ) ) ) ;
public class DOMHelper { /** * Get the next sibling element . * @ param node The start node . * @ return The next sibling element or { @ code null } . */ public static final Element getNextSiblingElement ( Node node ) { } }
List < Node > siblings = node . getParent ( ) . getChildren ( ) ; Node n = null ; int index = siblings . indexOf ( node ) + 1 ; if ( index > 0 && index < siblings . size ( ) ) { n = siblings . get ( index ) ; while ( ! ( n instanceof Element ) && ++ index < siblings . size ( ) ) { n = siblings . get ( index ) ; } if ( ...
public class route6 { /** * Use this API to fetch all the route6 resources that are configured on netscaler . * This uses route6 _ args which is a way to provide additional arguments while fetching the resources . */ public static route6 [ ] get ( nitro_service service , route6_args args ) throws Exception { } }
route6 obj = new route6 ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; route6 [ ] response = ( route6 [ ] ) obj . get_resources ( service , option ) ; return response ;
public class EFMImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setFMName ( String newFMName ) { } }
String oldFMName = fmName ; fmName = newFMName ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . EFM__FM_NAME , oldFMName , fmName ) ) ;
public class EJBSecurityCollaboratorImpl { /** * If invoked and received cred are null , then set the unauthenticated subject . * @ param invokedSubject * @ param receivedSubject * @ return { @ code true } if the unauthenticated subject was set , { @ code false } otherwise . */ private boolean setUnauthenticatedS...
if ( ( invokedSubject == null ) && ( receivedSubject == null ) ) { // create the unauthenticated subject and set as the invocation subject subjectManager . setInvocationSubject ( unauthenticatedSubjectServiceRef . getService ( ) . getUnauthenticatedSubject ( ) ) ; return true ; } return false ;
public class TransactionLogger { /** * Get string value of flow context for current instance * @ return string value of flow context */ public static String getFlowContext ( ) { } }
TransactionLogger instance = getInstance ( ) ; if ( instance == null ) { return null ; } return instance . flowContext ;
public class ValueUtils { /** * Convert a target object to { @ link List } . * @ param target * @ return */ public static List < ? > convertArrayOrList ( Object target ) { } }
if ( target instanceof JsonNode ) { return convertArrayOrList ( ( JsonNode ) target ) ; } return target instanceof Object [ ] ? Arrays . asList ( ( Object [ ] ) target ) : target instanceof Collection ? new ArrayList < Object > ( ( Collection < ? > ) target ) : null ;