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 the container group to be created or updated . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the ContainerGroupInner object if successful . */ public ContainerGroupInner beginCreateOrUpdate ( String resourceGroupName , String containerGroupName , ContainerGroupInner containerGroup ) { } }
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.specification.vendor" , "java.specification.name" , "java.class.version" , "java.class.path" , "java.library.path" , "java.io.tmpdir" , "java.compiler" , "java.ext.dirs" , "os.name" , "os.arch" , "os.version" , "file.separator" , "path.separator" , "line.separator" , "user.name" , "user.home" , "user.dir" , "java.runtime.name" , "sun.boot.library.path" , "java.vendor.url" , "file.encoding.pkg" , "sun.java.launcher" , "user.country" , "sun.os.patch.level" , "java.runtime.version" , "java.awt.graphicsenv" , "java.endorsed.dirs" , "user.variant" , "sun.jnu.encoding" , "sun.management.compiler" , "user.timezone" , "java.awt.printerjob" , "file.encoding" , "sun.arch.data.model" , "user.language" , "awt.toolkit" , "java.vm.info" , "sun.boot.class.path" , "java.vendor" , "java.vendor.url.bug" , "sun.io.unicode.encoding" , "sun.cpu.endian" , "sun.desktop" , "sun.cpu.isalist" ) ; final Properties sysProperties = System . getProperties ( ) ; for ( final Object obj : sysProperties . keySet ( ) ) { final String key = ( String ) obj ; // We don ' t override for the default defined system keys . if ( disallowedKeys . contains ( key ) ) { continue ; } final String value = sysProperties . getProperty ( key ) ; final boolean doSecurely = key . startsWith ( "_" ) ; if ( doSecurely ) { logger . warning ( "Pulling override from System.getProperty: '" + key + "'=***PROTECTED***" ) ; } else { logger . warning ( "Pulling override from System.getProperty: '" + key + "'='" + value + "'" ) ; } setOverride ( key , value ) ; }
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 , NoSuchAlgorithmException { } }
InputStream is = new FileInputStream ( pCaCert ) ; try { CertificateFactory certFactory = CertificateFactory . getInstance ( "X509" ) ; X509Certificate cert = ( X509Certificate ) certFactory . generateCertificate ( is ) ; String alias = cert . getSubjectX500Principal ( ) . getName ( ) ; pTrustStore . setCertificateEntry ( alias , cert ) ; } finally { is . close ( ) ; }
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 , ITypeUsesMap typeUsesMap , Stack < BlockExpression > blocks , ContextInferenceManager ctxInferenceMgr ) throws ParseResultsException { } }
IGosuParser parser = GosuParserFactory . createParser ( symbolTable , ScriptabilityModifiers . SCRIPTABLE ) ; for ( IScriptPartId id : scriptPartIdStack ) { ( ( GosuParser ) parser ) . pushScriptPart ( id ) ; } parser . setScript ( strCompiledSource ) ; if ( parser instanceof GosuParser ) { parser . setDfsDeclInSetByName ( dfsDeclByName ) ; if ( ctxInferenceMgr != null ) { ( ( GosuParser ) parser ) . setContextInferenceManager ( ctxInferenceMgr ) ; } } if ( typeUsesMap == null ) { typeUsesMap = parser . getTypeUsesMap ( ) ; } else { parser . setTypeUsesMap ( typeUsesMap ) ; } if ( _fqn != null ) { typeUsesMap . addToTypeUses ( GosuClassUtil . getPackage ( _fqn ) + ".*" ) ; } if ( blocks != null ) { ( ( GosuParser ) parser ) . setBlocks ( blocks ) ; } if ( _supertype != null && _supertype instanceof IGosuClassInternal ) { IGosuClassInternal supertype = ( IGosuClassInternal ) _supertype ; addStaticSymbols ( symbolTable , ( GosuParser ) parser , supertype ) ; List < ? extends GosuClassTypeLoader > typeLoaders = TypeSystem . getCurrentModule ( ) . getTypeLoaders ( GosuClassTypeLoader . class ) ; for ( GosuClassTypeLoader typeLoader : typeLoaders ) { List < ? extends IGosuEnhancement > enhancementsForType = typeLoader . getEnhancementIndex ( ) . getEnhancementsForType ( supertype ) ; for ( IGosuEnhancement enhancement : enhancementsForType ) { if ( enhancement instanceof IGosuEnhancementInternal ) { addStaticSymbols ( symbolTable , ( GosuParser ) parser , ( IGosuEnhancementInternal ) enhancement ) ; } } } // clear out private DFS that may have made their way into the dfsDecldsByName ( jove this is ugly ) for ( Entry < String , List < IFunctionSymbol > > dfsDecls : parser . getDfsDecls ( ) . entrySet ( ) ) { for ( Iterator < IFunctionSymbol > it = dfsDecls . getValue ( ) . iterator ( ) ; it . hasNext ( ) ; ) { IFunctionSymbol fs = it . next ( ) ; if ( fs instanceof Symbol && fs . isPrivate ( ) ) { it . remove ( ) ; } } } } IScriptPartId scriptPart ; ISymbol thisSymbol = symbolTable . getSymbol ( Keyword . KW_this . getName ( ) ) ; if ( thisSymbol != null && thisSymbol . getType ( ) instanceof IGosuClass ) { scriptPart = new ScriptPartId ( thisSymbol . getType ( ) , GS_TEMPLATE_PARSED ) ; } else { scriptPart = new TypelessScriptPartId ( GS_TEMPLATE_PARSED ) ; } Program program = ( Program ) parser . parseProgram ( scriptPart , null , null , true ) ; program . clearParseTreeInformation ( ) ; return program ;
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 into consideration the current values of the * { @ link Calendar # getFirstDayOfWeek ( ) getFirstDayOfWeek } , * { @ link Calendar # getMinimalDaysInFirstWeek ( ) getMinimalDaysInFirstWeek } , * { @ link # getGregorianChange ( ) getGregorianChange } and * { @ link Calendar # getTimeZone ( ) getTimeZone } methods . * @ param field the calendar field * @ return the lowest maximum value for the given calendar field . * @ see # getMinimum ( int ) * @ see # getMaximum ( int ) * @ see # getGreatestMinimum ( int ) * @ see # getActualMinimum ( int ) * @ see # getActualMaximum ( int ) */ @ Override public int getLeastMaximum ( int field ) { } }
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 ) ; gc . setTimeInMillis ( gregorianCutover - 1 ) ; int v2 = gc . getActualMaximum ( field ) ; return Math . min ( LEAST_MAX_VALUES [ field ] , Math . min ( v1 , v2 ) ) ; } } return LEAST_MAX_VALUES [ 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 */ public Filter getQueueFilter ( PermissionManager permissionManager ) { } }
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 queueName : visibleQueues ) { filters [ i ++ ] = new Compare . Equal ( "queueName" , queueName ) ; } Filter statusFilter [ ] = new Filter [ 2 ] ; statusFilter [ 0 ] = new Or ( filters ) ; statusFilter [ 1 ] = new Compare . Equal ( "status" , TaskStatus . WAIT ) ; Filter userFilter [ ] = new Filter [ 2 ] ; userFilter [ 0 ] = new Compare . Equal ( "lockedBy" , permissionManager . getCurrentUser ( ) ) ; userFilter [ 1 ] = new Compare . Equal ( "status" , TaskStatus . BUSY ) ; return new Or ( new And ( statusFilter ) , new And ( userFilter ) ) ;
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 ( EntityColumn column : columnSet ) { if ( column . getEntityField ( ) . isAnnotationPresent ( Version . class ) ) { if ( versionColumn != null ) { throw new VersionException ( entityClass . getCanonicalName ( ) + " 中包含多个带有 @Version 注解的字段,一个类中只能存在一个带有 @Version 注解的字段!" ) ; } versionColumn = column ; } if ( column . getEntityField ( ) . isAnnotationPresent ( LogicDelete . class ) ) { if ( logicDeleteColumn != null ) { throw new LogicDeleteException ( entityClass . getCanonicalName ( ) + " 中包含多个带有 @LogicDelete 注解的字段,一个类中只能存在一个带有 @LogicDelete 注解的字段!" ) ; } logicDeleteColumn = column ; } if ( ! column . isId ( ) && column . isUpdatable ( ) ) { if ( column == versionColumn ) { Version version = versionColumn . getEntityField ( ) . getAnnotation ( Version . class ) ; String versionClass = version . nextVersion ( ) . getCanonicalName ( ) ; sql . append ( "<bind name=\"" ) . append ( column . getProperty ( ) ) . append ( "Version\" value=\"" ) ; // version = $ { @ tk . mybatis . mapper . version @ nextVersionClass ( " versionClass " , version ) } sql . append ( "@tk.mybatis.mapper.version.VersionUtil@nextVersion(" ) . append ( "@" ) . append ( versionClass ) . append ( "@class, " ) ; if ( StringUtil . isNotEmpty ( entityName ) ) { sql . append ( entityName ) . append ( "." ) ; } sql . append ( column . getProperty ( ) ) . append ( ")\"/>" ) ; sql . append ( column . getColumn ( ) ) . append ( " = #{" ) . append ( column . getProperty ( ) ) . append ( "Version}," ) ; } else if ( column == logicDeleteColumn ) { sql . append ( logicDeleteColumnEqualsValue ( column , false ) ) . append ( "," ) ; } else if ( notNull ) { sql . append ( SqlHelper . getIfNotNull ( entityName , column , column . getColumnEqualsHolder ( entityName ) + "," , notEmpty ) ) ; } else { sql . append ( column . getColumnEqualsHolder ( entityName ) + "," ) ; } } } sql . append ( "</set>" ) ; return sql . toString ( ) ;
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 serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < JobInner > createAsync ( String resourceGroupName , String automationAccountName , UUID jobId , JobCreateParameters parameters , final ServiceCallback < JobInner > serviceCallback ) { } }
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 InterruptedException The calling thread was interrupted by another thread . */ public boolean await ( ) throws InterruptedException { } }
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 = mithraApplicationNotificationSubscriber . get ( key ) ; if ( registrationEntryList == null ) { registrationEntryList = new RegistrationEntryList ( ) ; mithraApplicationNotificationSubscriber . put ( key , registrationEntryList ) ; } return registrationEntryList ;
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 . getValue ( ) ) ; } } return new ProcessingParameters ( procParams , pParams . get ( PATH_QUERY_PARAM ) ) ;
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 the first * Provider that supports the specified algorithm is returned . * < p > Note that the list of registered providers may be retrieved via * the { @ link Security # getProviders ( ) Security . getProviders ( ) } method . * @ param algorithm the standard name of the algorithm requested . * See the Signature section in the < a href = * " { @ docRoot } openjdk - redirect . html ? v = 8 & path = / technotes / guides / security / StandardNames . html # Signature " > * Java Cryptography Architecture Standard Algorithm Name Documentation < / a > * for information about standard algorithm names . * @ return the new Signature object . * @ exception NoSuchAlgorithmException if no Provider supports a * Signature implementation for the * specified algorithm . * @ see Provider */ public static Signature getInstance ( String algorithm ) throws NoSuchAlgorithmException { } }
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 ( algorithm + " Signature not available" ) ; } // try services until we find an Spi or a working Signature subclass NoSuchAlgorithmException failure ; do { Service s = t . next ( ) ; if ( isSpi ( s ) ) { return new Delegate ( algorithm ) ; } else { // must be a subclass of Signature , disable dynamic selection try { Instance instance = GetInstance . getInstance ( s , SignatureSpi . class ) ; return getInstance ( instance , algorithm ) ; } catch ( NoSuchAlgorithmException e ) { failure = e ; } } } while ( t . hasNext ( ) ) ; throw failure ;
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 , String [ ] > > parsed = extractConfig ( delayedConfig ) ; // check for missing factories from channel configs for ( Entry < String , String [ ] > entry : parsed . get ( "channels" ) . entrySet ( ) ) { for ( String prop : entry . getValue ( ) ) { if ( "type" . equals ( extractKey ( prop ) ) ) { String factory = extractValue ( prop ) ; if ( null == cf . lookupFactory ( factory ) ) { if ( tc . isWarningEnabled ( ) ) { Tr . warning ( tc , "missing.factory" , factory ) ; } } } } }
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 ) asymmetric , C1 ; ( 2) * heteromeric ( belongs to more than 1 subunit cluster ) ; ( 3 ) more than 2 * subunits ( heteromers with just 2 chains cannot have local symmetry ) * @ param globalComposition * { @ link Stoichiometry } object that contains global clustering results * @ param symmParams * quaternary symmetry parameters * @ return List of LOCAL quaternary structure symmetry results . Empty if * none . */ public static List < QuatSymmetryResults > calcLocalSymmetries ( Stoichiometry globalComposition , QuatSymmetryParameters symmParams ) { } }
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 ) ) . collect ( Collectors . toList ( ) ) ; QuatSymmetrySubunits consideredSubunits = new QuatSymmetrySubunits ( nontrivialClusters ) ; if ( consideredSubunits . getSubunitCount ( ) < 2 ) return new ArrayList < > ( ) ; Graph < Integer , DefaultEdge > graph = initContactGraph ( nontrivialClusters ) ; Stoichiometry nontrivialComposition = new Stoichiometry ( nontrivialClusters , false ) ; List < Integer > allSubunitIds = new ArrayList < > ( graph . vertexSet ( ) ) ; Collections . sort ( allSubunitIds ) ; List < Integer > allSubunitClusterIds = consideredSubunits . getClusterIds ( ) ; // since clusters are rearranged and trimmed , we need a reference to the original data // to maintain consistent IDs of clusters and subunits across all solutions Map < Integer , List < Integer > > clusterIdToSubunitIds = allSubunitIds . stream ( ) . collect ( Collectors . groupingBy ( allSubunitClusterIds :: get , Collectors . toList ( ) ) ) ; List < QuatSymmetryResults > redundantSymmetries = new ArrayList < > ( ) ; // first , find symmetries for single clusters and their groups // grouping is done based on symmetries found ( i . e . , no exhaustive permutation search is performed ) if ( clusters . size ( ) > 1 ) { List < QuatSymmetryResults > clusterSymmetries = calcLocalSymmetriesCluster ( nontrivialComposition , clusterIdToSubunitIds , symmParams , knownCombinations ) ; redundantSymmetries . addAll ( clusterSymmetries ) ; } // find symmetries for groups based on connectivity of subunits // disregarding initial clustering List < QuatSymmetryResults > graphSymmetries = calcLocalSymmetriesGraph ( nontrivialComposition , allSubunitClusterIds , clusterIdToSubunitIds , symmParams , knownCombinations , graph ) ; redundantSymmetries . addAll ( graphSymmetries ) ; // find symmetries which are not superseded by any other symmetry // e . g . , we have global stoichiometry of A3B3C , // the local symmetries found are C3 with stoichiometries A3 , B3 , A3B3; // then output only A3B3. List < QuatSymmetryResults > outputSymmetries = redundantSymmetries . stream ( ) . filter ( a -> redundantSymmetries . stream ( ) . noneMatch ( b -> a != b && a . isSupersededBy ( b ) ) ) . collect ( Collectors . toList ( ) ) ; if ( symmParams . isLocalLimitsExceeded ( knownCombinations ) ) { logger . warn ( "Exceeded calculation limits for local symmetry detection. The results may be incomplete." ) ; } return outputSymmetries ;
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 written to an XML file without * encoding ; false otherwise */ public static boolean isValidXMLString ( String s ) { } }
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 ( ! isValidXMLCharacter ( codePoint ) ) { return false ; } index += Character . charCount ( codePoint ) ; } // If we get here then all of the characters have been checked and are // valid . Unfortunately the usual case takes the longest to verify . return true ;
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 ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
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 = getLower ( ) . longValue ( ) >>> shiftAdjustment ; return upperAdjusted - lowerAdjusted + 1 ;
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 > initProvisioningWithHttpInfo ( ) throws ApiException { } }
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 the type of the symbol */ public static Stream < ? extends AnnotationMirror > getAllAnnotations ( Symbol symbol ) { } }
// 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 any ) . Use * { @ link # setComplianceResourceTypes ( java . util . Collection ) } or * { @ link # withComplianceResourceTypes ( java . util . Collection ) } if you want to override the existing values . * @ param complianceResourceTypes * 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 > . * @ return Returns a reference to this object so that method calls can be chained together . */ public Scope withComplianceResourceTypes ( String ... complianceResourceTypes ) { } }
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 ThreadIdentityService * issues a Tr ) , it will likely cause infinite recursion . * If we have NOT recursed , then this method will return false and set the recursionMarker . * Subsequent calls to this method on this thread will return true . * Once the recursion - safe block of code is finished , the recursionMarker must be reset * with a call to resetRecursionCheck . * TODO : despite the recursion safety , odd things may still happen in the logging code . * E . g , on log rollover , we may end up with an extra intermittent log between the * first call to runAsServer and the 2nd call ( which NO - OPs due to the recursion check ) . * Not sure how to fix this oddness . * And for the record , I am not at all satisfied with this hack - ish solution , but at * the moment I lack any better ideas . * Note : Problems may occur if we decide to do log rollover whilst in the middle of * setting the thread identity . E . g , suppose we ' re running as unprivileged user * " rob " , then we try to access the classloader . The classloader is wrapped * with a call to ThreadIdentityManager . runAsServer . We enter runAsServer , set * the recursion marker , then prior to setting the identity , we issue a trace * record which causes the logging code to rollover . The rollover tries to * issue a runAsServer , but that call is NO - OPed by the recursion check . So the * runAsServer in the rollover code never runs , and we try to create the rollover * log file using id " rob " , which fails . * In general , bad things happen when log - rollover and ThreadIdentityManagement are * both enabled . I ' m not sure if it ' s possible to avoid that badness , so we might * end up having to document the badness and / or prevent log rollover when * ThreadIdentityManagement is enabled . * @ return false , if we have NOT recursed . The recursionMarker is set . * true , if we have recursed . */ private static boolean checkForRecursionAndSet ( ) { } }
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 ( postExecutionResult ) { document . setSpecificationListener ( new PostExecutionResultSpecificationListener ( definition , document ) ) ; } return document ;
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 IOException , InterruptedException { } }
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 file = subPath . toFile ( ) ; TarArchiveEntry entry = new TarArchiveEntry ( file , dirPath . relativize ( subPath ) . toString ( ) ) ; archiveStream . putArchiveEntry ( entry ) ; if ( file . isFile ( ) ) { try ( InputStream fileIn = Files . newInputStream ( subPath ) ) { IOUtils . copy ( fileIn , archiveStream ) ; } } archiveStream . closeArchiveEntry ( ) ; } archiveStream . finish ( ) ; zipStream . finish ( ) ;
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 noticeable , because * access to primitive fields of evicted objects should always trigger a reload . Because of * this , ZooDB by default avoids the effort of resetting primitive fields . * Default is { @ code false } . * @ param flag The flag * @ return this * @ see ZooConstants # PROPERTY _ EVICT _ PRIMITIVES */ public ZooJdoProperties setZooEvictPrimitives ( boolean flag ) { } }
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 ( "An EXSLT function cannot set more than one result!" ) ; } int sourceNode = context . getCurrentNode ( ) ; // Set the return value ; XObject var = getValue ( transformer , sourceNode ) ; transformer . popCurrentFuncResult ( ) ; transformer . pushCurrentFuncResult ( var ) ;
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 Respoke . TaskCompletionListener completionListener ) { } }
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 ( rawMessage ) ; directData . flip ( ) ; DataChannel . Buffer data = new DataChannel . Buffer ( directData , false ) ; if ( dataChannel . send ( data ) ) { Respoke . postTaskSuccess ( completionListener ) ; } else { Respoke . postTaskError ( completionListener , "Error sending message" ) ; } } catch ( JSONException e ) { Respoke . postTaskError ( completionListener , "Unable to encode message to JSON" ) ; } } else { Respoke . postTaskError ( completionListener , "DataChannel not in an open state" ) ; }
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 centroidCoordinatePoint ; if ( node . points [ i ] . weight != 0.0 ) { centroidCoordinatePoint = node . points [ i ] . coordinates [ l ] / node . points [ i ] . weight ; } else { centroidCoordinatePoint = node . points [ i ] . coordinates [ l ] ; } // centroid coordinate of the centre double centroidCoordinateCentre ; if ( centreA . weight != 0.0 ) { centroidCoordinateCentre = centreA . coordinates [ l ] / centreA . weight ; } else { centroidCoordinateCentre = centreA . coordinates [ l ] ; } distanceA += ( centroidCoordinatePoint - centroidCoordinateCentre ) * ( centroidCoordinatePoint - centroidCoordinateCentre ) ; } // stores the distance between p and centreB double distanceB = 0.0 ; for ( l = 0 ; l < node . points [ i ] . dimension ; l ++ ) { // centroid coordinate of the point double centroidCoordinatePoint ; if ( node . points [ i ] . weight != 0.0 ) { centroidCoordinatePoint = node . points [ i ] . coordinates [ l ] / node . points [ i ] . weight ; } else { centroidCoordinatePoint = node . points [ i ] . coordinates [ l ] ; } // centroid coordinate of the centre double centroidCoordinateCentre ; if ( centreB . weight != 0.0 ) { centroidCoordinateCentre = centreB . coordinates [ l ] / centreB . weight ; } else { centroidCoordinateCentre = centreB . coordinates [ l ] ; } distanceB += ( centroidCoordinatePoint - centroidCoordinateCentre ) * ( centroidCoordinatePoint - centroidCoordinateCentre ) ; } // add the cost of the closest centre to the sum if ( distanceA < distanceB ) { sum += distanceA * node . points [ i ] . weight ; } else { sum += distanceB * node . points [ i ] . weight ; } } // return the total cost return sum ;
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 < code > null < / code > ) * @ return the previous , current , and next cp option * @ throws NoSuchCPOptionException if a cp option with the primary key could not be found */ @ Override public CPOption [ ] findByUuid_PrevAndNext ( long CPOptionId , String uuid , OrderByComparator < CPOption > orderByComparator ) throws NoSuchCPOptionException { } }
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 ( session , cpOption , uuid , orderByComparator , false ) ; return array ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; }
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 key , Object value ) { } }
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 , boolean positive ) { } }
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 < prefixItemset . length ) { tree . add ( i , prefixItemset . length , prefixItemset , node . count ) ; } node = node . next ; } return tree ;
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 * hashCode ( ) will break ! * @ param scale Number of places the decimal point will be shifted when formatting * a quantity of satoshis . */ protected static void prefixUnitsIndicator ( DecimalFormat numberFormat , int scale ) { } }
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 ( ) , scale ) ) ;
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 * @ return the JobScheduleEnableOptions object itself . */ public JobScheduleEnableOptions withIfUnmodifiedSince ( DateTime ifUnmodifiedSince ) { } }
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 , HttpServletRequest request ) { } }
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 ( ) ; } catch ( IOException e ) { throw new OCommandExecutionException ( "Error on executing command" , e ) ; } return recs ;
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 . getAttributeDefinition ( resolvePropertyName ( field ) ) ) ; } } else { if ( assetType . getShortNameAttribute ( ) != null ) { attributes . add ( assetType . getShortNameAttribute ( ) ) ; } if ( assetType . getNameAttribute ( ) != null ) { attributes . add ( assetType . getNameAttribute ( ) ) ; } if ( assetType . getDescriptionAttribute ( ) != null ) { attributes . add ( assetType . getDescriptionAttribute ( ) ) ; } } return new QueryFind ( find . getSearchString ( ) , attributes ) ; } return null ;
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 ( msg , e , INTERNAL_SERVER_ERROR ) ; } catch ( Exception e ) { return responseBad ( msg , e , INTERNAL_SERVER_ERROR ) ; }
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 the event that the document data cannot be simply cleaned up . */ private BytesRef validateEditedEntry ( byte [ ] retryDataBuffer ) { } }
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 = retryDataBuffer [ retryDataBuffer . length - 1 ] ; if ( lastByte == newline ) { // If last byte is a newline , make sure there are two newlines present in the data if ( newlines != 2 ) { throw new EsHadoopIllegalArgumentException ( "Encountered malformed data entry for bulk write retry. " + "Data contains [" + newlines + "] newline characters (\\n) but expected to have [2]." ) ; } } else if ( lastByte == closeBrace ) { // If the last byte is a closed brace , make sure there is only one newline in the data if ( newlines != 1 ) { throw new EsHadoopIllegalArgumentException ( "Encountered malformed data entry for bulk write retry. " + "Data contains [" + newlines + "] newline characters (\\n) but expected to have [1]." ) ; } // Add a newline to the entry in this case . byte [ ] trailingNewline = new byte [ ] { newline } ; result . add ( trailingNewline ) ; } // Further checks are probably intrusive to performance return result ;
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 ( "+" ) ; } } return sb . toString ( ) ;
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 the mapped response */ public WebEndpointResponse < Health > map ( Health health , SecurityContext securityContext ) { } }
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 to JSON: " + e . getMessage ( ) , e ) ; }
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 += "<" + String . join ( "," , acts ) + ">" ; } } } varType = varType . replace ( '$' , '.' ) ; return varType ;
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 importCertificateRequest ) { } }
return importCertificate ( importCertificateRequest . vaultBaseUrl ( ) , importCertificateRequest . certificateName ( ) , importCertificateRequest . base64EncodedCertificate ( ) , importCertificateRequest . password ( ) , importCertificateRequest . certificatePolicy ( ) , importCertificateRequest . certificateAttributes ( ) , importCertificateRequest . tags ( ) ) ;
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 not found or could not be instantiated */ public static Object newInstanceFromName ( Object enclosingObject , String className ) { } }
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 . */ public void moveSQLToField ( ResultSet resultset , int iColumn ) throws SQLException { } }
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 implementation is based on * < ul > * < li > < a href = " http : / / mathworld . wolfram . com / GammaFunction . html " > Gamma * Function < / a > , equation ( 28 ) . < / li > * < li > < a href = " http : / / mathworld . wolfram . com / LanczosApproximation . html " > * Lanczos Approximation < / a > , equations ( 1 ) through ( 5 ) . < / li > * < li > < a href = " http : / / my . fit . edu / ~ gabdo / gamma . txt " > Paul Godfrey , A note on * the computation of the convergent Lanczos complex Gamma * approximation < / a > < / li > * < / ul > * @ param x Argument . * @ return the value of { @ code log ( Gamma ( x ) ) } , { @ code Double . NaN } if * { @ code x < = 0.0 } . */ public static double logGamma ( double x ) { } }
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 i = 1 ; i <= n ; i ++ ) { prod *= x - i ; } return logGamma1p ( x - ( n + 1 ) ) + Math . log ( prod ) ; } else { double sum = lanczos ( x ) ; double tmp = x + LANCZOS_G + .5 ; ret = ( ( x + .5 ) * Math . log ( tmp ) ) - tmp + HALF_LOG_2_PI + Math . log ( sum / x ) ; } return ret ;
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 ( ) ; j < size ; j ++ ) { BandElement be = list . get ( j ) ; if ( be instanceof ReportBandElement ) { subreports . add ( ( ( ReportBandElement ) be ) . getReport ( ) ) ; } } } } return subreports ;
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 ) ; protocolMarshaller . marshall ( streamDescription . getStreamStatus ( ) , STREAMSTATUS_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getShards ( ) , SHARDS_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getHasMoreShards ( ) , HASMORESHARDS_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getRetentionPeriodHours ( ) , RETENTIONPERIODHOURS_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getStreamCreationTimestamp ( ) , STREAMCREATIONTIMESTAMP_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getEnhancedMonitoring ( ) , ENHANCEDMONITORING_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getEncryptionType ( ) , ENCRYPTIONTYPE_BINDING ) ; protocolMarshaller . marshall ( streamDescription . getKeyId ( ) , KEYID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
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 , - 6 , - 7] * index : [ 2 , 4 , 6 , 8 , 10 , 12 , 14] * sum : [ 3 , 6 , 9 , 12 , 5 , 6 , 7] * result : [ 1 , 2] * < / pre > * @ param from the initial value of the index ( inclusive ) * @ param step the step of the index * @ param predicate the { @ code IndexedPredicate } used to take elements * @ return the new stream * @ since 1.1.6 */ @ NotNull public Stream < T > takeWhileIndexed ( int from , int step , @ NotNull IndexedPredicate < ? super T > predicate ) { } }
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 * { @ link # setTrafficPolicyInstances ( java . util . Collection ) } or * { @ link # withTrafficPolicyInstances ( java . util . Collection ) } if you want to override the existing values . * @ param trafficPolicyInstances * A list that contains one < code > TrafficPolicyInstance < / code > element for each traffic policy instance that * matches the elements in the request . * @ return Returns a reference to this object so that method calls can be chained together . */ public ListTrafficPolicyInstancesByHostedZoneResult withTrafficPolicyInstances ( TrafficPolicyInstance ... trafficPolicyInstances ) { } }
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 if operation completes . * @ param sourcePath source file path , * @ param targetPath target file path . * @ return true if move completes , false if source does not exist , destination already exists or move fails . * @ throws IllegalArgumentException if source or target path parameter is null . */ public static boolean move ( String sourcePath , String targetPath ) throws IllegalArgumentException { } }
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 . exists ( ) ) { log . debug ( "Target file exists |%s|. File moving aborted." , targetPath ) ; return false ; } return sourceFile . renameTo ( targetFile ) ;
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 ( ends ( "able" ) ) break ; if ( ends ( "ible" ) ) break ; return ; case 'n' : if ( ends ( "ant" ) ) break ; if ( ends ( "ement" ) ) break ; if ( ends ( "ment" ) ) break ; /* element etc . not stripped before the m */ if ( ends ( "ent" ) ) break ; return ; case 'o' : if ( ends ( "ion" ) && j >= 0 && ( b [ j ] == 's' || b [ j ] == 't' ) ) break ; /* j > = 0 fixes Bug 2 */ if ( ends ( "ou" ) ) break ; return ; /* takes care of - ous */ case 's' : if ( ends ( "ism" ) ) break ; return ; case 't' : if ( ends ( "ate" ) ) break ; if ( ends ( "iti" ) ) break ; return ; case 'u' : if ( ends ( "ous" ) ) break ; return ; case 'v' : if ( ends ( "ive" ) ) break ; return ; case 'z' : if ( ends ( "ize" ) ) break ; return ; default : return ; } if ( m ( ) > 1 ) k = j ;
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 } , * the default system { @ code GraphicsConfiguration } is assumed * @ return the new { @ link JDialog } */ public static JDialog newJDialog ( Component parentComponent , String title , boolean modal , GraphicsConfiguration gc ) { } }
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 = new JDialog ( ( Frame ) null , title , modal , gc ) ; } return 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 ( "\nteam " + team + " is too old; replacing." ) ; System . out . println ( "start time: " + team . getStartTimeInMillis ( ) + ", end time: " + team . getEndTimeInMillis ( ) + ", current time:" + currTime ) ; removeTeam ( index ) ; // Add a new team in its stead . return ( addLiveTeam ( ) ) ; } else { return team ; }
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 * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the ImageInner object if successful . */ public ImageInner update ( String resourceGroupName , String imageName , ImageUpdate parameters ) { } }
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 wrapWidth = multiLine ? getWrapSize ( ) : - 1 ; float lineWidth = 0 ; float wordWidth = 0 ; float lineHeight = 0 ; StringWalker walker = new StringWalker ( str , fontOptions ) ; walker . skipChars ( false ) ; walker . applyStyles ( true ) ; while ( walker . walk ( ) ) { char c = walker . getChar ( ) ; lineWidth += walker . width ( ) ; wordWidth += walker . width ( ) ; lineHeight = Math . max ( lineHeight , walker . height ( ) ) ; word . append ( c ) ; // we just ended a new word , add it to the current line if ( Character . isWhitespace ( c ) || c == '-' || c == '.' ) { line . append ( word ) ; word . setLength ( 0 ) ; wordWidth = 0 ; } if ( isMultiLine ( ) && ( ( wrapWidth > 0 && lineWidth >= wrapWidth ) || c == '\n' ) ) { // the first word on the line is too large , split anyway if ( line . length ( ) == 0 ) { line . append ( word ) ; word . setLength ( 0 ) ; wordWidth = 0 ; } // remove current word from last line lineWidth -= wordWidth ; // add the new line lines . add ( new LineInfo ( line . toString ( ) , MathHelper . ceil ( lineWidth ) , MathHelper . ceil ( lineHeight ) , 0 ) ) ; line . setLength ( 0 ) ; lineWidth = wordWidth ; } } line . append ( word ) ; lines . add ( new LineInfo ( line . toString ( ) , MathHelper . ceil ( lineWidth ) , MathHelper . ceil ( lineHeight ) , 0 ) ) ; buildLines = false ; updateSize ( ) ;
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 : setImplicitReceiver ( ( XExpression ) null ) ; return ; case XbasePackage . XABSTRACT_FEATURE_CALL__INVALID_FEATURE_ISSUE_CODE : setInvalidFeatureIssueCode ( INVALID_FEATURE_ISSUE_CODE_EDEFAULT ) ; return ; case XbasePackage . XABSTRACT_FEATURE_CALL__IMPLICIT_FIRST_ARGUMENT : setImplicitFirstArgument ( ( XExpression ) null ) ; return ; } super . eUnset ( featureID ) ;
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 ( describeConfigRuleEvaluationStatusRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( describeConfigRuleEvaluationStatusRequest . getLimit ( ) , LIMIT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
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 " description = " The title for the HTML span . " */ public void setTitle ( String title ) { } }
_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 cleaned . xd file is postponed for * @ return this { @ code EnvironmentConfig } instance * @ throws InvalidSettingException { @ code delay } is less than { @ code 0 } . */ public EnvironmentConfig setGcFilesDeletionDelay ( final int delay ) throws InvalidSettingException { } }
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 point ( exclusive ) * @ param startup indicates if the cluster node is syncing on startup * or does a normal sync . * @ throws JournalException if an error occurs */ @ Override protected void doSync ( long startRevision , boolean startup ) throws JournalException { } }
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 , unwrappedRequest ) ; sh . removeAttribute ( rc , attrName ) ;
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 deleteObjectRow ( TableDefinition tableDef , String objID ) { } }
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 shortBasename ( String filename ) { } }
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 = fromFileStandardToURLStandard ( filename ) ; int idx ; int end = normalizedFilename . length ( ) ; do { end -- ; idx = normalizedFilename . lastIndexOf ( URL_PATH_SEPARATOR_CHAR , end ) ; } while ( idx >= 0 && end >= 0 && idx >= end ) ; final String basename ; if ( idx < 0 ) { if ( end < normalizedFilename . length ( ) - 1 ) { basename = normalizedFilename . substring ( 0 , end + 1 ) ; } else { basename = normalizedFilename ; } } else { basename = normalizedFilename . substring ( idx + 1 , end + 1 ) ; } idx = basename . indexOf ( getFileExtensionCharacter ( ) ) ; if ( idx < 0 ) { return basename ; } return basename . substring ( 0 , idx ) ;
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 . throw_wrong_data_exception ( e . toString ( ) , "Exception catched : " + e . toString ( ) + "\n" + "Maybe the attribute value has not been initialized" , "DeviceAttribute.extractDevStateArray()" ) ; } return new DevState [ 0 ] ; // never used
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 , @ NonNull @ Source . SourceType String sourceType , @ Nullable SourceRetrievalListener listener ) { } }
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 ) ; } mEphemeralKeyManager . retrieveEphemeralKey ( operationId , ACTION_ADD_SOURCE , arguments ) ;
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 ) ;