signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DataSetBuilder { /** * Private methods */ private IDataSet loadXmlDataSet ( final String xmlFile ) throws DataSetException { } }
final FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder ( ) ; flatXmlDataSetBuilder . setColumnSensing ( true ) ; addDtdIfDefined ( flatXmlDataSetBuilder , xmlFile ) ; return flatXmlDataSetBuilder . build ( Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( xmlFile ) ) ...
public class InternalServiceProviders { /** * Accessor for method . */ @ VisibleForTesting public static < T > Iterable < T > getCandidatesViaServiceLoader ( Class < T > klass , ClassLoader cl ) { } }
return ServiceProviders . getCandidatesViaServiceLoader ( klass , cl ) ;
public class J2CUtilityClass { /** * Finds the next Throwable object from the one provided . * @ param t The throwable to start with * @ return The next or linked , or initial cause . */ public static Throwable getNextThrowable ( Throwable t ) { } }
Throwable nextThrowable = null ; if ( t != null ) { // try getCause first . nextThrowable = t . getCause ( ) ; if ( nextThrowable == null ) { // if getCause returns null , look for the JDBC and JCA specific chained exceptions // in case the resource adapter or database has not implemented getCause and initCause yet . i...
public class ProcessAdapter { /** * Waits until the specified timeout for this { @ link Process } to stop . * This method handles the { @ link InterruptedException } thrown by { @ link Process # waitFor ( long , TimeUnit ) } * by resetting the interrupt bit on the current ( calling ) { @ link Thread } . * @ param...
try { return getProcess ( ) . waitFor ( timeout , unit ) ; } catch ( InterruptedException ignore ) { Thread . currentThread ( ) . interrupt ( ) ; return isNotRunning ( ) ; }
public class IbanUtil { /** * Calculates Iban * < a href = " http : / / en . wikipedia . org / wiki / ISO _ 13616 # Generating _ IBAN _ check _ digits " > Check Digit < / a > . * @ param iban string value * @ throws IbanFormatException if iban contains invalid character . * @ return check digit as String */ pub...
final String reformattedIban = replaceCheckDigit ( iban , Iban . DEFAULT_CHECK_DIGIT ) ; final int modResult = calculateMod ( reformattedIban ) ; final int checkDigitIntValue = ( 98 - modResult ) ; final String checkDigit = Integer . toString ( checkDigitIntValue ) ; return checkDigitIntValue > 9 ? checkDigit : "0" + c...
public class rewritepolicy_rewritepolicylabel_binding { /** * Use this API to count the filtered set of rewritepolicy _ rewritepolicylabel _ binding resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static long count_filtered ( nitro_service service , String na...
rewritepolicy_rewritepolicylabel_binding obj = new rewritepolicy_rewritepolicylabel_binding ( ) ; obj . set_name ( name ) ; options option = new options ( ) ; option . set_count ( true ) ; option . set_filter ( filter ) ; rewritepolicy_rewritepolicylabel_binding [ ] response = ( rewritepolicy_rewritepolicylabel_binding...
public class MMultiLineTableCellRenderer { /** * { @ inheritDoc } */ @ Override public void setValue ( final Object value ) { } }
if ( value == null ) { setToolTipText ( null ) ; setText ( "" ) ; } else { final String text = value . toString ( ) ; if ( text . indexOf ( '\n' ) == - 1 ) { setToolTipText ( null ) ; setText ( text ) ; } else { final StringBuilder sb = new StringBuilder ( text . length ( ) + text . length ( ) / 4 ) ; sb . append ( "<h...
public class FormInputHandler { /** * Creates a new { @ link FormInputHandler } based on this { @ link FormInputHandler } using the specified { @ link DataSet } to * retrieve values from . * @ param theDataSet * the { @ link DataSet } to retrieve the value from * @ return the new { @ link FormInputHandler } ins...
checkState ( dataSet == null , "Cannot specify a DataSet because a direct value is already set." ) ; Fields fields = new Fields ( this ) ; fields . dataSet = theDataSet ; return new FormInputHandler ( fields ) ;
public class MainForm { /** * / * Element Getter Methods - - - - - */ public javax . swing . JMenuBar getBaseMenuBar ( ) { } }
if ( baseMenuBar == null ) { baseMenuBar = new javax . swing . JMenuBar ( ) ; baseMenuBar . setName ( "baseMenuBar" ) ; baseMenuBar . add ( getMenu_File ( ) ) ; baseMenuBar . add ( getMenu_View ( ) ) ; baseMenuBar . add ( getMenu_LookAndFeel ( ) ) ; baseMenuBar . add ( getMenu_Help ( ) ) ; } return baseMenuBar ;
public class AmazonEC2Client { /** * Deletes the data feed for Spot Instances . * @ param deleteSpotDatafeedSubscriptionRequest * Contains the parameters for DeleteSpotDatafeedSubscription . * @ return Result of the DeleteSpotDatafeedSubscription operation returned by the service . * @ sample AmazonEC2 . Delete...
request = beforeClientExecution ( request ) ; return executeDeleteSpotDatafeedSubscription ( request ) ;
public class ClientProbeSenders { /** * This closes any of the underlying resources that a ProbeSender might be * using , such as a connection to a server somewhere . */ public void close ( ) { } }
for ( ProbeSender sender : getSenders ( ) ) { try { sender . close ( ) ; } catch ( TransportException e ) { LOGGER . warn ( "Issue closing the ProbeSender [" + sender . getDescription ( ) + "]" , e ) ; } }
public class ResolveSource { /** * replacement may be null to delete */ ResolveSource replaceWithinCurrentParent ( AbstractConfigValue old , AbstractConfigValue replacement ) { } }
if ( ConfigImpl . traceSubstitutionsEnabled ( ) ) ConfigImpl . trace ( "replaceWithinCurrentParent old " + old + "@" + System . identityHashCode ( old ) + " replacement " + replacement + "@" + System . identityHashCode ( old ) + " in " + this ) ; if ( old == replacement ) { return this ; } else if ( pathFromRoot != nul...
public class LimesurveyRC { /** * Gets all surveys . * @ return a stream of surveys * @ throws LimesurveyRCException the limesurvey rc exception */ public Stream < LsSurvey > getSurveys ( ) throws LimesurveyRCException { } }
JsonElement result = callRC ( new LsApiBody ( "list_surveys" , getParamsWithKey ( ) ) ) ; List < LsSurvey > surveys = gson . fromJson ( result , new TypeToken < List < LsSurvey > > ( ) { } . getType ( ) ) ; return surveys . stream ( ) ;
public class AllianceApi { /** * List alliance & # 39 ; s corporations List all current member corporations of * an alliance - - - This route is cached for up to 3600 seconds * @ param allianceId * An EVE alliance ID ( required ) * @ param datasource * The server name you would like data from ( optional , def...
com . squareup . okhttp . Call call = getAlliancesAllianceIdCorporationsValidateBeforeCall ( allianceId , datasource , ifNoneMatch , null ) ; Type localVarReturnType = new TypeToken < List < Integer > > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class PolymerClassRewriter { /** * Determine if the method parameter a quoted string or numeric literal recognized by Polymer . */ private static boolean isParamLiteral ( String param ) { } }
try { Double . parseDouble ( param ) ; return true ; } catch ( NumberFormatException e ) { // Check to see if the parameter is a literal - either a quoted string or // numeric literal if ( param . length ( ) > 1 && ( param . charAt ( 0 ) == '"' || param . charAt ( 0 ) == '\'' ) && param . charAt ( 0 ) == param . charAt...
public class MetaMethod { /** * Invokes the method this object represents . This method is not final but it should be overloaded very carefully and only by generated methods * there is no guarantee that it will be called * @ param object The object the method is to be called at . * @ param argumentArray Arguments...
argumentArray = coerceArgumentsToClasses ( argumentArray ) ; try { return invoke ( object , argumentArray ) ; } catch ( Exception e ) { throw processDoMethodInvokeException ( e , object , argumentArray ) ; }
public class BioCCollectionReader { /** * Reads the collection of documents . * @ return the BioC collection * @ throws XMLStreamException if an unexpected processing error occurs */ public BioCCollection readCollection ( ) throws XMLStreamException { } }
if ( collection != null ) { BioCCollection thisCollection = collection ; collection = null ; return thisCollection ; } return null ;
public class JavaTokenizer { /** * with annotation values . */ private boolean isMagicComment ( ) { } }
assert reader . ch == '@' ; int parens = 0 ; boolean stringLit = false ; int lbp = reader . bp ; char lch = reader . buf [ ++ lbp ] ; if ( ! Character . isJavaIdentifierStart ( lch ) ) { // The first thing after the @ has to be the annotation identifier return false ; } while ( lbp < reader . buflen ) { lch = reader . ...
public class JournalSet { /** * Called when some journals experience an error in some operation . */ private void disableAndReportErrorOnJournals ( List < JournalAndStream > badJournals , String status ) throws IOException { } }
if ( badJournals == null || badJournals . isEmpty ( ) ) { if ( forceJournalCheck ) { // check status here , because maybe some other operation // ( e . g . , rollEditLog failed and disabled journals ) but this // was missed by logSync ( ) exit runtime forceJournalCheck = false ; checkJournals ( status ) ; } return ; //...
public class ReloadingPropertyPlaceholderConfigurer { /** * copy & paste , just so we can insert our own visitor . * 启动时 进行配置的解析 */ protected void processProperties ( ConfigurableListableBeanFactory beanFactoryToProcess , Properties props ) throws BeansException { } }
BeanDefinitionVisitor visitor = new ReloadingPropertyPlaceholderConfigurer . PlaceholderResolvingBeanDefinitionVisitor ( props ) ; String [ ] beanNames = beanFactoryToProcess . getBeanDefinitionNames ( ) ; for ( int i = 0 ; i < beanNames . length ; i ++ ) { // Check that we ' re not parsing our own bean definition , //...
public class AmazonCloudFormationClient { /** * Returns information about whether a resource ' s actual configuration differs , or has < i > drifted < / i > , from it ' s * expected configuration , as defined in the stack template and any values specified as template parameters . This * information includes actual ...
request = beforeClientExecution ( request ) ; return executeDetectStackResourceDrift ( request ) ;
public class OBDAModel { /** * Announces to the listeners that a mapping was deleted . */ private void fireMappingDeleted ( URI srcuri , String mapping_id ) { } }
for ( OBDAMappingListener listener : mappingListeners ) { listener . mappingDeleted ( srcuri ) ; }
public class FSDirectory { /** * Delete a path from the name space * Update the count at each ancestor directory with quota * @ param src a string representation of a path to an inode * @ param modificationTime the time the inode is removed * @ return the deleted target inode , null if deletion failed */ INode ...
return unprotectedDelete ( src , this . getExistingPathINodes ( src ) , null , BLOCK_DELETION_NO_LIMIT , modificationTime ) ;
public class Bag { /** * Retrieve a mapped element and return it as a Float . * @ param key A string value used to index the element . * @ param notFound A function to create a new Float if the requested key was not found * @ return The element as a Float , or notFound if the element is not found . */ public Floa...
return getParsed ( key , Float :: new , notFound ) ;
public class TimeoutImpl { /** * Restart the timer . . . stop the timer , reset the stopped flag and then start again with the same timeout policy */ public void restart ( ) { } }
lock . writeLock ( ) . lock ( ) ; try { if ( this . timeoutTask == null ) { throw new IllegalStateException ( Tr . formatMessage ( tc , "internal.error.CWMFT4999E" ) ) ; } stop ( ) ; this . stopped = false ; start ( this . timeoutTask ) ; } finally { lock . writeLock ( ) . unlock ( ) ; }
public class SubnetworkClient { /** * Retrieves an aggregated list of usable subnetworks . * < p > Sample code : * < pre > < code > * try ( SubnetworkClient subnetworkClient = SubnetworkClient . create ( ) ) { * ProjectName project = ProjectName . of ( " [ PROJECT ] " ) ; * for ( UsableSubnetwork element : su...
ListUsableSubnetworksHttpRequest request = ListUsableSubnetworksHttpRequest . newBuilder ( ) . setProject ( project ) . build ( ) ; return listUsableSubnetworks ( request ) ;
public class CalendarScanListener { /** * If this file should be processed , return true . */ public boolean filterDirectory ( File file ) { } }
boolean bProcessFile = super . filterDirectory ( file ) ; if ( bProcessFile == false ) return bProcessFile ; String strName = file . getName ( ) ; for ( String strMonth : m_rgstrMonths ) { if ( strName . equalsIgnoreCase ( strMonth ) ) return false ; } if ( Utility . isNumeric ( strName ) ) { int iYear = Integer . pars...
public class App { /** * Pauses the test for a set amount of time * @ param seconds - the number of seconds to wait */ public void wait ( double seconds ) { } }
String action = "Wait " + seconds + SECONDS ; String expected = WAITED + seconds + SECONDS ; try { Thread . sleep ( ( long ) ( seconds * 1000 ) ) ; } catch ( InterruptedException e ) { log . warn ( e ) ; reporter . fail ( action , expected , "Failed to wait " + seconds + SECONDS + ". " + e . getMessage ( ) ) ; Thread ....
public class Graphics { /** * Fill polygon . The coordinates are in logical coordinates . This also supports * basic alpha compositing rules for combining source and destination * colors to achieve blending and transparency effects with graphics and images . * @ param alpha the constant alpha to be multiplied wit...
int [ ] [ ] c = new int [ coord . length ] [ 2 ] ; for ( int i = 0 ; i < coord . length ; i ++ ) { c [ i ] = projection . screenProjection ( coord [ i ] ) ; } int [ ] x = new int [ c . length ] ; for ( int i = 0 ; i < c . length ; i ++ ) { x [ i ] = c [ i ] [ 0 ] ; } int [ ] y = new int [ c . length ] ; for ( int i = 0...
public class NodeUtil { /** * Whether the child node is the FINALLY block of a try . */ static boolean isTryFinallyNode ( Node parent , Node child ) { } }
return parent . isTry ( ) && parent . hasXChildren ( 3 ) && child == parent . getLastChild ( ) ;
public class Mmff { /** * Assign the partial charges , all existing charges are cleared . * Atom types must be assigned first . * @ param mol molecule * @ return charges were assigned * @ see # effectiveCharges ( IAtomContainer ) * @ see # assignAtomTypes ( IAtomContainer ) */ public boolean partialCharges ( ...
int [ ] [ ] adjList = mol . getProperty ( MMFF_ADJLIST_CACHE ) ; GraphUtil . EdgeToBondMap edgeMap = mol . getProperty ( MMFF_EDGEMAP_CACHE ) ; if ( adjList == null || edgeMap == null ) throw new IllegalArgumentException ( "Invoke assignAtomTypes first." ) ; effectiveCharges ( mol ) ; for ( int v = 0 ; v < mol . getAto...
public class QRSCT { /** * Sets the text of this builder ! ! ! If you set this attribute , attribute * reference will be reset to an empty string ! ! ! It ' s only possible to * define one of these attributes * @ param text * text ( max length : 140) * @ return QRSCT builder */ public QRSCT text ( String text...
if ( text != null && text . length ( ) <= 140 ) { this . reference = "" ; // $ NON - NLS - 1 $ this . text = checkValidSigns ( text ) ; return this ; } throw new IllegalArgumentException ( "supplied text [" + text // $ NON - NLS - 1 $ + "] not valid: has to be not null and of max length 140" ) ; // $ NON - NLS - 1 $
public class DummyInternalTransaction { /** * ( non - Javadoc ) * @ see com . ibm . ws . objectManager . InternalTransaction # addFromCheckpoint ( com . ibm . ws . objectManager . ManagedObject , com . ibm . ws . objectManager . Transaction ) */ protected synchronized void addFromCheckpoint ( ManagedObject managedObj...
throw new InvalidStateException ( this , InternalTransaction . stateTerminated , InternalTransaction . stateNames [ InternalTransaction . stateTerminated ] ) ;
public class AuditLoggerFactory { /** * Creates new instance of audit logger based on given type and parameters and * registers it directly in given ksession to receive its events . * Depending on the types several properties are supported : * < bold > JPA < / bold > * No properties are supported * < bold > J...
AbstractAuditLogger logger = null ; switch ( type ) { case JPA : logger = new JPAWorkingMemoryDbLogger ( ksession ) ; break ; case JMS : boolean transacted = true ; if ( properties . containsKey ( "jbpm.audit.jms.transacted" ) ) { transacted = ( Boolean ) properties . get ( "jbpm.audit.jms.transacted" ) ; } logger = ne...
public class DependsFileParser { /** * Extracts all build - time dependency information from a dependencies . properties file * embedded in this plugin ' s JAR . * @ param artifactId This plugin ' s artifactId . * @ return A SortedMap relating [ groupId ] / [ artifactId ] keys to DependencyInfo values . * @ thr...
// Check sanity Validate . notEmpty ( artifactId , "artifactNamePart" ) ; Exception extractionException = null ; try { // Get the ClassLoader used final ClassLoader contextClassLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; final List < URL > manifestURLs = Collections . list ( contextClassLoader . g...
public class IcalParseUtil { /** * parse a period value of the form & lt ; start & gt ; / & lt ; end & gt ; , converting * from the given timezone to UTC . * This does not yet recognize the & lt ; start & gt ; / & lt ; duration & gt ; form . */ public static PeriodValue parsePeriodValue ( String s , TimeZone tzid )...
int sep = s . indexOf ( '/' ) ; if ( sep < 0 ) { throw new ParseException ( s , s . length ( ) ) ; } DateValue start = parseDateValue ( s . substring ( 0 , sep ) , tzid ) , end = parseDateValue ( s . substring ( sep + 1 ) , tzid ) ; if ( ( start instanceof TimeValue ) != ( end instanceof TimeValue ) ) { throw new Parse...
public class Ix { /** * Performs a running accumulation , that is , returns intermediate elements returned by the * scanner function . * The result ' s iterator ( ) doesn ' t support remove ( ) . * @ param scanner the function that receives the previous ( or first ) accumulated element and the current * element...
return new IxScan < T > ( this , nullCheck ( scanner , "scanner is null" ) ) ;
public class MultiViewOps { /** * Given a fundamental matrix a pair of camera matrices P0 and P1 can be extracted . Same * { @ link # fundamentalToProjective ( DMatrixRMaj , Point3D _ F64 , Vector3D _ F64 , double ) } but with the suggested values * for all variables filled in for you . * @ see FundamentalToProje...
FundamentalToProjective f2p = new FundamentalToProjective ( ) ; DMatrixRMaj P = new DMatrixRMaj ( 3 , 4 ) ; f2p . twoView ( F , P ) ; return P ;
public class ClassPathCSSGenerator { /** * ( non - Javadoc ) * @ see net . jawr . web . resource . bundle . generator . AbstractCSSGenerator # * generateResourceForDebug * ( net . jawr . web . resource . bundle . generator . GeneratorContext ) */ @ Override protected Reader generateResourceForDebug ( Reader rd , ...
// The following section is executed in DEBUG mode to retrieve the // classpath CSS from the temporary folder , // if the user defines that the image servlet should be used to retrieve // the CSS images . // It ' s not executed at the initialization process to be able to read // data from classpath . if ( context . get...
public class QueryParser { /** * src / riemann / Query . g : 28:1 : or : and ( ( WS ) * OR ( WS ) * and ) * ; */ public final QueryParser . or_return or ( ) throws RecognitionException { } }
QueryParser . or_return retval = new QueryParser . or_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token WS4 = null ; Token OR5 = null ; Token WS6 = null ; QueryParser . and_return and3 = null ; QueryParser . and_return and7 = null ; CommonTree WS4_tree = null ; CommonTree OR5_tree = null...
public class ConfigPropertyImpl { /** * { @ inheritDoc } */ public boolean isValueSet ( ) { } }
return ( this . getConfigPropertyValue ( ) != null && this . getConfigPropertyValue ( ) . getValue ( ) != null && ! this . getConfigPropertyValue ( ) . getValue ( ) . trim ( ) . equals ( "" ) ) ;
public class RewindableInputStream { /** * Closes underlying byte stream . * @ throws IOException if an I / O error occurs . */ public void close ( ) throws IOException { } }
if ( fInputStream != null ) { fInputStream . close ( ) ; fInputStream = null ; fData = null ; }
public class RedCardableAssist { public void checkValidatorCalled ( ) { } }
if ( ! execute . isSuppressValidatorCallCheck ( ) && certainlyNotBeValidatorCalled ( ) ) { execute . getFormMeta ( ) . filter ( meta -> isValidatorAnnotated ( meta ) ) . ifPresent ( meta -> { throwLonelyValidatorAnnotationException ( meta ) ; // # hope see fields in nested element } ) ; }
public class CmsContentDefinition { /** * Creates an entity object containing the default values configured for it ' s type . < p > * @ param entityType the entity type * @ param entityTypes the entity types * @ param attributeConfigurations the attribute configurations * @ return the created entity */ protecte...
CmsEntity result = new CmsEntity ( null , entityType . getId ( ) ) ; for ( String attributeName : entityType . getAttributeNames ( ) ) { CmsType attributeType = entityTypes . get ( entityType . getAttributeTypeName ( attributeName ) ) ; for ( int i = 0 ; i < entityType . getAttributeMinOccurrence ( attributeName ) ; i ...
public class PipelineBuilder { /** * Adds a function to the pipeline . * @ param mTransaction * Transaction to operate with . * @ param mFuncName * The name of the function * @ param mNum * The number of arguments that are passed to the function * @ throws TTXPathException * if function can ' t be added...
assert getPipeStack ( ) . size ( ) >= mNum ; final List < AbsAxis > args = new ArrayList < AbsAxis > ( mNum ) ; // arguments are stored on the stack in reverse order - > invert arg // order for ( int i = 0 ; i < mNum ; i ++ ) { args . add ( getPipeStack ( ) . pop ( ) . getExpr ( ) ) ; } // get right function type final...
public class PolicyFinderModule { /** * Gets a deny - biased policy set that includes all repository - wide and * object - specific policies . */ @ Override public PolicyFinderResult findPolicy ( EvaluationCtx context ) { } }
PolicyFinderResult policyFinderResult = null ; PolicySet policySet = m_repositoryPolicySet ; try { String pid = getPid ( context ) ; if ( pid != null && ! pid . isEmpty ( ) ) { AbstractPolicy objectPolicyFromObject = m_policyLoader . loadObjectPolicy ( m_policyParser . copy ( ) , pid , m_validateObjectPoliciesFromDatas...
public class Applet { /** * Write out the HTML */ public void write ( Writer out ) throws IOException { } }
if ( codeBase != null ) attribute ( "codebase" , codeBase ) ; if ( debug ) paramHolder . add ( "<param name=\"debug\" value=\"yes\">" ) ; if ( params != null ) for ( Enumeration enm = params . keys ( ) ; enm . hasMoreElements ( ) ; ) { String key = enm . nextElement ( ) . toString ( ) ; paramHolder . add ( "<param name...
public class BooleanMatcher { void handleRemove ( SimpleTest test , Conjunction selector , MatchTarget object , InternTable subExpr , OrdinalPosition parentId ) throws MatchingException { } }
if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handleRemove" , "test: " + test + ",selector: " + selector + ", object: " + object ) ; if ( test . getKind ( ) == SimpleTest . ID ) trueChild = trueChild . remove ( selector , object , subExpr , ordinalPosition ) ; else if ( test . getKind ( ) == SimpleTest ....
public class HelloSignClient { /** * Sets the access token for the OAuth user that this client will use to * perform requests . * @ param accessToken String access token * @ param tokenType String token type * @ throws HelloSignException thrown if there ' s a problem setting the access * token . */ public voi...
auth . setAccessToken ( accessToken , tokenType ) ;
public class PathResource { /** * This implementation opens a InputStream for the underlying file . * @ see java . nio . file . spi . FileSystemProvider # newInputStream ( Path , OpenOption . . . ) */ @ Override public InputStream getInputStream ( ) throws IOException { } }
if ( ! exists ( ) ) { throw new FileNotFoundException ( getPath ( ) + " (no such file or directory)" ) ; } if ( Files . isDirectory ( this . path ) ) { throw new FileNotFoundException ( getPath ( ) + " (is a directory)" ) ; } return Files . newInputStream ( this . path ) ;
public class InheritanceHelper { /** * Replies if the given JVM element is a SARL capacity . * @ param type the JVM type to test . * @ return { @ code true } if the given type is a SARL capacity , or not . * @ since 0.8 */ public boolean isSarlCapacity ( LightweightTypeReference type ) { } }
return type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_CAPACITY || type . isSubtypeOf ( Capacity . class ) ) ;
public class XMLFormatterUtils { /** * Determine if the given character is a legal starting character for an XML * name . Note that although a colon is a legal value its use is strongly * discouraged and this method will return false for a colon . * The list of valid characters can be found in the < a * href = ...
if ( codepoint >= Character . codePointAt ( "A" , 0 ) && codepoint <= Character . codePointAt ( "Z" , 0 ) ) { return true ; } else if ( codepoint == Character . codePointAt ( "_" , 0 ) ) { return true ; } else if ( codepoint >= Character . codePointAt ( "a" , 0 ) && codepoint <= Character . codePointAt ( "z" , 0 ) ) { ...
public class PubSubRealization { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # getPubSubOutputHandler ( com . ibm . ws . sib . utils . SIBUuid8) */ public PubSubOutputHandler getPubSubOutputHandler ( SIBUuid8 neighbourUUID ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getPubSubOutputHandler" , neighbourUUID ) ; PubSubOutputHandler handler = null ; // note that this does not obtain a read lock before attempting the get // Get the PubSub Output Handel if ( _pubsubOutputHandlers != null ) h...
public class CreateDeploymentGroupRequest { /** * Information about triggers to create when the deployment group is created . For examples , see < a * href = " https : / / docs . aws . amazon . com / codedeploy / latest / userguide / how - to - notify - sns . html " > Create a Trigger for an AWS * CodeDeploy Event ...
if ( triggerConfigurations == null ) { triggerConfigurations = new com . amazonaws . internal . SdkInternalList < TriggerConfig > ( ) ; } return triggerConfigurations ;
public class InstrumentedScheduledExecutorService { /** * { @ inheritDoc } */ @ Override public ScheduledFuture < ? > scheduleWithFixedDelay ( Runnable command , long initialDelay , long delay , TimeUnit unit ) { } }
scheduledRepetitively . mark ( ) ; return delegate . scheduleWithFixedDelay ( new InstrumentedRunnable ( command ) , initialDelay , delay , unit ) ;
public class Connections { /** * Creates and returns a new Lyra managed ConfigurableConnection for the given * { @ code connectionFactory } and { @ code config } . If the connection attempt fails , retries will be * performed according to the { @ link Config # getConnectRetryPolicy ( ) configured RetryPolicy } befo...
Assert . notNull ( connectionFactory , "connectionFactory" ) ; return create ( new ConnectionOptions ( connectionFactory ) , config , DEFAULT_CLASS_LOADER ) ;
public class ElasticLoadBalancer { /** * A list of the EC2 instances that the Elastic Load Balancing instance is managing traffic for . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setEc2InstanceIds ( java . util . Collection ) } or { @ link # withEc2Insta...
if ( this . ec2InstanceIds == null ) { setEc2InstanceIds ( new com . amazonaws . internal . SdkInternalList < String > ( ec2InstanceIds . length ) ) ; } for ( String ele : ec2InstanceIds ) { this . ec2InstanceIds . add ( ele ) ; } return this ;
public class ReflectionUtilities { /** * Check to see if one class can be coerced into another . A class is * coercable to another if , once both are boxed , the target class is a * superclass or implemented interface of the source class . * If both classes are numeric types , then this method returns true iff ...
final Class < ? > boxedTo = boxClass ( to ) ; final Class < ? > boxedFrom = boxClass ( from ) ; if ( Number . class . isAssignableFrom ( boxedTo ) && Number . class . isAssignableFrom ( boxedFrom ) ) { return SIZEOF . get ( boxedFrom ) <= SIZEOF . get ( boxedTo ) ; } return boxedTo . isAssignableFrom ( boxedFrom ) ;
public class ServiceFacade { /** * the applciation ' code get the service instance , such as : XXXService * xxxService = WeAppUtil . getService ( " xxxService " ) ; * @ return Returns the service . */ public Service getService ( AppContextWrapper sc ) { } }
ContainerWrapper containerWrapper = containerFinder . findContainer ( sc ) ; Service service = ( Service ) containerWrapper . lookup ( ComponentKeys . WEBSERVICE ) ; return service ;
public class RecommendationsInner { /** * Disable all recommendations for an app . * Disable all recommendations for an app . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param siteName Name of the app . * @ throws IllegalArgumentException thrown if parameters fail ...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( siteName == null ) { throw new IllegalArgumentException ( "Parameter siteName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw ...
public class ObjectVector { /** * Deletes the component at the specified index . Each component in * this vector with an index greater or equal to the specified * index is shifted downward to have an index one smaller than * the value it had previously . * @ param i index of where to remove an object */ public ...
if ( i > m_firstFree ) System . arraycopy ( m_map , i + 1 , m_map , i , m_firstFree ) ; else m_map [ i ] = null ; m_firstFree -- ;
public class LoadBalancersInner { /** * Deletes the specified load balancer . * @ param resourceGroupName The name of the resource group . * @ param loadBalancerName The name of the load balancer . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if t...
deleteWithServiceResponseAsync ( resourceGroupName , loadBalancerName ) . toBlocking ( ) . last ( ) . body ( ) ;
public class SSLServerSocket { /** * Returns the SSLParameters in effect for newly accepted connections . * The ciphersuites and protocols of the returned SSLParameters * are always non - null . * @ return the SSLParameters in effect for newly accepted connections * @ see # setSSLParameters ( SSLParameters ) ...
SSLParameters parameters = new SSLParameters ( ) ; parameters . setCipherSuites ( getEnabledCipherSuites ( ) ) ; parameters . setProtocols ( getEnabledProtocols ( ) ) ; if ( getNeedClientAuth ( ) ) { parameters . setNeedClientAuth ( true ) ; } else if ( getWantClientAuth ( ) ) { parameters . setWantClientAuth ( true ) ...
public class PartitionPlanImpl { /** * If not already created , a new < code > properties < / code > element will be created and returned . * Otherwise , the first existing < code > properties < / code > element will be returned . * @ return the instance defined for the element < code > properties < / code > */ pub...
List < Node > nodeList = childNode . get ( "properties" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new PropertiesImpl < PartitionPlan < T > > ( this , "properties" , childNode , nodeList . get ( 0 ) ) ; } return createProperties ( ) ;
public class JolokiaActivator { /** * { @ inheritDoc } */ public void stop ( BundleContext pBundleContext ) { } }
assert pBundleContext . equals ( bundleContext ) ; if ( httpServiceTracker != null ) { // Closing the tracker will also call { @ link HttpServiceCustomizer # removedService ( ) } // for every active service which in turn unregisters the servlet httpServiceTracker . close ( ) ; httpServiceTracker = null ; } if ( jolokia...
public class ShortExtensions { /** * The binary < code > divide < / code > operator . This is the equivalent to the Java < code > / < / code > operator . * @ param a a short . * @ param b a long . * @ return < code > a / b < / code > * @ since 2.3 */ @ Pure @ Inline ( value = "($1 / $2)" , constantExpression = ...
return a / b ;
public class XID { /** * Parses an XID object from its text representation . * @ param idString * Text representation of an XID . * @ return The parsed XID . */ public static XID parse ( String idString ) { } }
UUID uuid = UUID . fromString ( idString ) ; return new XID ( uuid ) ;
public class PooledHttpTransportFactory { /** * Creates a Transport using the given TransportPool . * @ param pool Transport is borrowed from * @ param hostInfo For logging purposes * @ return A Transport backed by a pooled resource */ private Transport borrowFrom ( TransportPool pool , String hostInfo ) { } }
if ( ! pool . getJobPoolingKey ( ) . equals ( jobKey ) ) { throw new EsHadoopIllegalArgumentException ( "PooledTransportFactory found a pool with a different owner than this job. " + "This could be a different job incorrectly polluting the TransportPool. Bailing out..." ) ; } try { return pool . borrowTransport ( ) ; }...
public class Yank { /** * Return a List of Beans given an SQL statement * @ param poolName The name of the connection pool to query against * @ param sql The SQL statement * @ param beanType The Class of the desired return Objects matching the table * @ param params The replacement parameters * @ return The L...
List < T > returnList = null ; try { BeanListHandler < T > resultSetHandler = new BeanListHandler < T > ( beanType , new BasicRowProcessor ( new YankBeanProcessor < T > ( beanType ) ) ) ; returnList = new QueryRunner ( YANK_POOL_MANAGER . getConnectionPool ( poolName ) ) . query ( sql , resultSetHandler , params ) ; } ...
public class CPDisplayLayoutLocalServiceBaseImpl { /** * Returns all the cp display layouts matching the UUID and company . * @ param uuid the UUID of the cp display layouts * @ param companyId the primary key of the company * @ return the matching cp display layouts , or an empty list if no matches were found */...
return cpDisplayLayoutPersistence . findByUuid_C ( uuid , companyId ) ;
public class Calc { /** * Translates an atom object , given a Vector3d ( i . e . the vecmath library * double - precision 3 - d vector ) * @ param atom * @ param v */ public static final void translate ( Atom atom , Vector3d v ) { } }
atom . setX ( atom . getX ( ) + v . x ) ; atom . setY ( atom . getY ( ) + v . y ) ; atom . setZ ( atom . getZ ( ) + v . z ) ;
public class EmptyView { /** * Set this view to it ' s empty state showing the icon , message , and action if configured * @ deprecated see { @ link # setLoading ( boolean ) } and { @ link # setState ( int ) } */ @ Deprecated public void setEmpty ( ) { } }
mState = STATE_EMPTY ; mProgress . setVisibility ( View . GONE ) ; if ( mEmptyIcon != - 1 ) mIcon . setVisibility ( View . VISIBLE ) ; if ( ! TextUtils . isEmpty ( mEmptyMessage ) ) mMessage . setVisibility ( View . VISIBLE ) ; if ( ! TextUtils . isEmpty ( mEmptyActionText ) ) mAction . setVisibility ( View . VISIBLE )...
public class UnicodeUtils { /** * Returns a valid C / C + + character literal ( including quotes ) . */ public static String escapeCharLiteral ( char c ) { } }
if ( c >= 0x20 && c <= 0x7E ) { // if ASCII switch ( c ) { case '\'' : return "'\\''" ; case '\\' : return "'\\\\'" ; } return "'" + c + "'" ; } else { return UnicodeUtils . format ( "0x%04x" , ( int ) c ) ; }
public class Morpha { /** * Resumes scanning until the next regular expression is matched , * the end of input is encountered or an I / O - Error occurs . * @ return the next token * @ exception java . io . IOException if any I / O - Error occurs */ public String next ( ) throws java . io . IOException { } }
int zzInput ; int zzAction ; // cached fields : int zzCurrentPosL ; int zzMarkedPosL ; int zzEndReadL = zzEndRead ; char [ ] zzBufferL = zzBuffer ; char [ ] zzCMapL = ZZ_CMAP ; int [ ] zzTransL = ZZ_TRANS ; int [ ] zzRowMapL = ZZ_ROWMAP ; int [ ] zzAttrL = ZZ_ATTRIBUTE ; while ( true ) { zzMarkedPosL = zzMarkedPos ; zz...
public class JKStringUtil { public static StringBuilder removeLast ( final StringBuilder builder , final String string ) { } }
final int lastIndexOf = builder . lastIndexOf ( string ) ; if ( lastIndexOf == - 1 ) { return builder ; } return new StringBuilder ( builder . substring ( 0 , lastIndexOf ) ) ;
public class Buffers { /** * read utf16 strings , use strLen , not ending 0 char . */ public static String readString ( ByteBuffer buffer , int strLen ) { } }
StringBuilder sb = new StringBuilder ( strLen ) ; for ( int i = 0 ; i < strLen ; i ++ ) { sb . append ( buffer . getChar ( ) ) ; } return sb . toString ( ) ;
public class ListChangeManager { /** * getUpdateActions ( ) is called inside RingList . onChanged ( ) . i . e . , when its data set * has changed and items needs to be reconstructed in a efficient way . * Given the current state ( the list of item IDs ) , this function returns a list of * actions to be performed ...
List < Long > oldIDs = new ArrayList < Long > ( ) ; final int count = mAdapter . getCount ( ) ; for ( int index = 0 ; index < count ; index ++ ) { long id = mAdapter . getItemId ( index ) ; oldIDs . add ( Long . valueOf ( id ) ) ; } LongSparseArray < Integer > newMap = new LongSparseArray < Integer > ( ) ; listToMap ( ...
public class MessageLog { /** * Set up the screen input fields . */ public void setupFields ( ) { } }
FieldInfo field = null ; field = new FieldInfo ( this , ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field . setHidden ( true ) ; field = new FieldInfo ( this , LAST_CHANGED , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Date . class ) ;...
public class ToStringStyle { /** * Create < code > ToStringStyle < / code > instance from class name of the following * predefined styles : * < ul > * < li > { @ link # DEFAULT _ STYLE } < / li > * < li > { @ link # SIMPLE _ STYLE } < / li > * < li > { @ link # MULTI _ LINE _ STYLE } < / li > * < li > { @ l...
if ( S . isEqual ( DEFAULT_STYLE . getClass ( ) . getName ( ) , s ) ) return DEFAULT_STYLE ; if ( S . isEqual ( SIMPLE_STYLE . getClass ( ) . getName ( ) , s ) ) return SIMPLE_STYLE ; if ( S . isEqual ( MULTI_LINE_STYLE . getClass ( ) . getName ( ) , s ) ) return MULTI_LINE_STYLE ; if ( S . isEqual ( SHORT_PREFIX_STYLE...
public class CliFrontend { /** * Executes the info action . * @ param args Command line arguments for the info action . */ protected void info ( String [ ] args ) throws CliArgsException , FileNotFoundException , ProgramInvocationException { } }
LOG . info ( "Running 'info' command." ) ; final Options commandOptions = CliFrontendParser . getInfoCommandOptions ( ) ; final CommandLine commandLine = CliFrontendParser . parse ( commandOptions , args , true ) ; InfoOptions infoOptions = new InfoOptions ( commandLine ) ; // evaluate help flag if ( infoOptions . isPr...
public class DropSynonymGenerator { /** * DROP [ PUBLIC ] SYNONYM [ schema . ] synonym [ FORCE ] ; */ public Sql [ ] generateSql ( DropSynonymStatement statement , Database database , SqlGeneratorChain chain ) { } }
StringBuilder sql = new StringBuilder ( "DROP " ) ; if ( statement . isPublic ( ) != null && statement . isPublic ( ) ) { sql . append ( "PUBLIC " ) ; } sql . append ( "SYNONYM " ) ; if ( statement . getSynonymSchemaName ( ) != null ) { sql . append ( statement . getSynonymSchemaName ( ) ) . append ( "." ) ; } sql . ap...
public class DiscreteMixture { /** * BIC score of the mixture for given data . */ public double bic ( double [ ] data ) { } }
if ( components . isEmpty ( ) ) { throw new IllegalStateException ( "Mixture is empty!" ) ; } int n = data . length ; double logLikelihood = 0.0 ; for ( double x : data ) { double p = p ( x ) ; if ( p > 0 ) { logLikelihood += Math . log ( p ) ; } } return logLikelihood - 0.5 * npara ( ) * Math . log ( n ) ;
public class AlgorithmParameters { /** * Returns a ( transparent ) specification of this parameter object . * { @ code paramSpec } identifies the specification class in which * the parameters should be returned . It could , for example , be * { @ code DSAParameterSpec . class } , to indicate that the * paramete...
if ( this . initialized == false ) { throw new InvalidParameterSpecException ( "not initialized" ) ; } return paramSpi . engineGetParameterSpec ( paramSpec ) ;
public class CPDefinitionLinkUtil { /** * Returns all the cp definition links where CProductId = & # 63 ; and type = & # 63 ; . * @ param CProductId the c product ID * @ param type the type * @ return the matching cp definition links */ public static List < CPDefinitionLink > findByCP_T ( long CProductId , String...
return getPersistence ( ) . findByCP_T ( CProductId , type ) ;
public class ConfigEvaluator { /** * This method can retrieve a registry entry for an element using an ibm : childAlias for a node name . * @ param parent * @ param childNodeName This now seems to be the pid due to confusion about what " nodeName " might mean . * @ return the registry entry for the child , or < c...
if ( parentEntry == null ) return null ; // This will work in the unlikely event that childNodeName is actually the xml element name RegistryEntry pe = parentEntry ; while ( pe != null ) { // The parent entry must have ibm : supportsExtensions defined for ibm : childAlias to be valid here if ( pe . getObjectClassDefini...
public class DefaultGroovyMethods { /** * Extend class globally with category methods . * @ param self any Class * @ param categoryClass a category class to use * @ since 1.6.0 */ public static void mixin ( Class self , Class [ ] categoryClass ) { } }
mixin ( getMetaClass ( self ) , Arrays . asList ( categoryClass ) ) ;
public class BitmapUtils { /** * Creates a copy of the bitmap by calculating the transformation based on the * original color and applying it to the the destination color . * @ param bitmap The original bitmap . * @ param originalColor Tint color in the original bitmap . * @ param destinationColor Tint color to...
// original tint color int [ ] o = new int [ ] { Color . red ( originalColor ) , Color . green ( originalColor ) , Color . blue ( originalColor ) } ; // destination tint color int [ ] d = new int [ ] { Color . red ( destinationColor ) , Color . green ( destinationColor ) , Color . blue ( destinationColor ) } ; int widt...
public class BeanBuilder { /** * Loads a set of given beans * @ param resources The resources to load * @ throws IOException Thrown if there is an error reading one of the passes resources */ public void loadBeans ( Resource [ ] resources ) { } }
@ SuppressWarnings ( "rawtypes" ) Closure beans = new Closure ( this ) { private static final long serialVersionUID = - 2778328821635253740L ; @ Override public Object call ( Object ... args ) { invokeBeanDefiningClosure ( ( Closure ) args [ 0 ] ) ; return null ; } } ; Binding b = new Binding ( ) { @ Override public vo...
public class ByteCodeMachine { /** * CEC */ private void opStateCheckPush ( ) { } }
int mem = code [ ip ++ ] ; if ( stateCheckVal ( s , mem ) ) { opFail ( ) ; return ; } int addr = code [ ip ++ ] ; pushAltWithStateCheck ( ip + addr , s , sprev , mem , pkeep ) ;
public class ClassLoaderUtils { /** * Try to obtain a resource by name , returning { @ code null } if it could not be located . * This method works very similarly to { @ link # loadResourceAsStream ( String ) } but will just return { @ code null } * if the resource cannot be located by the sequence of class loaders...
// First try the context class loader final ClassLoader contextClassLoader = getThreadContextClassLoader ( ) ; if ( contextClassLoader != null ) { final InputStream inputStream = contextClassLoader . getResourceAsStream ( resourceName ) ; if ( inputStream != null ) { return inputStream ; } // Pass - through , there mig...
public class RunStepRequest { /** * < pre > * Options for the run call . * < / pre > * < code > optional . tensorflow . RunOptions options = 5 ; < / code > */ public org . tensorflow . framework . RunOptions getOptions ( ) { } }
return options_ == null ? org . tensorflow . framework . RunOptions . getDefaultInstance ( ) : options_ ;
public class BundleHandler { /** * 和 ResouceBundle . getString ( ) 方法一样 , 不过当 key 不存在时 , 直接返回 key 。 * @ param key ResouceBundle 中的 key * @ return ResouceBundle 中 key 对应的值 , 如果没找到 , 直接返回 key 本身 */ public String get ( String key ) { } }
try { return bundle . getString ( key ) ; } catch ( MissingResourceException e ) { logger . warn ( "Missing resource." , e ) ; return key ; }
public class TinyPlugzContextServlet { /** * Wraps the given Servlet . * @ param servlet The servlet to wrap . * @ return The decorated servlet . */ public static Servlet wrap ( Servlet servlet ) { } }
Require . nonNull ( servlet , "servlet" ) ; if ( servlet instanceof TinyPlugzContextServlet ) { return servlet ; } return new TinyPlugzContextServlet ( servlet ) ;
public class CommerceWarehouseItemLocalServiceBaseImpl { /** * Updates the commerce warehouse item in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners . * @ param commerceWarehouseItem the commerce warehouse item * @ return the commerce warehouse item that was updated...
return commerceWarehouseItemPersistence . update ( commerceWarehouseItem ) ;
public class host_interface { /** * < pre > * Use this operation to delete channels . * < / pre > */ public static host_interface delete ( nitro_service client , host_interface resource ) throws Exception { } }
resource . validate ( "delete" ) ; return ( ( host_interface [ ] ) resource . perform_operation ( client , "delete" ) ) [ 0 ] ;
public class DrawSymbol { /** * { @ inheritDoc } */ @ Override protected void paintComponent ( Graphics g ) { } }
super . paintComponent ( g ) ; Graphics2D g2d = ( Graphics2D ) g ; g2d . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; Java2DRenderer renderer = new Java2DRenderer ( g2d , OkapiUI . factor , OkapiUI . paperColour , OkapiUI . inkColour ) ; renderer . render ( OkapiUI . sy...
public class InternalPureXbaseLexer { /** * $ ANTLR start " T _ _ 69" */ public final void mT__69 ( ) throws RecognitionException { } }
try { int _type = T__69 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalPureXbase . g : 67:7 : ( ' new ' ) // InternalPureXbase . g : 67:9 : ' new ' { match ( "new" ) ; } state . type = _type ; state . channel = _channel ; } finally { }
public class DependencyExtractorManager { /** * Returns the extractor with the specified name . The name typically refers * to the parser that generated the output files that the extractor can * read . * @ param name the name associated with an extractor . * @ throws IllegalArgumentException if no extractor is ...
DependencyExtractor e = nameToExtractor . get ( name ) ; if ( e == null ) throw new IllegalArgumentException ( "No extactor with name " + name ) ; return e ;
public class OrthologizedKam { /** * Wrap a { @ link KamNode } as an { @ link OrthologousNode } to allow conversion * of the node label by the { @ link SpeciesDialect } . * @ param kamNode { @ link KamNode } * @ return the wrapped kam node , * < ol > * < li > { @ code null } if { @ code kamNode } input is { @...
if ( kamNode == null ) { return null ; } TermParameter param = ntp . get ( kamNode . getId ( ) ) ; if ( param != null ) { return new OrthologousNode ( kamNode , param ) ; } return kamNode ;
public class MaterialWindow { /** * Open the window . */ public void open ( ) { } }
if ( ! isAttached ( ) ) { RootPanel . get ( ) . add ( this ) ; } windowCount ++ ; if ( windowOverlay != null && ! windowOverlay . isAttached ( ) ) { RootPanel . get ( ) . add ( windowOverlay ) ; } if ( fullsceenOnMobile && Window . matchMedia ( Resolution . ALL_MOBILE . asMediaQuery ( ) ) ) { setMaximize ( true ) ; } i...