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 .
if ( t instanceof SQLException ) { nextThrowable = ( ( SQLException ) t ) . getNextException ( ) ; } else if ( t instanceof ResourceException ) { nextThrowable = ( ( ResourceException ) t ) . getCause ( ) ; } } } return nextThrowable ; |
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 timeout long value to indicate the number of units in the timeout .
* @ param unit { @ link TimeUnit } of the timeout ( e . g . seconds ) .
* @ return a boolean value indicating whether the { @ link Process } stopped within the given timeout .
* @ see java . lang . Process # waitFor ( long , TimeUnit )
* @ see # isNotRunning ( ) */
public boolean waitFor ( long timeout , TimeUnit unit ) { } } | 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 */
public static String calculateCheckDigit ( final String iban ) throws IbanFormatException { } } | 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" + checkDigit ; |
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 name , String filter ) throws Exception { } } | 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 [ ] ) obj . getfiltered ( service , option ) ; if ( response != null ) { return response [ 0 ] . __count ; } return 0 ; |
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 ( "<html>" ) ; if ( getHorizontalAlignment ( ) == CENTER ) { sb . append ( "<center>" ) ; } sb . append ( text . replace ( "\n" , "<br/>" ) . replace ( " " , " " ) ) ; final String string = sb . toString ( ) ; setToolTipText ( string ) ; setText ( string ) ; } } |
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 } instance */
public FormInputHandler dataSet ( final DataSet theDataSet ) { } } | 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 . DeleteSpotDatafeedSubscription
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / ec2-2016-11-15 / DeleteSpotDatafeedSubscription "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public DeleteSpotDatafeedSubscriptionResult deleteSpotDatafeedSubscription ( DeleteSpotDatafeedSubscriptionRequest request ) { } } | 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 != null ) { Container parent = pathFromRoot . head ( ) ; AbstractConfigValue newParent = parent . replaceChild ( old , replacement ) ; return replaceCurrentParent ( parent , ( newParent instanceof Container ) ? ( Container ) newParent : null ) ; } else { if ( old == root && replacement instanceof Container ) { return new ResolveSource ( rootMustBeObj ( ( Container ) replacement ) ) ; } else { throw new ConfigException . BugOrBroken ( "replace in parent not possible " + old + " with " + replacement + " in " + this ) ; // return this ;
} } |
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 , default to
* tranquility )
* @ param ifNoneMatch
* ETag from a previous request . A 304 will be returned if this
* matches the current ETag ( optional )
* @ return ApiResponse & lt ; List & lt ; Integer & gt ; & gt ;
* @ throws ApiException
* If fail to call the API , e . g . server error or cannot
* deserialize the response body */
public ApiResponse < List < Integer > > getAlliancesAllianceIdCorporationsWithHttpInfo ( Integer allianceId , String datasource , String ifNoneMatch ) throws ApiException { } } | 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 ( param . length ( ) - 1 ) ) { return true ; } } return false ; |
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 for the method invocation .
* @ return The return value of the invoked method . */
public Object doMethodInvoke ( Object object , Object [ ] argumentArray ) { } } | 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 . buf [ ++ lbp ] ; // We are outside any annotation values
if ( Character . isWhitespace ( lch ) && ! spacesincomments && parens == 0 ) { return false ; } else if ( lch == '@' && parens == 0 ) { // At most one annotation per magic comment
return false ; } else if ( lch == '(' && ! stringLit ) { ++ parens ; } else if ( lch == ')' && ! stringLit ) { -- parens ; } else if ( lch == '"' ) { // TODO : handle more complicated string literals ,
// char literals , escape sequences , unicode , etc .
stringLit = ! stringLit ; } else if ( lch == '*' && ! stringLit && lbp + 1 < reader . buflen && reader . buf [ lbp + 1 ] == '/' ) { // We reached the end of the comment , make sure no
// parens are open
return parens == 0 ; } else if ( ! Character . isJavaIdentifierPart ( lch ) && ! Character . isWhitespace ( lch ) && lch != '.' && // separator in fully - qualified annotation name
// TODO : this also allows / * @ A . . . * / which should not be recognized .
! spacesincomments && parens == 0 && ! stringLit ) { return false ; } // Do we need anything else for annotation values , e . g . String literals ?
} // came to end of file before ' * / '
return false ; |
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 ; // nothing to do
} for ( JournalAndStream j : badJournals ) { LOG . error ( "Disabling journal " + j ) ; j . abort ( ) ; j . setDisabled ( true ) ; // report errors on storage directories as well for FJMs
if ( j . journal instanceof FileJournalManager ) { FileJournalManager fjm = ( FileJournalManager ) j . journal ; // pass image to handle image managers
storage . reportErrorsOnDirectory ( fjm . getStorageDirectory ( ) , image ) ; } // report error on shared journal / image managers
if ( j . journal instanceof ImageManager ) { ImageManager im = ( ImageManager ) j . journal ; im . setImageDisabled ( true ) ; } } // update image manager metrics
if ( image != null ) { image . updateImageMetrics ( ) ; } checkJournals ( status ) ; |
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 ,
// to avoid failing on unresolvable placeholders in net . unicon . iamlabs . spring . properties . example . net
// . unicon . iamlabs . spring . properties file locations .
if ( ! ( beanNames [ i ] . equals ( this . beanName ) && beanFactoryToProcess . equals ( this . beanFactory ) ) ) { this . currentBeanName = beanNames [ i ] ; try { BeanDefinition bd = beanFactoryToProcess . getBeanDefinition ( beanNames [ i ] ) ; try { visitor . visitBeanDefinition ( bd ) ; } catch ( BeanDefinitionStoreException ex ) { throw new BeanDefinitionStoreException ( bd . getResourceDescription ( ) , beanNames [ i ] , ex . getMessage ( ) ) ; } } finally { currentBeanName = null ; } } } StringValueResolver stringValueResolver = new PlaceholderResolvingStringValueResolver ( props ) ; // New in Spring 2.5 : resolve placeholders in alias target names and aliases as well .
beanFactoryToProcess . resolveAliases ( stringValueResolver ) ; // New in Spring 3.0 : resolve placeholders in embedded values such as annotation attributes .
beanFactoryToProcess . addEmbeddedValueResolver ( stringValueResolver ) ; |
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 and expected property values for resources in which AWS CloudFormation detects drift .
* Only resource properties explicitly defined in the stack template are checked for drift . For more information
* about stack and resource drift , see < a
* href = " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / using - cfn - stack - drift . html " > Detecting
* Unregulated Configuration Changes to Stacks and Resources < / a > .
* Use < code > DetectStackResourceDrift < / code > to detect drift on individual resources , or < a > DetectStackDrift < / a > to
* detect drift on all resources in a given stack that support drift detection .
* Resources that do not currently support drift detection cannot be checked . For a list of resources that support
* drift detection , see < a
* href = " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / using - cfn - stack - drift - resource - list . html "
* > Resources that Support Drift Detection < / a > .
* @ param detectStackResourceDriftRequest
* @ return Result of the DetectStackResourceDrift operation returned by the service .
* @ sample AmazonCloudFormation . DetectStackResourceDrift
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / cloudformation - 2010-05-15 / DetectStackResourceDrift "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public DetectStackResourceDriftResult detectStackResourceDrift ( DetectStackResourceDriftRequest request ) { } } | 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 unprotectedDelete ( String src , long modificationTime ) { } } | 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 Float getFloat ( String key , Supplier < Float > notFound ) { } } | 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 : subnetworkClient . listUsableSubnetworks ( project . toString ( ) ) . iterateAll ( ) ) {
* / / doThingsWith ( element ) ;
* < / code > < / pre >
* @ param project Project ID for this request .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
@ BetaApi public final ListUsableSubnetworksPagedResponse listUsableSubnetworks ( String project ) { } } | 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 . parseInt ( strName ) ; if ( ( iYear > 1990 ) && ( iYear < 2020 ) ) return false ; } return bProcessFile ; |
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 . currentThread ( ) . interrupt ( ) ; return ; } reporter . pass ( action , expected , WAITED + seconds + SECONDS ) ; |
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 with the alpha of the
* source . alpha must be a floating point number in the inclusive range
* [ 0.0 , 1.0 ] . */
public void fillPolygon ( float alpha , double [ ] ... coord ) { } } | 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 ; i < c . length ; i ++ ) { y [ i ] = c [ i ] [ 1 ] ; } Composite cs = g2d . getComposite ( ) ; g2d . setComposite ( AlphaComposite . getInstance ( AlphaComposite . SRC_OVER , alpha ) ) ; g2d . fillPolygon ( x , y , c . length ) ; g2d . setComposite ( cs ) ; |
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 ( IAtomContainer mol ) { } } | 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 . getAtomCount ( ) ; v ++ ) { IAtom atom = mol . getAtom ( v ) ; String symbType = atom . getAtomTypeName ( ) ; final int thisType = mmffParamSet . intType ( symbType ) ; // unknown
if ( thisType == 0 ) continue ; double pbci = mmffParamSet . getPartialBondChargeIncrement ( thisType ) . doubleValue ( ) ; for ( int w : adjList [ v ] ) { int otherType = mmffParamSet . intType ( mol . getAtom ( w ) . getAtomTypeName ( ) ) ; // unknown
if ( otherType == 0 ) continue ; IBond bond = edgeMap . get ( v , w ) ; int bondCls = mmffParamSet . getBondCls ( thisType , otherType , bond . getOrder ( ) . numeric ( ) , bond . getProperty ( MMFF_AROM ) != null ) ; BigDecimal bci = mmffParamSet . getBondChargeIncrement ( bondCls , thisType , otherType ) ; if ( bci != null ) { atom . setCharge ( atom . getCharge ( ) - bci . doubleValue ( ) ) ; } else { // empirical BCI
atom . setCharge ( atom . getCharge ( ) + ( pbci - mmffParamSet . getPartialBondChargeIncrement ( otherType ) . doubleValue ( ) ) ) ; } } } return true ; |
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 managedObject , Transaction transaction ) throws ObjectManagerException { } } | 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 > JMS < / bold >
* < ul >
* < li > jbpm . audit . jms . transacted - determines if JMS session is transacted or not - default true - type Boolean < / li >
* < li > jbpm . audit . jms . connection . factory - connection factory instance - type javax . jms . ConnectionFactory < / li >
* < li > jbpm . audit . jms . queue - JMS queue instance - type javax . jms . Queue < / li >
* < li > jbpm . audit . jms . connection . factory . jndi - JNDI name of the connection factory to look up - type String < / li >
* < li > jbpm . audit . jms . queue . jndi - JNDI name of the queue to look up - type String < / li >
* < / ul >
* @ param type - type of the AuditLoger to create ( JPA or JMS )
* @ param ksession - ksession that the logger will be attached to
* @ param properties - optional properties for the type of logger to initialize it
* @ return new instance of AbstractAuditLogger */
public static AbstractAuditLogger newInstance ( Type type , KieSession ksession , Map < String , Object > properties ) { } } | 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 = new AsyncAuditLogProducer ( ksession , transacted ) ; // set connection factory and queue if given as property
if ( properties . containsKey ( "jbpm.audit.jms.connection.factory" ) ) { ConnectionFactory connFactory = ( ConnectionFactory ) properties . get ( "jbpm.audit.jms.connection.factory" ) ; ( ( AsyncAuditLogProducer ) logger ) . setConnectionFactory ( connFactory ) ; } if ( properties . containsKey ( "jbpm.audit.jms.queue" ) ) { Queue queue = ( Queue ) properties . get ( "jbpm.audit.jms.queue" ) ; ( ( AsyncAuditLogProducer ) logger ) . setQueue ( queue ) ; } try { // look up connection factory and queue if given as property
if ( properties . containsKey ( "jbpm.audit.jms.connection.factory.jndi" ) ) { ConnectionFactory connFactory = ( ConnectionFactory ) InitialContext . doLookup ( ( String ) properties . get ( properties . get ( "jbpm.audit.jms.connection.factory.jndi" ) ) ) ; ( ( AsyncAuditLogProducer ) logger ) . setConnectionFactory ( connFactory ) ; } if ( properties . containsKey ( "jbpm.audit.jms.queue.jndi" ) ) { Queue queue = ( Queue ) InitialContext . doLookup ( ( String ) properties . get ( "jbpm.audit.jms.queue.jndi" ) ) ; ( ( AsyncAuditLogProducer ) logger ) . setQueue ( queue ) ; } } catch ( NamingException e ) { throw new RuntimeException ( "Error when looking up ConnectionFactory/Queue" , e ) ; } break ; default : break ; } return logger ; |
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 .
* @ throws java . lang . IllegalStateException if no artifact in the current Thread ' s context ClassLoader
* contained the supplied artifactNamePart . */
public static SortedMap < String , String > getVersionMap ( final String artifactId ) { } } | // 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 . getResources ( DEPENDENCIES_PROPERTIES_FILE ) ) ; // Find the latest of the URLs matching , to cope with test - scope dependencies .
URL matching = null ; for ( URL current : manifestURLs ) { if ( current . toString ( ) . contains ( artifactId ) ) { matching = current ; } } if ( matching != null ) { return getVersionMap ( matching ) ; } } catch ( Exception e ) { extractionException = e ; } // We should never wind up here . . .
if ( extractionException != null ) { throw new IllegalStateException ( "Could not read data from manifest." , extractionException ) ; } else { throw new IllegalStateException ( "Found no manifest corresponding to artifact name snippet '" + artifactId + "'." ) ; } |
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 ) throws ParseException { } } | 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 ParseException ( s , 0 ) ; } try { return PeriodValueImpl . create ( start , end ) ; } catch ( IllegalArgumentException ex ) { throw ( ParseException ) new ParseException ( s , sep + 1 ) . initCause ( ex ) ; } |
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 and returns a value to be emitted and to become the accumulated element
* @ return the new Ix instance
* @ throws NullPointerException if scanner is null
* @ since 1.0 */
public final Ix < T > scan ( IxFunction2 < T , T , T > scanner ) { } } | 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 FundamentalToProjective
* @ param F ( Input ) Fundamental Matrix
* @ return The canonical camera ( projection ) matrix P ' ( 3 by 4 ) Known up to a projective transform . */
public static DMatrixRMaj fundamentalToProjective ( DMatrixRMaj F ) { } } | 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 , GeneratorContext context ) { } } | // 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 . getConfig ( ) . isCssClasspathImageHandledByClasspathCss ( ) ) { rd = super . generateResourceForDebug ( rd , context ) ; } return rd ; |
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 ; CommonTree WS6_tree = null ; try { // src / riemann / Query . g : 28:4 : ( and ( ( WS ) * OR ( WS ) * and ) * )
// src / riemann / Query . g : 28:6 : and ( ( WS ) * OR ( WS ) * and ) *
{ root_0 = ( CommonTree ) adaptor . nil ( ) ; pushFollow ( FOLLOW_and_in_or160 ) ; and3 = and ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , and3 . getTree ( ) ) ; // src / riemann / Query . g : 28:10 : ( ( WS ) * OR ( WS ) * and ) *
loop3 : do { int alt3 = 2 ; int LA3_0 = input . LA ( 1 ) ; if ( ( LA3_0 == OR || LA3_0 == WS ) ) { alt3 = 1 ; } switch ( alt3 ) { case 1 : // src / riemann / Query . g : 28:11 : ( WS ) * OR ( WS ) * and
{ // src / riemann / Query . g : 28:11 : ( WS ) *
loop1 : do { int alt1 = 2 ; int LA1_0 = input . LA ( 1 ) ; if ( ( LA1_0 == WS ) ) { alt1 = 1 ; } switch ( alt1 ) { case 1 : // src / riemann / Query . g : 28:11 : WS
{ WS4 = ( Token ) match ( input , WS , FOLLOW_WS_in_or163 ) ; WS4_tree = ( CommonTree ) adaptor . create ( WS4 ) ; adaptor . addChild ( root_0 , WS4_tree ) ; } break ; default : break loop1 ; } } while ( true ) ; OR5 = ( Token ) match ( input , OR , FOLLOW_OR_in_or166 ) ; OR5_tree = ( CommonTree ) adaptor . create ( OR5 ) ; root_0 = ( CommonTree ) adaptor . becomeRoot ( OR5_tree , root_0 ) ; // src / riemann / Query . g : 28:19 : ( WS ) *
loop2 : do { int alt2 = 2 ; int LA2_0 = input . LA ( 1 ) ; if ( ( LA2_0 == WS ) ) { alt2 = 1 ; } switch ( alt2 ) { case 1 : // src / riemann / Query . g : 28:19 : WS
{ WS6 = ( Token ) match ( input , WS , FOLLOW_WS_in_or169 ) ; WS6_tree = ( CommonTree ) adaptor . create ( WS6 ) ; adaptor . addChild ( root_0 , WS6_tree ) ; } break ; default : break loop2 ; } } while ( true ) ; pushFollow ( FOLLOW_and_in_or172 ) ; and7 = and ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , and7 . getTree ( ) ) ; } break ; default : break loop3 ; } } while ( true ) ; } retval . stop = input . LT ( - 1 ) ; retval . tree = ( CommonTree ) adaptor . rulePostProcessing ( root_0 ) ; adaptor . setTokenBoundaries ( retval . tree , retval . start , retval . stop ) ; } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; retval . tree = ( CommonTree ) adaptor . errorNode ( input , retval . start , input . LT ( - 1 ) , re ) ; } finally { } return retval ; |
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 */
protected static CmsEntity createDefaultValueEntity ( CmsType entityType , Map < String , CmsType > entityTypes , Map < String , CmsAttributeConfiguration > attributeConfigurations ) { } } | 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 ++ ) { if ( attributeType . isSimpleType ( ) ) { result . addAttributeValue ( attributeName , attributeConfigurations . get ( attributeName ) . getDefaultValue ( ) ) ; } else { result . addAttributeValue ( attributeName , createDefaultValueEntity ( attributeType , entityTypes , attributeConfigurations ) ) ; } } } return result ; |
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 */
public void addFunction ( final INodeReadTrx mTransaction , final String mFuncName , final int mNum ) throws TTXPathException { } } | 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 FuncDef func ; try { func = FuncDef . fromString ( mFuncName ) ; } catch ( final NullPointerException e ) { throw EXPathError . XPST0017 . getEncapsulatedException ( ) ; } // get function class
final Class < ? extends AbsFunction > function = func . getFunc ( ) ; final Integer min = func . getMin ( ) ; final Integer max = func . getMax ( ) ; final Integer returnType = NamePageHash . generateHashForString ( func . getReturnType ( ) ) ; // parameter types of the function ' s constructor
final Class < ? > [ ] paramTypes = { INodeReadTrx . class , List . class , Integer . TYPE , Integer . TYPE , Integer . TYPE } ; try { // instantiate function class with right constructor
final Constructor < ? > cons = function . getConstructor ( paramTypes ) ; final AbsAxis axis = ( AbsAxis ) cons . newInstance ( mTransaction , args , min , max , returnType ) ; if ( getPipeStack ( ) . empty ( ) || getExpression ( ) . getSize ( ) != 0 ) { addExpressionSingle ( ) ; } getExpression ( ) . add ( axis ) ; } catch ( final NoSuchMethodException e ) { throw EXPathError . XPST0017 . getEncapsulatedException ( ) ; } catch ( final IllegalArgumentException e ) { throw EXPathError . XPST0017 . getEncapsulatedException ( ) ; } catch ( final InstantiationException e ) { throw new IllegalStateException ( "Function not implemented yet." ) ; } catch ( final IllegalAccessException e ) { throw EXPathError . XPST0017 . getEncapsulatedException ( ) ; } catch ( final InvocationTargetException e ) { throw EXPathError . XPST0017 . getEncapsulatedException ( ) ; } |
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_validateObjectPoliciesFromDatastream ) ; if ( objectPolicyFromObject != null ) { List < AbstractPolicy > policies = new ArrayList < AbstractPolicy > ( m_repositoryPolicies ) ; policies . add ( objectPolicyFromObject ) ; policySet = toPolicySet ( policies , m_combiningAlgorithm ) ; } } policyFinderResult = new PolicyFinderResult ( policySet ) ; } catch ( Exception e ) { logger . warn ( "PolicyFinderModule seriously failed to evaluate a policy " , e ) ; policyFinderResult = new PolicyFinderResult ( new Status ( ERROR_CODE_LIST , e . getMessage ( ) ) ) ; } return policyFinderResult ; |
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=\"" + key + "\" value=\"" + params . get ( key ) . toString ( ) + "\">" ) ; } super . write ( out ) ; |
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 . NOTID ) falseChild = falseChild . remove ( selector , object , subExpr , ordinalPosition ) ; else throw new IllegalStateException ( ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "handleRemove" ) ; |
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 void setAccessToken ( String accessToken , String tokenType ) throws HelloSignException { } } | 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 = " http : / / www . w3 . org / TR / xml / 0sec - common - syn " > Common Syntactic
* Constructs section < / a > of the XML specification .
* @ param codepoint int value of the code point to check
* @ return true if the character may appear as the first letter of an XML
* name ; false otherwise */
public static boolean isXMLNameStart ( int codepoint ) { } } | 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 ) ) { return true ; } else if ( codepoint >= 0xC0 && codepoint <= 0xD6 ) { return true ; } else if ( codepoint >= 0xD8 && codepoint <= 0xF6 ) { return true ; } else if ( codepoint >= 0xF8 && codepoint <= 0x2FF ) { return true ; } else if ( codepoint >= 0x370 && codepoint <= 0x37D ) { return true ; } else if ( codepoint >= 0x37F && codepoint <= 0x1FFF ) { return true ; } else if ( codepoint >= 0x200C && codepoint <= 0x200D ) { return true ; } else if ( codepoint >= 0x2070 && codepoint <= 0x218F ) { return true ; } else if ( codepoint >= 0x2C00 && codepoint <= 0x2FEF ) { return true ; } else if ( codepoint >= 0x3001 && codepoint <= 0xD7FF ) { return true ; } else if ( codepoint >= 0xF900 && codepoint <= 0xFDCF ) { return true ; } else if ( codepoint >= 0xFDF0 && codepoint <= 0xFFFD ) { return true ; } else if ( codepoint >= 0x10000 && codepoint <= 0xEFFFF ) { return true ; } else { return false ; } |
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 ) handler = _pubsubOutputHandlers . get ( neighbourUUID ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getPubSubOutputHandler" , handler ) ; return handler ; |
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 < / a > in the AWS CodeDeploy User Guide .
* @ return 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 < / a > in the AWS CodeDeploy User Guide . */
public java . util . List < TriggerConfig > getTriggerConfigurations ( ) { } } | 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 } before
* throwing the failure .
* @ throws NullPointerException if { @ code connectionFactory } or { @ code config } are null
* @ throws IOException if the connection could not be created */
public static ConfigurableConnection create ( ConnectionFactory connectionFactory , Config config ) throws IOException , TimeoutException { } } | 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 # withEc2InstanceIds ( java . util . Collection ) } if you want
* to override the existing values .
* @ param ec2InstanceIds
* A list of the EC2 instances that the Elastic Load Balancing instance is managing traffic for .
* @ return Returns a reference to this object so that method calls can be chained together . */
public ElasticLoadBalancer withEc2InstanceIds ( String ... ec2InstanceIds ) { } } | 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
* the conversion will not result in a loss of precision .
* TODO : Float and double are currently coercible to int and long . This is a bug . */
public static boolean isCoercable ( final Class < ? > to , final Class < ? > from ) { } } | 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 the validation
* @ return the { @ link ServiceResponse } object if successful . */
public Observable < ServiceResponse < Void > > disableAllForWebAppWithServiceResponseAsync ( String resourceGroupName , String siteName ) { } } | 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 new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } return service . disableAllForWebApp ( resourceGroupName , siteName , this . client . subscriptionId ( ) , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Void > > > ( ) { @ Override public Observable < ServiceResponse < Void > > call ( Response < ResponseBody > response ) { try { ServiceResponse < Void > clientResponse = disableAllForWebAppDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; |
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 final void removeElementAt ( int i ) { } } | 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 the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete ( String resourceGroupName , String loadBalancerName ) { } } | 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 )
* @ since 1.7 */
public SSLParameters getSSLParameters ( ) { } } | SSLParameters parameters = new SSLParameters ( ) ; parameters . setCipherSuites ( getEnabledCipherSuites ( ) ) ; parameters . setProtocols ( getEnabledProtocols ( ) ) ; if ( getNeedClientAuth ( ) ) { parameters . setNeedClientAuth ( true ) ; } else if ( getWantClientAuth ( ) ) { parameters . setWantClientAuth ( true ) ; } return parameters ; |
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 > */
public Properties < PartitionPlan < T > > getOrCreateProperties ( ) { } } | 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 ( jolokiaServiceRegistration != null ) { jolokiaServiceRegistration . unregister ( ) ; jolokiaServiceRegistration = null ; } // Shut this down last to make sure nobody calls for a property after this is shutdown
if ( configAdminTracker != null ) { configAdminTracker . close ( ) ; configAdminTracker = null ; } if ( jolokiaHttpContext instanceof ServiceAuthenticationHttpContext ) { final ServiceAuthenticationHttpContext context = ( ServiceAuthenticationHttpContext ) jolokiaHttpContext ; context . close ( ) ; } restrictor = null ; bundleContext = null ; |
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 = true ) public static long operator_divide ( short a , long b ) { } } | 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 ( ) ; } catch ( Exception ex ) { throw new EsHadoopException ( String . format ( "Could not get a Transport from the Transport Pool for host [%s]" , hostInfo ) , ex ) ; } |
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 List of Objects */
public static < T > List < T > queryBeanList ( String poolName , String sql , Class < T > beanType , Object [ ] params ) throws YankSQLException { } } | 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 ) ; } catch ( SQLException e ) { handleSQLException ( e , poolName , sql ) ; } return returnList ; |
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 */
@ Override public List < CPDisplayLayout > getCPDisplayLayoutsByUuidAndCompanyId ( String uuid , long companyId ) { } } | 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 ; zzAction = - 1 ; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL ; zzState = ZZ_LEXSTATE [ zzLexicalState ] ; zzForAction : { while ( true ) { if ( zzCurrentPosL < zzEndReadL ) zzInput = zzBufferL [ zzCurrentPosL ++ ] ; else if ( zzAtEOF ) { zzInput = YYEOF ; break zzForAction ; } else { // store back cached positions
zzCurrentPos = zzCurrentPosL ; zzMarkedPos = zzMarkedPosL ; boolean eof = zzRefill ( ) ; // get translated positions and possibly new buffer
zzCurrentPosL = zzCurrentPos ; zzMarkedPosL = zzMarkedPos ; zzBufferL = zzBuffer ; zzEndReadL = zzEndRead ; if ( eof ) { zzInput = YYEOF ; break zzForAction ; } else { zzInput = zzBufferL [ zzCurrentPosL ++ ] ; } } int zzNext = zzTransL [ zzRowMapL [ zzState ] + zzCMapL [ zzInput ] ] ; if ( zzNext == - 1 ) break zzForAction ; zzState = zzNext ; int zzAttributes = zzAttrL [ zzState ] ; if ( ( zzAttributes & 1 ) == 1 ) { zzAction = zzState ; zzMarkedPosL = zzCurrentPosL ; if ( ( zzAttributes & 8 ) == 8 ) break zzForAction ; } } } // store back cached position
zzMarkedPos = zzMarkedPosL ; switch ( zzAction < 0 ? zzAction : ZZ_ACTION [ zzAction ] ) { case 180 : { return ( stem ( 3 , "te" , "ed" ) ) ; } case 372 : break ; case 298 : { return ( stem ( 1 , "a" , "s" ) ) ; } case 373 : break ; case 94 : { return ( stem ( 3 , "ide" , "ed" ) ) ; } case 374 : break ; case 126 : { return ( stem ( 2 , "al" , "s" ) ) ; } case 375 : break ; case 15 : { return ( null_stem ( ) ) ; } case 376 : break ; case 293 : { return ( stem ( 2 , "la" , "s" ) ) ; } case 377 : break ; case 38 : { return ( stem ( 3 , "will" , "" ) ) ; } case 378 : break ; case 8 : { yybegin ( scan ) ; if ( option ( tag_output ) ) return yytext ( ) ; } case 379 : break ; case 11 : { return cnull_stem ( ) ; } case 380 : break ; case 72 : { return ( stem ( 3 , "eel" , "ed" ) ) ; } case 381 : break ; case 173 : { return ( stem ( 3 , "eal" , "ed" ) ) ; } case 382 : break ; case 177 : { return ( stem ( 4 , "ake" , "en" ) ) ; } case 383 : break ; case 134 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "I" , "" ) ) ; } case 384 : break ; case 133 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 1 , "y" , "" ) ) ; } case 385 : break ; case 259 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 4 ; { return ( stem ( 1 , "y" , "" ) ) ; } case 386 : break ; case 89 : { return ( stem ( 3 , "ay" , "ed" ) ) ; } case 387 : break ; case 272 : { return ( stem ( 3 , "se" , "ed" ) ) ; } case 388 : break ; case 95 : { return ( stem ( 3 , "ise" , "ed" ) ) ; } case 389 : break ; case 236 : { return ( stem ( 3 , "ike" , "ed" ) ) ; } case 390 : break ; case 29 : { return ( ynull_stem ( ) ) ; } case 391 : break ; case 111 : { return ( stem ( 3 , "ell" , "ed" ) ) ; } case 392 : break ; case 10 : { return ( stem ( 1 , "us" , "s" ) ) ; } case 393 : break ; case 1 : { return ( common_noun_stem ( ) ) ; } case 394 : break ; case 13 : // lookahead expression with fixed lookahead length
yypushback ( 1 ) ; { return ( common_noun_stem ( ) ) ; } case 395 : break ; case 70 : { return ( stem ( 3 , "ly" , "ed" ) ) ; } case 396 : break ; case 67 : { return ( stem ( 3 , "ive" , "ed" ) ) ; } case 397 : break ; case 355 : { return ( stem ( 3 , "is" , "s" ) ) ; } case 398 : break ; case 239 : { return ( stem ( 5 , "eek" , "ed" ) ) ; } case 399 : break ; case 160 : { return ( stem ( 3 , "ar" , "ed" ) ) ; } case 400 : break ; case 267 : { return ( stem ( 4 , "ame" , "ed" ) ) ; } case 401 : break ; case 33 : { return ( stem ( 3 , "see" , "ed" ) ) ; } case 402 : break ; case 151 : { return ( stem ( 3 , "epe" , "ed" ) ) ; } case 403 : break ; case 21 : { return ( stem ( 3 , "get" , "ed" ) ) ; } case 404 : break ; case 351 : { return ( stem ( 8 , "-de-sac" , "s" ) ) ; } case 405 : break ; case 369 : { return ( stem ( 12 , "-in-the-box" , "s" ) ) ; } case 406 : break ; case 266 : { return ( stem ( 5 , "ing" , "ed" ) ) ; } case 407 : break ; case 182 : { return ( stem ( 2 , "i" , "s" ) ) ; } case 408 : break ; case 162 : { return ( stem ( 3 , "an" , "ed" ) ) ; } case 409 : break ; case 30 : { return ( stem ( 3 , "red" , "ed" ) ) ; } case 410 : break ; case 51 : { return ( stem ( 3 , "e" , "ing" ) ) ; } case 411 : break ; case 214 : { return ( stem ( 3 , "ass" , "ed" ) ) ; } case 412 : break ; case 249 : { return ( stem ( 2 , "re" , "s" ) ) ; } case 413 : break ; case 65 : { return ( stem ( 2 , "e" , "s" ) ) ; } case 414 : break ; case 78 : { return ( stem ( 3 , "o" , "en" ) ) ; } case 415 : break ; case 155 : { return ( stem ( 5 , "do" , "ed" ) ) ; } case 416 : break ; case 71 : { return ( stem ( 3 , "all" , "ed" ) ) ; } case 417 : break ; case 125 : { return ( stem ( 2 , "ra" , "s" ) ) ; } case 418 : break ; case 212 : { return ( stem ( 6 , "clepe" , "ed" ) ) ; } case 419 : break ; case 256 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 4 ; { return ( stem ( 1 , "" , "" ) ) ; } case 420 : break ; case 60 : { return ( stem ( 3 , "ear" , "ed" ) ) ; } case 421 : break ; case 63 : { return ( stem ( 3 , "ome" , "ed" ) ) ; } case 422 : break ; case 52 : { return ( stem ( 1 , "" , "ed" ) ) ; } case 423 : break ; case 157 : { return ( stem ( 3 , "eeze" , "ed" ) ) ; } case 424 : break ; case 27 : { return ( stem ( 3 , "light" , "ed" ) ) ; } case 425 : break ; case 139 : { return ( stem ( 3 , "y" , "s" ) ) ; } case 426 : break ; case 296 : { return ( stem ( 2 , "zo" , "s" ) ) ; } case 427 : break ; case 31 : { return ( stem ( 3 , "run" , "ed" ) ) ; } case 428 : break ; case 46 : { return ( stem ( 2 , "an" , "s" ) ) ; } case 429 : break ; case 333 : { return ( stem ( 3 , "ix" , "ed" ) ) ; } case 430 : break ; case 304 : { return ( stem ( 4 , "g" , "ing" ) ) ; } case 431 : break ; case 57 : { return ( stem ( 3 , "end" , "ed" ) ) ; } case 432 : break ; case 131 : // general lookahead , find correct zzMarkedPos
{ int zzFState = 5 ; int zzFPos = zzStartRead ; if ( zzFin . length <= zzBufferL . length ) { zzFin = new boolean [ zzBufferL . length + 1 ] ; } boolean zzFinL [ ] = zzFin ; while ( zzFState != - 1 && zzFPos < zzMarkedPos ) { if ( ( zzAttrL [ zzFState ] & 1 ) == 1 ) { zzFinL [ zzFPos ] = true ; } zzInput = zzBufferL [ zzFPos ++ ] ; zzFState = zzTransL [ zzRowMapL [ zzFState ] + zzCMapL [ zzInput ] ] ; } if ( zzFState != - 1 && ( zzAttrL [ zzFState ] & 1 ) == 1 ) { zzFinL [ zzFPos ] = true ; } zzFState = 7 ; zzFPos = zzMarkedPos ; while ( ! zzFinL [ zzFPos ] || ( zzAttrL [ zzFState ] & 1 ) != 1 ) { zzInput = zzBufferL [ -- zzFPos ] ; zzFState = zzTransL [ zzRowMapL [ zzFState ] + zzCMapL [ zzInput ] ] ; } ; zzMarkedPos = zzFPos ; } { return ( proper_name_stem ( ) ) ; } case 433 : break ; case 50 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 1 ; { return ( proper_name_stem ( ) ) ; } case 434 : break ; case 55 : { return ( stem ( 3 , "low" , "ed" ) ) ; } case 435 : break ; case 193 : { return ( stem ( 2 , "ny" , "s" ) ) ; } case 436 : break ; case 138 : { return ( stem ( 3 , "y" , "ed" ) ) ; } case 437 : break ; case 104 : { return ( stem ( 3 , "mite" , "ed" ) ) ; } case 438 : break ; case 305 : { return ( stem ( 3 , "d" , "en" ) ) ; } case 439 : break ; case 14 : { return ( stem ( 2 , "e" , "ed" ) ) ; } case 440 : break ; case 100 : { return ( stem ( 3 , "hoot" , "ed" ) ) ; } case 441 : break ; case 185 : { return ( stem ( 2 , "so" , "s" ) ) ; } case 442 : break ; case 341 : { return ( stem ( 2 , "r" , "s" ) ) ; } case 443 : break ; case 231 : { return ( stem ( 5 , "elt" , "en" ) ) ; } case 444 : break ; case 225 : { return ( stem ( 4 , "eeze" , "en" ) ) ; } case 445 : break ; case 332 : { return ( stem ( 4 , "y" , "ing" ) ) ; } case 446 : break ; case 130 : // general lookahead , find correct zzMarkedPos
{ int zzFState = 5 ; int zzFPos = zzStartRead ; if ( zzFin . length <= zzBufferL . length ) { zzFin = new boolean [ zzBufferL . length + 1 ] ; } boolean zzFinL [ ] = zzFin ; while ( zzFState != - 1 && zzFPos < zzMarkedPos ) { if ( ( zzAttrL [ zzFState ] & 1 ) == 1 ) { zzFinL [ zzFPos ] = true ; } zzInput = zzBufferL [ zzFPos ++ ] ; zzFState = zzTransL [ zzRowMapL [ zzFState ] + zzCMapL [ zzInput ] ] ; } if ( zzFState != - 1 && ( zzAttrL [ zzFState ] & 1 ) == 1 ) { zzFinL [ zzFPos ] = true ; } zzFState = 6 ; zzFPos = zzMarkedPos ; while ( ! zzFinL [ zzFPos ] || ( zzAttrL [ zzFState ] & 1 ) != 1 ) { zzInput = zzBufferL [ -- zzFPos ] ; zzFState = zzTransL [ zzRowMapL [ zzFState ] + zzCMapL [ zzInput ] ] ; } ; zzMarkedPos = zzFPos ; } { yybegin ( noun ) ; yypushback ( yylength ( ) ) ; return ( next ( ) ) ; } case 447 : break ; case 81 : { return ( stem ( 3 , "ew" , "en" ) ) ; } case 448 : break ; case 113 : { return ( stem ( 3 , "aw" , "en" ) ) ; } case 449 : break ; case 49 : // lookahead expression with fixed lookahead length
yypushback ( 2 ) ; { yybegin ( verb ) ; yypushback ( yylength ( ) ) ; return ( next ( ) ) ; } case 450 : break ; case 314 : { return ( stem ( 3 , "ship" , "ed" ) ) ; } case 451 : break ; case 335 : { return ( stem ( 1 , "de" , "s" ) ) ; } case 452 : break ; case 364 : { return ( stem ( 9 , "-mutuel" , "s" ) ) ; } case 453 : break ; case 370 : { return ( stem ( 14 , "y-in-waiting" , "s" ) ) ; } case 454 : break ; case 9 : { return ( stem ( 2 , "be" , "" ) ) ; } case 455 : break ; case 206 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "be" , "" ) ) ; } case 456 : break ; case 69 : { return ( stem ( 3 , "lee" , "ed" ) ) ; } case 457 : break ; case 40 : { return ( stem ( 1 , "um" , "s" ) ) ; } case 458 : break ; case 56 : { return ( stem ( 3 , "reed" , "ed" ) ) ; } case 459 : break ; case 163 : { return ( stem ( 3 , "ap" , "ed" ) ) ; } case 460 : break ; case 343 : { return ( stem ( 2 , "te" , "s" ) ) ; } case 461 : break ; case 197 : { return ( stem ( 3 , "f" , "s" ) ) ; } case 462 : break ; case 200 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "can" , "" ) ) ; } case 463 : break ; case 300 : { return ( stem ( 2 , "lio" , "s" ) ) ; } case 464 : break ; case 108 : { return ( stem ( 3 , "wim" , "en" ) ) ; } case 465 : break ; case 91 : { return ( stem ( 3 , "ow" , "en" ) ) ; } case 466 : break ; case 321 : { return ( stem ( 2 , "g" , "s" ) ) ; } case 467 : break ; case 228 : { return ( semi_reg_stem ( 1 , "" ) ) ; } case 468 : break ; case 275 : { return ( stem ( 2 , "gue" , "s" ) ) ; } case 469 : break ; case 143 : { return ( stem ( 3 , "ei" , "ed" ) ) ; } case 470 : break ; case 37 : { return ( stem ( 3 , "eat" , "ed" ) ) ; } case 471 : break ; case 17 : { return ( stem ( 3 , "bid" , "ed" ) ) ; } case 472 : break ; case 217 : { return ( stem ( 3 , "" , "en" ) ) ; } case 473 : break ; case 354 : { return ( stem ( 10 , "an-at-arms" , "s" ) ) ; } case 474 : break ; case 132 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "we" , "" ) ) ; } case 475 : break ; case 244 : { return ( stem ( 2 , "ron" , "s" ) ) ; } case 476 : break ; case 338 : { return ( stem ( 2 , "non" , "s" ) ) ; } case 477 : break ; case 196 : { return ( stem ( 2 , "uum" , "s" ) ) ; } case 478 : break ; case 24 : { return ( stem ( 3 , "have" , "ed" ) ) ; } case 479 : break ; case 344 : { return ( stem ( 3 , "ff" , "s" ) ) ; } case 480 : break ; case 251 : { return ( stem ( 2 , "mum" , "s" ) ) ; } case 481 : break ; case 242 : { return ( stem ( 2 , "ie" , "ed" ) ) ; } case 482 : break ; case 273 : { return ( stem ( 2 , "ee" , "ed" ) ) ; } case 483 : break ; case 334 : { return ( stem ( 2 , "do" , "s" ) ) ; } case 484 : break ; case 262 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "do" , "s" ) ) ; } case 485 : break ; case 360 : { return ( stem ( 6 , "-doux" , "s" ) ) ; } case 486 : break ; case 299 : { return ( stem ( 3 , "ly" , "s" ) ) ; } case 487 : break ; case 224 : { return ( stem ( 4 , "w" , "ed" ) ) ; } case 488 : break ; case 237 : { return ( stem ( 4 , "eal" , "en" ) ) ; } case 489 : break ; case 253 : { return ( stem ( 6 , "m.p." , "s" ) ) ; } case 490 : break ; case 45 : { return ( stem ( 2 , "" , "s" ) ) ; } case 491 : break ; case 346 : { return ( stem ( 9 , "an-of-war" , "s" ) ) ; } case 492 : break ; case 90 : { return ( stem ( 3 , "ie" , "en" ) ) ; } case 493 : break ; case 121 : { return ( stem ( 2 , "tum" , "s" ) ) ; } case 494 : break ; case 199 : { return ( stem ( 5 , "eyrir" , "s" ) ) ; } case 495 : break ; case 110 : { return ( stem ( 3 , "ee" , "en" ) ) ; } case 496 : break ; case 204 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "will" , "" ) ) ; } case 497 : break ; case 250 : { return ( stem ( 2 , "ia" , "s" ) ) ; } case 498 : break ; case 255 : { return ( stem ( 3 , "s" , "s" ) ) ; } case 499 : break ; case 44 : { return ( stem ( 2 , "uo" , "s" ) ) ; } case 500 : break ; case 226 : { return ( stem ( 5 , "ight" , "ed" ) ) ; } case 501 : break ; case 124 : { return ( stem ( 3 , "ouse" , "s" ) ) ; } case 502 : break ; case 358 : { return ( stem ( 2 , "t" , "s" ) ) ; } case 503 : break ; case 7 : { return ( stem ( 2 , "be" , "s" ) ) ; } case 504 : break ; case 260 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "be" , "s" ) ) ; } case 505 : break ; case 53 : { return ( semi_reg_stem ( 0 , "e" ) ) ; } case 506 : break ; case 356 : { return ( stem ( 8 , "-in-law" , "s" ) ) ; } case 507 : break ; case 181 : { return ( stem ( 4 , "." , "s" ) ) ; } case 508 : break ; case 169 : { return ( stem ( 3 , "ay" , "en" ) ) ; } case 509 : break ; case 165 : { return ( stem ( 3 , "se" , "en" ) ) ; } case 510 : break ; case 39 : { return ( stem ( 3 , "have" , "" ) ) ; } case 511 : break ; case 166 : { return ( stem ( 3 , "ine" , "ed" ) ) ; } case 512 : break ; case 278 : { return ( stem ( 5 , "ink" , "ed" ) ) ; } case 513 : break ; case 326 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 4 ; { return ( stem ( 4 , "be" , "ed" ) ) ; } case 514 : break ; case 116 : { return ( stem ( 4 , "be" , "ed" ) ) ; } case 515 : break ; case 359 : { return ( stem ( 9 , "-down" , "ing" ) ) ; } case 516 : break ; case 297 : { return ( stem ( 3 , "en" , "s" ) ) ; } case 517 : break ; case 148 : { return ( stem ( 4 , "ear" , "en" ) ) ; } case 518 : break ; case 361 : { return ( stem ( 8 , "-de-lys" , "s" ) ) ; } case 519 : break ; case 115 : { return ( stem ( 4 , "go" , "ed" ) ) ; } case 520 : break ; case 309 : { return ( stem ( 4 , "y" , "ed" ) ) ; } case 521 : break ; case 42 : { return ( stem ( 2 , "a" , "s" ) ) ; } case 522 : break ; case 2 : { String str = yytext ( ) ; int first = str . charAt ( 0 ) ; String msg = String . format ( "Untokenizable: %s (U+%s, decimal: %s) - this may be because your text isn't using _ as a tag delimiter" , yytext ( ) , Integer . toHexString ( first ) . toUpperCase ( ) , Integer . toString ( first ) ) ; LOGGER . warning ( msg ) ; } case 523 : break ; case 189 : { return ( stem ( 3 , "x" , "s" ) ) ; } case 524 : break ; case 61 : { return ( stem ( 3 , "id" , "ed" ) ) ; } case 525 : break ; case 83 : { return ( stem ( 4 , "have" , "s" ) ) ; } case 526 : break ; case 59 : { return ( stem ( 3 , "ear" , "en" ) ) ; } case 527 : break ; case 96 : { return ( stem ( 3 , "eeve" , "ed" ) ) ; } case 528 : break ; case 76 : { return ( stem ( 3 , "ild" , "ed" ) ) ; } case 529 : break ; case 353 : { return ( stem ( 10 , "anservant" , "s" ) ) ; } case 530 : break ; case 202 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "he" , "" ) ) ; } case 531 : break ; case 254 : { return ( stem ( 4 , "ex" , "s" ) ) ; } case 532 : break ; case 150 : { return ( stem ( 3 , "oose" , "ed" ) ) ; } case 533 : break ; case 336 : { return ( stem ( 4 , "-in" , "s" ) ) ; } case 534 : break ; case 285 : { return ( stem ( 6 , "ork" , "ed" ) ) ; } case 535 : break ; case 144 : { return ( stem ( 3 , "eak" , "ed" ) ) ; } case 536 : break ; case 112 : { return ( stem ( 3 , "ink" , "ed" ) ) ; } case 537 : break ; case 241 : { return ( stem ( 3 , "a" , "ed" ) ) ; } case 538 : break ; case 141 : { return ( stem ( 3 , "rn" , "ed" ) ) ; } case 539 : break ; case 330 : { return ( stem ( 6 , "-up" , "ed" ) ) ; } case 540 : break ; case 156 : { return ( stem ( 3 , "y" , "en" ) ) ; } case 541 : break ; case 119 : { return ( stem ( 2 , "um" , "s" ) ) ; } case 542 : break ; case 222 : { return ( stem ( 4 , "tch" , "ed" ) ) ; } case 543 : break ; case 88 : { return ( stem ( 3 , "ose" , "ed" ) ) ; } case 544 : break ; case 25 : { return ( stem ( 3 , "have" , "s" ) ) ; } case 545 : break ; case 101 : { return ( stem ( 3 , "hit" , "ed" ) ) ; } case 546 : break ; case 122 : { return ( stem ( 3 , "oot" , "s" ) ) ; } case 547 : break ; case 68 : { return ( stem ( 4 , "do" , "s" ) ) ; } case 548 : break ; case 97 : { return ( stem ( 3 , "ing" , "ed" ) ) ; } case 549 : break ; case 246 : { return ( stem ( 3 , "denum" , "s" ) ) ; } case 550 : break ; case 352 : { return ( stem ( 6 , "-over" , "s" ) ) ; } case 551 : break ; case 191 : { return ( stem ( 1 , "s" , "s" ) ) ; } case 552 : break ; case 34 : { return ( stem ( 3 , "win" , "ed" ) ) ; } case 553 : break ; case 82 : { return ( stem ( 3 , "eave" , "ed" ) ) ; } case 554 : break ; case 342 : { return ( stem ( 7 , "-up" , "ing" ) ) ; } case 555 : break ; case 74 : { return ( stem ( 3 , "eld" , "ed" ) ) ; } case 556 : break ; case 289 : { return ( stem ( 4 , "yatid" , "s" ) ) ; } case 557 : break ; case 291 : { return ( stem ( 1 , "o" , "s" ) ) ; } case 558 : break ; case 127 : { return ( stem ( 2 , "lo" , "s" ) ) ; } case 559 : break ; case 103 : { return ( stem ( 3 , "lide" , "ed" ) ) ; } case 560 : break ; case 41 : { return ( stem ( 2 , "." , "s" ) ) ; } case 561 : break ; case 175 : { return ( stem ( 3 , "and" , "ed" ) ) ; } case 562 : break ; case 223 : { return ( stem ( 3 , "am" , "ed" ) ) ; } case 563 : break ; case 3 : { return common_noun_stem ( ) . concat ( next ( ) ) ; } case 564 : break ; case 114 : { return ( stem ( 3 , "read" , "ed" ) ) ; } case 565 : break ; case 263 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "have" , "s" ) ) ; } case 566 : break ; case 349 : { return ( stem ( 8 , "-down" , "ed" ) ) ; } case 567 : break ; case 209 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "have" , "ed" ) ) ; } case 568 : break ; case 137 : { return ( stem ( 3 , "" , "ing" ) ) ; } case 569 : break ; case 146 : { return ( stem ( 5 , "be" , "ing" ) ) ; } case 570 : break ; case 219 : { return ( stem ( 4 , "te" , "ing" ) ) ; } case 571 : break ; case 322 : { return ( stem ( 4 , "isee" , "s" ) ) ; } case 572 : break ; case 118 : { return ( stem ( 1 , "on" , "s" ) ) ; } case 573 : break ; case 117 : { return ( stem ( 2 , "" , "ed" ) ) ; } case 574 : break ; case 307 : { return ( stem ( 4 , "y" , "s" ) ) ; } case 575 : break ; case 345 : { return ( stem ( 4 , "-on" , "s" ) ) ; } case 576 : break ; case 337 : { return ( stem ( 8 , "onsieur" , "s" ) ) ; } case 577 : break ; case 178 : { return ( stem ( 4 , "eave" , "en" ) ) ; } case 578 : break ; case 248 : { return ( stem ( 3 , "us" , "s" ) ) ; } case 579 : break ; case 365 : { return ( stem ( 9 , "-de-camp" , "s" ) ) ; } case 580 : break ; case 201 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "she" , "" ) ) ; } case 581 : break ; case 64 : { return ( stem ( 3 , "raw" , "ed" ) ) ; } case 582 : break ; case 317 : { return ( stem ( 2 , "cio" , "s" ) ) ; } case 583 : break ; case 371 : { return ( stem ( 11 , "y-general" , "s" ) ) ; } case 584 : break ; case 320 : { return ( stem ( 2 , "eum" , "s" ) ) ; } case 585 : break ; case 368 : { return ( stem ( 9 , "-at-arms" , "s" ) ) ; } case 586 : break ; case 315 : { return ( stem ( 2 , "ion" , "s" ) ) ; } case 587 : break ; case 367 : { return ( stem ( 11 , "erfamilias" , "s" ) ) ; } case 588 : break ; case 328 : { return ( stem ( 6 , "-down" , "s" ) ) ; } case 589 : break ; case 288 : { return ( stem ( 1 , "x" , "s" ) ) ; } case 590 : break ; case 323 : { return ( stem ( 2 , "oan" , "s" ) ) ; } case 591 : break ; case 306 : { return ( stem ( 5 , "eech" , "ed" ) ) ; } case 592 : break ; case 73 : { return ( stem ( 3 , "row" , "ed" ) ) ; } case 593 : break ; case 4 : { return yytext ( ) ; } case 594 : break ; case 292 : { return ( stem ( 2 , "ro" , "s" ) ) ; } case 595 : break ; case 252 : { return ( stem ( 3 , "ey" , "s" ) ) ; } case 596 : break ; case 324 : { return ( stem ( 2 , "ton" , "s" ) ) ; } case 597 : break ; case 5 : { return ( stem ( 1 , "" , "s" ) ) ; } case 598 : break ; case 303 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "be" , "" ) ) ; } case 599 : break ; case 36 : { return ( stem ( 3 , "be" , "" ) ) ; } case 600 : break ; case 229 : { return ( stem ( 5 , "et" , "en" ) ) ; } case 601 : break ; case 99 : { return ( stem ( 3 , "hoe" , "ed" ) ) ; } case 602 : break ; case 164 : { return ( stem ( 3 , "de" , "en" ) ) ; } case 603 : break ; case 43 : { return ( xnull_stem ( ) ) ; } case 604 : break ; case 362 : { return ( stem ( 8 , "-de-lis" , "s" ) ) ; } case 605 : break ; case 207 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "have" , "" ) ) ; } case 606 : break ; case 271 : { return ( stem ( 5 , "ivy" , "s" ) ) ; } case 607 : break ; case 238 : { return ( stem ( 3 , "ge" , "ed" ) ) ; } case 608 : break ; case 233 : { return ( stem ( 3 , "ce" , "ed" ) ) ; } case 609 : break ; case 176 : { return ( stem ( 3 , "ke" , "en" ) ) ; } case 610 : break ; case 105 : { return ( stem ( 3 , "pin" , "ed" ) ) ; } case 611 : break ; case 287 : { return ( stem ( 2 , "no" , "s" ) ) ; } case 612 : break ; case 312 : { return ( semi_reg_stem ( 0 , "ue" ) ) ; } case 613 : break ; case 235 : { return ( stem ( 3 , "il" , "ed" ) ) ; } case 614 : break ; case 350 : { return ( stem ( 2 , "l" , "s" ) ) ; } case 615 : break ; case 167 : { return ( semi_reg_stem ( 0 , "" ) ) ; } case 616 : break ; case 159 : { return ( stem ( 3 , "ve" , "en" ) ) ; } case 617 : break ; case 203 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 2 , "e" , "" ) ) ; } case 618 : break ; case 234 : { return ( stem ( 5 , "ink" , "en" ) ) ; } case 619 : break ; case 145 : { return ( stem ( 3 , "gin" , "ed" ) ) ; } case 620 : break ; case 286 : { return ( stem ( 5 , "y" , "ed" ) ) ; } case 621 : break ; case 205 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "we" , "" ) ) ; } case 622 : break ; case 171 : { return ( stem ( 3 , "ill" , "ed" ) ) ; } case 623 : break ; case 232 : { return ( stem ( 3 , "ue" , "ed" ) ) ; } case 624 : break ; case 245 : { return ( stem ( 1 , "i" , "s" ) ) ; } case 625 : break ; case 183 : { return ( stem ( 2 , "d" , "s" ) ) ; } case 626 : break ; case 19 : { return ( stem ( 3 , "do" , "ed" ) ) ; } case 627 : break ; case 58 : { return ( stem ( 4 , "be" , "en" ) ) ; } case 628 : break ; case 270 : { return ( stem ( 5 , "ivy" , "ed" ) ) ; } case 629 : break ; case 168 : { return ( stem ( 3 , "i" , "ed" ) ) ; } case 630 : break ; case 187 : { return ( stem ( 1 , "e" , "s" ) ) ; } case 631 : break ; case 340 : { return ( stem ( 2 , "le" , "s" ) ) ; } case 632 : break ; case 280 : { return ( stem ( 5 , "ead" , "en" ) ) ; } case 633 : break ; case 301 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 5 ; { return ( stem ( 2 , "y" , "" ) ) ; } case 634 : break ; case 149 : { return ( stem ( 3 , "rse" , "ed" ) ) ; } case 635 : break ; case 66 : { return ( stem ( 4 , "do" , "en" ) ) ; } case 636 : break ; case 170 : { return ( stem ( 3 , "ite" , "ed" ) ) ; } case 637 : break ; case 227 : { return ( stem ( 3 , "l" , "en" ) ) ; } case 638 : break ; case 128 : { return ( stem ( 4 , "ABC" , "s" ) ) ; } case 639 : break ; case 106 : { return ( stem ( 3 , "peed" , "ed" ) ) ; } case 640 : break ; case 215 : { return ( stem ( 4 , "eak" , "en" ) ) ; } case 641 : break ; case 28 : { return ( stem ( 3 , "meet" , "ed" ) ) ; } case 642 : break ; case 347 : { return ( stem ( 4 , "-by" , "s" ) ) ; } case 643 : break ; case 135 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 1 , "" , "n" ) ) ; } case 644 : break ; case 325 : { return ( stem ( 4 , "s" , "s" ) ) ; } case 645 : break ; case 318 : { return ( stem ( 3 , "esis" , "s" ) ) ; } case 646 : break ; case 230 : { return ( stem ( 3 , "ey" , "ed" ) ) ; } case 647 : break ; case 142 : { return ( stem ( 3 , "ess" , "ed" ) ) ; } case 648 : break ; case 218 : { return ( stem ( 3 , "e" , "en" ) ) ; } case 649 : break ; case 348 : { return ( stem ( 4 , "o" , "s" ) ) ; } case 650 : break ; case 152 : { return ( stem ( 4 , "are" , "ed" ) ) ; } case 651 : break ; case 147 : { return ( stem ( 4 , "ind" , "ed" ) ) ; } case 652 : break ; case 172 : { return ( stem ( 3 , "ick" , "ed" ) ) ; } case 653 : break ; case 153 : { return ( stem ( 4 , "ie" , "ing" ) ) ; } case 654 : break ; case 107 : { return ( stem ( 3 , "pit" , "ed" ) ) ; } case 655 : break ; case 184 : { return ( stem ( 2 , "u" , "s" ) ) ; } case 656 : break ; case 129 : { return ( stem ( 2 , "to" , "s" ) ) ; } case 657 : break ; case 268 : { return ( stem ( 3 , "ride" , "ed" ) ) ; } case 658 : break ; case 186 : { return ( stem ( 2 , "denum" , "s" ) ) ; } case 659 : break ; case 290 : { return ( stem ( 4 , "sbok" , "s" ) ) ; } case 660 : break ; case 308 : { return ( stem ( 6 , "ivy" , "ing" ) ) ; } case 661 : break ; case 366 : { return ( stem ( 13 , "ademoiselle" , "s" ) ) ; } case 662 : break ; case 195 : { return ( stem ( 4 , "ooth" , "s" ) ) ; } case 663 : break ; case 20 : { return ( stem ( 3 , "feed" , "ed" ) ) ; } case 664 : break ; case 98 : { return ( stem ( 3 , "ink" , "en" ) ) ; } case 665 : break ; case 92 : { return ( stem ( 3 , "ake" , "ed" ) ) ; } case 666 : break ; case 62 : { return ( stem ( 3 , "lothe" , "ed" ) ) ; } case 667 : break ; case 18 : { return ( stem ( 3 , "dig" , "ed" ) ) ; } case 668 : break ; case 279 : { return ( stem ( 4 , "k" , "ed" ) ) ; } case 669 : break ; case 194 : { return ( stem ( 2 , "po" , "s" ) ) ; } case 670 : break ; case 221 : { return ( stem ( 3 , "ose" , "en" ) ) ; } case 671 : break ; case 174 : { return ( stem ( 3 , "ave" , "ed" ) ) ; } case 672 : break ; case 77 : { return ( stem ( 3 , "ird" , "ed" ) ) ; } case 673 : break ; case 161 : { return ( stem ( 3 , "in" , "ed" ) ) ; } case 674 : break ; case 210 : { return ( stem ( 4 , "" , "ing" ) ) ; } case 675 : break ; case 85 : { return ( stem ( 3 , "en" , "ed" ) ) ; } case 676 : break ; case 87 : { return ( stem ( 3 , "o" , "ed" ) ) ; } case 677 : break ; case 281 : { return ( stem ( 3 , "mel" , "s" ) ) ; } case 678 : break ; case 274 : { return ( stem ( 4 , "-up" , "s" ) ) ; } case 679 : break ; case 12 : { return ( stem ( 2 , "is" , "s" ) ) ; } case 680 : break ; case 23 : { return ( stem ( 3 , "hide" , "ed" ) ) ; } case 681 : break ; case 93 : { return ( stem ( 3 , "ing" , "en" ) ) ; } case 682 : break ; case 257 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "not" , "" ) ) ; } case 683 : break ; case 283 : { return ( stem ( 4 , "i" , "ing" ) ) ; } case 684 : break ; case 243 : { return ( stem ( 4 , "e" , "ing" ) ) ; } case 685 : break ; case 284 : { return ( stem ( 4 , "a" , "ing" ) ) ; } case 686 : break ; case 136 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "'s" , "" ) ) ; } case 687 : break ; case 264 : { return ( condub_stem ( 3 , "" , "ing" ) ) ; } case 688 : break ; case 120 : { return ( stem ( 3 , "a" , "s" ) ) ; } case 689 : break ; case 327 : { return ( stem ( 4 , "l" , "ing" ) ) ; } case 690 : break ; case 316 : { return ( stem ( 2 , "ne" , "s" ) ) ; } case 691 : break ; case 247 : { return ( stem ( 3 , "ur" , "s" ) ) ; } case 692 : break ; case 198 : { return ( stem ( 2 , "b" , "s" ) ) ; } case 693 : break ; case 220 : { return ( stem ( 5 , "uy" , "ed" ) ) ; } case 694 : break ; case 258 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "shall" , "" ) ) ; } case 695 : break ; case 190 : { return ( stem ( 3 , "fe" , "s" ) ) ; } case 696 : break ; case 216 : { return ( stem ( 2 , "" , "en" ) ) ; } case 697 : break ; case 311 : { return ( stem ( 5 , "ify" , "s" ) ) ; } case 698 : break ; case 313 : { return ( stem ( 5 , "k" , "ing" ) ) ; } case 699 : break ; case 6 : { return ( cnull_stem ( ) ) ; } case 700 : break ; case 80 : { return ( stem ( 3 , "old" , "ed" ) ) ; } case 701 : break ; case 339 : { return ( stem ( 4 , "ese" , "s" ) ) ; } case 702 : break ; case 294 : { return ( stem ( 2 , "dum" , "s" ) ) ; } case 703 : break ; case 47 : { return ( stem ( 2 , "s" , "s" ) ) ; } case 704 : break ; case 329 : { return ( stem ( 5 , "y" , "ing" ) ) ; } case 705 : break ; case 357 : { return ( stem ( 6 , "-lit" , "s" ) ) ; } case 706 : break ; case 158 : { return ( stem ( 3 , "ip" , "ed" ) ) ; } case 707 : break ; case 79 : { return ( stem ( 3 , "ang" , "ed" ) ) ; } case 708 : break ; case 331 : { return ( stem ( 6 , "ify" , "ing" ) ) ; } case 709 : break ; case 295 : { return ( stem ( 4 , "belly" , "s" ) ) ; } case 710 : break ; case 188 : { return ( stem ( 4 , "oose" , "s" ) ) ; } case 711 : break ; case 282 : { return ( stem ( 4 , "ge" , "ing" ) ) ; } case 712 : break ; case 109 : { return ( stem ( 3 , "wim" , "ed" ) ) ; } case 713 : break ; case 179 : { return ( stem ( 3 , "t" , "en" ) ) ; } case 714 : break ; case 276 : { return ( stem ( 4 , "ue" , "ing" ) ) ; } case 715 : break ; case 48 : { return ( stem ( 2 , "vum" , "s" ) ) ; } case 716 : break ; case 123 : { return ( stem ( 2 , "rum" , "s" ) ) ; } case 717 : break ; case 192 : { return ( stem ( 2 , "num" , "s" ) ) ; } case 718 : break ; case 102 : { return ( stem ( 3 , "lay" , "ed" ) ) ; } case 719 : break ; case 277 : { return ( stem ( 5 , "ell" , "en" ) ) ; } case 720 : break ; case 140 : { return ( stem ( 3 , "" , "ed" ) ) ; } case 721 : break ; case 261 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "as" , "" ) ) ; } case 722 : break ; case 16 : { return ( stem ( 3 , "bite" , "ed" ) ) ; } case 723 : break ; case 154 : { return ( stem ( 3 , "al" , "ed" ) ) ; } case 724 : break ; case 213 : { return ( stem ( 3 , "" , "s" ) ) ; } case 725 : break ; case 302 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3 ; { return ( stem ( 3 , "be" , "ed" ) ) ; } case 726 : break ; case 35 : { return ( stem ( 3 , "be" , "ed" ) ) ; } case 727 : break ; case 32 : { return ( stem ( 3 , "sit" , "ed" ) ) ; } case 728 : break ; case 240 : { return ( stem ( 5 , "each" , "ed" ) ) ; } case 729 : break ; case 363 : { return ( stem ( 9 , "-a-terre" , "s" ) ) ; } case 730 : break ; case 84 : { return ( stem ( 3 , "now" , "ed" ) ) ; } case 731 : break ; case 22 : { return ( stem ( 3 , "gin" , "en" ) ) ; } case 732 : break ; case 269 : { return ( stem ( 3 , "ie" , "ed" ) ) ; } case 733 : break ; case 75 : { return ( stem ( 3 , "ee" , "ed" ) ) ; } case 734 : break ; case 86 : { return ( stem ( 3 , "eep" , "ed" ) ) ; } case 735 : break ; case 208 : // lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 2 ; { return ( stem ( 2 , "would" , "" ) ) ; } case 736 : break ; case 54 : { return ( stem ( 3 , "leed" , "ed" ) ) ; } case 737 : break ; case 26 : { return ( stem ( 3 , "lead" , "ed" ) ) ; } case 738 : break ; case 265 : { return ( stem ( 7 , "clepe" , "ed" ) ) ; } case 739 : break ; case 319 : { return ( stem ( 4 , "eps" , "s" ) ) ; } case 740 : break ; case 310 : { return ( stem ( 5 , "ify" , "ed" ) ) ; } case 741 : break ; case 211 : { return ( condub_stem ( 2 , "" , "ed" ) ) ; } case 742 : break ; default : if ( zzInput == YYEOF && zzStartRead == zzCurrentPos ) { zzAtEOF = true ; { return null ; } } else { zzScanError ( ZZ_NO_MATCH ) ; } } } |
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 sequentially in order to reach the desired new state .
* @ param itemIDs : list of IDs starting from firstItemPos
* @ param firstItemPos : position of the first item .
* @ return a list of actions to be performed sequentially */
public List < Action > getUpdateActions ( List < Long > itemIDs , int firstItemPos ) { } } | 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 ( itemIDs , newMap , firstItemPos ) ; LongSparseArray < Integer > oldMap = new LongSparseArray < Integer > ( ) ; final List < Action > actions = new ArrayList < Action > ( ) ; synchronized ( mSyncObject ) { if ( oldIDs != null ) { listToMap ( oldIDs , oldMap , 0 ) ; for ( int pos = oldIDs . size ( ) - 1 ; pos >= firstItemPos ; pos -- ) { Long id = oldIDs . get ( pos ) ; int newPos = newMap . get ( id , - 1 ) ; if ( newPos == - 1 ) { oldIDs . remove ( pos ) ; oldMap . delete ( id ) ; updateMap ( oldIDs , oldMap , pos , - 1 ) ; actions . add ( new Action ( ACTION_TYPE . DELETE , id , pos , - 1 ) ) ; } } } if ( itemIDs != null ) { for ( int index = 0 ; index < itemIDs . size ( ) ; index ++ ) { final int pos = firstItemPos + index ; final Long id = itemIDs . get ( index ) ; int oldPos = oldMap . get ( id , - 1 ) ; if ( oldPos != - 1 ) { if ( oldPos != pos ) { oldIDs . remove ( oldPos ) ; oldIDs . add ( pos , id ) ; int min = Math . min ( oldPos , pos ) ; int max = Math . max ( oldPos , pos ) ; updateMap ( oldIDs , oldMap , min , max + 1 ) ; actions . add ( new Action ( ACTION_TYPE . MOVE , id , oldPos , pos ) ) ; } } else { if ( oldIDs != null ) { oldIDs . add ( pos , id ) ; updateMap ( oldIDs , oldMap , pos , - 1 ) ; } actions . add ( new Action ( ACTION_TYPE . ADD , id , - 1 , pos ) ) ; } } } } return actions ; |
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 ) ; field . setHidden ( true ) ; field = new FieldInfo ( this , DELETED , 10 , null , new Boolean ( false ) ) ; field . setDataClass ( Boolean . class ) ; field . setHidden ( true ) ; field = new FieldInfo ( this , MESSAGE_INFO_TYPE_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , MESSAGE_TYPE_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , MESSAGE_STATUS_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , MESSAGE_TRANSPORT_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , MESSAGE_PROCESS_INFO_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , CONTACT_TYPE_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , CONTACT_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , DESCRIPTION , 60 , null , null ) ; field = new FieldInfo ( this , MESSAGE_TIME , 25 , null , null ) ; field . setDataClass ( Date . class ) ; field = new FieldInfo ( this , TIMEOUT_SECONDS , 10 , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , TIMEOUT_TIME , 25 , null , null ) ; field . setDataClass ( Date . class ) ; field = new FieldInfo ( this , USER_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , REFERENCE_TYPE , 60 , null , null ) ; field = new FieldInfo ( this , REFERENCE_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , RESPONSE_MESSAGE_LOG_ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field = new FieldInfo ( this , MESSAGE_HEADER_PROPERTIES , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field = new FieldInfo ( this , MESSAGE_INFO_PROPERTIES , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field = new FieldInfo ( this , MESSAGE_TRANSPORT_PROPERTIES , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field = new FieldInfo ( this , MESSAGE_CLASS_NAME , 128 , null , null ) ; field = new FieldInfo ( this , MESSAGE_HEADER_CLASS_NAME , 128 , null , null ) ; field = new FieldInfo ( this , MESSAGE_DATA_CLASS_NAME , 128 , null , null ) ; field = new FieldInfo ( this , EXTERNAL_MESSAGE_CLASS_NAME , 128 , null , null ) ; field = new FieldInfo ( this , MESSAGE_QUEUE_NAME , 60 , null , null ) ; field = new FieldInfo ( this , MESSAGE_QUEUE_TYPE , 60 , null , null ) ; field = new FieldInfo ( this , MESSAGE_DATA_TYPE , 30 , null , null ) ; field = new FieldInfo ( this , XML_MESSAGE_DATA , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field = new FieldInfo ( this , MESSAGE_DATA , 32000 , null , null ) ; field = new FieldInfo ( this , ERROR_TEXT , 127 , null , null ) ; |
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 > { @ link # SHORT _ PREFIX _ STYLE } < / li >
* < li > { @ link # NO _ FIELD _ NAMES _ STYLE } < / li >
* < / ul >
* < p > If the String specified cannot match any of the above style ' s class
* name , then an { @ link IllegalArgumentException } will be thrown out < / p >
* @ param s
* @ return a < code > ToStringStyle < / code > from the give string */
public static ToStringStyle valueOf ( String s ) { } } | 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 . getClass ( ) . getName ( ) , s ) ) return SHORT_PREFIX_STYLE ; if ( S . isEqual ( NO_FIELD_NAMES_STYLE . getClass ( ) . getName ( ) , s ) ) return NO_FIELD_NAMES_STYLE ; throw new IllegalArgumentException ( "Unknown ToStringStyle: " + s ) ; |
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 . isPrintHelp ( ) ) { CliFrontendParser . printHelpForInfo ( ) ; return ; } if ( infoOptions . getJarFilePath ( ) == null ) { throw new CliArgsException ( "The program JAR file was not specified." ) ; } // - - - - - build the packaged program - - - - -
LOG . info ( "Building program from JAR file" ) ; final PackagedProgram program = buildProgram ( infoOptions ) ; try { int parallelism = infoOptions . getParallelism ( ) ; if ( ExecutionConfig . PARALLELISM_DEFAULT == parallelism ) { parallelism = defaultParallelism ; } LOG . info ( "Creating program plan dump" ) ; Optimizer compiler = new Optimizer ( new DataStatistics ( ) , new DefaultCostEstimator ( ) , configuration ) ; FlinkPlan flinkPlan = ClusterClient . getOptimizedPlan ( compiler , program , parallelism ) ; String jsonPlan = null ; if ( flinkPlan instanceof OptimizedPlan ) { jsonPlan = new PlanJSONDumpGenerator ( ) . getOptimizerPlanAsJSON ( ( OptimizedPlan ) flinkPlan ) ; } else if ( flinkPlan instanceof StreamingPlan ) { jsonPlan = ( ( StreamingPlan ) flinkPlan ) . getStreamingPlanAsJSON ( ) ; } if ( jsonPlan != null ) { System . out . println ( "----------------------- Execution Plan -----------------------" ) ; System . out . println ( jsonPlan ) ; System . out . println ( "--------------------------------------------------------------" ) ; } else { System . out . println ( "JSON plan could not be generated." ) ; } String description = program . getDescription ( ) ; if ( description != null ) { System . out . println ( ) ; System . out . println ( description ) ; } else { System . out . println ( ) ; System . out . println ( "No description provided." ) ; } } finally { program . deleteExtractedLibraries ( ) ; } |
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 . append ( statement . getSynonymName ( ) ) ; if ( statement . isForce ( ) != null && statement . isForce ( ) ) { sql . append ( " FORCE" ) ; } return new Sql [ ] { new UnparsedSql ( sql . toString ( ) ) } ; |
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
* parameters should be returned in an instance of the
* { @ code DSAParameterSpec } class .
* @ param < T > the type of the parameter specification to be returrned
* @ param paramSpec the specification class in which
* the parameters should be returned .
* @ return the parameter specification .
* @ exception InvalidParameterSpecException if the requested parameter
* specification is inappropriate for this parameter object , or if this
* parameter object has not been initialized . */
public final < T extends AlgorithmParameterSpec > T getParameterSpec ( Class < T > paramSpec ) throws InvalidParameterSpecException { } } | 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 type ) { } } | 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 < code > null < / code > if no match was found */
private RegistryEntry getRegistryEntryForChildFirstConfig ( final RegistryEntry parentEntry , String childNodeName ) { } } | 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 . getObjectClassDefinition ( ) . supportsExtensions ( ) ) { RegistryEntry childAliasEntry = metatypeRegistry . getRegistryEntry ( pe . getPid ( ) , childNodeName ) ; if ( childAliasEntry != null ) return childAliasEntry ; } pe = pe . getExtendedRegistryEntry ( ) ; } // This will work in the more likely scenario that the node name has been replaced by the pid .
// We didn ' t find an entry for the child alias , try using the PID / Alias
RegistryEntry childEntry = getRegistryEntry ( childNodeName ) ; if ( childEntry == null ) return null ; // check whether the parent element matches the child ' s ibm : parentPid
// or the parent ibm : extends an OCD matching the child ' s ibm : parentPid
final String ibmParentPid = childEntry . getObjectClassDefinition ( ) . getParentPID ( ) ; for ( String s = parentEntry . getPid ( ) ; s != null ; s = getExtends ( s ) ) if ( s . equals ( ibmParentPid ) ) return childEntry ; return null ; |
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 be applied .
* @ return A copy of the given bitmap with the tint color changed . */
public static Bitmap changeTintColor ( Bitmap bitmap , int originalColor , int destinationColor ) { } } | // 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 width = bitmap . getWidth ( ) ; int height = bitmap . getHeight ( ) ; int [ ] pixels = new int [ width * height ] ; bitmap . getPixels ( pixels , 0 , width , 0 , 0 , width , height ) ; int maxIndex = getMaxIndex ( o ) ; int mintIndex = getMinIndex ( o ) ; for ( int i = 0 ; i < pixels . length ; i ++ ) { int color = pixels [ i ] ; // pixel color
int [ ] p = new int [ ] { Color . red ( color ) , Color . green ( color ) , Color . blue ( color ) } ; int alpha = Color . alpha ( color ) ; float [ ] transformation = calculateTransformation ( o [ maxIndex ] , o [ mintIndex ] , p [ maxIndex ] , p [ mintIndex ] ) ; pixels [ i ] = applyTransformation ( d , alpha , transformation ) ; } return Bitmap . createBitmap ( pixels , width , height , Bitmap . Config . ARGB_8888 ) ; |
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 void setVariable ( String name , Object value ) { if ( currentBeanConfig == null ) { super . setVariable ( name , value ) ; } else { setPropertyOnBeanConfig ( name , value ) ; } } } ; b . setVariable ( "beans" , beans ) ; for ( Resource resource : resources ) { try { GroovyShell shell = classLoader == null ? new GroovyShell ( b ) : new GroovyShell ( classLoader , b ) ; shell . evaluate ( new InputStreamReader ( resource . getInputStream ( ) , "UTF-8" ) ) ; } catch ( Throwable e ) { throw new BeanDefinitionParsingException ( new Problem ( "Error evaluating bean definition script: " + e . getMessage ( ) , new Location ( resource ) , null , e ) ) ; } } |
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 being tried .
* @ param resourceName the name of the resource to be obtained .
* @ return an input stream on the resource , or { @ code null } if it could not be located .
* @ since 3.0.3 */
public static InputStream findResourceAsStream ( final String resourceName ) { } } | // 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 might be other ways of obtaining it
// note anyway that this is not really normal : the context class loader should be
// either able to resolve any of our application ' s resources , or to delegate to a class
// loader that can do that .
} // The thread context class loader might have already delegated to both the class
// and system class loaders , in which case it makes little sense to query them too .
if ( ! isKnownLeafClassLoader ( contextClassLoader ) ) { // The context class loader didn ' t help , so . . . maybe the class one ?
if ( classClassLoader != null && classClassLoader != contextClassLoader ) { final InputStream inputStream = classClassLoader . getResourceAsStream ( resourceName ) ; if ( inputStream != null ) { return inputStream ; } // Pass - through , maybe the system class loader can do it ? - though it would be * really * weird . . .
} if ( ! systemClassLoaderAccessibleFromClassClassLoader ) { // The only class loader we can rely on for not being null is the system one
if ( systemClassLoader != null && systemClassLoader != contextClassLoader && systemClassLoader != classClassLoader ) { final InputStream inputStream = systemClassLoader . getResourceAsStream ( resourceName ) ; if ( inputStream != null ) { return inputStream ; } // Pass - through , anyway we have a return null after this . . .
} } } return null ; |
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 */
@ Indexable ( type = IndexableType . REINDEX ) @ Override public CommerceWarehouseItem updateCommerceWarehouseItem ( CommerceWarehouseItem commerceWarehouseItem ) { } } | 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 . symbol ) ; |
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 known for the { @ code
* name } */
public static synchronized DependencyExtractor getExtractor ( String name ) { } } | 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 { @ code null } < / li >
* < li > { @ link OrthologousNode } if { @ code kamNode } has orthologized < / li >
* < li > the original { @ code kamNode } input if it has not orthologized < / li >
* < / ol > */
private KamNode wrapNode ( KamNode kamNode ) { } } | 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 ) ; } if ( openAnimation == null ) { getOpenMixin ( ) . setOn ( true ) ; OpenEvent . fire ( this , true ) ; } else { setOpacity ( 0 ) ; Scheduler . get ( ) . scheduleDeferred ( ( ) -> { getOpenMixin ( ) . setOn ( true ) ; openAnimation . animate ( this , ( ) -> OpenEvent . fire ( this , true ) ) ; } ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.