signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ReflectionUtils { /** * This helper method facilitates creation of wrapper arrays and pre - populates them with the set of String values * provided . E . g . , of wrapper arrays include Integer [ ] , Character [ ] , Boolean [ ] and so on . This method can also be * used to create arrays of types which ...
logger . entering ( new Object [ ] { type , values } ) ; validateParams ( type , values ) ; boolean condition = ( isWrapperArray ( type ) || hasOneArgStringConstructor ( type . getComponentType ( ) ) ) ; checkArgument ( condition , type . getName ( ) + " is neither awrapper type nor has a 1 arg String constructor defin...
public class CloudSchedulerClient { /** * Pauses a job . * < p > If a job is paused then the system will stop executing the job until it is re - enabled via * [ ResumeJob ] [ google . cloud . scheduler . v1beta1 . CloudScheduler . ResumeJob ] . The state of the job is * stored in [ state ] [ google . cloud . sche...
PauseJobRequest request = PauseJobRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return pauseJob ( request ) ;
public class LazyLoadingInterceptor { /** * { @ inheritDoc } */ @ Override public Object intercept ( Object proxy , Method method , Object [ ] args , MethodProxy arg3 ) throws Throwable { } }
if ( id == null ) { throw new NullPointerException ( ) ; } try { if ( loadedTarget == null ) { loadedTarget = daoSupport . findById ( id , targetedLoad ) ; } return method . invoke ( loadedTarget , args ) ; } catch ( Throwable thr ) { thr . printStackTrace ( ) ; if ( InvocationTargetException . class . isInstance ( thr...
public class FeatureShapes { /** * Add a map shape with the feature id , database , and table * @ param mapShape map shape * @ param featureId feature id * @ param database GeoPackage database * @ param table table name */ public void addMapShape ( GoogleMapShape mapShape , long featureId , String database , St...
FeatureShape featureShape = getFeatureShape ( database , table , featureId ) ; featureShape . addShape ( mapShape ) ;
public class DescribeDBClustersResult { /** * Contains a list of DB clusters for the user . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDBClusters ( java . util . Collection ) } or { @ link # withDBClusters ( java . util . Collection ) } if you want to...
if ( this . dBClusters == null ) { setDBClusters ( new java . util . ArrayList < DBCluster > ( dBClusters . length ) ) ; } for ( DBCluster ele : dBClusters ) { this . dBClusters . add ( ele ) ; } return this ;
public class ParameterBuilder { /** * Builds the parameter definition . * @ return Parameter definition */ public Parameter < T > build ( ) { } }
if ( this . name == null ) { throw new IllegalArgumentException ( "Name is missing." ) ; } if ( this . type == null ) { throw new IllegalArgumentException ( "Type is missing." ) ; } if ( this . applicationId == null ) { throw new IllegalArgumentException ( "Application id is missing." ) ; } return new Parameter < T > (...
public class ResultUtil { /** * Add a child result . * @ param parent Parent * @ param child Child */ public static void addChildResult ( HierarchicalResult parent , Result child ) { } }
parent . getHierarchy ( ) . add ( parent , child ) ;
public class Dj2JrCrosstabBuilder { /** * set proper expression text invoking the DJCRosstabMeasurePrecalculatedTotalProvider for the cell * @ param auxRows * @ param auxCols * @ param measureExp * @ param djmeasure * @ param crosstabColumn * @ param crosstabRow * @ param meausrePrefix */ private void set...
String rowValuesExp = "new Object[]{" ; String rowPropsExp = "new String[]{" ; for ( int i = 0 ; i < auxRows . length ; i ++ ) { if ( auxRows [ i ] . getProperty ( ) == null ) continue ; rowValuesExp += "$V{" + auxRows [ i ] . getProperty ( ) . getProperty ( ) + "}" ; rowPropsExp += "\"" + auxRows [ i ] . getProperty (...
public class HierarchyControl { /** * Sets the value of provided property to null . * @ param propName * allowed object is { @ link String } */ @ Override public void unset ( String propName ) { } }
if ( propName . equals ( "level" ) ) { unsetLevel ( ) ; } if ( propName . equals ( "treeView" ) ) { unsetTreeView ( ) ; } super . unset ( propName ) ;
public class NPM { /** * Utility method to extract the version from a NPM by reading its ' package . json ' file . * @ param npmDirectory the directory in which the NPM is installed * @ param log the logger object * @ return the read version , " 0.0.0 " if there are not ' package . json ' file , { @ code null } i...
File packageFile = new File ( npmDirectory , PACKAGE_JSON ) ; if ( ! packageFile . isFile ( ) ) { return "0.0.0" ; } FileReader reader = null ; try { reader = new FileReader ( packageFile ) ; // NOSONAR JSONObject json = ( JSONObject ) JSONValue . parseWithException ( reader ) ; return ( String ) json . get ( "version"...
public class UnmountPRequest { /** * < code > optional . alluxio . grpc . file . UnmountPOptions options = 2 ; < / code > */ public alluxio . grpc . UnmountPOptionsOrBuilder getOptionsOrBuilder ( ) { } }
return options_ == null ? alluxio . grpc . UnmountPOptions . getDefaultInstance ( ) : options_ ;
public class Component { /** * is the template ending with a component extension ? * @ param page * @ return return true if so false otherwse and null if the code is not depending on a template */ private Boolean isInsideCITemplate ( Page page ) { } }
SourceCode sc = page . getSourceCode ( ) ; if ( ! ( sc instanceof PageSourceCode ) ) return null ; PageSource psc = ( ( PageSourceCode ) sc ) . getPageSource ( ) ; String src = psc . getDisplayPath ( ) ; return Constants . isComponentExtension ( ResourceUtil . getExtension ( src , "" ) ) ; // int pos = src . lastIndexO...
public class CommsByteBuffer { /** * Puts a SelectionCriteria object into the byte buffer . * @ param criteria */ public synchronized void putSelectionCriteria ( SelectionCriteria criteria ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putSelectionCriteria" , criteria ) ; checkValid ( ) ; String discriminator = null ; String selector = null ; short selectorDomain = ( short ) SelectorDomain . SIMESSAGE . toInt ( ) ; if ( criteria != null ) { discrim...
public class User { /** * Creates a user with a new id . * @ param id The new id . * @ return The user with new id . */ public User withId ( final long id ) { } }
return new User ( id , username , displayName , slug , email , createTimestamp , url , metadata ) ;
public class snmp_user { /** * Use this API to fetch filtered set of snmp _ user resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static snmp_user [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
snmp_user obj = new snmp_user ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; snmp_user [ ] response = ( snmp_user [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class XAttributeUtils { /** * Static helper method for extracting all extensions from an attribute map . * @ param attributeMap * The attribute map from which to extract extensions . * @ return The set of extensions in the attribute map . */ public static Set < XExtension > extractExtensions ( Map < String...
HashSet < XExtension > extensions = new HashSet < XExtension > ( ) ; for ( XAttribute attribute : attributeMap . values ( ) ) { XExtension extension = attribute . getExtension ( ) ; if ( extension != null ) { extensions . add ( extension ) ; } } return extensions ;
public class Viewport { /** * Set the viewport ' s coordinates from the data stored in the specified parcel . To write a viewport to a parcel , * call writeToParcel ( ) . * @ param in The parcel to read the viewport ' s coordinates from */ public void readFromParcel ( Parcel in ) { } }
left = in . readFloat ( ) ; top = in . readFloat ( ) ; right = in . readFloat ( ) ; bottom = in . readFloat ( ) ;
public class X509CRLEntryImpl { /** * This static method is the default implementation of the * getRevocationReason method in X509CRLEntry . */ public static CRLReason getRevocationReason ( X509CRLEntry crlEntry ) { } }
try { byte [ ] ext = crlEntry . getExtensionValue ( "2.5.29.21" ) ; if ( ext == null ) { return null ; } DerValue val = new DerValue ( ext ) ; byte [ ] data = val . getOctetString ( ) ; CRLReasonCodeExtension rcExt = new CRLReasonCodeExtension ( Boolean . FALSE , data ) ; return rcExt . getReasonCode ( ) ; } catch ( IO...
public class ExecArgList { /** * @ return Join a list of strings and then quote the entire string , if specified * @ param commandList1 list of commands * @ param quote quote converter */ public static String joinAndQuote ( List < String > commandList1 , Converter < String , String > quote ) { } }
String join = DataContextUtils . join ( commandList1 , " " ) ; if ( null != quote ) { join = quote . convert ( join ) ; } return join ;
public class SerializerRegistry { /** * Registers a serializer for the given class . * @ param type The serializable class . * @ param factory The serializer factory . * @ return The serializer registry . * @ throws RegistrationException If the given { @ code type } is already registered */ public SerializerReg...
return register ( type , calculateTypeId ( type ) , factory ) ;
public class AmazonEC2Client { /** * Modifies a subnet attribute . You can only modify one attribute at a time . * @ param modifySubnetAttributeRequest * @ return Result of the ModifySubnetAttribute operation returned by the service . * @ sample AmazonEC2 . ModifySubnetAttribute * @ see < a href = " http : / / ...
request = beforeClientExecution ( request ) ; return executeModifySubnetAttribute ( request ) ;
public class OracleDdlParser { /** * If the index type is a bitmap - join the columns are from the dimension tables which are defined in the FROM clause . All * other index types the columns are from the table the index in on . * < code > * column - expression = = left - paren column - name [ ASC | DESC ] | const...
final DdlTokenStream tokens = new DdlTokenStream ( columnExpressionList , DdlTokenStream . ddlTokenizer ( false ) , false ) ; tokens . start ( ) ; tokens . consume ( L_PAREN ) ; // must have opening paren int numLeft = 1 ; int numRight = 0 ; // must have content between the parens if ( ! tokens . matches ( R_PAREN ) ) ...
public class AccountsInner { /** * Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account . * @ param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account . * @ param accountName The name of the Data Lake Store account to attem...
return enableKeyVaultWithServiceResponseAsync ( resourceGroupName , accountName ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ;
public class ApiClientMgr { /** * Huawe Api Client 连接成功回到 */ @ Override public void onConnected ( ) { } }
HMSAgentLog . d ( "connect success" ) ; timeoutHandler . removeMessages ( APICLIENT_TIMEOUT_HANDLE_MSG ) ; onConnectEnd ( ConnectionResult . SUCCESS ) ;
public class Datatype_Builder { /** * Replaces the value to be returned by { @ link Datatype # isInterfaceType ( ) } by applying { @ code * mapper } to it and using the result . * @ return this { @ code Builder } object * @ throws NullPointerException if { @ code mapper } is null or returns null * @ throws Ille...
Objects . requireNonNull ( mapper ) ; return setInterfaceType ( mapper . apply ( isInterfaceType ( ) ) ) ;
public class Jenkins { /** * Gets the names of all the { @ link Job } s . */ public Collection < String > getJobNames ( ) { } }
List < String > names = new ArrayList < > ( ) ; for ( Job j : allItems ( Job . class ) ) names . add ( j . getFullName ( ) ) ; names . sort ( String . CASE_INSENSITIVE_ORDER ) ; return names ;
public class KeyValueStoreSessionManager { @ Override public void doStart ( ) throws Exception { } }
log . info ( "starting..." ) ; super . doStart ( ) ; if ( _cookieDomain == null ) { String [ ] cookieDomains = getContextHandler ( ) . getVirtualHosts ( ) ; // commented as api dropped in jetty9 // if ( cookieDomains = = null | | cookieDomains . length = = 0) // cookieDomains = getContextHandler ( ) . getConnectorNames...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.drugbank.ca" , name = "protein-name" , scope = SnpEffectType . class ) public JAXBElement < String > createSnpEffectTypeProteinName ( String value )...
return new JAXBElement < String > ( _SnpAdverseDrugReactionTypeProteinName_QNAME , String . class , SnpEffectType . class , value ) ;
public class AWSServiceDiscoveryClient { /** * Creates a public namespace based on DNS , which will be visible on the internet . The namespace defines your * service naming scheme . For example , if you name your namespace < code > example . com < / code > and name your service * < code > backend < / code > , the r...
request = beforeClientExecution ( request ) ; return executeCreatePublicDnsNamespace ( request ) ;
public class CSSURLHelper { /** * Surround the passed URL with the CSS " url ( . . . ) " . When the passed URL * contains characters that require quoting , quotes are automatically added ! * @ param sURL * URL to be wrapped . May not be < code > null < / code > but maybe empty . * @ param bForceQuoteURL * if ...
ValueEnforcer . notNull ( sURL , "URL" ) ; final StringBuilder aSB = new StringBuilder ( CCSSValue . PREFIX_URL_OPEN ) ; final boolean bAreQuotesRequired = bForceQuoteURL || isCSSURLRequiringQuotes ( sURL ) ; if ( bAreQuotesRequired ) { // Determine the best quote char to use - default to ' \ ' ' for backwards // compa...
public class DefaultRedirectResolver { /** * Check if host matches the registered value . * @ param registered the registered host * @ param requested the requested host * @ return true if they match */ protected boolean hostMatches ( String registered , String requested ) { } }
if ( matchSubdomains ) { return registered . equals ( requested ) || requested . endsWith ( "." + registered ) ; } return registered . equals ( requested ) ;
public class GLTextureView { /** * This method is used as part of the View class and is not normally * called or subclassed by clients of GLSurfaceView . * Must not be called before a renderer has been set . */ @ Override protected void onDetachedFromWindow ( ) { } }
if ( LOG_ATTACH_DETACH ) { Log . d ( TAG , "onDetachedFromWindow" ) ; } if ( mGLThread != null ) { mGLThread . requestExitAndWait ( ) ; } mDetached = true ; super . onDetachedFromWindow ( ) ;
public class RSocketClientCodec { /** * Encoder function . * @ param message client message . * @ param transformer bi function transformer from two headers and data buffers to client * specified object of type T * @ param < T > client specified type which could be constructed out of headers and data bufs . *...
ByteBuf dataBuffer = Unpooled . EMPTY_BUFFER ; ByteBuf headersBuffer = Unpooled . EMPTY_BUFFER ; if ( message . hasData ( ByteBuf . class ) ) { dataBuffer = message . data ( ) ; } else if ( message . hasData ( ) ) { dataBuffer = ByteBufAllocator . DEFAULT . buffer ( ) ; try { dataCodec . encode ( new ByteBufOutputStrea...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link SemanticsType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "semantics" ) public JAXBElement < SemanticsType > createSemantics ( SemanticsType value ) { } }
return new JAXBElement < SemanticsType > ( _Semantics_QNAME , SemanticsType . class , null , value ) ;
public class ConcurrentCollectorMultiple { /** * Internal method to invoke the performed for the passed list of objects . * @ param aObjectsToPerform * List of objects to be passed to the performer . Never * < code > null < / code > . The length is at last * { @ link # getMaxPerformCount ( ) } . * @ return { ...
if ( ! aObjectsToPerform . isEmpty ( ) ) { try { // Perform the action on the objects , regardless of whether a // " stop queue message " was received or not m_aPerformer . runAsync ( aObjectsToPerform ) ; } catch ( final Exception ex ) { LOGGER . error ( "Failed to perform actions on " + aObjectsToPerform . size ( ) +...
public class ServerCommonLoginModule { /** * Common method called by all login modules that use the UserRegistry ( UsernameAndPasswordLoginModule , * CertificateLoginModule , HashtableLoginModule and TokenLoginModule ) . Determines the securityName to use * for the login . * @ param loginName The username passed ...
UserRegistry ur = getUserRegistry ( ) ; if ( ur != null && ur . getType ( ) != "CUSTOM" ) { // Preserve the existing behavior for CUSTOM user registries String securityName = ur . getUserSecurityName ( urAuthenticatedId ) ; if ( securityName != null ) { return securityName ; } } // If a loginName was provided , use it ...
public class GVRAudioManager { /** * Removes an audio source from the audio manager . * @ param audioSource audio source to remove */ public void removeSource ( GVRAudioSource audioSource ) { } }
synchronized ( mAudioSources ) { audioSource . setListener ( null ) ; mAudioSources . remove ( audioSource ) ; }
public class AWSStorageGatewayClient { /** * Updates the type of medium changer in a tape gateway . When you activate a tape gateway , you select a medium * changer type for the tape gateway . This operation enables you to select a different type of medium changer after * a tape gateway is activated . This operatio...
request = beforeClientExecution ( request ) ; return executeUpdateVTLDeviceType ( request ) ;
public class BNFHeadersImpl { /** * Method to marshall the current set of headers but use the existing parse * buffers they were originally found in . This might require deleting some * headers from those buffers , as well as allocating new buffers to handle * additional headers . * @ param inBuffers * @ retu...
final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; WsByteBuffer [ ] src = inBuffers ; if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Marshalling headers and re-using buffers, change=" + this . headerChangeCount + ", add=" + this . headerAddCount + ", src=" + src ) ; } HeaderElement elem = ...
public class URLHandler { /** * Encode the specified URL String with percent encoding . * Order of encoding : * 1 . Encode percent signs to " % 25 " . Not doing this first will clobber subsequent encodings . * 2 . Encode semi - colons to " % 3B " since they are invalid in cookie values . * 3 . Encode commas to ...
url = url . replaceAll ( "%" , "%25" ) ; url = url . replaceAll ( ";" , "%3B" ) ; url = url . replaceAll ( "," , "%2C" ) ; return url ;
public class MCARGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . MCARG__RG_LENGTH : return getRGLength ( ) ; case AfplibPackage . MCARG__TRIPLETS : return getTriplets ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class XConstructorCallImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case XbasePackage . XCONSTRUCTOR_CALL__CONSTRUCTOR : setConstructor ( ( JvmConstructor ) null ) ; return ; case XbasePackage . XCONSTRUCTOR_CALL__ARGUMENTS : getArguments ( ) . clear ( ) ; return ; case XbasePackage . XCONSTRUCTOR_CALL__TYPE_ARGUMENTS : getTypeArguments ( ) . clear ( ) ; return ;...
public class KeyVaultClientBaseImpl { /** * Updates the specified certificate issuer . * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity . This operation requires the certificates / setissuers permission . * @ param vaultBaseUrl The vault name , for example https ...
return updateCertificateIssuerWithServiceResponseAsync ( vaultBaseUrl , issuerName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class NumberRange { /** * Increments by given step * @ param value the value to increment * @ param step the amount to increment * @ return the incremented value */ @ SuppressWarnings ( "unchecked" ) private Comparable increment ( Object value , Number step ) { } }
return ( Comparable ) plus ( ( Number ) value , step ) ;
public class RoaringBitmap { /** * Checks whether the value is included , which is equivalent to checking if the corresponding bit * is set ( get in BitSet class ) . * @ param x integer value * @ return whether the integer value is included . */ @ Override public boolean contains ( final int x ) { } }
final short hb = Util . highbits ( x ) ; final Container c = highLowContainer . getContainer ( hb ) ; return c != null && c . contains ( Util . lowbits ( x ) ) ;
public class RequestMessage { /** * @ see javax . servlet . ServletRequest # getServerName ( ) */ @ Override public String getServerName ( ) { } }
String name = this . request . getVirtualHost ( ) ; if ( null == name ) { name = "localhost" ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "getServerName: " + name ) ; } return name ;
public class SamlProfileSamlAuthNStatementBuilder { /** * Creates an authentication statement for the current request . * @ param casAssertion the cas assertion * @ param authnRequest the authn request * @ param adaptor the adaptor * @ param service the service * @ param binding the binding * @ param messag...
val assertion = Assertion . class . cast ( casAssertion ) ; val authenticationMethod = this . authnContextClassRefBuilder . build ( assertion , authnRequest , adaptor , service ) ; var id = request != null ? CommonUtils . safeGetParameter ( request , CasProtocolConstants . PARAMETER_TICKET ) : StringUtils . EMPTY ; if ...
public class NioDatagramChannel { /** * Block the given sourceToBlock address for the given multicastAddress on the given networkInterface */ @ Override public ChannelFuture block ( InetAddress multicastAddress , NetworkInterface networkInterface , InetAddress sourceToBlock , ChannelPromise promise ) { } }
checkJavaVersion ( ) ; if ( multicastAddress == null ) { throw new NullPointerException ( "multicastAddress" ) ; } if ( sourceToBlock == null ) { throw new NullPointerException ( "sourceToBlock" ) ; } if ( networkInterface == null ) { throw new NullPointerException ( "networkInterface" ) ; } synchronized ( this ) { if ...
public class SeekBarPreference { /** * Obtains the maximum value , the preference allows to choose , from a specific typed array . * @ param typedArray * The typed array , the maximum value should be obtained from , as an instance of the * class { @ link TypedArray } . The typed array may not be null */ private v...
int defaultValue = getContext ( ) . getResources ( ) . getInteger ( R . integer . seek_bar_preference_default_max_value ) ; setMaxValue ( typedArray . getInteger ( R . styleable . AbstractNumericPreference_android_max , defaultValue ) ) ;
public class EncodedImage { /** * Copy the meta data from another EncodedImage . * @ param encodedImage the EncodedImage to copy the meta data from . */ public void copyMetaDataFrom ( EncodedImage encodedImage ) { } }
mImageFormat = encodedImage . getImageFormat ( ) ; mWidth = encodedImage . getWidth ( ) ; mHeight = encodedImage . getHeight ( ) ; mRotationAngle = encodedImage . getRotationAngle ( ) ; mExifOrientation = encodedImage . getExifOrientation ( ) ; mSampleSize = encodedImage . getSampleSize ( ) ; mStreamSize = encodedImage...
public class DateTimeExpression { /** * Create a week expression * @ return week */ public NumberExpression < Integer > week ( ) { } }
if ( week == null ) { week = Expressions . numberOperation ( Integer . class , Ops . DateTimeOps . WEEK , mixin ) ; } return week ;
public class DefaultProcessDiagramCanvas { /** * Generates an image of what currently is drawn on the canvas . * Throws an { @ link ActivitiImageException } when { @ link # close ( ) } is already * called . */ public InputStream generateImage ( ) { } }
if ( closed ) { throw new ActivitiImageException ( "ProcessDiagramGenerator already closed" ) ; } try { ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ; Writer out ; out = new OutputStreamWriter ( stream , "UTF-8" ) ; g . stream ( out , true ) ; return new ByteArrayInputStream ( stream . toByteArray ( ) )...
public class OptionConfiguration { /** * A list of VpcSecurityGroupMembership name strings used for this option . * @ param vpcSecurityGroupMemberships * A list of VpcSecurityGroupMembership name strings used for this option . */ public void setVpcSecurityGroupMemberships ( java . util . Collection < String > vpcSe...
if ( vpcSecurityGroupMemberships == null ) { this . vpcSecurityGroupMemberships = null ; return ; } this . vpcSecurityGroupMemberships = new com . amazonaws . internal . SdkInternalList < String > ( vpcSecurityGroupMemberships ) ;
public class Composite { /** * Replace an object within the composite . */ public boolean replace ( Object oldObj , Object newObj ) { } }
if ( nest != null ) { return nest . replace ( oldObj , newObj ) ; } else { int sz = elements . size ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { if ( elements . get ( i ) == oldObj ) { elements . set ( i , newObj ) ; return true ; } } } return false ;
public class LookupService { /** * Returns the country the IP address is in . * @ param addr * the IP address as Inet6Address . * @ return the country the IP address is from . */ public synchronized Country getCountryV6 ( InetAddress addr ) { } }
if ( file == null && ( dboptions & GEOIP_MEMORY_CACHE ) == 0 ) { throw new IllegalStateException ( "Database has been closed." ) ; } int ret = seekCountryV6 ( addr ) - COUNTRY_BEGIN ; if ( ret == 0 ) { return UNKNOWN_COUNTRY ; } else { return new Country ( countryCode [ ret ] , countryName [ ret ] ) ; }
public class RoundRobin { /** * Returns the next item . * @ return the next item */ public V next ( ) { } }
Collection < ? extends V > collection = this . collection ; V offset = this . offset ; if ( offset != null ) { boolean accept = false ; for ( V element : collection ) { if ( element == offset ) { accept = true ; continue ; } if ( accept ) { return this . offset = element ; } } } return this . offset = collection . iter...
public class CompositeFilter { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . resourceindex . SearchResultFilter # filterSearchResult ( org . archive . wayback . core . SearchResult ) */ public int filterObject ( CaptureSearchResult r ) { } }
for ( ObjectFilter < CaptureSearchResult > filter : filters ) { if ( filter == null ) { return FILTER_EXCLUDE ; } int result = filter . filterObject ( r ) ; if ( result != FILTER_INCLUDE ) { return result ; } } return FILTER_INCLUDE ;
public class InjectionBinding { /** * F743-32637 */ private InjectionTargetMethod createInjectionTarget ( Method method , InjectionBinding < ? > binding ) throws InjectionException { } }
if ( method . getParameterTypes ( ) . length != 1 ) // d706744 { return new InjectionTargetMultiParamMethod ( method , binding ) ; } return new InjectionTargetMethod ( method , binding ) ;
public class LinkInfoImpl { /** * { @ inheritDoc } * This method sets the link attributes to the appropriate values * based on the context . * @ param c the context id to set . */ public final void setContext ( Kind c ) { } }
// NOTE : Put context specific link code here . switch ( c ) { case ALL_CLASSES_FRAME : case PACKAGE_FRAME : case IMPLEMENTED_CLASSES : case SUBCLASSES : case EXECUTABLE_ELEMENT_COPY : case VARIABLE_ELEMENT_COPY : case PROPERTY_COPY : case CLASS_USE_HEADER : includeTypeInClassLinkLabel = false ; break ; case ANNOTATION...
public class Normalization { /** * Scale based on min , max * @ param schema the schema of the data to scale * @ param data the data to sclae * @ param min the minimum value * @ param max the maximum value * @ return the normalized ata */ public static JavaRDD < List < Writable > > normalize ( Schema schema ,...
DataRowsFacade frame = DataFrames . toDataFrame ( schema , data ) ; return DataFrames . toRecords ( normalize ( frame , min , max , Collections . < String > emptyList ( ) ) ) . getSecond ( ) ;
public class TermConverter { /** * { @ inheritDoc } */ @ Override public XBELTerm convert ( Term source ) { } }
if ( source == null ) return null ; XBELTerm xt = new XBELTerm ( ) ; FunctionEnum functionEnum = source . getFunctionEnum ( ) ; Function func = Function . fromValue ( functionEnum . getDisplayValue ( ) ) ; xt . setFunction ( func ) ; List < BELObject > functionArgs = source . getFunctionArguments ( ) ; List < JAXBEleme...
public class FileBatchConflictDetectServiceImpl { /** * 具体冲突检测的行为 */ private FileBatch onFileConflictDetect ( FileConflictDetectEvent event ) { } }
final FileBatch fileBatch = event . getFileBatch ( ) ; if ( CollectionUtils . isEmpty ( fileBatch . getFiles ( ) ) ) { return fileBatch ; } ExecutorTemplate executorTemplate = executorTemplateGetter . get ( ) ; try { MDC . put ( OtterConstants . splitPipelineLoadLogFileKey , String . valueOf ( fileBatch . getIdentity (...
public class HighwayHash { /** * Updates the hash with the last 1 to 31 bytes of the data . You must use * updatePacket first per 32 bytes of the data , if and only if 1 to 31 bytes * of the data are not processed after that , updateRemainder must be used for * those final bytes . * @ param bytes data array whi...
if ( pos < 0 ) { throw new IllegalArgumentException ( String . format ( "Pos (%s) must be positive" , pos ) ) ; } if ( size_mod32 < 0 || size_mod32 >= 32 ) { throw new IllegalArgumentException ( String . format ( "size_mod32 (%s) must be between 0 and 31" , size_mod32 ) ) ; } if ( pos + size_mod32 > bytes . length ) { ...
public class GroupProjectsFilter { /** * Get the query params specified by this filter . * @ return a GitLabApiForm instance holding the query parameters for this ProjectFilter instance */ public GitLabApiForm getQueryParams ( ) { } }
return ( new GitLabApiForm ( ) . withParam ( "archived" , archived ) . withParam ( "visibility" , visibility ) . withParam ( "order_by" , orderBy ) . withParam ( "sort" , sort ) . withParam ( "search" , search ) . withParam ( "simple" , simple ) . withParam ( "owned" , owned ) . withParam ( "starred" , starred ) . with...
public class FastMath { /** * Compute least significant bit ( Unit in Last Position ) for a number . * @ param x number from which ulp is requested * @ return ulp ( x ) */ public static double ulp ( double x ) { } }
if ( Double . isInfinite ( x ) ) { return Double . POSITIVE_INFINITY ; } return abs ( x - Double . longBitsToDouble ( Double . doubleToLongBits ( x ) ^ 1 ) ) ;
public class EventSubscriptionsInner { /** * List all regional event subscriptions under an Azure subscription . * List all event subscriptions from the given location under a specific Azure subscription . * @ param location Name of the location * @ param serviceCallback the async ServiceCallback to handle succes...
return ServiceFuture . fromResponse ( listRegionalBySubscriptionWithServiceResponseAsync ( location ) , serviceCallback ) ;
public class GVRShaderData { /** * Bind an { @ code int } to the shader uniform { @ code key } . * Throws an exception of the key does not exist . * @ param key Name of the shader uniform * @ param value New data */ public void setInt ( String key , int value ) { } }
checkKeyIsUniform ( key ) ; NativeShaderData . setInt ( getNative ( ) , key , value ) ;
public class JavaGeneratingProcessor { /** * Generates a source file from the specified { @ link io . sundr . codegen . model . TypeDef } . * @ param model The model of the class to generate . * @ param resourceName The template to use . * @ throws IOException If it fails to create the source file . */ public voi...
try { generateFromResources ( model , processingEnv . getFiler ( ) . createSourceFile ( model . getFullyQualifiedName ( ) ) , resourceName ) ; } catch ( FilerException e ) { // TODO : Need to avoid dublicate interfaces here . }
public class ModelControllerLock { /** * Acquire the exclusive lock , with a max wait timeout to acquire . * @ param permit - the permit Integer for this operation . May not be { @ code null } . * @ param timeout - the timeout scalar quantity . * @ param unit - see { @ code TimeUnit } for quantities . * @ retur...
if ( permit == null ) { throw new IllegalArgumentException ( ) ; } return sync . tryAcquireNanos ( permit , unit . toNanos ( timeout ) ) ;
public class BaseDrawerItem { /** * helper method to decide for the correct color * @ param ctx * @ return */ protected int getSelectedTextColor ( Context ctx ) { } }
return ColorHolder . color ( getSelectedTextColor ( ) , ctx , R . attr . material_drawer_selected_text , R . color . material_drawer_selected_text ) ;
public class GoogleMapShapeConverter { /** * Add a shape to the map * @ param map google map * @ param shape google map shape * @ return google map shape */ public static GoogleMapShape addShapeToMap ( GoogleMap map , GoogleMapShape shape ) { } }
GoogleMapShape addedShape = null ; switch ( shape . getShapeType ( ) ) { case LAT_LNG : addedShape = new GoogleMapShape ( shape . getGeometryType ( ) , GoogleMapShapeType . MARKER , addLatLngToMap ( map , ( LatLng ) shape . getShape ( ) ) ) ; break ; case MARKER_OPTIONS : addedShape = new GoogleMapShape ( shape . getGe...
public class CmsCloneModuleThread { /** * Replaces the referenced formatters within the new XSD files with the new formatter paths . < p > * @ param targetModule the target module * @ throws CmsException if something goes wrong * @ throws UnsupportedEncodingException if the file content could not be read with the...
CmsResource formatterSourceFolder = getCms ( ) . readResource ( "/system/modules/" + m_cloneInfo . getFormatterSourceModule ( ) + "/" ) ; CmsResource formatterTargetFolder = getCms ( ) . readResource ( "/system/modules/" + m_cloneInfo . getFormatterTargetModule ( ) + "/" ) ; for ( I_CmsResourceType type : targetModule ...
public class JVMMetrics { /** * These metrics can be useful for diagnosing native memory usage . */ private void updateBufferPoolMetrics ( ) { } }
for ( BufferPoolMXBean bufferPoolMXBean : bufferPoolMXBeanList ) { String normalizedKeyName = bufferPoolMXBean . getName ( ) . replaceAll ( "[^\\w]" , "-" ) ; final ByteAmount memoryUsed = ByteAmount . fromBytes ( bufferPoolMXBean . getMemoryUsed ( ) ) ; final ByteAmount totalCapacity = ByteAmount . fromBytes ( bufferP...
public class authenticationcertpolicy_vpnglobal_binding { /** * Use this API to fetch authenticationcertpolicy _ vpnglobal _ binding resources of given name . */ public static authenticationcertpolicy_vpnglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
authenticationcertpolicy_vpnglobal_binding obj = new authenticationcertpolicy_vpnglobal_binding ( ) ; obj . set_name ( name ) ; authenticationcertpolicy_vpnglobal_binding response [ ] = ( authenticationcertpolicy_vpnglobal_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class SpecificationMethodAdapter { /** * Injects calls to old value contract methods . old value contract * methods get called with , in this order : * < ul > * < li > the { @ code this } pointer , if any ; * < li > and the original method ' s parameters . * < / ul > * @ param kind either OLD or SIGN...
"kind != null" , "kind.isOld()" , "list != null" } ) protected void invokeOldValues ( ContractKind kind , List < Integer > list ) { List < MethodContractHandle > olds = contracts . getMethodHandles ( kind , methodName , methodDesc , 0 ) ; if ( olds . isEmpty ( ) ) { return ; } for ( MethodContractHandle h : olds ) { Me...
public class ScriptExecutionHistorysInner { /** * Promotes the specified ad - hoc script execution to a persisted script . * @ param resourceGroupName The name of the resource group . * @ param clusterName The name of the cluster . * @ param scriptExecutionId The script execution Id * @ param serviceCallback th...
return ServiceFuture . fromResponse ( promoteWithServiceResponseAsync ( resourceGroupName , clusterName , scriptExecutionId ) , serviceCallback ) ;
public class JreProxyInstaller { /** * Filter the given document . * @ param obj the document to filter . * @ param expectedType the expected type of the { @ code obj } . * @ return the filtered { @ code obj } . */ protected Object processElement ( Object obj , Class < ? > expectedType ) { } }
if ( obj == null || obj instanceof Proxy ) { return obj ; } if ( obj instanceof Doc ) { return wrap ( obj ) ; } else if ( expectedType != null && expectedType . isArray ( ) ) { final Class < ? > componentType = expectedType . getComponentType ( ) ; if ( Doc . class . isAssignableFrom ( componentType ) ) { final int len...
public class QueueFactory { /** * Retrieve a new QueueBuilder using the ROOT _ QUEUE * as a parent . * @ return The new QueueBuilder object . */ public static < B extends ProcessBuilder > QueueBuilder < B > newQueueBuilder ( Class < B > process_builder_class ) { } }
return new QueueBuilder < B > ( ROOT_QUEUE , process_builder_class ) ;
public class CoNLLSentence { /** * 找出特定依存关系的子节点 * @ param word * @ param relation * @ return */ public List < CoNLLWord > findChildren ( CoNLLWord word , String relation ) { } }
List < CoNLLWord > result = new LinkedList < CoNLLWord > ( ) ; for ( CoNLLWord other : this ) { if ( other . HEAD == word && other . DEPREL . equals ( relation ) ) result . add ( other ) ; } return result ;
public class Modal { /** * Add a modal component in the dialog . * @ param dialog * the dialog * @ param component * the component for modal * @ param listener * the listener for modal * @ param modalDepth * the depth for modal */ public static void addModal ( JDialog dialog , Component component , Moda...
addModal_ ( dialog , component , listener , modalDepth ) ;
public class JDBCStatement { /** * # ifdef JAVA4 */ public synchronized int executeUpdate ( String sql , int autoGeneratedKeys ) throws SQLException { } }
if ( autoGeneratedKeys != Statement . RETURN_GENERATED_KEYS && autoGeneratedKeys != Statement . NO_GENERATED_KEYS ) { throw Util . invalidArgument ( "autoGeneratedKeys" ) ; } fetchResult ( sql , StatementTypes . RETURN_COUNT , autoGeneratedKeys , null , null ) ; if ( resultIn . isError ( ) ) { throw Util . sqlException...
public class ExecutorComparator { /** * < pre > * function defines the Memory comparator . * Note : comparator firstly take the absolute value of the remaining memory , if both sides have * the same value , * it go further to check the percent of the remaining memory . * < / pre > * @ param weight weight of...
return FactorComparator . create ( MEMORY_COMPARATOR_NAME , weight , new Comparator < Executor > ( ) { @ Override public int compare ( final Executor o1 , final Executor o2 ) { final ExecutorInfo stat1 = o1 . getExecutorInfo ( ) ; final ExecutorInfo stat2 = o2 . getExecutorInfo ( ) ; final int result = 0 ; if ( statist...
public class PerformanceMonitorBeanFactory { /** * Create a new { @ link PerformanceMonitorBean } and map it to the provided * name . If the { @ link MBeanExportOperations } is set , then the * PerformanceMonitorBean will be exported as a JMX MBean . * If the PerformanceMonitor already exists , then the existing ...
PerformanceMonitorBean performanceMonitor = findPerformanceMonitorBean ( name ) ; if ( performanceMonitor == null ) { performanceMonitor = new PerformanceMonitorBean ( ) ; if ( mBeanExportOperations != null ) { ObjectName objectName ; try { objectName = new ObjectName ( "org.fishwife.jrugged.spring:type=" + "Performanc...
public class gslbldnsentries { /** * Use this API to clear gslbldnsentries resources . */ public static base_responses clear ( nitro_service client , gslbldnsentries resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { gslbldnsentries clearresources [ ] = new gslbldnsentries [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { clearresources [ i ] = new gslbldnsentries ( ) ; } result = perform_operation_bulk_request ( client , ...
public class AbstractPropertyEditor { /** * - - - - - OTHER METHODS - - - - - */ @ Override public void addMaxCardinalityRestriction ( Class < ? extends D > domain , int max ) { } }
if ( multipleCardinality ) { this . maxCardinalities . put ( domain , max ) ; } else { if ( max == 1 ) { if ( log . isInfoEnabled ( ) ) { log . info ( "unnecessary use of cardinality restriction. " + "Maybe you want to use functional instead?" ) ; } } else if ( max == 0 ) { this . maxCardinalities . put ( domain , max ...
public class CancelSpotFleetRequestsResult { /** * Information about the Spot Fleet requests that are successfully canceled . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSuccessfulFleetRequests ( java . util . Collection ) } or * { @ link # withSucce...
if ( this . successfulFleetRequests == null ) { setSuccessfulFleetRequests ( new com . amazonaws . internal . SdkInternalList < CancelSpotFleetRequestsSuccessItem > ( successfulFleetRequests . length ) ) ; } for ( CancelSpotFleetRequestsSuccessItem ele : successfulFleetRequests ) { this . successfulFleetRequests . add ...
public class CellModel { /** * Format an { @ link Object } value . This method is used to apply a chain of formatters to some * value . It will return < code > null < / code > if the provided value is null ; in this case , it * is up to the caller to provide an appropriate default value . * @ param value the { @ ...
if ( value == null ) return null ; if ( _formatters == null ) return value . toString ( ) ; Object formatted = value ; for ( int i = 0 ; i < _formatters . size ( ) ; i ++ ) { assert _formatters . get ( i ) instanceof Formatter : "Found invalid formatter type \"" + ( _formatters . get ( i ) != null ? _formatters . get (...
public class XElement { /** * Add an element with the supplied content text . * @ param name the name * @ param value the content * @ return the new element */ public XElement add ( String name , Object value ) { } }
XElement result = add ( name ) ; result . parent = this ; result . setValue ( value ) ; return result ;
public class SnowflakeConnectionV1 { /** * Method to put data from a stream at a stage location . The data will be * uploaded as one file . No splitting is done in this method . * Stream size must match the total size of data in the input stream unless * compressData parameter is set to true . * caller is respo...
logger . debug ( "upload data from stream: stageName={}" + ", destPrefix={}, destFileName={}" , stageName , destPrefix , destFileName ) ; if ( stageName == null ) { throw new SnowflakeSQLException ( SqlState . INTERNAL_ERROR , ErrorCode . INTERNAL_ERROR . getMessageCode ( ) , "stage name is null" ) ; } if ( destFileNam...
public class IPSetDescriptorMarshaller { /** * Marshall the given parameter object . */ public void marshall ( IPSetDescriptor iPSetDescriptor , ProtocolMarshaller protocolMarshaller ) { } }
if ( iPSetDescriptor == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( iPSetDescriptor . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( iPSetDescriptor . getValue ( ) , VALUE_BINDING ) ; } catch ( Exception e ) { throw new S...
public class LRUVectorTileCache { /** * Returns a cached Object given a key * @ param key * The key of the Object stored on the HashMap * @ return The Object or null if it is not stored in the cache */ public synchronized Object get ( final String key ) { } }
try { final Object value = super . get ( key ) ; if ( value != null ) { updateKey ( key ) ; } return value ; } catch ( Exception e ) { log . log ( Level . SEVERE , "get" , e ) ; return null ; }
public class LWJGL3TypeConversions { /** * Convert types from GL constants . * @ param type The GL constant . * @ return The value . */ public static JCGLType typeFromGL ( final int type ) { } }
switch ( type ) { case GL20 . GL_BOOL : return JCGLType . TYPE_BOOLEAN ; case GL20 . GL_BOOL_VEC2 : return JCGLType . TYPE_BOOLEAN_VECTOR_2 ; case GL20 . GL_BOOL_VEC3 : return JCGLType . TYPE_BOOLEAN_VECTOR_3 ; case GL20 . GL_BOOL_VEC4 : return JCGLType . TYPE_BOOLEAN_VECTOR_4 ; case GL11 . GL_FLOAT : return JCGLType ....
public class J4pReadResponse { /** * Get the name of all attributes fetched for a certain MBean name . If the request was * performed for a single MBean , then the given name must match that of the MBean name * provided in the request . If < code > null < / code > is given as argument , then this method * will re...
ObjectName requestMBean = getRequest ( ) . getObjectName ( ) ; if ( requestMBean . isPattern ( ) ) { // We need to got down one level in the returned values JSONObject attributes = getAttributesForObjectNameWithPatternRequest ( pObjectName ) ; return attributes . keySet ( ) ; } else { if ( pObjectName != null && ! pObj...
public class AmazonAppStreamClient { /** * Stops the specified image builder . * @ param stopImageBuilderRequest * @ return Result of the StopImageBuilder operation returned by the service . * @ throws ResourceNotFoundException * The specified resource was not found . * @ throws OperationNotPermittedException...
request = beforeClientExecution ( request ) ; return executeStopImageBuilder ( request ) ;
public class JTrees { /** * Returns the children of the given node in the given tree model * @ param treeModel The tree model * @ param node The node * @ return The children */ public static List < Object > getChildren ( TreeModel treeModel , Object node ) { } }
List < Object > children = new ArrayList < Object > ( ) ; int n = treeModel . getChildCount ( node ) ; for ( int i = 0 ; i < n ; i ++ ) { Object child = treeModel . getChild ( node , i ) ; children . add ( child ) ; } return children ;
public class BoyerMoore { /** * Computes the function < i > last < / i > and stores its values in the array < code > last < / code > . * The function is defined as follows : * < pre > * last ( Char ch ) = the index of the right - most occurrence of the character ch * in the pattern ; * - 1 if ch does not occu...
for ( int k = 0 ; k < last . length ; k ++ ) { last [ k ] = - 1 ; } for ( int j = pattern . length ( ) - 1 ; j >= 0 ; j -- ) { if ( last [ pattern . charAt ( j ) ] < 0 ) { last [ pattern . charAt ( j ) ] = j ; } }
public class CollectionFactory { /** * Sort the input collection ; if the ordering is unstable and an error is * thrown ( due to the use of TimSort in JDK 1.7 and newer ) , catch it and * leave the collection unsorted . NOTE : use this method if ordering is * desirable but not necessary . * @ param < T > * li...
try { Collections . sort ( toReturn ) ; } catch ( IllegalArgumentException e ) { // catch possible sorting misbehaviour if ( ! e . getMessage ( ) . contains ( "Comparison method violates its general contract!" ) ) { throw e ; } // otherwise print a warning and leave the list unsorted }
public class DefaultConfigurationFactory { /** * Creates default implementation of { @ link MemoryCache } - { @ link LruMemoryCache } < br / > * Default cache size = 1/8 of available app memory . */ public static MemoryCache createMemoryCache ( Context context , int memoryCacheSize ) { } }
if ( memoryCacheSize == 0 ) { ActivityManager am = ( ActivityManager ) context . getSystemService ( Context . ACTIVITY_SERVICE ) ; int memoryClass = am . getMemoryClass ( ) ; if ( hasHoneycomb ( ) && isLargeHeap ( context ) ) { memoryClass = getLargeMemoryClass ( am ) ; } memoryCacheSize = 1024 * 1024 * memoryClass / 8...
public class BitMatrixParser { /** * < p > Reads the 8 bits of the special corner condition 1 . < / p > * < p > See ISO 16022:2006 , Figure F . 3 < / p > * @ param numRows Number of rows in the mapping matrix * @ param numColumns Number of columns in the mapping matrix * @ return byte from the Corner condition ...
int currentByte = 0 ; if ( readModule ( numRows - 1 , 0 , numRows , numColumns ) ) { currentByte |= 1 ; } currentByte <<= 1 ; if ( readModule ( numRows - 1 , 1 , numRows , numColumns ) ) { currentByte |= 1 ; } currentByte <<= 1 ; if ( readModule ( numRows - 1 , 2 , numRows , numColumns ) ) { currentByte |= 1 ; } curren...
public class KrakenImpl { /** * Parse and execute SQL . */ public void exec ( String sql , Object [ ] params , Result < Object > result ) { } }
QueryBuilderKraken query = QueryParserKraken . parse ( this , sql ) ; query . build ( result . then ( ( q , r ) -> q . exec ( r , params ) ) ) ;