signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ContainerGroupsInner { /** * Create or update container groups . * Create or update container groups with specified configurations . * @ param resourceGroupName The name of the resource group . * @ param containerGroupName The name of the container group . * @ param containerGroup The properties of...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , containerGroupName , containerGroup ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PropertyManager { /** * Loads overrides from System . getProperties ( ) , mostly for things passed in on * the command line using the - Dkey = value scheme . */ private void loadOverridesFromCommandLine ( ) { } }
final List < String > disallowedKeys = Arrays . asList ( "java.version" , "java.vendorjava.vendor.url" , "java.home" , "java.vm.specification.version" , "java.vm.specification.vendor" , "java.vm.specification.name" , "java.vm.version" , "java.vm.vendor" , "java.vm.name" , "java.specification.version" , "java.specificat...
public class HttpUtil { /** * Determine if a uri is in origin - form according to * < a href = " https : / / tools . ietf . org / html / rfc7230 # section - 5.3 " > rfc7230 , 5.3 < / a > . */ public static boolean isOriginForm ( URI uri ) { } }
return uri . getScheme ( ) == null && uri . getSchemeSpecificPart ( ) == null && uri . getHost ( ) == null && uri . getAuthority ( ) == null ;
public class PAWriter { /** * ( non - Javadoc ) * @ see uk . ac . ebi . embl . flatfile . writer . FlatFileWriter # write ( java . io . Writer ) */ @ Override public boolean write ( Writer writer ) throws IOException { } }
writeBlock ( writer , EmblPadding . PA_PADDING , accession ) ; return true ;
public class KeyStoreUtil { /** * Update a keystore with a CA certificate * @ param pTrustStore the keystore to update * @ param pCaCert CA cert as PEM used for the trust store */ public static void updateWithCaPem ( KeyStore pTrustStore , File pCaCert ) throws IOException , CertificateException , KeyStoreException...
InputStream is = new FileInputStream ( pCaCert ) ; try { CertificateFactory certFactory = CertificateFactory . getInstance ( "X509" ) ; X509Certificate cert = ( X509Certificate ) certFactory . generateCertificate ( is ) ; String alias = cert . getSubjectX500Principal ( ) . getName ( ) ; pTrustStore . setCertificateEntr...
public class StringUtil { /** * Joins Strings with EOL character * @ param start the starting String * @ param linePrefix the prefix for each line to be joined * @ param lines collection to join */ public static String join ( String start , String linePrefix , Collection < ? > lines ) { } }
if ( lines . isEmpty ( ) ) { return "" ; } StringBuilder out = new StringBuilder ( start ) ; for ( Object line : lines ) { out . append ( linePrefix ) . append ( line ) . append ( "\n" ) ; } return out . substring ( 0 , out . length ( ) - 1 ) ; // lose last EOL
public class TemplateGenerator { /** * @ return the program to execute * @ throws gw . lang . parser . exceptions . ParseException */ private Program compile ( Stack < IScriptPartId > scriptPartIdStack , String strCompiledSource , ISymbolTable symbolTable , Map < String , List < IFunctionSymbol > > dfsDeclByName , IT...
IGosuParser parser = GosuParserFactory . createParser ( symbolTable , ScriptabilityModifiers . SCRIPTABLE ) ; for ( IScriptPartId id : scriptPartIdStack ) { ( ( GosuParser ) parser ) . pushScriptPart ( id ) ; } parser . setScript ( strCompiledSource ) ; if ( parser instanceof GosuParser ) { parser . setDfsDeclInSetByNa...
public class GregorianCalendar { /** * Returns the lowest maximum value for the given calendar field * of this < code > GregorianCalendar < / code > instance . The lowest * maximum value is defined as the smallest value returned by * { @ link # getActualMaximum ( int ) } for any possible time value , * taking i...
switch ( field ) { case MONTH : case DAY_OF_MONTH : case DAY_OF_YEAR : case WEEK_OF_YEAR : case WEEK_OF_MONTH : case DAY_OF_WEEK_IN_MONTH : case YEAR : { GregorianCalendar gc = ( GregorianCalendar ) clone ( ) ; gc . setLenient ( true ) ; gc . setTimeInMillis ( gregorianCutover ) ; int v1 = gc . getActualMaximum ( field...
public class QueueProcessManager { /** * If we have the TECHSUPPORT or ADMIN permission then return null . Those users can see everything so no filter required . * For the rest we only display queues they have permission to see and only processes in WAIT status . * @ param permissionManager * @ return filter */ p...
if ( permissionManager . hasPermission ( FixedPermissions . TECHSUPPORT ) || permissionManager . hasPermission ( FixedPermissions . ADMIN ) ) { return null ; } Set < String > visibleQueues = getVisibleQueues ( permissionManager ) ; Filter filters [ ] = new Filter [ visibleQueues . size ( ) ] ; int i = 0 ; for ( String ...
public class SqlHelper { /** * update set列 * @ param entityClass * @ param entityName 实体映射名 * @ param notNull 是否判断 ! = null * @ param notEmpty 是否判断String类型 ! = ' ' * @ return */ public static String updateSetColumns ( Class < ? > entityClass , String entityName , boolean notNull , boolean notEmpty ) { } }
StringBuilder sql = new StringBuilder ( ) ; sql . append ( "<set>" ) ; // 获取全部列 Set < EntityColumn > columnSet = EntityHelper . getColumns ( entityClass ) ; // 对乐观锁的支持 EntityColumn versionColumn = null ; // 逻辑删除列 EntityColumn logicDeleteColumn = null ; // 当某个列有主键策略时 , 不需要考虑他的属性是否为空 , 因为如果为空 , 一定会根据主键策略给他生成一个值 for ( Ent...
public class SelectExtension { /** * toggles the selection of the item at the given position * @ param position the global position */ public void toggleSelection ( int position ) { } }
if ( mFastAdapter . getItem ( position ) . isSelected ( ) ) { deselect ( position ) ; } else { select ( position ) ; }
public class ProtocolItemStream { /** * Return the destinationHandler that the protocol itemstream is associated * with */ public BaseDestinationHandler getDestinationHandler ( ) { } }
if ( tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestinationHandler" ) ; SibTr . exit ( tc , "getDestinationHandler" , destinationHandler ) ; } return destinationHandler ;
public class JobsInner { /** * Create a job of the runbook . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param jobId The job id . * @ param parameters The parameters supplied to the create job operation . * @ param serv...
return ServiceFuture . fromResponse ( createWithServiceResponseAsync ( resourceGroupName , automationAccountName , jobId , parameters ) , serviceCallback ) ;
public class ClassModel { /** * If a field does not satisfy the private memory conditions , null , otherwise the size of private memory required . */ public Integer getPrivateMemorySize ( String fieldName ) throws ClassParseException { } }
if ( CacheEnabler . areCachesEnabled ( ) ) return privateMemorySizes . computeIfAbsent ( fieldName ) ; return computePrivateMemorySize ( fieldName ) ;
public class ComplexCondition { /** * Wait for a signal on the condition . Must call { @ code lock ( ) } first * and { @ code unlock ( ) } afterwards . * @ return A boolean value that indicates whether or not a signal was received . False * indicates a timeout occurred before a signal was received . * @ throws ...
boolean noTimeout = true ; // Use a loop and a boolean to avoid spurious time outs . try { while ( ! isSignal && noTimeout ) { noTimeout = conditionVar . await ( timeoutPeriod , timeoutUnits ) ; } } finally { isSignal = false ; } return noTimeout ;
public class MithraNotificationEventManagerImpl { /** * Must only be called from the thread which is used for registration */ private RegistrationEntryList getRegistrationEntryList ( String subject , RelatedFinder finder ) { } }
RegistrationEntryList registrationEntryList ; RegistrationKey key = new RegistrationKey ( subject , finder . getFinderClassName ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "**************Adding application notification registration with key: " + key . toString ( ) ) ; } registrationEntryList = mithra...
public class Configuration { /** * Get processing parameters from a string - string map * @ param pParams params to extra . A parameter " p " is used as extra path info * @ return the processing parameters */ public ProcessingParameters getProcessingParameters ( Map < String , String > pParams ) { } }
Map < ConfigKey , String > procParams = ProcessingParameters . convertToConfigMap ( pParams ) ; for ( Map . Entry < ConfigKey , String > entry : globalConfig . entrySet ( ) ) { ConfigKey key = entry . getKey ( ) ; if ( key . isRequestConfig ( ) && ! procParams . containsKey ( key ) ) { procParams . put ( key , entry . ...
public class Signature { /** * Returns a Signature object that implements the specified signature * algorithm . * < p > This method traverses the list of registered security Providers , * starting with the most preferred Provider . * A new Signature object encapsulating the * SignatureSpi implementation from ...
List < Service > list ; if ( algorithm . equalsIgnoreCase ( RSA_SIGNATURE ) ) { list = GetInstance . getServices ( rsaIds ) ; } else { list = GetInstance . getServices ( "Signature" , algorithm ) ; } Iterator < Service > t = list . iterator ( ) ; if ( t . hasNext ( ) == false ) { throw new NoSuchAlgorithmException ( al...
public class SipStandardManager { /** * For debugging : return a list of all session ids currently active */ public String listSipSessionIds ( ) { } }
StringBuffer sb = new StringBuffer ( ) ; Iterator < MobicentsSipSession > sipSessions = sipManagerDelegate . getAllSipSessions ( ) ; while ( sipSessions . hasNext ( ) ) { sb . append ( sipSessions . next ( ) . getKey ( ) ) . append ( " " ) ; } return sb . toString ( ) ;
public class ChannelUtils { /** * Check and report on any missing configuration . */ public static synchronized void checkMissingConfig ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Checking for missing config" ) ; } if ( delayedConfig . isEmpty ( ) ) { return ; } delayCheckSignaled = false ; final ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; Map < String , Map < String , St...
public class QuatSymmetryDetector { /** * Returns a List of LOCAL symmetry results . This means that a subset of the * { @ link SubunitCluster } is left out of the symmetry calculation . Each * element of the List is one possible LOCAL symmetry result . * Determine local symmetry if global structure is : ( 1 ) as...
Set < Set < Integer > > knownCombinations = new HashSet < > ( ) ; List < SubunitCluster > clusters = globalComposition . getClusters ( ) ; // more than one subunit per cluster required for symmetry List < SubunitCluster > nontrivialClusters = clusters . stream ( ) . filter ( cluster -> ( cluster . size ( ) > 1 ) ) . co...
public class XMLFormatterUtils { /** * Determine if the given string can be written to an XML file without * encoding . This will be the case so long as the string does not contain * illegal XML characters . * @ param s * String to examine for illegal XML characters * @ return true if the String can be writte...
int length = s . length ( ) ; // Loop through the string by UNICODE codepoints . This is NOT equivalent // to looping through the characters because some UNICODE codepoints can // occupy more than one character . int index = 0 ; while ( index < length ) { int codePoint = s . codePointAt ( index ) ; if ( ! isValidXMLCha...
public class PerfMonCollector { /** * ensure we start only on one host ( if multiple slaves ) */ private synchronized static boolean isWorkingHost ( String host ) { } }
if ( workerHost == null ) { workerHost = host ; return true ; } else { return host . equals ( workerHost ) ; }
public class DescribeHsmRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeHsmRequest describeHsmRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeHsmRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeHsmRequest . getHsmArn ( ) , HSMARN_BINDING ) ; protocolMarshaller . marshall ( describeHsmRequest . getHsmSerialNumber ( ) , HSMSERIALNUMBER_BINDING ) ; } ca...
public class IPv4AddressSeqRange { /** * Equivalent to { @ link # getPrefixCount ( int ) } but returns a long * @ return */ public long getIPv4PrefixCount ( int prefixLength ) { } }
if ( prefixLength < 0 ) { throw new PrefixLenException ( this , prefixLength ) ; } int bitCount = getBitCount ( ) ; if ( bitCount <= prefixLength ) { return getIPv4Count ( ) ; } int shiftAdjustment = bitCount - prefixLength ; long upperAdjusted = getUpper ( ) . longValue ( ) >>> shiftAdjustment ; long lowerAdjusted = g...
public class SessionApi { /** * Init Session * The GET operation will init user session . * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < ApiSuccessResponse > initProvisio...
com . squareup . okhttp . Call call = initProvisioningValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class NullabilityUtil { /** * NOTE : this method does not work for getting all annotations of parameters of methods from class * files . For that case , use { @ link # getAllAnnotationsForParameter ( Symbol . MethodSymbol , int ) } * @ param symbol the symbol * @ return all annotations on the symbol and on...
// for methods , we care about annotations on the return type , not on the method type itself Stream < ? extends AnnotationMirror > typeUseAnnotations = getTypeUseAnnotations ( symbol ) ; return Stream . concat ( symbol . getAnnotationMirrors ( ) . stream ( ) , typeUseAnnotations ) ;
public class Scope { /** * The resource types of only those AWS resources that you want to trigger an evaluation for the rule . You can only * specify one type if you also specify a resource ID for < code > ComplianceResourceId < / code > . * < b > NOTE : < / b > This method appends the values to the existing list ...
if ( this . complianceResourceTypes == null ) { setComplianceResourceTypes ( new com . amazonaws . internal . SdkInternalList < String > ( complianceResourceTypes . length ) ) ; } for ( String ele : complianceResourceTypes ) { this . complianceResourceTypes . add ( ele ) ; } return this ;
public class ThreadIdentityManager { /** * Check for recursion . * As a rule , ThreadIdentityManager should NEVER be re - entered . However , it can * be called from the Tr code ( during log rollover , for example ) , so if the * ThreadIdentityService issues another Tr ( or if ANY code called by ThreadIdentitySer...
if ( recursionMarker . get ( ) == null ) { recursionMarker . set ( Boolean . TRUE ) ; return false ; } else { return true ; // recursion detected . }
public class GreenPepperRepository { /** * { @ inheritDoc } */ public Document loadDocument ( String location ) throws Exception { } }
Vector < String > definition = getDefinition ( location ) ; DocumentRepository repository = getRepository ( definition ) ; String specLocation = definition . get ( 4 ) + ( implemented != null ? "?implemented=" + implemented : "" ) ; Document document = repository . loadDocument ( specLocation ) ; if ( postExecutionResu...
public class TarUtils { /** * Creates a gzipped tar archive from the given path , streaming the data to the give output * stream . * @ param dirPath the path to archive * @ param output the output stream to write the data to */ public static void writeTarGz ( Path dirPath , OutputStream output ) throws IOExceptio...
GzipCompressorOutputStream zipStream = new GzipCompressorOutputStream ( output ) ; TarArchiveOutputStream archiveStream = new TarArchiveOutputStream ( zipStream ) ; for ( Path subPath : Files . walk ( dirPath ) . collect ( toList ( ) ) ) { if ( Thread . interrupted ( ) ) { throw new InterruptedException ( ) ; } File fi...
public class JDBC4ResultSet { /** * ResultSet object as a Clob object in the Java programming language . */ @ Override public Clob getClob ( int columnIndex ) throws SQLException { } }
checkColumnBounds ( columnIndex ) ; try { return new SerialClob ( table . getString ( columnIndex - 1 ) . toCharArray ( ) ) ; } catch ( Exception x ) { throw SQLError . get ( x ) ; }
public class ZooJdoProperties { /** * Property that defines whether evict ( ) should also reset primitive values . By default , * ZooDB only resets references to objects , even though the JDO spec states that all fields * should be evicted . * In a properly enhanced / activated class , the difference should no be...
DBTracer . logCall ( this , flag ) ; put ( ZooConstants . PROPERTY_EVICT_PRIMITIVES , Boolean . toString ( flag ) ) ; return this ;
public class ElemExsltFuncResult { /** * Generate the EXSLT function return value , and assign it to the variable * index slot assigned for it in ElemExsltFunction compose ( ) . */ public void execute ( TransformerImpl transformer ) throws TransformerException { } }
XPathContext context = transformer . getXPathContext ( ) ; // Verify that result has not already been set by another result // element . Recursion is allowed : intermediate results are cleared // in the owner ElemExsltFunction execute ( ) . if ( transformer . currentFuncResultSeen ( ) ) { throw new TransformerException...
public class RespokeDirectConnection { /** * Send a message to the remote client through the direct connection . * @ param message The message to send * @ param completionListener A listener to receive a notification on the success of the asynchronous operation */ public void sendMessage ( String message , final Re...
if ( isActive ( ) ) { JSONObject jsonMessage = new JSONObject ( ) ; try { jsonMessage . put ( "message" , message ) ; byte [ ] rawMessage = jsonMessage . toString ( ) . getBytes ( Charset . forName ( "UTF-8" ) ) ; ByteBuffer directData = ByteBuffer . allocateDirect ( rawMessage . length ) ; directData . put ( rawMessag...
public class TreeCoreset { /** * computes the hypothetical cost if the node would be split with new centers centreA , centreB */ double treeNodeSplitCost ( treeNode node , Point centreA , Point centreB ) { } }
// loop counter variable int i ; // stores the cost double sum = 0.0 ; for ( i = 0 ; i < node . n ; i ++ ) { // loop counter variable int l ; // stores the distance between p and centreA double distanceA = 0.0 ; for ( l = 0 ; l < node . points [ i ] . dimension ; l ++ ) { // centroid coordinate of the point double cent...
public class CPOptionPersistenceImpl { /** * Returns the cp options before and after the current cp option in the ordered set where uuid = & # 63 ; . * @ param CPOptionId the primary key of the current cp option * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < ...
CPOption cpOption = findByPrimaryKey ( CPOptionId ) ; Session session = null ; try { session = openSession ( ) ; CPOption [ ] array = new CPOptionImpl [ 3 ] ; array [ 0 ] = getByUuid_PrevAndNext ( session , cpOption , uuid , orderByComparator , true ) ; array [ 1 ] = cpOption ; array [ 2 ] = getByUuid_PrevAndNext ( ses...
public class Clientlib { /** * A link that matches this . */ @ Override public ClientlibLink makeLink ( ) { } }
return new ClientlibLink ( getType ( ) , ClientlibLink . Kind . CLIENTLIB , resource . getPath ( ) , null ) ;
public class Yoke { /** * When you need to share global properties with your requests you can add them * to Yoke and on every request they will be available as request . get ( String ) * @ param key unique identifier * @ param value Any non null value , nulls are not saved */ public Yoke set ( @ NotNull String ke...
if ( value == null ) { defaultContext . remove ( key ) ; } else { defaultContext . put ( key , value ) ; } return this ;
public class GlParticlesView { /** * { @ inheritDoc } */ public void setLineThickness ( @ FloatRange ( from = 1 ) final float lineThickness ) { } }
queueEvent ( new Runnable ( ) { @ Override public void run ( ) { scene . setLineThickness ( lineThickness ) ; } } ) ;
public class ZealotKhala { /** * 执行生成in范围查询SQL片段的方法 . * @ param prefix 前缀 * @ param field 数据库字段 * @ param values 数组的值 * @ param match 是否匹配 * @ param positive true则表示是in , 否则是not in * @ return ZealotKhala实例的当前实例 */ private ZealotKhala doIn ( String prefix , String field , Object [ ] values , boolean match , ...
return this . doInByType ( prefix , field , values , match , ZealotConst . OBJTYPE_ARRAY , positive ) ;
public class PostgreSQLDatabase { /** * { @ inheritDoc } */ @ Override protected StringBuilder getAlterColumn ( final String _columnName , final org . efaps . db . databases . AbstractDatabase . ColumnType _columnType ) { } }
final StringBuilder ret = new StringBuilder ( ) . append ( " alter " ) . append ( getColumnQuote ( ) ) . append ( _columnName ) . append ( getColumnQuote ( ) ) . append ( " type " ) . append ( getWriteSQLTypeName ( _columnType ) ) ; return ret ;
public class FPGrowth { /** * Generates a local FP tree * @ param node the conditional patterns given this node to construct the local FP - tree . * @ rerurn the local FP - tree . */ private FPTree getLocalFPTree ( FPTree . Node node , int [ ] localItemSupport , int [ ] prefixItemset ) { } }
FPTree tree = new FPTree ( localItemSupport , minSupport ) ; while ( node != null ) { Node parent = node . parent ; int i = prefixItemset . length ; while ( parent != null ) { if ( localItemSupport [ parent . id ] >= minSupport ) { prefixItemset [ -- i ] = parent . id ; } parent = parent . parent ; } if ( i < prefixIte...
public class GetContextKeysForCustomPolicyResult { /** * The list of context keys that are referenced in the input policies . * @ return The list of context keys that are referenced in the input policies . */ public java . util . List < String > getContextKeyNames ( ) { } }
if ( contextKeyNames == null ) { contextKeyNames = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return contextKeyNames ;
public class BtcFormat { /** * Set both the currency symbol and code of the underlying , mutable NumberFormat object * according to the given denominational units scale factor . This is for formatting , not parsing . * < p > Set back to zero when you ' re done formatting otherwise immutability , equals ( ) and * ...
checkState ( Thread . holdsLock ( numberFormat ) ) ; // make sure caller intends to reset before changing DecimalFormatSymbols fs = numberFormat . getDecimalFormatSymbols ( ) ; setSymbolAndCode ( numberFormat , prefixSymbol ( fs . getCurrencySymbol ( ) , scale ) , prefixCode ( fs . getInternationalCurrencySymbol ( ) , ...
public class JobScheduleEnableOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has not been modified since the specified time . * @ param ifUnmodifiedSince the ifUnmodifiedSince value to set * ...
if ( ifUnmodifiedSince == null ) { this . ifUnmodifiedSince = null ; } else { this . ifUnmodifiedSince = new DateTimeRfc1123 ( ifUnmodifiedSince ) ; } return this ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getPagePositionInformation ( ) { } }
if ( pagePositionInformationEClass == null ) { pagePositionInformationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 370 ) ; } return pagePositionInformationEClass ;
public class Graphics { /** * Sets the MatrixMode . * @ param mode * Either PROJECTION or MODELVIEW */ public void matrixMode ( MatrixMode mode ) { } }
switch ( mode ) { case PROJECTION : gl . glMatrixMode ( GL2 . GL_PROJECTION ) ; break ; case MODELVIEW : gl . glMatrixMode ( GL2 . GL_MODELVIEW ) ; break ; default : break ; }
public class StorePackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getModelCheckerResultHeader ( ) { } }
if ( modelCheckerResultHeaderEClass == null ) { modelCheckerResultHeaderEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 93 ) ; } return modelCheckerResultHeaderEClass ;
public class ScopedServletUtils { /** * If the request is a ScopedRequest , this returns an attribute whose name is scoped to that request ' s scope - ID ; * otherwise , it is a straight passthrough to { @ link HttpSession # getAttribute } . * @ exclude */ public static Object getScopedSessionAttr ( String attrName...
HttpSession session = request . getSession ( false ) ; if ( session != null ) { return session . getAttribute ( getScopedSessionAttrName ( attrName , request ) ) ; } else { return null ; }
public class OCommandExecutorSQLTruncateCluster { /** * Execute the command . */ public Object execute ( final Map < Object , Object > iArgs ) { } }
if ( clusterName == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not been parsed yet" ) ; OCluster cluster = ( ( OStorageEmbedded ) getDatabase ( ) . getStorage ( ) ) . getClusterByName ( clusterName ) ; final long recs = cluster . getEntries ( ) ; try { cluster . truncate ( ...
public class EntityFilter { /** * Create { @ code QueryFind } by { @ code assetType } and { @ code EntityFilter . find } . * @ param assetType information about Asset type . * @ return created object { @ code QueryFind } . */ public QueryFind buildFind ( IAssetType assetType ) { } }
String searchString = find . getSearchString ( ) ; if ( ( searchString != null ) && ( searchString . trim ( ) . length ( ) != 0 ) ) { AttributeSelection attributes = new AttributeSelection ( ) ; if ( find . fields . size ( ) > 0 ) { for ( String field : find . fields ) { attributes . add ( assetType . getAttributeDefin...
public class SpaceRest { /** * see SpaceResource . getSpaceACLs ( String , String ) ; * @ return 200 response with space ACLs included as header values */ @ Path ( "/acl/{spaceID}" ) @ HEAD public Response getSpaceACLs ( @ PathParam ( "spaceID" ) String spaceID , @ QueryParam ( "storeID" ) String storeID ) { } }
String msg = "getting space ACLs(" + spaceID + ", " + storeID + ")" ; try { log . debug ( msg ) ; return addSpaceACLsToResponse ( Response . ok ( ) , spaceID , storeID ) ; } catch ( ResourceNotFoundException e ) { return responseNotFound ( msg , e , NOT_FOUND ) ; } catch ( ResourceException e ) { return responseBad ( m...
public class CfgParseTree { /** * Gets a new parse tree equivalent to this one , with probability * { @ code this . probability * amount } . * @ param amount * @ return */ public CfgParseTree multiplyProbability ( double amount ) { } }
if ( isTerminal ( ) ) { return new CfgParseTree ( root , ruleType , terminal , getProbability ( ) * amount , spanStart , spanEnd ) ; } else { return new CfgParseTree ( root , ruleType , left , right , getProbability ( ) * amount ) ; }
public class Choice8 { /** * Specialize this choice ' s projection to a { @ link Tuple8 } . * @ return a { @ link Tuple8} */ @ Override public Tuple8 < Maybe < A > , Maybe < B > , Maybe < C > , Maybe < D > , Maybe < E > , Maybe < F > , Maybe < G > , Maybe < H > > project ( ) { } }
return into8 ( HList :: tuple , CoProduct8 . super . project ( ) ) ;
public class BulkProcessor { /** * Validate the byte contents of a bulk entry that has been edited before being submitted for retry . * @ param retryDataBuffer The new entry contents * @ return A BytesRef that contains the entry contents , potentially cleaned up . * @ throws EsHadoopIllegalArgumentException In th...
BytesRef result = new BytesRef ( ) ; byte closeBrace = '}' ; byte newline = '\n' ; int newlines = 0 ; for ( byte b : retryDataBuffer ) { if ( b == newline ) { newlines ++ ; } } result . add ( retryDataBuffer ) ; // Check to make sure that either the last byte is a closed brace or a new line . byte lastByte = retryDataB...
public class NumberColumn { /** * Returns the count of missing values in this column */ @ Override public int countMissing ( ) { } }
int count = 0 ; for ( int i = 0 ; i < size ( ) ; i ++ ) { if ( isMissing ( i ) ) { count ++ ; } } return count ;
public class OAuthClientUtil { /** * Check the response from the endpoint to see if there was an error */ boolean isErrorResponse ( HttpResponse response ) { } }
StatusLine status = response . getStatusLine ( ) ; if ( status == null || status . getStatusCode ( ) != 200 ) { return true ; } return false ;
public class LdapRdn { /** * Get a String representation of this LdapRdn for use in urls . * @ return a String representation of this LdapRdn for use in urls . */ public String encodeUrl ( ) { } }
StringBuffer sb = new StringBuffer ( DEFAULT_BUFFER_SIZE ) ; for ( Iterator iter = components . values ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { LdapRdnComponent component = ( LdapRdnComponent ) iter . next ( ) ; sb . append ( component . encodeUrl ( ) ) ; if ( iter . hasNext ( ) ) { sb . append ( "+" ) ; } } retur...
public class HealthWebEndpointResponseMapper { /** * Maps the given { @ code health } to a { @ link WebEndpointResponse } , honouring the * mapper ' s default { @ link ShowDetails } using the given { @ code securityContext } . * @ param health the health to map * @ param securityContext the security context * @...
return map ( health , securityContext , this . showDetails ) ;
public class Transform { /** * Add a parameter for the transformation * @ param name * @ param value * @ see Transformer # setParameter ( java . lang . String , java . lang . Object ) */ public void setParameter ( String name , Object value ) { } }
parameters . put ( name , value ) ; transformation . addParameter ( name , value ) ;
public class NativeInterface { public static void methodExit ( String mname , String cname ) { } }
System . err . println ( "methodExit( " + cname + "::" + mname + ")" ) ;
public class OLAPMonoService { /** * initService */ @ Override public void startService ( ) { } }
Utils . require ( OLAPService . instance ( ) . getState ( ) . isInitialized ( ) , "OLAPMonoService requires the OLAPService" ) ; OLAPService . instance ( ) . waitForFullService ( ) ;
public class Iteration { /** * Begin an { @ link Iteration } over the selection that is placed on the top of the { @ link Variables } . Also sets the name of the variable for this * iteration ' s " current element " ( i . e payload ) to have the default value . */ public static IterationBuilderOver over ( ) { } }
Iteration iterationImpl = new Iteration ( new TopLayerSingletonFramesSelector ( ) ) ; iterationImpl . setPayloadManager ( new NamedIterationPayloadManager ( DEFAULT_SINGLE_VARIABLE_STRING ) ) ; return iterationImpl ;
public class DescribeThingTypeRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeThingTypeRequest describeThingTypeRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeThingTypeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeThingTypeRequest . getThingTypeName ( ) , THINGTYPENAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request...
public class IPv6Address { /** * Set a bit in the address . * @ param bit to set ( in the range [ 0 , 127 ] ) * @ return an address with the given bit set */ public IPv6Address setBit ( final int bit ) { } }
if ( bit < 0 || bit > 127 ) throw new IllegalArgumentException ( "can only set bits in the interval [0, 127]" ) ; if ( bit < 64 ) { return new IPv6Address ( this . highBits , this . lowBits | ( 1L << bit ) ) ; } else { return new IPv6Address ( this . highBits | ( 1L << ( bit - 64 ) ) , this . lowBits ) ; }
public class BufferBuilder { /** * 获取带泛型的类型名称 * @ param type * @ param actTypes * @ return */ public String getVarTypeName ( Class < ? > type , Type ... actTypes ) { } }
String varType = getVarTypeName ( type ) ; if ( actTypes != null ) { List < String > acts = new ArrayList < > ( ) ; for ( Type act : actTypes ) { acts . add ( act . getTypeName ( ) ) ; } if ( ! acts . isEmpty ( ) ) { if ( acts . size ( ) == 1 ) { varType += "<" + acts . remove ( 0 ) + ">" ; } else { varType += "<" + St...
public class KeyVaultClientCustomImpl { /** * Imports a certificate into the specified vault . * @ param importCertificateRequest * the grouped properties for importing a certificate request * @ return the CertificateBundle if successful . */ public CertificateBundle importCertificate ( ImportCertificateRequest i...
return importCertificate ( importCertificateRequest . vaultBaseUrl ( ) , importCertificateRequest . certificateName ( ) , importCertificateRequest . base64EncodedCertificate ( ) , importCertificateRequest . password ( ) , importCertificateRequest . certificatePolicy ( ) , importCertificateRequest . certificateAttribute...
public class FactoryHelper { /** * Creates an instance from a String class name . * @ param genericAccessObjectManager * @ param className * full class name * @ param classLoader * the class will be loaded with this ClassLoader * @ return new instance of the class * @ throws RuntimeException * if class ...
return newInstanceFromName ( enclosingObject , className , FactoryHelper . class . getClassLoader ( ) ) ;
public class BaseField { /** * Move the physical binary data to this SQL parameter row . * This is overidden to move the physical data type . * @ param resultset The resultset to get the SQL data from . * @ param iColumn the column in the resultset that has my data . * @ exception SQLException From SQL calls . ...
String strResult = resultset . getString ( iColumn ) ; if ( resultset . wasNull ( ) ) this . setString ( Constants . BLANK , false , DBConstants . READ_MOVE ) ; // Null value else this . setString ( strResult , false , DBConstants . READ_MOVE ) ;
public class Gamma { /** * Returns the value of log & nbsp ; & Gamma ; ( x ) for x & nbsp ; & gt ; & nbsp ; 0. * For x & le ; 8 , the implementation is based on the double precision * implementation in the < em > NSWC Library of Mathematics Subroutines < / em > , * { @ code DGAMLN } . For x & gt ; 8 , the impleme...
double ret ; if ( Double . isNaN ( x ) || ( x <= 0.0 ) ) { ret = Double . NaN ; } else if ( x < 0.5 ) { return logGamma1p ( x ) - Math . log ( x ) ; } else if ( x <= 2.5 ) { return logGamma1p ( ( x - 0.5 ) - 0.5 ) ; } else if ( x <= 8.0 ) { final int n = ( int ) Math . floor ( x - 1.5 ) ; double prod = 1.0 ; for ( int ...
public class ReportUtil { /** * Get subreports for a report * @ param report current report * @ return list of subreports */ public static List < Report > getSubreports ( Report report ) { } }
List < Report > subreports = new ArrayList < Report > ( ) ; List < Band > bands = report . getLayout ( ) . getDocumentBands ( ) ; for ( Band band : bands ) { for ( int i = 0 , rows = band . getRowCount ( ) ; i < rows ; i ++ ) { List < BandElement > list = band . getRow ( i ) ; for ( int j = 0 , size = list . size ( ) ;...
public class StreamDescriptionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StreamDescription streamDescription , ProtocolMarshaller protocolMarshaller ) { } }
if ( streamDescription == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( streamDescription . getStreamName ( ) , STREAMNAME_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getStreamARN ( ) , STREAMARN_BINDING ) ; protocolMar...
public class Stream { /** * Takes elements while the { @ code IndexedPredicate } returns { @ code true } . * < p > This is an intermediate operation . * < p > Example : * < pre > * from : 2 * step : 2 * predicate : ( index , value ) - & gt ; ( index + value ) & lt ; 8 * stream : [ 1 , 2 , 3 , 4 , - 5 , - ...
return new Stream < T > ( params , new ObjTakeWhileIndexed < T > ( new IndexedIterator < T > ( from , step , iterator ) , predicate ) ) ;
public class ListTrafficPolicyInstancesByHostedZoneResult { /** * A list that contains one < code > TrafficPolicyInstance < / code > element for each traffic policy instance that matches * the elements in the request . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * {...
if ( this . trafficPolicyInstances == null ) { setTrafficPolicyInstances ( new com . amazonaws . internal . SdkInternalList < TrafficPolicyInstance > ( trafficPolicyInstances . length ) ) ; } for ( TrafficPolicyInstance ele : trafficPolicyInstances ) { this . trafficPolicyInstances . add ( ele ) ; } return this ;
public class Files { /** * Move source file to requested destination but do not overwrite . This method takes care to not overwrite destination * file and returns false if it already exists . Note that this method does not throw exceptions if move fails and * caller should always test returned boolean to determine ...
Params . notNull ( sourcePath , "Source path" ) ; Params . notNull ( targetPath , "Target path" ) ; File sourceFile = new File ( sourcePath ) ; if ( ! sourceFile . exists ( ) ) { log . error ( "Missing file to move |%s|." , sourcePath ) ; return false ; } File targetFile = new File ( targetPath ) ; if ( targetFile . ex...
public class ControlMessageImpl { /** * Helper method to append a string array to a summary string method */ protected static void appendArray ( StringBuilder buff , String name , String [ ] values ) { } }
buff . append ( ',' ) ; buff . append ( name ) ; buff . append ( "=[" ) ; if ( values != null ) { for ( int i = 0 ; i < values . length ; i ++ ) { if ( i != 0 ) buff . append ( ',' ) ; buff . append ( values [ i ] ) ; } } buff . append ( ']' ) ;
public class PorterStemmer { /** * / * step5 ( ) takes off - ant , - ence etc . , in context < c > vcvc < v > . */ private final void step5 ( ) { } }
if ( k == 0 ) return ; /* for Bug 1 */ switch ( sb . charAt ( k - 1 ) ) { case 'a' : if ( ends ( "al" ) ) break ; return ; case 'c' : if ( ends ( "ance" ) ) break ; if ( ends ( "ence" ) ) break ; return ; case 'e' : if ( ends ( "er" ) ) break ; return ; case 'i' : if ( ends ( "ic" ) ) break ; return ; case 'l' : if ( e...
public class JDialogFactory { /** * Factory method for create a { @ link JDialog } object . * @ param parentComponent * the parent component * @ param title * the title * @ param modal * the modal * @ param gc * the { @ code GraphicsConfiguration } of the target screen device ; if { @ code null } , * ...
final JDialog dialog ; Window window = AwtExtensions . getWindowForComponent ( parentComponent ) ; if ( window instanceof Frame ) { dialog = new JDialog ( ( Frame ) window , title , modal , gc ) ; } else if ( window instanceof Dialog ) { dialog = new JDialog ( ( Dialog ) window , title , modal , gc ) ; } else { dialog ...
public class Invoice { /** * Retrieves the invoice with the given ID . */ public static Invoice retrieve ( String invoice ) throws StripeException { } }
return retrieve ( invoice , ( Map < String , Object > ) null , ( RequestOptions ) null ) ;
public class ActionRequestProcessor { public OptionalThing < VirtualForm > prepareActionForm ( ActionRuntime runtime ) { } }
final ActionExecute execute = runtime . getActionExecute ( ) ; final OptionalThing < VirtualForm > optForm = execute . createActionForm ( ) ; optForm . ifPresent ( form -> saveFormToRequest ( execute , form ) ) ; // to use form tag runtime . manageActionForm ( optForm ) ; // to use in action hook return optForm ;
public class Injector { /** * Get and return a random team . If the selected team is too old w . r . t its expiration , remove * it , replacing it with a new team . */ private static TeamInfo randomTeam ( ArrayList < TeamInfo > list ) { } }
int index = random . nextInt ( list . size ( ) ) ; TeamInfo team = list . get ( index ) ; // If the selected team is expired , remove it and return a new team . long currTime = System . currentTimeMillis ( ) ; if ( ( team . getEndTimeInMillis ( ) < currTime ) || team . numMembers ( ) == 0 ) { System . out . println ( "...
public class GraphDecision { @ Override public void apply ( ) throws ContradictionException { } }
if ( branch == 1 ) { if ( to == - 1 ) { assignment . apply ( var , from , this ) ; } else { assignment . apply ( var , from , to , this ) ; } } else if ( branch == 2 ) { if ( to == - 1 ) { assignment . unapply ( var , from , this ) ; } else { assignment . unapply ( var , from , to , this ) ; } }
public class ImagesInner { /** * Update an image . * @ param resourceGroupName The name of the resource group . * @ param imageName The name of the image . * @ param parameters Parameters supplied to the Update Image operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ ...
return updateWithServiceResponseAsync ( resourceGroupName , imageName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class GuiText { /** * Splits the cache in multiple lines to fit in the { @ link # wrapSize } . * @ param str the str */ private void buildLines ( ) { } }
wrapSize . update ( ) ; buildLines |= wrapSize . hasChanged ( ) ; if ( ! buildLines ) return ; lines . clear ( ) ; String str = cache . replace ( "\r?(?<=\n)" , "\n" ) ; StringBuilder line = new StringBuilder ( ) ; StringBuilder word = new StringBuilder ( ) ; // FontRenderOptions fro = new FontRenderOptions ( ) ; int w...
public class XAbstractFeatureCallImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case XbasePackage . XABSTRACT_FEATURE_CALL__FEATURE : setFeature ( ( JvmIdentifiableElement ) null ) ; return ; case XbasePackage . XABSTRACT_FEATURE_CALL__TYPE_ARGUMENTS : getTypeArguments ( ) . clear ( ) ; return ; case XbasePackage . XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER : setImplicitRecei...
public class ModuleInfo { /** * Get the { @ link PackageInfo } objects for all packages that are members of this module . * @ return the list of { @ link PackageInfo } objects for all packages that are members of this module . */ public PackageInfoList getPackageInfo ( ) { } }
if ( packageInfoSet == null ) { return new PackageInfoList ( 1 ) ; } final PackageInfoList packageInfoList = new PackageInfoList ( packageInfoSet ) ; CollectionUtils . sortIfNotEmpty ( packageInfoList ) ; return packageInfoList ;
public class DescribeConfigRuleEvaluationStatusRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeConfigRuleEvaluationStatusRequest describeConfigRuleEvaluationStatusRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeConfigRuleEvaluationStatusRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeConfigRuleEvaluationStatusRequest . getConfigRuleNames ( ) , CONFIGRULENAMES_BINDING ) ; protocolMarshaller . marshall ( describeConfig...
public class AbstractZealotConfig { /** * 添加自定义标签和其对应的Handler class . * @ param tagName 标签名称 * @ param handlerCls 动态处理类的反射类型 */ protected static void add ( String tagName , Class < ? extends IConditHandler > handlerCls ) { } }
tagHandlerMap . put ( tagName , new TagHandler ( handlerCls ) ) ;
public class SpanCell { /** * Sets the value of the title attribute for the HTML span . * @ param title * @ jsptagref . attributedescription The title for the HTML span . * @ jsptagref . attributesyntaxvalue < i > string _ title < / i > * @ netui : attribute required = " false " rtexprvalue = " true " descripti...
_spanState . registerAttribute ( AbstractHtmlState . ATTR_GENERAL , HtmlConstants . TITLE , title ) ;
public class EnvironmentConfig { /** * Sets the number of milliseconds which deletion of any successfully cleaned { @ code Log } file ( . xd file ) * is postponed for . Default value is { @ code 5000 } . * < p > Mutable at runtime : yes * @ param delay number of milliseconds which deletion of any successfully cle...
if ( delay < 0 ) { throw new InvalidSettingException ( "Invalid GC files deletion delay: " + delay ) ; } return setSetting ( GC_FILES_DELETION_DELAY , delay ) ;
public class sdcard { /** * Writes a file to Disk . * This is an I / O operation and this method executes in the main thread , so it is recommended to * perform this operation using another thread . * @ param file The file to write to Disk . */ public void writeToFile ( File file , String fileContent ) { } }
if ( ! file . exists ( ) ) { try { FileWriter writer = new FileWriter ( file ) ; writer . write ( fileContent ) ; writer . close ( ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { } }
public class EPSImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . EPS__PSEG_NAME : return PSEG_NAME_EDEFAULT == null ? psegName != null : ! PSEG_NAME_EDEFAULT . equals ( psegName ) ; } return super . eIsSet ( featureID ) ;
public class DatabaseJournal { /** * Synchronize contents from journal . May be overridden by subclasses . * Do the initial sync in batchMode , since some databases ( PSQL ) when * not in transactional mode , load all results in memory which causes * out of memory . See JCR - 2832 * @ param startRevision start ...
if ( ! startup ) { // if the cluster node is not starting do a normal sync doSync ( startRevision ) ; } else { try { startBatch ( ) ; try { doSync ( startRevision ) ; } finally { endBatch ( true ) ; } } catch ( SQLException e ) { throw new JournalException ( "Couldn't sync the cluster node" , e ) ; } }
public class PageFlowStack { /** * Destroy the stack of { @ link PageFlowController } s that have invoked nested page flows . * @ param request the current HttpServletRequest . */ public void destroy ( HttpServletRequest request ) { } }
StorageHandler sh = Handlers . get ( getServletContext ( ) ) . getStorageHandler ( ) ; HttpServletRequest unwrappedRequest = PageFlowUtils . unwrapMultipart ( request ) ; RequestContext rc = new RequestContext ( unwrappedRequest , null ) ; String attrName = ScopedServletUtils . getScopedSessionAttrName ( JPF_STACK_ATTR...
public class SpiderTransaction { /** * Delete the primary field storage row for the given object . This usually called * when the object is being deleted . * @ param tableDef { @ link TableDefinition } that owns object . * @ param objID ID of object whose " objects " row is to be deleted . */ public void deleteOb...
deleteRow ( SpiderService . objectsStoreName ( tableDef ) , objID ) ;
public class FileSystem { /** * Reply the basename of the specified file without all the extensions . * < p > Caution : This function does not support URL format . * @ param filename is the name to parse . * @ return the basename of the specified file without all the extensions . */ @ Pure public static String sh...
if ( filename == null ) { return null ; } if ( isWindowsNativeFilename ( filename ) ) { return shortBasename ( normalizeWindowsNativeFilename ( filename ) ) ; } try { return shortBasename ( new URL ( filename ) ) ; } catch ( Exception exception ) { // No log } final String normalizedFilename = fromFileStandardToURLStan...
public class DeviceAttribute_3DAODefaultImpl { public DevState [ ] extractDevStateArray ( ) throws DevFailed { } }
manageExceptions ( "extractDevStateArray()" ) ; try { if ( isArray ( ) ) { return DevVarStateArrayHelper . extract ( attrval . value ) ; } else { // It is used for state attribute return new DevState [ ] { DevStateHelper . extract ( attrval . value ) } ; } } catch ( final org . omg . CORBA . BAD_PARAM e ) { Except . th...
public class CustomerSession { /** * Add the input source to the current customer object . * @ param sourceId the ID of the source to be added * @ param listener a { @ link SourceRetrievalListener } to be notified when the api call is * complete */ public void addCustomerSource ( @ NonNull String sourceId , @ Non...
final Map < String , Object > arguments = new HashMap < > ( ) ; arguments . put ( KEY_SOURCE , sourceId ) ; arguments . put ( KEY_SOURCE_TYPE , sourceType ) ; final String operationId = UUID . randomUUID ( ) . toString ( ) ; if ( listener != null ) { mSourceRetrievalListeners . put ( operationId , listener ) ; } mEphem...
public class Hashids { /** * Encrypt numbers to string * @ param numbers the numbers to encrypt * @ return the encrypt string */ public String encode ( long ... numbers ) { } }
String retval = "" ; if ( numbers . length == 0 ) { return retval ; } return this . _encode ( numbers ) ;