signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AmazonSimpleEmailServiceClient { /** * Deletes the specified receipt rule set and all of the receipt rules it contains . * < note > * The currently active rule set cannot be deleted . * < / note > * For information about managing receipt rule sets , see the < a * href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - managing - receipt - rule - sets . html " * > Amazon SES Developer Guide < / a > . * You can execute this operation no more than once per second . * @ param deleteReceiptRuleSetRequest * Represents a request to delete a receipt rule set and all of the receipt rules it contains . You use * receipt rule sets to receive email with Amazon SES . For more information , see the < a * href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - concepts . html " > Amazon SES * Developer Guide < / a > . * @ return Result of the DeleteReceiptRuleSet operation returned by the service . * @ throws CannotDeleteException * Indicates that the delete operation could not be completed . * @ sample AmazonSimpleEmailService . DeleteReceiptRuleSet * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / email - 2010-12-01 / DeleteReceiptRuleSet " target = " _ top " > AWS API * Documentation < / a > */ @ Override public DeleteReceiptRuleSetResult deleteReceiptRuleSet ( DeleteReceiptRuleSetRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDeleteReceiptRuleSet ( request ) ;
public class TaskTypesImpl { /** * Set this instance to fallback to using the passed in workspace , when none other is passed explicitly . * Using this once means you don ' t have to pass this workspace instance around any longer when performing * actions on these tasks . * @ param currentWorkspace the workspace to be used in all consequent requests * @ param currentProject the project to be used in all consequent requests * @ return the same instance of { @ link TasksImpl } as before , but setup to use the currentWorkspace */ public TaskTypesImpl using ( Workspace currentWorkspace , Project currentProject ) { } }
this . currentWorkspace = currentWorkspace ; this . currentProject = currentProject ; return this ;
public class HtmlDocletWriter { /** * Adds the annotatation types for the given packageDoc . * @ param packageDoc the package to write annotations for . * @ param htmltree the documentation tree to which the annotation info will be * added */ public void addAnnotationInfo ( PackageDoc packageDoc , Content htmltree ) { } }
addAnnotationInfo ( packageDoc , packageDoc . annotations ( ) , htmltree ) ;
public class GuiRenderer { /** * Draws an non - textured rectangle in the GUI at a position relative to { @ link # currentComponent } . * @ param x the x * @ param y the y * @ param z the z * @ param width the width * @ param height the height * @ param color the color * @ param alpha the alpha */ public void drawRectangle ( int x , int y , int z , int width , int height , int color , int alpha ) { } }
drawRectangle ( x , y , z , width , height , color , alpha , true ) ;
public class CloudStorageRetryHandler { /** * Checks whether we should retry , reopen , or give up . * < p > In the latter case it throws an exception ( this includes the scenario where we exhausted the * retry count ) . * < p > Otherwise , it sleeps for a bit and returns whether we should reopen . The sleep time is * dependent on the retry number . * @ param exs caught StorageException * @ return True if you need to reopen and then try again . False if you can just try again . * @ throws StorageException if the exception is not retryable , or if you ran out of retries . */ public boolean handleStorageException ( final StorageException exs ) throws StorageException { } }
// None of the retryable exceptions are reopenable , so it ' s OK to write the code this way . if ( isRetryable ( exs ) ) { handleRetryForStorageException ( exs ) ; return false ; } if ( isReopenable ( exs ) ) { handleReopenForStorageException ( exs ) ; return true ; } throw exs ;
public class SimpleDOReader { /** * { @ inheritDoc } */ @ Override public boolean hasRelationship ( PredicateNode predicate , ObjectNode object ) { } }
return m_obj . hasRelationship ( predicate , object ) ;
public class CassandraCell { /** * Constructs a Cell from a { @ link com . stratio . deep . commons . annotations . DeepField } property . * @ param e instance of the testentity whose field is going to generate a Cell . * @ param field field that will generate the Cell . * @ param < E > a subclass of IDeepType . * @ return an instance of a Cell object for the provided parameters . */ public static < E extends IDeepType > Cell create ( E e , Field field ) { } }
return new CassandraCell ( e , field ) ;
public class PropertyWriterImpl { /** * { @ inheritDoc } */ protected void addInheritedSummaryLink ( ClassDoc cd , ProgramElementDoc member , Content linksTree ) { } }
linksTree . addContent ( writer . getDocLink ( LinkInfoImpl . Kind . MEMBER , cd , ( MemberDoc ) member , ( ( member . name ( ) . lastIndexOf ( "Property" ) != - 1 ) && configuration . javafx ) ? member . name ( ) . substring ( 0 , member . name ( ) . length ( ) - "Property" . length ( ) ) : member . name ( ) , false , true ) ) ;
public class CreatorUtils { /** * < p > filterSubtypesForDeserialization < / p > * @ param logger a { @ link com . google . gwt . core . ext . TreeLogger } object . * @ param configuration a { @ link com . github . nmorel . gwtjackson . rebind . RebindConfiguration } object . * @ param type a { @ link com . google . gwt . core . ext . typeinfo . JClassType } object . * @ return a { @ link com . google . gwt . thirdparty . guava . common . collect . ImmutableList } object . */ public static ImmutableList < JClassType > filterSubtypesForDeserialization ( TreeLogger logger , RebindConfiguration configuration , JClassType type ) { } }
boolean filterOnlySupportedType = isObjectOrSerializable ( type ) ; ImmutableList . Builder < JClassType > builder = ImmutableList . builder ( ) ; if ( type . getSubtypes ( ) . length > 0 ) { for ( JClassType subtype : type . getSubtypes ( ) ) { if ( ( null == subtype . isInterface ( ) && ! subtype . isAbstract ( ) && ( ! subtype . isMemberType ( ) || subtype . isStatic ( ) ) ) && null == subtype . isAnnotation ( ) && subtype . isPublic ( ) && ( ! filterOnlySupportedType || ( configuration . isTypeSupportedForDeserialization ( logger , subtype ) // EnumSet and EnumMap are not supported in subtype deserialization because we can ' t know the enum to use . && ! EnumSet . class . getCanonicalName ( ) . equals ( subtype . getQualifiedSourceName ( ) ) && ! EnumMap . class . getCanonicalName ( ) . equals ( subtype . getQualifiedSourceName ( ) ) ) ) && ! findFirstEncounteredAnnotationsOnAllHierarchy ( configuration , subtype . isClassOrInterface ( ) , JsonIgnoreType . class , Optional . of ( type ) ) . isPresent ( ) ) { builder . add ( subtype ) ; } } } return builder . build ( ) ;
public class MyVideoUtils { /** * Internal loop to fiond w / h headers * @ param fis Stream * @ param lastTkhdHolder Holder * @ return Dimensions * @ throws IOException */ private static Dimension getDimension ( InputStream fis , AtomicReference < ByteBuffer > lastTkhdHolder ) throws IOException { } }
while ( fis . available ( ) > 0 ) { byte [ ] header = new byte [ 8 ] ; fis . read ( header ) ; long size = readUint32 ( header , 0 ) ; String type = new String ( header , 4 , 4 , "ISO-8859-1" ) ; if ( containers . contains ( type ) ) { Dimension dimension = getDimension ( fis , lastTkhdHolder ) ; if ( dimension != null ) { return dimension ; } } else if ( type . equals ( "tkhd" ) ) { byte [ ] lastTkhd = new byte [ ( int ) ( size - 8 ) ] ; lastTkhdHolder . set ( ByteBuffer . wrap ( lastTkhd ) ) ; fis . read ( lastTkhd ) ; } else if ( type . equals ( "hdlr" ) ) { byte [ ] hdlr = new byte [ ( int ) ( size - 8 ) ] ; fis . read ( hdlr ) ; if ( hdlr [ 8 ] == 0x76 && hdlr [ 9 ] == 0x69 && hdlr [ 10 ] == 0x64 && hdlr [ 11 ] == 0x65 ) { byte [ ] lastTkhd = lastTkhdHolder . get ( ) . array ( ) ; return new Dimension ( ( int ) readFixedPoint1616 ( lastTkhd , lastTkhd . length - 8 ) , ( int ) readFixedPoint1616 ( lastTkhd , lastTkhd . length - 4 ) ) ; } } else { fis . skip ( size - 8 ) ; } } return null ;
public class QueryRunner { /** * Executes the given SELECT SQL query and returns a result object . * The < code > Connection < / code > is retrieved from the * < code > DataSource < / code > set in the constructor . * @ param sql The SQL statement to execute . * @ param params Initialize the PreparedStatement ' s IN parameters with * this array . * @ param rsh The handler used to create the result object from * the < code > ResultSet < / code > . * @ return An object generated by the handler . * @ throws java . sql . SQLException if a database access error occurs */ public < T > T query ( String sql , Object [ ] params , ResultSetHandler < T > rsh ) throws SQLException { } }
Connection conn = this . prepareConnection ( ) ; try { return this . query ( conn , sql , params , rsh ) ; } finally { close ( conn ) ; }
public class AbstractEntityReader { /** * Parse over each relation of fetched entity . * @ param entity * @ param relationsMap * @ param m * @ param pd * @ param relation * @ param relationType * @ param lazilyloaded * @ param relationStack */ private void onRelation ( final Object entity , final Map < String , Object > relationsMap , final EntityMetadata m , final PersistenceDelegator pd , Relation relation , ForeignKey relationType , boolean lazilyloaded , Map < Object , Object > relationStack ) { } }
FetchType fetchType = relation . getFetchType ( ) ; if ( ! lazilyloaded && fetchType . equals ( FetchType . LAZY ) ) { final Object entityId = PropertyAccessorHelper . getId ( entity , m ) ; getAssociationBuilder ( ) . setProxyRelationObject ( entity , relationsMap , m , pd , entityId , relation ) ; } else { if ( relation . getType ( ) . equals ( ForeignKey . MANY_TO_MANY ) ) { // First , Save this entity to persistence cache Field f = relation . getProperty ( ) ; Object object = PropertyAccessorHelper . getObject ( entity , f ) ; final Object entityId = PropertyAccessorHelper . getId ( entity , m ) ; PersistenceCacheManager . addEntityToPersistenceCache ( entity , pd , entityId ) ; getAssociationBuilder ( ) . populateRelationForM2M ( entity , m , pd , relation , object , relationsMap ) ; } else { onRelation ( entity , relationsMap , relation , m , pd , lazilyloaded , relationStack ) ; } }
public class StaticCATXATransaction { /** * Calls prepare ( ) on the SIXAResource . * Fields : * BIT16 XAResourceId * The XID Structure * @ param request * @ param conversation * @ param requestNumber * @ param allocatedFromBufferPool * @ param partOfExchange */ public static void rcvXAPrepare ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvXAPrepare" , new Object [ ] { request , conversation , "" + requestNumber , "" + allocatedFromBufferPool , "" + partOfExchange } ) ; // PK61176 We need to clean up tran state in catch block if required . Scope vars appropriately . ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; ServerLinkLevelState linkState = ( ServerLinkLevelState ) conversation . getLinkLevelAttachment ( ) ; SITransaction tran = null ; int clientTransactionId = 0 ; XidProxy xid = null ; final boolean optimizedTx = CommsUtils . requiresOptimizedTransaction ( conversation ) ; try { clientTransactionId = request . getInt ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "XAResource Object ID" , clientTransactionId ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Getting Xid" ) ; xid = ( XidProxy ) request . getXid ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Completed:" , xid ) ; boolean endRequired = false ; int endFlags = 0 ; if ( optimizedTx ) { endRequired = request . get ( ) == 0x01 ; endFlags = request . getInt ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "End Required:" , "" + endRequired ) ; SibTr . debug ( tc , "End Flags:" , "" + endFlags ) ; } } boolean requiresMSResource = false ; if ( conversation . getHandshakeProperties ( ) . getFapLevel ( ) >= JFapChannelConstants . FAP_VERSION_5 ) { requiresMSResource = request . get ( ) == 0x01 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Requires MS Resource:" , "" + requiresMSResource ) ; } // Get the transaction out of the table if ( endRequired ) linkState . getTransactionTable ( ) . endOptimizedGlobalTransactionBranch ( clientTransactionId , endFlags ) ; tran = linkState . getTransactionTable ( ) . getResourceForGlobalTransactionBranch ( clientTransactionId , xid ) ; // If the UOW was never created ( because we were running with the // optimization that gets an XAResource and enlists it as part of the // first piece of transacted work and this failed ) then throw // an exception notifying the caller that the UOW has been rolled back . if ( tran == IdToTransactionTable . INVALID_TRANSACTION ) { Throwable throwable = linkState . getTransactionTable ( ) . getExceptionForRollbackOnlyGlobalTransactionBranch ( clientTransactionId , xid ) ; String errorMsg = nls . getFormattedMessage ( "TRANSACTION_MARKED_AS_ERROR_SICO2029" , new Object [ ] { throwable } , null ) ; XAException xa = new XAException ( errorMsg ) ; xa . initCause ( throwable ) ; xa . errorCode = XAException . XA_RBOTHER ; throw xa ; } // Get the actual transaction . . . SIXAResource xaResource = getResourceFromTran ( tran , convState , requiresMSResource ) ; boolean isUnitOfWorkInError = false ; if ( tran != null ) { isUnitOfWorkInError = linkState . getTransactionTable ( ) . isGlobalTransactionBranchRollbackOnly ( clientTransactionId , xid ) ; } if ( isUnitOfWorkInError ) { // PK59276 Rollback the transaction , as after we throw a XA _ RB * error the // transaction manager will not call us with xa _ rollback . xaResource . rollback ( xid ) ; Throwable throwable = linkState . getTransactionTable ( ) . getExceptionForRollbackOnlyGlobalTransactionBranch ( clientTransactionId , xid ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "The transaction was marked as error due to" , throwable ) ; // And respond with an error XAException xa = new XAException ( nls . getFormattedMessage ( "TRANSACTION_MARKED_AS_ERROR_SICO2029" , new Object [ ] { throwable } , null ) ) ; xa . initCause ( throwable ) ; xa . errorCode = XAException . XA_RBOTHER ; throw xa ; } int rc = 0 ; try { // Now call the method on the XA resource rc = xaResource . prepare ( xid ) ; } finally { // Now mark the transaction as no longer in doubt . Ensure we always do this if ( tran != null ) { // Remove transaction from table - as it is no longer in flight linkState . getTransactionTable ( ) . removeGlobalTransactionBranch ( clientTransactionId , xid ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Prepare returned: " + rc ) ; // PM23626 If we have enlisted in a read only transaction , for example when the only action within // the transaction is a synchronous receive that returned null , we also need to remove // the transaction from the dispatchable map - as we will not be called with commit / rollback . if ( rc == XAException . XA_RDONLY ) { linkState . getDispatchableMap ( ) . removeDispatchableForGlobalTransaction ( clientTransactionId , xid ) ; } CommsByteBuffer reply = poolManager . allocate ( ) ; reply . putInt ( rc ) ; try { conversation . send ( reply , JFapChannelConstants . SEG_XAPREPARE_R , requestNumber , JFapChannelConstants . PRIORITY_MEDIUM , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvXAPrepare" , CommsConstants . STATICCATXATRANSACTION_XAPREPARE_01 ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2027" , e ) ; } } catch ( XAException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvXAPrepare" , CommsConstants . STATICCATXATRANSACTION_XAPREPARE_02 ) ; // PK61176 If the XAException is a XA _ RBXXXX then this will be the last time we will get called . // Remove transaction from table - as it is no longer in flight if ( tran != null && e . errorCode >= XAException . XA_RBBASE && e . errorCode <= XAException . XA_RBEND ) { try { linkState . getTransactionTable ( ) . removeGlobalTransactionBranch ( clientTransactionId , xid ) ; } catch ( SIErrorException sie ) { // No FFDC Code Needed // We could potentially throw this exception because we have already called removeGlobalTransactionBranch in // the finally block of the xaResource . prepare call . As other calls outside of that try - finally block can // throw XAExceptions then we have no guarantee that we even called prepare so we still need this call here in // the catch . We can ' t add a finally block to this call as we only want to remove the global tran in the case were // we called prepare . The safest fix is just to catch this exception and move on . if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Caught SIErrorException when calling remoteGlobalTransactionBranch: " + sie ) ; } linkState . getDispatchableMap ( ) . removeDispatchableForGlobalTransaction ( clientTransactionId , xid ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "XAException - RC: " + e . errorCode , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATXATRANSACTION_XAPREPARE_02 , conversation , requestNumber ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "rcvXAPrepare" ) ;
public class AwsSecurityFindingFilters { /** * A list of name / value string pairs associated with the finding . These are custom , user - defined fields added to a * finding . * @ param userDefinedFields * A list of name / value string pairs associated with the finding . These are custom , user - defined fields added * to a finding . */ public void setUserDefinedFields ( java . util . Collection < MapFilter > userDefinedFields ) { } }
if ( userDefinedFields == null ) { this . userDefinedFields = null ; return ; } this . userDefinedFields = new java . util . ArrayList < MapFilter > ( userDefinedFields ) ;
public class TokenScanner { /** * [ - + 0-9 ] * ENDSPC */ private boolean yblock ( ) throws IOException { } }
int plus = 0 ; int ych = parser . buffer . buffer [ parser . cursor + plus ] & 0xFF ; while ( DIGIT_OR_SIGN [ ych ] ) { plus ++ ; if ( ( parser . limit - parser . cursor ) < plus ) parser . read ( ) ; ych = parser . buffer . buffer [ parser . cursor + plus ] & 0xFF ; } switch ( ych ) { case ' ' : plus ++ ; while ( true ) { if ( ( parser . limit - parser . cursor ) < plus ) parser . read ( ) ; if ( parser . buffer . buffer [ parser . cursor + plus ] != ' ' ) { parser . cursor += plus ; return true ; } plus ++ ; } case '\r' : if ( parser . buffer . buffer [ parser . cursor + plus + 1 ] != '\n' ) { return false ; } plus ++ ; case '\n' : plus ++ ; parser . cursor += plus ; return true ; default : return false ; }
public class ContentHandler { /** * Given a URL connect stream positioned at the beginning of the * representation of an object , this method reads that stream and * creates an object that matches one of the types specified . * The default implementation of this method should call getContent ( ) * and screen the return type for a match of the suggested types . * @ param urlc a URL connection . * @ param classes an array of types requested * @ return the object read by the { @ code ContentHandler } that is * the first match of the suggested types . * null if none of the requested are supported . * @ exception IOException if an I / O error occurs while reading the object . * @ since 1.3 */ @ SuppressWarnings ( "rawtypes" ) public Object getContent ( URLConnection urlc , Class [ ] classes ) throws IOException { } }
Object obj = getContent ( urlc ) ; for ( int i = 0 ; i < classes . length ; i ++ ) { if ( classes [ i ] . isInstance ( obj ) ) { return obj ; } } return null ;
public class SubMapping { /** * Fill an index with the VM presents in this mapping * @ param index the index to fill * @ param p the index value to use for each VM in the mapping */ public void fillVMIndex ( TIntIntHashMap index , int p ) { } }
for ( Node n : scope ) { for ( VM v : parent . getRunningVMs ( n ) ) { index . put ( v . id ( ) , p ) ; } for ( VM v : parent . getSleepingVMs ( n ) ) { index . put ( v . id ( ) , p ) ; } } for ( VM v : ready ) { index . put ( v . id ( ) , p ) ; }
public class Pql { /** * Gets the underlying value of the api value object that ' s considered native to Java ( i . e . * DateTimeValue will return a Joda DateTime , not an API DateTime and DateValue will return a * string in the form of " yyyy - MM - dd " ) . * @ param apiValue the api value to convert * @ return the native value or { @ code null } if the underlying value is null * @ throws IllegalArgumentException if apiValue cannot be converted */ private static Object getNativeValue ( Object apiValue ) { } }
if ( apiValue == null ) { return null ; } else if ( apiValue instanceof DateTime ) { return DateTimes . toDateTime ( ( DateTime ) apiValue ) ; } else if ( apiValue instanceof Date ) { return DateTimes . toString ( ( Date ) apiValue ) ; } else if ( apiValue instanceof Set < ? > ) { Set < Object > nativeValues = new LinkedHashSet < Object > ( ) ; for ( Object entry : ( Set < ? > ) apiValue ) { validateSetValueEntryForSet ( getNativeValue ( entry ) , nativeValues ) ; nativeValues . add ( getNativeValue ( entry ) ) ; } return nativeValues ; } else { return apiValue ; }
public class TzdbZoneRulesCompiler { /** * Outputs the file . */ private static void outputFile ( File dstFile , Map < String , SortedMap < String , ZoneRules > > allBuiltZones , Set < String > allRegionIds , Set < ZoneRules > allRules , SortedMap < LocalDate , Byte > leapSeconds ) { } }
JarOutputStream jos = null ; try { jos = new JarOutputStream ( new FileOutputStream ( dstFile ) ) ; outputTzdbEntry ( jos , allBuiltZones , allRegionIds , allRules ) ; } catch ( Exception ex ) { System . out . println ( "Failed: " + ex . toString ( ) ) ; ex . printStackTrace ( ) ; System . exit ( 1 ) ; } finally { if ( jos != null ) { try { jos . close ( ) ; } catch ( IOException ex ) { // ignore } } }
public class SARLJvmModelInferrer { /** * Copy the annotations , except the ones given as parameters . * @ param annotations the annotations to copy . * @ param target the target . * @ param exceptions the annotations to skip . */ @ SuppressWarnings ( "static-method" ) protected void translateAnnotationsTo ( List < JvmAnnotationReference > annotations , JvmAnnotationTarget target , Class < ? > ... exceptions ) { } }
final Set < String > excepts = new HashSet < > ( ) ; for ( final Class < ? > type : exceptions ) { excepts . add ( type . getName ( ) ) ; } final List < JvmAnnotationReference > addition = new ArrayList < > ( ) ; for ( final JvmAnnotationReference annotation : Iterables . filter ( annotations , an -> { if ( ! ANNOTATION_TRANSLATION_FILTER . apply ( an ) ) { return false ; } return ! excepts . contains ( an . getAnnotation ( ) . getIdentifier ( ) ) ; } ) ) { addition . add ( annotation ) ; } target . getAnnotations ( ) . addAll ( addition ) ;
public class TransformGestureDetector { /** * Gets the rotation in radians */ public float getRotation ( ) { } }
if ( mDetector . getPointerCount ( ) < 2 ) { return 0 ; } else { float startDeltaX = mDetector . getStartX ( ) [ 1 ] - mDetector . getStartX ( ) [ 0 ] ; float startDeltaY = mDetector . getStartY ( ) [ 1 ] - mDetector . getStartY ( ) [ 0 ] ; float currentDeltaX = mDetector . getCurrentX ( ) [ 1 ] - mDetector . getCurrentX ( ) [ 0 ] ; float currentDeltaY = mDetector . getCurrentY ( ) [ 1 ] - mDetector . getCurrentY ( ) [ 0 ] ; float startAngle = ( float ) Math . atan2 ( startDeltaY , startDeltaX ) ; float currentAngle = ( float ) Math . atan2 ( currentDeltaY , currentDeltaX ) ; return currentAngle - startAngle ; }
public class DescribeHapgResult { /** * The list of partition serial numbers that belong to the high - availability partition group . * @ param partitionSerialList * The list of partition serial numbers that belong to the high - availability partition group . */ public void setPartitionSerialList ( java . util . Collection < String > partitionSerialList ) { } }
if ( partitionSerialList == null ) { this . partitionSerialList = null ; return ; } this . partitionSerialList = new com . amazonaws . internal . SdkInternalList < String > ( partitionSerialList ) ;
public class KuraServiceFactory { /** * Operations */ public static < T > T retrieveService ( Class < T > clazz , Registry registry ) { } }
if ( registry == null ) { throw new IllegalArgumentException ( "Registry cannot be null." ) ; } Set < T > servicesFromRegistry = registry . findByType ( clazz ) ; if ( servicesFromRegistry . size ( ) == 1 ) { T service = servicesFromRegistry . iterator ( ) . next ( ) ; LOG . info ( "Found Kura " + clazz . getCanonicalName ( ) + " in the registry. Kura component will use that instance." ) ; return service ; } else if ( servicesFromRegistry . size ( ) > 1 ) { throw new IllegalStateException ( "Too many " + clazz . getCanonicalName ( ) + " services found in a registry: " + servicesFromRegistry . size ( ) ) ; } else { throw new IllegalArgumentException ( "No " + clazz . getCanonicalName ( ) + " service instance found in a registry." ) ; }
public class BshClassPath { /** * Return the set of class names in the specified package * including all component paths . */ synchronized public Set getClassesForPackage ( String pack ) { } }
insureInitialized ( ) ; Set set = new HashSet ( ) ; Collection c = ( Collection ) packageMap . get ( pack ) ; if ( c != null ) set . addAll ( c ) ; if ( compPaths != null ) for ( int i = 0 ; i < compPaths . size ( ) ; i ++ ) { c = ( ( BshClassPath ) compPaths . get ( i ) ) . getClassesForPackage ( pack ) ; if ( c != null ) set . addAll ( c ) ; } return set ;
public class DirectoryServiceClient { /** * Unregister the ServiceInstance in Callback . * @ param serviceName * the service name . * @ param instanceId * the instanceId . * @ param cb * the Callback . * @ param context * the Callback context object . */ public void unregisterServiceInstance ( String serviceName , String instanceId , final RegistrationCallback cb , Object context ) { } }
ProtocolHeader header = new ProtocolHeader ( ) ; header . setType ( ProtocolType . UnregisterServiceInstance ) ; UnregisterServiceInstanceProtocol p = new UnregisterServiceInstanceProtocol ( serviceName , instanceId ) ; ProtocolCallback pcb = new ProtocolCallback ( ) { @ Override public void call ( boolean result , Response response , ErrorCode error , Object ctx ) { cb . call ( result , error , ctx ) ; } } ; connection . submitCallbackRequest ( header , p , pcb , context ) ;
public class PDBFileParser { /** * Parse a PDB file and return a datastructure implementing * PDBStructure interface . * @ param inStream an InputStream object * @ return a Structure object * @ throws IOException */ public Structure parsePDBFile ( InputStream inStream ) throws IOException { } }
BufferedReader buf = getBufferedReader ( inStream ) ; return parsePDBFile ( buf ) ;
public class Links { /** * Merges the current { @ link Links } with the given ones applying the given { @ link MergeMode } . * @ param mode must not be { @ literal null } . * @ param links must not be { @ literal null } . * @ return */ public Links merge ( MergeMode mode , Iterable < Link > links ) { } }
Assert . notNull ( mode , "MergeMode must not be null!" ) ; Assert . notNull ( links , "Links must not be null!" ) ; List < Link > newLinks = MergeMode . REPLACE_BY_REL . equals ( mode ) ? allWithoutRels ( links ) : new ArrayList < > ( this . links ) ; links . forEach ( it -> { if ( MergeMode . REPLACE_BY_REL . equals ( mode ) ) { newLinks . add ( it ) ; } if ( MergeMode . SKIP_BY_EQUALITY . equals ( mode ) && ! this . links . contains ( it ) ) { newLinks . add ( it ) ; } if ( MergeMode . SKIP_BY_REL . equals ( mode ) && ! this . hasLink ( it . getRel ( ) ) ) { newLinks . add ( it ) ; } } ) ; return new Links ( newLinks ) ;
public class Summary { /** * Generates a HTML summary that shows the gains , loses or ties of each * algorithm against each other , in a specific measure . . */ public void computeWinsTiesLossesHTML ( String path ) { } }
List < Algorithm > alg = this . streams . get ( 0 ) . algorithm ; int algorithmSize = this . streams . get ( 0 ) . algorithm . size ( ) ; String tablaSalida = "" ; tablaSalida += "<TABLE BORDER=1 WIDTH=\"100%\" ALIGN=CENTER>\n" ; tablaSalida += "<CAPTION> Experiment" ; tablaSalida += "<TR> <TD ROWSPAN = 2>Algorithm <TD TD ROWSPAN = 2>PM" ; for ( int i = 1 ; i < algorithmSize ; i ++ ) { tablaSalida += "<TD COLSPAN = 3>" + alg . get ( i ) . name ; } tablaSalida += "<TD>AVG" ; tablaSalida += "<TR>" ; for ( int i = 1 ; i < algorithmSize ; i ++ ) { tablaSalida += "<TD>" + "Wins" + "<TD>" + "Losses" + "<TD>" + "Ties" ; } for ( int i = 0 ; i < algorithmSize ; i ++ ) { tablaSalida += "<TR><TD ROWSPAN = " + alg . get ( i ) . measures . size ( ) + ">" + alg . get ( i ) . name ; List < Measure > measureRow [ ] = alg . get ( i ) . getMeasuresPerData ( streams ) ; int cont = 0 ; while ( cont != this . streams . get ( 0 ) . algorithm . get ( i ) . measures . size ( ) ) { // String name = measureRow [ i ] . get ( cont ) . getName ( ) ; String name = alg . get ( i ) . measures . get ( cont ) . getName ( ) ; tablaSalida += "<TD>" + name ; double sum = 0.0 ; for ( int j = 1 ; j < algorithmSize ; j ++ ) { List < Measure > measureCol [ ] = alg . get ( j ) . getMeasuresPerData ( streams ) ; int win = 0 , losses = 0 , ties = 0 ; for ( int k = 0 ; k < measureCol . length ; k ++ ) { double alg1 = measureRow [ k ] . get ( cont ) . getValue ( ) ; double alg2 = measureCol [ k ] . get ( cont ) . getValue ( ) ; if ( j == 1 ) { sum += measureRow [ k ] . get ( cont ) . getValue ( ) ; } if ( measureRow [ k ] . get ( cont ) . isType ( ) ) { if ( Algorithm . Round ( alg1 ) > Algorithm . Round ( alg2 ) ) { win ++ ; } else if ( Algorithm . Round ( alg1 ) < Algorithm . Round ( alg2 ) ) { losses ++ ; } else { ties ++ ; } } else { if ( alg1 < alg2 ) { win ++ ; } else if ( alg1 > alg2 ) { losses ++ ; } else { ties ++ ; } } } if ( i < j ) { tablaSalida += "<TD>" + win ; tablaSalida += "<TD>" + losses ; tablaSalida += "<TD>" + ties ; } else { tablaSalida += "<TD> " ; tablaSalida += "<TD> " ; tablaSalida += "<TD> " ; } } sum = ( double ) sum / measureRow . length ; tablaSalida += "<TD>" + Algorithm . format ( sum ) ; tablaSalida += "<TR>" ; cont ++ ; } } tablaSalida += "</TABLE>" ; // PrintStream salida = null ; // try { // salida = new PrintStream ( new BufferedOutputStream ( new FileOutputStream ( path + " summary . win . ties . losses . html " ) ) ) ; // } catch ( FileNotFoundException ex ) { // Logger . getLogger ( Summary . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; // System . setOut ( salida ) ; // System . out . println ( tablaSalida ) ; // salida . close ( ) ; try { BufferedWriter out = new BufferedWriter ( new FileWriter ( path + "summary.win.ties.losses.html" ) ) ; out . write ( tablaSalida ) ; // Replace with the string // you are trying to write out . close ( ) ; } catch ( IOException e ) { System . out . println ( "Error saving summary.win.ties.losses.html" ) ; }
public class ToXdr { /** * Lookup the index for the argument , or if it isn ' t present , create one . */ private int string_index_ ( dictionary_delta dict_delta , MetricValue str ) { } }
assert ( str . getStrValue ( ) != null ) ; final BiMap < MetricValue , Integer > dict = from_ . getStrvalDict ( ) . inverse ( ) ; final Integer resolved = dict . get ( str ) ; if ( resolved != null ) return resolved ; final int allocated = allocate_index_ ( dict ) ; dict . put ( str , allocated ) ; // Create new pdd for serialization . strval_dictionary_delta sdd = new strval_dictionary_delta ( ) ; sdd . id = allocated ; sdd . value = str . getStrValue ( ) ; // Append new entry to array . dict_delta . sdd = Stream . concat ( Arrays . stream ( dict_delta . sdd ) , Stream . of ( sdd ) ) . toArray ( strval_dictionary_delta [ ] :: new ) ; LOG . log ( Level . FINE , "dict_delta.sdd: {0} items (added {1})" , new Object [ ] { dict_delta . sdd . length , quotedString ( sdd . value ) } ) ; return allocated ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link SurfaceArrayPropertyType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link SurfaceArrayPropertyType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "surfaceMembers" ) public JAXBElement < SurfaceArrayPropertyType > createSurfaceMembers ( SurfaceArrayPropertyType value ) { } }
return new JAXBElement < SurfaceArrayPropertyType > ( _SurfaceMembers_QNAME , SurfaceArrayPropertyType . class , null , value ) ;
public class URLUtils { /** * Determines whether the parent directory contains the child element ( a file or directory ) * @ param directory the file to consider as the parent * @ param child the file to consider as the child * @ return true is the candidate leaf is under by the specified composite , otherwise false */ public static boolean directoryContains ( final URI directory , final URI child ) { } }
final String d = directory . normalize ( ) . toString ( ) ; final String c = child . normalize ( ) . toString ( ) ; if ( d . equals ( c ) ) { return false ; } else { return c . startsWith ( d ) ; }
public class BboxService { /** * Get the center of the bounding box as a Coordinate . * @ param bbox * The bounding box to get the center point for . * @ return The center of the given bounding box as a new coordinate . */ public static Coordinate getCenterPoint ( Bbox bbox ) { } }
double centerX = ( bbox . getWidth ( ) == 0 ? bbox . getX ( ) : bbox . getX ( ) + bbox . getWidth ( ) / 2 ) ; double centerY = ( bbox . getHeight ( ) == 0 ? bbox . getY ( ) : bbox . getY ( ) + bbox . getHeight ( ) / 2 ) ; return new Coordinate ( centerX , centerY ) ;
public class BusItineraryHalt { /** * Replies the road segment on which this bus halt was . * @ return the road segment */ @ Pure public RoadSegment getRoadSegment ( ) { } }
final BusItinerary itinerary = getContainer ( ) ; if ( itinerary != null && this . roadSegmentIndex >= 0 && this . roadSegmentIndex < itinerary . getRoadSegmentCount ( ) ) { return itinerary . getRoadSegmentAt ( this . roadSegmentIndex ) ; } return null ;
public class BusNetwork { /** * Remove the bus line at the specified index . * All the itineraries and the associated stops will be removed also . * If this bus line removal implies empty hubs , these hubs * will be also removed . * @ param index is the index of the bus line to remove . * @ return < code > true < / code > if the bus line was successfully removed , otherwise < code > false < / code > */ public boolean removeBusLine ( int index ) { } }
try { final BusLine busLine = this . busLines . remove ( index ) ; busLine . setContainer ( null ) ; busLine . setEventFirable ( true ) ; fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . LINE_REMOVED , busLine , index , "shape" , // $ NON - NLS - 1 $ null , null ) ) ; checkPrimitiveValidity ( ) ; return true ; } catch ( Throwable exception ) { } return false ;
public class Semaphore { /** * Wait for the semaphore to be posted * @ see Semaphore # post ( ) * @ throws InterruptedException if the wait is interrupted rather than posted */ public synchronized void waitOn ( ) throws InterruptedException { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "waitOn" , "" + count ) ; ++ count ; if ( count > 0 ) { try { wait ( ) ; } catch ( InterruptedException e ) { // No FFDC code needed -- count ; throw e ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "waitOn" ) ;
public class HibernateClient { /** * Removes the kundera proxies . * @ param metadata * the metadata * @ param entity * the entity * @ param relationHolders * the relation holders * @ return true , if successful */ private boolean removeKunderaProxies ( EntityMetadata metadata , Object entity , List < RelationHolder > relationHolders ) { } }
boolean proxyRemoved = false ; for ( Relation relation : metadata . getRelations ( ) ) { if ( relation != null && relation . isUnary ( ) ) { Object relationObject = PropertyAccessorHelper . getObject ( entity , relation . getProperty ( ) ) ; if ( relationObject != null && ProxyHelper . isKunderaProxy ( relationObject ) ) { EntityMetadata relMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , relation . getTargetEntity ( ) ) ; Method idAccessorMethod = relMetadata . getReadIdentifierMethod ( ) ; Object foreignKey = null ; try { foreignKey = idAccessorMethod . invoke ( relationObject , new Object [ ] { } ) ; } catch ( IllegalArgumentException e ) { log . error ( "Error while Fetching relationship value of {}, Caused by {}." , metadata . getEntityClazz ( ) , e ) ; } catch ( IllegalAccessException e ) { log . error ( "Error while Fetching relationship value of {}, Caused by {}." , metadata . getEntityClazz ( ) , e ) ; } catch ( InvocationTargetException e ) { log . error ( "Error while Fetching relationship value of {}, Caused by {}." , metadata . getEntityClazz ( ) , e ) ; } if ( foreignKey != null ) { relationObject = null ; PropertyAccessorHelper . set ( entity , relation . getProperty ( ) , relationObject ) ; relationHolders . add ( new RelationHolder ( relation . getJoinColumnName ( kunderaMetadata ) , foreignKey ) ) ; proxyRemoved = true ; } } } } return proxyRemoved ;
public class AwsSecurityFindingFilters { /** * The URL for more details from the source of the threat intel . * @ param threatIntelIndicatorSourceUrl * The URL for more details from the source of the threat intel . */ public void setThreatIntelIndicatorSourceUrl ( java . util . Collection < StringFilter > threatIntelIndicatorSourceUrl ) { } }
if ( threatIntelIndicatorSourceUrl == null ) { this . threatIntelIndicatorSourceUrl = null ; return ; } this . threatIntelIndicatorSourceUrl = new java . util . ArrayList < StringFilter > ( threatIntelIndicatorSourceUrl ) ;
public class AmazonAppStreamClient { /** * Updates the specified Directory Config object in AppStream 2.0 . This object includes the information required to * join streaming instances to an Active Directory domain . * @ param updateDirectoryConfigRequest * @ return Result of the UpdateDirectoryConfig operation returned by the service . * @ throws ResourceInUseException * The specified resource is in use . * @ throws ResourceNotFoundException * The specified resource was not found . * @ throws ConcurrentModificationException * An API error occurred . Wait a few minutes and try again . * @ sample AmazonAppStream . UpdateDirectoryConfig * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / appstream - 2016-12-01 / UpdateDirectoryConfig " * target = " _ top " > AWS API Documentation < / a > */ @ Override public UpdateDirectoryConfigResult updateDirectoryConfig ( UpdateDirectoryConfigRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeUpdateDirectoryConfig ( request ) ;
public class RepositoryResourceImpl { /** * { @ inheritDoc } */ @ Override public String getProviderName ( ) { } }
return _asset . getProvider ( ) == null ? null : _asset . getProvider ( ) . getName ( ) ;
public class DefaultPropertyExtractor { /** * { @ inheritDoc } */ public Map < String , PropertyWrapper > extractProperties ( Class < ? > clazz ) { } }
Map < String , PropertyInfo > map = new LinkedHashMap < > ( ) ; Method [ ] methods = clazz . getMethods ( ) ; for ( Method method : methods ) { // ignore java . lang . Object methods if ( method . getDeclaringClass ( ) == Object . class ) { continue ; } String methodName = method . getName ( ) ; if ( ( methodName . startsWith ( "get" ) || methodName . startsWith ( "is" ) ) && method . getParameterTypes ( ) . length == 0 ) { String propertyName = getPropertyName ( methodName ) ; PropertyInfo info = map . get ( propertyName ) ; if ( info == null ) { info = new PropertyInfo ( ) ; info . name = propertyName ; info . getterMethod = method ; info . type = method . getReturnType ( ) ; map . put ( propertyName , info ) ; } else if ( info . type == method . getReturnType ( ) ) { info . getterMethod = method ; } } if ( methodName . startsWith ( "set" ) && method . getParameterTypes ( ) . length == 1 ) { String propertyName = getPropertyName ( methodName ) ; PropertyInfo info = map . get ( propertyName ) ; if ( info == null ) { info = new PropertyInfo ( ) ; info . name = propertyName ; info . setterMethod = method ; info . type = method . getParameterTypes ( ) [ 0 ] ; map . put ( propertyName , info ) ; } else if ( info . type == method . getParameterTypes ( ) [ 0 ] ) { info . setterMethod = method ; } } } Field [ ] fields = clazz . getFields ( ) ; for ( Field field : fields ) { int modifiers = field . getModifiers ( ) ; if ( map . containsKey ( field . getName ( ) ) == false && Modifier . isStatic ( modifiers ) == false && Modifier . isFinal ( modifiers ) == false ) { PropertyInfo info = new PropertyInfo ( ) ; info . name = field . getName ( ) ; info . field = field ; info . type = field . getType ( ) ; map . put ( field . getName ( ) , info ) ; } } Map < String , PropertyWrapper > result = new LinkedHashMap < > ( ) ; for ( Map . Entry < String , PropertyInfo > e : map . entrySet ( ) ) { PropertyInfo info = e . getValue ( ) ; if ( info . field != null ) { result . put ( e . getKey ( ) , new PropertyWrapperImpl ( info . name , null , null , info . field ) ) ; } else { Field field = null ; try { field = clazz . getDeclaredField ( info . name ) ; } catch ( Exception ex ) { // ignore } result . put ( e . getKey ( ) , new PropertyWrapperImpl ( info . name , info . getterMethod , info . setterMethod , field ) ) ; } } return result ;
public class NodeReportsInner { /** * Retrieve the Dsc node reports by node id and report id . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param nodeId The Dsc node id . * @ param reportId The report id . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws ErrorResponseException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the Object object if successful . */ public Object getContent ( String resourceGroupName , String automationAccountName , String nodeId , String reportId ) { } }
return getContentWithServiceResponseAsync ( resourceGroupName , automationAccountName , nodeId , reportId ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ArrayUtils { /** * This method does a similar job to JSE 6.0 ' s Arrays . copyOf ( ) method and overloads the method for use with arrays of short * @ param shortArray The array to copy * @ return A copy of the input , of component type U */ public static short [ ] copyOf ( short [ ] shortArray ) { } }
short [ ] copy = new short [ shortArray . length ] ; System . arraycopy ( shortArray , 0 , copy , 0 , shortArray . length ) ; return copy ;
public class ContextExcludePanel { /** * This method initializes panelSession * @ return javax . swing . JPanel */ private JPanel getPanelSession ( ) { } }
if ( panelSession == null ) { panelSession = new JPanel ( ) ; panelSession . setLayout ( new GridBagLayout ( ) ) ; panelSession . setName ( "ExcludeFromScope" ) ; java . awt . GridBagConstraints gridBagConstraints2 = new GridBagConstraints ( ) ; java . awt . GridBagConstraints gridBagConstraints1 = new GridBagConstraints ( ) ; javax . swing . JLabel jLabel = new JLabel ( ) ; jLabel . setText ( Constant . messages . getString ( "context.label.exclude" ) ) ; gridBagConstraints1 . gridx = 0 ; gridBagConstraints1 . gridy = 0 ; gridBagConstraints1 . gridheight = 1 ; gridBagConstraints1 . insets = new java . awt . Insets ( 10 , 0 , 5 , 0 ) ; gridBagConstraints1 . anchor = java . awt . GridBagConstraints . NORTHWEST ; gridBagConstraints1 . fill = java . awt . GridBagConstraints . HORIZONTAL ; gridBagConstraints1 . weightx = 0.0D ; gridBagConstraints2 . gridx = 0 ; gridBagConstraints2 . gridy = 1 ; gridBagConstraints2 . weightx = 1.0 ; gridBagConstraints2 . weighty = 1.0 ; gridBagConstraints2 . fill = java . awt . GridBagConstraints . BOTH ; gridBagConstraints2 . ipadx = 0 ; gridBagConstraints2 . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; gridBagConstraints2 . anchor = java . awt . GridBagConstraints . NORTHWEST ; panelSession . add ( jLabel , gridBagConstraints1 ) ; panelSession . add ( regexesPanel , gridBagConstraints2 ) ; } return panelSession ;
public class ReservationUtilizationGroup { /** * The attributes for this group of reservations . * @ param attributes * The attributes for this group of reservations . * @ return Returns a reference to this object so that method calls can be chained together . */ public ReservationUtilizationGroup withAttributes ( java . util . Map < String , String > attributes ) { } }
setAttributes ( attributes ) ; return this ;
public class ReplaceDescendantsUtil { /** * class属性の指定で子孫要素を置換する なお 、 replaceのディープコピーで置換されます 。 * @ param target * object for scan * @ param clazz * class property of tag * @ param replace * replacement tag object * @ throws TagTypeUnmatchException */ public static < T extends AbstractJaxb > void replaceDescendants ( T target , String clazz , T replace ) throws TagTypeUnmatchException { } }
execute ( target , null , clazz , replace ) ;
public class DefaultDecomposer { /** * ( non - Javadoc ) * @ see org . jsmpp . util . PDUDecomposer # deliverSmResp ( byte [ ] ) */ public DeliverSmResp deliverSmResp ( byte [ ] b ) { } }
DeliverSmResp resp = new DeliverSmResp ( ) ; SequentialBytesReader reader = new SequentialBytesReader ( b ) ; assignHeader ( resp , reader ) ; // ignore the message _ id , because it unused . return resp ;
public class PaymiumAdapters { /** * Adapts a PaymiumTicker to a Ticker Object * @ param PaymiumTicker The exchange specific ticker * @ param currencyPair ( e . g . BTC / USD ) * @ return The ticker */ public static Ticker adaptTicker ( PaymiumTicker PaymiumTicker , CurrencyPair currencyPair ) { } }
BigDecimal bid = PaymiumTicker . getBid ( ) ; BigDecimal ask = PaymiumTicker . getAsk ( ) ; BigDecimal high = PaymiumTicker . getHigh ( ) ; BigDecimal low = PaymiumTicker . getLow ( ) ; BigDecimal last = PaymiumTicker . getPrice ( ) ; BigDecimal volume = PaymiumTicker . getVolume ( ) ; Date timestamp = new Date ( PaymiumTicker . getAt ( ) * 1000L ) ; return new Ticker . Builder ( ) . currencyPair ( currencyPair ) . bid ( bid ) . ask ( ask ) . high ( high ) . low ( low ) . last ( last ) . volume ( volume ) . timestamp ( timestamp ) . build ( ) ;
public class IntIntSortedVector { /** * Computes the dot product of this vector with the other vector . */ public int dot ( IntIntVector y ) { } }
if ( y instanceof IntIntSortedVector ) { IntIntSortedVector other = ( ( IntIntSortedVector ) y ) ; int dot = 0 ; int oc = 0 ; for ( int c = 0 ; c < used ; c ++ ) { while ( oc < other . used ) { if ( other . indices [ oc ] < indices [ c ] ) { oc ++ ; } else if ( indices [ c ] == other . indices [ oc ] ) { dot += values [ c ] * other . values [ oc ] ; break ; } else { break ; } } } return dot ; } else { int dot = 0 ; for ( int c = 0 ; c < used ; c ++ ) { dot += this . values [ c ] * y . get ( indices [ c ] ) ; } return dot ; }
public class InternalSARLParser { /** * InternalSARL . g : 1595:1 : ruleEventMember returns [ EObject current = null ] : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) ) ; */ public final EObject ruleEventMember ( ) throws RecognitionException { } }
EObject current = null ; Token lv_modifiers_4_0 = null ; Token otherlv_8 = null ; Token lv_modifiers_12_0 = null ; Token otherlv_14 = null ; Token otherlv_17 = null ; Token otherlv_19 = null ; Token otherlv_21 = null ; Token otherlv_24 = null ; Token otherlv_25 = null ; Token otherlv_27 = null ; Token otherlv_29 = null ; Token otherlv_30 = null ; Token otherlv_32 = null ; Token otherlv_34 = null ; Token otherlv_36 = null ; Token otherlv_38 = null ; Token otherlv_40 = null ; Token otherlv_42 = null ; EObject lv_annotations_1_0 = null ; AntlrDatatypeRuleToken lv_modifiers_3_0 = null ; AntlrDatatypeRuleToken lv_modifiers_5_0 = null ; AntlrDatatypeRuleToken lv_modifiers_6_0 = null ; AntlrDatatypeRuleToken lv_name_7_0 = null ; EObject lv_type_9_0 = null ; AntlrDatatypeRuleToken lv_modifiers_10_0 = null ; AntlrDatatypeRuleToken lv_modifiers_11_0 = null ; AntlrDatatypeRuleToken lv_name_13_0 = null ; EObject lv_type_15_0 = null ; AntlrDatatypeRuleToken lv_name_16_0 = null ; EObject lv_type_18_0 = null ; EObject lv_initialValue_20_0 = null ; AntlrDatatypeRuleToken lv_modifiers_23_0 = null ; EObject lv_typeParameters_26_0 = null ; EObject lv_typeParameters_28_0 = null ; EObject lv_parameters_31_0 = null ; EObject lv_parameters_33_0 = null ; EObject lv_exceptions_37_0 = null ; EObject lv_exceptions_39_0 = null ; EObject lv_typeParameters_41_0 = null ; EObject lv_typeParameters_43_0 = null ; EObject lv_expression_44_0 = null ; enterRule ( ) ; try { // InternalSARL . g : 1601:2 : ( ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) ) ) // InternalSARL . g : 1602:2 : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) ) { // InternalSARL . g : 1602:2 : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) ) // InternalSARL . g : 1603:3 : ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) { // InternalSARL . g : 1603:3 : ( ) // InternalSARL . g : 1604:4: { if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getEventMemberAccess ( ) . getXtendMemberAction_0 ( ) , current ) ; } } // InternalSARL . g : 1610:3 : ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * loop45 : do { int alt45 = 2 ; int LA45_0 = input . LA ( 1 ) ; if ( ( LA45_0 == 105 ) ) { alt45 = 1 ; } switch ( alt45 ) { case 1 : // InternalSARL . g : 1611:4 : ( lv _ annotations _ 1_0 = ruleXAnnotation ) { // InternalSARL . g : 1611:4 : ( lv _ annotations _ 1_0 = ruleXAnnotation ) // InternalSARL . g : 1612:5 : lv _ annotations _ 1_0 = ruleXAnnotation { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getAnnotationsXAnnotationParserRuleCall_1_0 ( ) ) ; } pushFollow ( FOLLOW_37 ) ; lv_annotations_1_0 = ruleXAnnotation ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "annotations" , lv_annotations_1_0 , "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotation" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop45 ; } } while ( true ) ; // InternalSARL . g : 1629:3 : ( ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) | ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) ) int alt63 = 2 ; alt63 = dfa63 . predict ( input ) ; switch ( alt63 ) { case 1 : // InternalSARL . g : 1630:4 : ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) { // InternalSARL . g : 1630:4 : ( ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? ) // InternalSARL . g : 1631:5 : ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? ( otherlv _ 21 = ' ; ' ) ? { // InternalSARL . g : 1631:5 : ( ) // InternalSARL . g : 1632:6: { if ( state . backtracking == 0 ) { current = forceCreateModelElementAndSet ( grammarAccess . getEventMemberAccess ( ) . getSarlFieldAnnotationInfoAction_2_0_0 ( ) , current ) ; } } // InternalSARL . g : 1638:5 : ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * loop46 : do { int alt46 = 2 ; int LA46_0 = input . LA ( 1 ) ; if ( ( LA46_0 == 25 || ( LA46_0 >= 78 && LA46_0 <= 89 ) ) ) { alt46 = 1 ; } switch ( alt46 ) { case 1 : // InternalSARL . g : 1639:6 : ( lv _ modifiers _ 3_0 = ruleCommonModifier ) { // InternalSARL . g : 1639:6 : ( lv _ modifiers _ 3_0 = ruleCommonModifier ) // InternalSARL . g : 1640:7 : lv _ modifiers _ 3_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_2_0_1_0 ( ) ) ; } pushFollow ( FOLLOW_38 ) ; lv_modifiers_3_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_3_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop46 ; } } while ( true ) ; // InternalSARL . g : 1657:5 : ( ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) ) int alt51 = 2 ; int LA51_0 = input . LA ( 1 ) ; if ( ( LA51_0 == 45 ) ) { alt51 = 1 ; } else if ( ( ( LA51_0 >= 65 && LA51_0 <= 66 ) ) ) { alt51 = 2 ; } else { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } NoViableAltException nvae = new NoViableAltException ( "" , 51 , 0 , input ) ; throw nvae ; } switch ( alt51 ) { case 1 : // InternalSARL . g : 1658:6 : ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) { // InternalSARL . g : 1658:6 : ( ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) ) // InternalSARL . g : 1659:7 : ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * ( ( lv _ name _ 7_0 = ruleValidID ) ) otherlv _ 8 = ' : ' ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) { // InternalSARL . g : 1659:7 : ( ( lv _ modifiers _ 4_0 = ' extension ' ) ) // InternalSARL . g : 1660:8 : ( lv _ modifiers _ 4_0 = ' extension ' ) { // InternalSARL . g : 1660:8 : ( lv _ modifiers _ 4_0 = ' extension ' ) // InternalSARL . g : 1661:9 : lv _ modifiers _ 4_0 = ' extension ' { lv_modifiers_4_0 = ( Token ) match ( input , 45 , FOLLOW_39 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( lv_modifiers_4_0 , grammarAccess . getEventMemberAccess ( ) . getModifiersExtensionKeyword_2_0_2_0_0_0 ( ) ) ; } if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElement ( grammarAccess . getEventMemberRule ( ) ) ; } addWithLastConsumed ( current , "modifiers" , lv_modifiers_4_0 , "extension" ) ; } } } // InternalSARL . g : 1673:7 : ( ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) | ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) ) * loop47 : do { int alt47 = 3 ; int LA47_0 = input . LA ( 1 ) ; if ( ( ( LA47_0 >= 65 && LA47_0 <= 66 ) ) ) { alt47 = 1 ; } else if ( ( LA47_0 == 25 || ( LA47_0 >= 78 && LA47_0 <= 89 ) ) ) { alt47 = 2 ; } switch ( alt47 ) { case 1 : // InternalSARL . g : 1674:8 : ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) { // InternalSARL . g : 1674:8 : ( ( lv _ modifiers _ 5_0 = ruleFieldModifier ) ) // InternalSARL . g : 1675:9 : ( lv _ modifiers _ 5_0 = ruleFieldModifier ) { // InternalSARL . g : 1675:9 : ( lv _ modifiers _ 5_0 = ruleFieldModifier ) // InternalSARL . g : 1676:10 : lv _ modifiers _ 5_0 = ruleFieldModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersFieldModifierParserRuleCall_2_0_2_0_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_39 ) ; lv_modifiers_5_0 = ruleFieldModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_5_0 , "org.eclipse.xtend.core.Xtend.FieldModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; case 2 : // InternalSARL . g : 1694:8 : ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) { // InternalSARL . g : 1694:8 : ( ( lv _ modifiers _ 6_0 = ruleCommonModifier ) ) // InternalSARL . g : 1695:9 : ( lv _ modifiers _ 6_0 = ruleCommonModifier ) { // InternalSARL . g : 1695:9 : ( lv _ modifiers _ 6_0 = ruleCommonModifier ) // InternalSARL . g : 1696:10 : lv _ modifiers _ 6_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_2_0_2_0_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_39 ) ; lv_modifiers_6_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_6_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop47 ; } } while ( true ) ; // InternalSARL . g : 1714:7 : ( ( lv _ name _ 7_0 = ruleValidID ) ) // InternalSARL . g : 1715:8 : ( lv _ name _ 7_0 = ruleValidID ) { // InternalSARL . g : 1715:8 : ( lv _ name _ 7_0 = ruleValidID ) // InternalSARL . g : 1716:9 : lv _ name _ 7_0 = ruleValidID { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getNameValidIDParserRuleCall_2_0_2_0_2_0 ( ) ) ; } pushFollow ( FOLLOW_40 ) ; lv_name_7_0 = ruleValidID ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "name" , lv_name_7_0 , "org.eclipse.xtend.core.Xtend.ValidID" ) ; afterParserOrEnumRuleCall ( ) ; } } } otherlv_8 = ( Token ) match ( input , 46 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_8 , grammarAccess . getEventMemberAccess ( ) . getColonKeyword_2_0_2_0_3 ( ) ) ; } // InternalSARL . g : 1737:7 : ( ( lv _ type _ 9_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 1738:8 : ( lv _ type _ 9_0 = ruleJvmTypeReference ) { // InternalSARL . g : 1738:8 : ( lv _ type _ 9_0 = ruleJvmTypeReference ) // InternalSARL . g : 1739:9 : lv _ type _ 9_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeJvmTypeReferenceParserRuleCall_2_0_2_0_4_0 ( ) ) ; } pushFollow ( FOLLOW_42 ) ; lv_type_9_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "type" , lv_type_9_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } } break ; case 2 : // InternalSARL . g : 1758:6 : ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) { // InternalSARL . g : 1758:6 : ( ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) ) // InternalSARL . g : 1759:7 : ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) { // InternalSARL . g : 1759:7 : ( ( lv _ modifiers _ 10_0 = ruleFieldModifier ) ) // InternalSARL . g : 1760:8 : ( lv _ modifiers _ 10_0 = ruleFieldModifier ) { // InternalSARL . g : 1760:8 : ( lv _ modifiers _ 10_0 = ruleFieldModifier ) // InternalSARL . g : 1761:9 : lv _ modifiers _ 10_0 = ruleFieldModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersFieldModifierParserRuleCall_2_0_2_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_43 ) ; lv_modifiers_10_0 = ruleFieldModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_10_0 , "org.eclipse.xtend.core.Xtend.FieldModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 1778:7 : ( ( lv _ modifiers _ 11_0 = ruleCommonModifier ) ) * loop48 : do { int alt48 = 2 ; int LA48_0 = input . LA ( 1 ) ; if ( ( LA48_0 == 25 || ( LA48_0 >= 78 && LA48_0 <= 89 ) ) ) { alt48 = 1 ; } switch ( alt48 ) { case 1 : // InternalSARL . g : 1779:8 : ( lv _ modifiers _ 11_0 = ruleCommonModifier ) { // InternalSARL . g : 1779:8 : ( lv _ modifiers _ 11_0 = ruleCommonModifier ) // InternalSARL . g : 1780:9 : lv _ modifiers _ 11_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_2_0_2_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_43 ) ; lv_modifiers_11_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_11_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop48 ; } } while ( true ) ; // InternalSARL . g : 1797:7 : ( ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) | ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) ) int alt50 = 2 ; int LA50_0 = input . LA ( 1 ) ; if ( ( LA50_0 == 45 ) ) { alt50 = 1 ; } else if ( ( LA50_0 == RULE_ID || LA50_0 == 44 || ( LA50_0 >= 92 && LA50_0 <= 95 ) ) ) { alt50 = 2 ; } else { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } NoViableAltException nvae = new NoViableAltException ( "" , 50 , 0 , input ) ; throw nvae ; } switch ( alt50 ) { case 1 : // InternalSARL . g : 1798:8 : ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) { // InternalSARL . g : 1798:8 : ( ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) ) // InternalSARL . g : 1799:9 : ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) ( ( lv _ name _ 13_0 = ruleValidID ) ) otherlv _ 14 = ' : ' ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) { // InternalSARL . g : 1799:9 : ( ( lv _ modifiers _ 12_0 = ' extension ' ) ) // InternalSARL . g : 1800:10 : ( lv _ modifiers _ 12_0 = ' extension ' ) { // InternalSARL . g : 1800:10 : ( lv _ modifiers _ 12_0 = ' extension ' ) // InternalSARL . g : 1801:11 : lv _ modifiers _ 12_0 = ' extension ' { lv_modifiers_12_0 = ( Token ) match ( input , 45 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( lv_modifiers_12_0 , grammarAccess . getEventMemberAccess ( ) . getModifiersExtensionKeyword_2_0_2_1_2_0_0_0 ( ) ) ; } if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElement ( grammarAccess . getEventMemberRule ( ) ) ; } addWithLastConsumed ( current , "modifiers" , lv_modifiers_12_0 , "extension" ) ; } } } // InternalSARL . g : 1813:9 : ( ( lv _ name _ 13_0 = ruleValidID ) ) // InternalSARL . g : 1814:10 : ( lv _ name _ 13_0 = ruleValidID ) { // InternalSARL . g : 1814:10 : ( lv _ name _ 13_0 = ruleValidID ) // InternalSARL . g : 1815:11 : lv _ name _ 13_0 = ruleValidID { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getNameValidIDParserRuleCall_2_0_2_1_2_0_1_0 ( ) ) ; } pushFollow ( FOLLOW_40 ) ; lv_name_13_0 = ruleValidID ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "name" , lv_name_13_0 , "org.eclipse.xtend.core.Xtend.ValidID" ) ; afterParserOrEnumRuleCall ( ) ; } } } otherlv_14 = ( Token ) match ( input , 46 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_14 , grammarAccess . getEventMemberAccess ( ) . getColonKeyword_2_0_2_1_2_0_2 ( ) ) ; } // InternalSARL . g : 1836:9 : ( ( lv _ type _ 15_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 1837:10 : ( lv _ type _ 15_0 = ruleJvmTypeReference ) { // InternalSARL . g : 1837:10 : ( lv _ type _ 15_0 = ruleJvmTypeReference ) // InternalSARL . g : 1838:11 : lv _ type _ 15_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeJvmTypeReferenceParserRuleCall_2_0_2_1_2_0_3_0 ( ) ) ; } pushFollow ( FOLLOW_42 ) ; lv_type_15_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "type" , lv_type_15_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } } break ; case 2 : // InternalSARL . g : 1857:8 : ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) { // InternalSARL . g : 1857:8 : ( ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? ) // InternalSARL . g : 1858:9 : ( ( lv _ name _ 16_0 = ruleValidID ) ) ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? { // InternalSARL . g : 1858:9 : ( ( lv _ name _ 16_0 = ruleValidID ) ) // InternalSARL . g : 1859:10 : ( lv _ name _ 16_0 = ruleValidID ) { // InternalSARL . g : 1859:10 : ( lv _ name _ 16_0 = ruleValidID ) // InternalSARL . g : 1860:11 : lv _ name _ 16_0 = ruleValidID { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getNameValidIDParserRuleCall_2_0_2_1_2_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_44 ) ; lv_name_16_0 = ruleValidID ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "name" , lv_name_16_0 , "org.eclipse.xtend.core.Xtend.ValidID" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 1877:9 : ( otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) ) ? int alt49 = 2 ; int LA49_0 = input . LA ( 1 ) ; if ( ( LA49_0 == 46 ) ) { alt49 = 1 ; } switch ( alt49 ) { case 1 : // InternalSARL . g : 1878:10 : otherlv _ 17 = ' : ' ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) { otherlv_17 = ( Token ) match ( input , 46 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_17 , grammarAccess . getEventMemberAccess ( ) . getColonKeyword_2_0_2_1_2_1_1_0 ( ) ) ; } // InternalSARL . g : 1882:10 : ( ( lv _ type _ 18_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 1883:11 : ( lv _ type _ 18_0 = ruleJvmTypeReference ) { // InternalSARL . g : 1883:11 : ( lv _ type _ 18_0 = ruleJvmTypeReference ) // InternalSARL . g : 1884:12 : lv _ type _ 18_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeJvmTypeReferenceParserRuleCall_2_0_2_1_2_1_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_42 ) ; lv_type_18_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "type" , lv_type_18_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; } } } break ; } } } break ; } // InternalSARL . g : 1906:5 : ( otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) ) ? int alt52 = 2 ; int LA52_0 = input . LA ( 1 ) ; if ( ( LA52_0 == 47 ) ) { alt52 = 1 ; } switch ( alt52 ) { case 1 : // InternalSARL . g : 1907:6 : otherlv _ 19 = ' = ' ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) { otherlv_19 = ( Token ) match ( input , 47 , FOLLOW_45 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_19 , grammarAccess . getEventMemberAccess ( ) . getEqualsSignKeyword_2_0_3_0 ( ) ) ; } // InternalSARL . g : 1911:6 : ( ( lv _ initialValue _ 20_0 = ruleXExpression ) ) // InternalSARL . g : 1912:7 : ( lv _ initialValue _ 20_0 = ruleXExpression ) { // InternalSARL . g : 1912:7 : ( lv _ initialValue _ 20_0 = ruleXExpression ) // InternalSARL . g : 1913:8 : lv _ initialValue _ 20_0 = ruleXExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getInitialValueXExpressionParserRuleCall_2_0_3_1_0 ( ) ) ; } pushFollow ( FOLLOW_46 ) ; lv_initialValue_20_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "initialValue" , lv_initialValue_20_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; } // InternalSARL . g : 1931:5 : ( otherlv _ 21 = ' ; ' ) ? int alt53 = 2 ; int LA53_0 = input . LA ( 1 ) ; if ( ( LA53_0 == 26 ) ) { alt53 = 1 ; } switch ( alt53 ) { case 1 : // InternalSARL . g : 1932:6 : otherlv _ 21 = ' ; ' { otherlv_21 = ( Token ) match ( input , 26 , FOLLOW_2 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_21 , grammarAccess . getEventMemberAccess ( ) . getSemicolonKeyword_2_0_4 ( ) ) ; } } break ; } } } break ; case 2 : // InternalSARL . g : 1939:4 : ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) { // InternalSARL . g : 1939:4 : ( ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) ) // InternalSARL . g : 1940:5 : ( ) ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * otherlv _ 24 = ' new ' ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) { // InternalSARL . g : 1940:5 : ( ) // InternalSARL . g : 1941:6: { if ( state . backtracking == 0 ) { current = forceCreateModelElementAndSet ( grammarAccess . getEventMemberAccess ( ) . getSarlConstructorAnnotationInfoAction_2_1_0 ( ) , current ) ; } } // InternalSARL . g : 1947:5 : ( ( lv _ modifiers _ 23_0 = ruleCommonModifier ) ) * loop54 : do { int alt54 = 2 ; int LA54_0 = input . LA ( 1 ) ; if ( ( LA54_0 == 25 || ( LA54_0 >= 78 && LA54_0 <= 89 ) ) ) { alt54 = 1 ; } switch ( alt54 ) { case 1 : // InternalSARL . g : 1948:6 : ( lv _ modifiers _ 23_0 = ruleCommonModifier ) { // InternalSARL . g : 1948:6 : ( lv _ modifiers _ 23_0 = ruleCommonModifier ) // InternalSARL . g : 1949:7 : lv _ modifiers _ 23_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_2_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_47 ) ; lv_modifiers_23_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_23_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop54 ; } } while ( true ) ; otherlv_24 = ( Token ) match ( input , 48 , FOLLOW_48 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_24 , grammarAccess . getEventMemberAccess ( ) . getNewKeyword_2_1_2 ( ) ) ; } // InternalSARL . g : 1970:5 : ( otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' ) ? int alt56 = 2 ; int LA56_0 = input . LA ( 1 ) ; if ( ( LA56_0 == 40 ) ) { alt56 = 1 ; } switch ( alt56 ) { case 1 : // InternalSARL . g : 1971:6 : otherlv _ 25 = ' < ' ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 29 = ' > ' { otherlv_25 = ( Token ) match ( input , 40 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_25 , grammarAccess . getEventMemberAccess ( ) . getLessThanSignKeyword_2_1_3_0 ( ) ) ; } // InternalSARL . g : 1975:6 : ( ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 1976:7 : ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 1976:7 : ( lv _ typeParameters _ 26_0 = ruleJvmTypeParameter ) // InternalSARL . g : 1977:8 : lv _ typeParameters _ 26_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_2_1_3_1_0 ( ) ) ; } pushFollow ( FOLLOW_28 ) ; lv_typeParameters_26_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_26_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 1994:6 : ( otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) ) * loop55 : do { int alt55 = 2 ; int LA55_0 = input . LA ( 1 ) ; if ( ( LA55_0 == 32 ) ) { alt55 = 1 ; } switch ( alt55 ) { case 1 : // InternalSARL . g : 1995:7 : otherlv _ 27 = ' , ' ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) { otherlv_27 = ( Token ) match ( input , 32 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_27 , grammarAccess . getEventMemberAccess ( ) . getCommaKeyword_2_1_3_2_0 ( ) ) ; } // InternalSARL . g : 1999:7 : ( ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2000:8 : ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2000:8 : ( lv _ typeParameters _ 28_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2001:9 : lv _ typeParameters _ 28_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_2_1_3_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_28 ) ; lv_typeParameters_28_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_28_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop55 ; } } while ( true ) ; otherlv_29 = ( Token ) match ( input , 41 , FOLLOW_49 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_29 , grammarAccess . getEventMemberAccess ( ) . getGreaterThanSignKeyword_2_1_3_3 ( ) ) ; } } break ; } // InternalSARL . g : 2024:5 : ( otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' ) ? int alt59 = 2 ; int LA59_0 = input . LA ( 1 ) ; if ( ( LA59_0 == 49 ) ) { alt59 = 1 ; } switch ( alt59 ) { case 1 : // InternalSARL . g : 2025:6 : otherlv _ 30 = ' ( ' ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? otherlv _ 34 = ' ) ' { otherlv_30 = ( Token ) match ( input , 49 , FOLLOW_50 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_30 , grammarAccess . getEventMemberAccess ( ) . getLeftParenthesisKeyword_2_1_4_0 ( ) ) ; } // InternalSARL . g : 2029:6 : ( ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * ) ? int alt58 = 2 ; int LA58_0 = input . LA ( 1 ) ; if ( ( LA58_0 == RULE_ID || ( LA58_0 >= 44 && LA58_0 <= 45 ) || ( LA58_0 >= 92 && LA58_0 <= 95 ) || LA58_0 == 105 ) ) { alt58 = 1 ; } switch ( alt58 ) { case 1 : // InternalSARL . g : 2030:7 : ( ( lv _ parameters _ 31_0 = ruleParameter ) ) ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * { // InternalSARL . g : 2030:7 : ( ( lv _ parameters _ 31_0 = ruleParameter ) ) // InternalSARL . g : 2031:8 : ( lv _ parameters _ 31_0 = ruleParameter ) { // InternalSARL . g : 2031:8 : ( lv _ parameters _ 31_0 = ruleParameter ) // InternalSARL . g : 2032:9 : lv _ parameters _ 31_0 = ruleParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getParametersParameterParserRuleCall_2_1_4_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_parameters_31_0 = ruleParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "parameters" , lv_parameters_31_0 , "io.sarl.lang.SARL.Parameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2049:7 : ( otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) ) * loop57 : do { int alt57 = 2 ; int LA57_0 = input . LA ( 1 ) ; if ( ( LA57_0 == 32 ) ) { alt57 = 1 ; } switch ( alt57 ) { case 1 : // InternalSARL . g : 2050:8 : otherlv _ 32 = ' , ' ( ( lv _ parameters _ 33_0 = ruleParameter ) ) { otherlv_32 = ( Token ) match ( input , 32 , FOLLOW_52 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_32 , grammarAccess . getEventMemberAccess ( ) . getCommaKeyword_2_1_4_1_1_0 ( ) ) ; } // InternalSARL . g : 2054:8 : ( ( lv _ parameters _ 33_0 = ruleParameter ) ) // InternalSARL . g : 2055:9 : ( lv _ parameters _ 33_0 = ruleParameter ) { // InternalSARL . g : 2055:9 : ( lv _ parameters _ 33_0 = ruleParameter ) // InternalSARL . g : 2056:10 : lv _ parameters _ 33_0 = ruleParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getParametersParameterParserRuleCall_2_1_4_1_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_parameters_33_0 = ruleParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "parameters" , lv_parameters_33_0 , "io.sarl.lang.SARL.Parameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop57 ; } } while ( true ) ; } break ; } otherlv_34 = ( Token ) match ( input , 50 , FOLLOW_53 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_34 , grammarAccess . getEventMemberAccess ( ) . getRightParenthesisKeyword_2_1_4_2 ( ) ) ; } } break ; } // InternalSARL . g : 2080:5 : ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) // InternalSARL . g : 2081:6 : ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) { // InternalSARL . g : 2081:6 : ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) // InternalSARL . g : 2082:7 : ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) { getUnorderedGroupHelper ( ) . enter ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) ) ; // InternalSARL . g : 2085:7 : ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) // InternalSARL . g : 2086:8 : ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * { // InternalSARL . g : 2086:8 : ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * loop62 : do { int alt62 = 3 ; int LA62_0 = input . LA ( 1 ) ; if ( LA62_0 == 51 && getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 0 ) ) { alt62 = 1 ; } else if ( LA62_0 == 52 && getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 1 ) ) { alt62 = 2 ; } switch ( alt62 ) { case 1 : // InternalSARL . g : 2087:6 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) { // InternalSARL . g : 2087:6 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) // InternalSARL . g : 2088:7 : { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) { if ( ! getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 0 ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleEventMember" , "getUnorderedGroupHelper().canSelect(grammarAccess.getEventMemberAccess().getUnorderedGroup_2_1_5(), 0)" ) ; } // InternalSARL . g : 2088:114 : ( ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) ) // InternalSARL . g : 2089:8 : ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) { getUnorderedGroupHelper ( ) . select ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 0 ) ; // InternalSARL . g : 2092:11 : ( { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) ) // InternalSARL . g : 2092:12 : { . . . } ? = > ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) { if ( ! ( ( true ) ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleEventMember" , "true" ) ; } // InternalSARL . g : 2092:21 : ( otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * ) // InternalSARL . g : 2092:22 : otherlv _ 36 = ' throws ' ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * { otherlv_36 = ( Token ) match ( input , 51 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_36 , grammarAccess . getEventMemberAccess ( ) . getThrowsKeyword_2_1_5_0_0 ( ) ) ; } // InternalSARL . g : 2096:11 : ( ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2097:12 : ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2097:12 : ( lv _ exceptions _ 37_0 = ruleJvmTypeReference ) // InternalSARL . g : 2098:13 : lv _ exceptions _ 37_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getExceptionsJvmTypeReferenceParserRuleCall_2_1_5_0_1_0 ( ) ) ; } pushFollow ( FOLLOW_54 ) ; lv_exceptions_37_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "exceptions" , lv_exceptions_37_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2115:11 : ( otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) ) * loop60 : do { int alt60 = 2 ; int LA60_0 = input . LA ( 1 ) ; if ( ( LA60_0 == 32 ) ) { alt60 = 1 ; } switch ( alt60 ) { case 1 : // InternalSARL . g : 2116:12 : otherlv _ 38 = ' , ' ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) { otherlv_38 = ( Token ) match ( input , 32 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_38 , grammarAccess . getEventMemberAccess ( ) . getCommaKeyword_2_1_5_0_2_0 ( ) ) ; } // InternalSARL . g : 2120:12 : ( ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2121:13 : ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2121:13 : ( lv _ exceptions _ 39_0 = ruleJvmTypeReference ) // InternalSARL . g : 2122:14 : lv _ exceptions _ 39_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getExceptionsJvmTypeReferenceParserRuleCall_2_1_5_0_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_54 ) ; lv_exceptions_39_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "exceptions" , lv_exceptions_39_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop60 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . returnFromSelection ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) ) ; } } } break ; case 2 : // InternalSARL . g : 2146:6 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) { // InternalSARL . g : 2146:6 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) // InternalSARL . g : 2147:7 : { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) { if ( ! getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 1 ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleEventMember" , "getUnorderedGroupHelper().canSelect(grammarAccess.getEventMemberAccess().getUnorderedGroup_2_1_5(), 1)" ) ; } // InternalSARL . g : 2147:114 : ( ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) ) // InternalSARL . g : 2148:8 : ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) { getUnorderedGroupHelper ( ) . select ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) , 1 ) ; // InternalSARL . g : 2151:11 : ( { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) ) // InternalSARL . g : 2151:12 : { . . . } ? = > ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) { if ( ! ( ( true ) ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleEventMember" , "true" ) ; } // InternalSARL . g : 2151:21 : ( otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * ) // InternalSARL . g : 2151:22 : otherlv _ 40 = ' with ' ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * { otherlv_40 = ( Token ) match ( input , 52 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_40 , grammarAccess . getEventMemberAccess ( ) . getWithKeyword_2_1_5_1_0 ( ) ) ; } // InternalSARL . g : 2155:11 : ( ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2156:12 : ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2156:12 : ( lv _ typeParameters _ 41_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2157:13 : lv _ typeParameters _ 41_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_2_1_5_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_54 ) ; lv_typeParameters_41_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_41_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2174:11 : ( otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) ) * loop61 : do { int alt61 = 2 ; int LA61_0 = input . LA ( 1 ) ; if ( ( LA61_0 == 32 ) ) { alt61 = 1 ; } switch ( alt61 ) { case 1 : // InternalSARL . g : 2175:12 : otherlv _ 42 = ' , ' ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) { otherlv_42 = ( Token ) match ( input , 32 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_42 , grammarAccess . getEventMemberAccess ( ) . getCommaKeyword_2_1_5_1_2_0 ( ) ) ; } // InternalSARL . g : 2179:12 : ( ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2180:13 : ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2180:13 : ( lv _ typeParameters _ 43_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2181:14 : lv _ typeParameters _ 43_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_2_1_5_1_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_54 ) ; lv_typeParameters_43_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_43_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop61 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . returnFromSelection ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) ) ; } } } break ; default : break loop62 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . leave ( grammarAccess . getEventMemberAccess ( ) . getUnorderedGroup_2_1_5 ( ) ) ; } // InternalSARL . g : 2212:5 : ( ( lv _ expression _ 44_0 = ruleXBlockExpression ) ) // InternalSARL . g : 2213:6 : ( lv _ expression _ 44_0 = ruleXBlockExpression ) { // InternalSARL . g : 2213:6 : ( lv _ expression _ 44_0 = ruleXBlockExpression ) // InternalSARL . g : 2214:7 : lv _ expression _ 44_0 = ruleXBlockExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getEventMemberAccess ( ) . getExpressionXBlockExpressionParserRuleCall_2_1_6_0 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; lv_expression_44_0 = ruleXBlockExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getEventMemberRule ( ) ) ; } set ( current , "expression" , lv_expression_44_0 , "org.eclipse.xtext.xbase.Xbase.XBlockExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } } } break ; } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
public class FieldInfo { /** * Lame method , since awt , swing , and android components all have setText methods . * @ param obj * @ param text */ public String getNameByReflection ( Object obj ) { } }
Object name = null ; try { java . lang . reflect . Method method = obj . getClass ( ) . getMethod ( "getName" ) ; if ( method != null ) name = method . invoke ( obj ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } if ( name == null ) return null ; else return name . toString ( ) ;
public class SimpleWorkflow { /** * Ends the current thread and switches to * @ param to * @ param msg */ public void endTo ( K to , M msg ) { } }
K key = getCurrentKey ( ) ; if ( key . equals ( to ) ) { throw new IllegalArgumentException ( "current and to are equals" ) ; } if ( key != null ) { kill ( key ) ; doFork ( to , msg ) ; throw new ThreadStoppedException ( "suicide" ) ; } else { throw new IllegalArgumentException ( "called from wrong thread" ) ; }
public class NamedArgumentDefinition { /** * one value , in which case we throw . */ private void setScalarValue ( final CommandLineArgumentParser commandLineArgumentParser , final List < String > originalValues ) // Note that these might be tag surrogates { } }
if ( getHasBeenSet ( ) || originalValues . size ( ) > 1 ) { throw new CommandLineException . BadArgumentValue ( String . format ( "Argument '%s' cannot be specified more than once." , getArgumentAliasDisplayString ( ) ) ) ; } if ( isFlag ( ) && originalValues . isEmpty ( ) ) { setArgumentValue ( true ) ; } else { final String stringValue = originalValues . get ( 0 ) ; Object value = null ; if ( stringValue . equals ( NULL_ARGUMENT_STRING ) ) { if ( getUnderlyingField ( ) . getType ( ) . isPrimitive ( ) ) { throw new CommandLineException . BadArgumentValue ( String . format ( "Argument '%s' is not a nullable argument type." , getArgumentAliasDisplayString ( ) ) ) ; } } else { final Pair < String , String > normalizedSurrogatePair = getNormalizedTagValuePair ( commandLineArgumentParser , stringValue ) ; value = getValuePopulatedWithTags ( normalizedSurrogatePair . getLeft ( ) , normalizedSurrogatePair . getRight ( ) ) ; } checkArgumentRange ( value ) ; setArgumentValue ( value ) ; }
public class AstaFileReader { /** * Process a SQLite database PP file . * @ param inputStream file input stream * @ return ProjectFile instance */ private ProjectFile readDatabaseFile ( InputStream inputStream ) throws MPXJException { } }
ProjectReader reader = new AstaDatabaseFileReader ( ) ; addListeners ( reader ) ; return reader . read ( inputStream ) ;
public class HttpOutputStream { public void write ( int b ) throws IOException { } }
prepareOutput ( 1 ) ; if ( ! _nulled ) _out . write ( b ) ; if ( _bytes == _contentLength ) flush ( ) ;
public class NameValueData { /** * { @ inheritDoc } */ @ Override protected QPath getPath ( ) { } }
QPathEntry entry = new QPathEntry ( value , 0 ) ; return new QPath ( new QPathEntry [ ] { entry } ) ;
public class IPv6AddressRange { /** * Remove an address from the range , resulting in one , none or two new ranges . If an address outside the range is removed , this has no * effect . If the first or last address is removed , a single new range is returned ( potentially empty if the range only contained a * single address ) . If an address somewhere else in the range is removed , two new ranges are returned . * @ param address adddress to remove from the range * @ return list of resulting ranges */ public List < IPv6AddressRange > remove ( IPv6Address address ) { } }
if ( address == null ) throw new IllegalArgumentException ( "invalid address [null]" ) ; if ( ! contains ( address ) ) return Collections . singletonList ( this ) ; else if ( address . equals ( first ) && address . equals ( last ) ) return Collections . emptyList ( ) ; else if ( address . equals ( first ) ) return Collections . singletonList ( fromFirstAndLast ( first . add ( 1 ) , last ) ) ; else if ( address . equals ( last ) ) return Collections . singletonList ( fromFirstAndLast ( first , last . subtract ( 1 ) ) ) ; else return Arrays . asList ( fromFirstAndLast ( first , address . subtract ( 1 ) ) , fromFirstAndLast ( address . add ( 1 ) , last ) ) ;
public class Options { /** * Sets whether an action will be sent to the target integration . Same as { @ link * # setIntegration ( String , boolean ) } but type safe for bundled integrations . * @ param bundledIntegration The target integration * @ param enabled < code > true < / code > for enabled , < code > false < / code > for disabled * @ return This options object for chaining * @ see # setIntegration ( String , boolean ) */ public Options setIntegration ( Analytics . BundledIntegration bundledIntegration , boolean enabled ) { } }
setIntegration ( bundledIntegration . key , enabled ) ; return this ;
public class KeyUtil { /** * 生成 { @ link SecretKey } , 仅用于对称加密和摘要算法 * @ param algorithm 算法 * @ param keySpec { @ link KeySpec } * @ return { @ link SecretKey } */ public static SecretKey generateKey ( String algorithm , KeySpec keySpec ) { } }
final SecretKeyFactory keyFactory = getSecretKeyFactory ( algorithm ) ; try { return keyFactory . generateSecret ( keySpec ) ; } catch ( InvalidKeySpecException e ) { throw new CryptoException ( e ) ; }
public class AbstractLoginManager { /** * Get the current password * @ param aRequestScope * Request scope * @ return < code > null < / code > if no password was present * @ since 3.4.0 */ @ Nullable @ OverrideOnDemand protected String getPassword ( @ Nonnull final IRequestWebScopeWithoutResponse aRequestScope ) { } }
return aRequestScope . params ( ) . getAsString ( CLogin . REQUEST_ATTR_PASSWORD ) ;
public class Util { /** * Checks that no element in the given iterable is null , throwing NPE if any is . */ static void checkNoneNull ( Iterable < ? > objects ) { } }
if ( ! ( objects instanceof ImmutableCollection ) ) { for ( Object o : objects ) { checkNotNull ( o ) ; } }
public class Logger { /** * Format a string with arguments . * @ param format the format string , null if just to concat the arguments * @ param args the arguments * @ return the formatted string */ private String formatArgs ( String format , Object ... args ) { } }
if ( format != null ) { return String . format ( format , args ) ; } else { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 , N = args . length ; i < N ; i ++ ) { if ( i != 0 ) { sb . append ( ", " ) ; } sb . append ( args [ i ] ) ; } return sb . toString ( ) ; }
public class DbxClientV1 { /** * A wrapper around { @ link # uploadFile ( String , DbxWriteMode , long , DbxStreamWriter ) } that * lets you pass in an { @ link InputStream } . The entire stream { @ code contents } will * be uploaded . * < pre > * DbxClientV1 dbxClient = . . . * File f = new File ( " ReadMe . txt " ) * dbxClient . uploadFile ( " / ReadMe . txt " , { @ link DbxWriteMode # add ( ) } , f . length ( ) , new FileInputStream ( f ) ) * < / pre > * @ param targetPath * The path to the file on Dropbox ( see { @ link DbxPathV1 } ) . If a file at * that path already exists on Dropbox , then the { @ code writeMode } parameter * will determine what happens . * @ param writeMode * Determines what to do if there ' s already a file at the given { @ code targetPath } . * @ param numBytes * The number of bytes in the given stream . Use { @ code - 1 } if you don ' t know . * @ param contents * The source of file contents . This stream will be automatically closed ( whether or not the * upload succeeds ) . * @ throws IOException * If there ' s an error reading from { @ code in } . */ public DbxEntry . File uploadFile ( String targetPath , DbxWriteMode writeMode , long numBytes , InputStream contents ) throws DbxException , IOException { } }
return uploadFile ( targetPath , writeMode , numBytes , new DbxStreamWriter . InputStreamCopier ( contents ) ) ;
public class BigIntegerExtensions { /** * The binary < code > modulo < / code > operator . * @ param a * a BigInteger . May not be < code > null < / code > . * @ param b * a BigInteger . May not be < code > null < / code > . * @ return < code > a . mod ( b ) < / code > * @ throws NullPointerException * if { @ code a } or { @ code b } is < code > null < / code > . */ @ Inline ( value = "$1.mod($2)" ) @ Pure public static BigInteger operator_modulo ( BigInteger a , BigInteger b ) { } }
return a . mod ( b ) ;
public class ModelsImpl { /** * Updates an explicit list item for a Pattern . Any entity . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId The Pattern . Any entity extractor ID . * @ param itemId The explicit list item ID . * @ param explicitListItem The explicit list item . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the OperationStatus object */ public Observable < ServiceResponse < OperationStatus > > updateExplicitListItemWithServiceResponseAsync ( UUID appId , String versionId , UUID entityId , long itemId , String explicitListItem ) { } }
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgumentException ( "Parameter versionId is required and cannot be null." ) ; } if ( entityId == null ) { throw new IllegalArgumentException ( "Parameter entityId is required and cannot be null." ) ; } ExplicitListItemUpdateObject item = new ExplicitListItemUpdateObject ( ) ; item . withExplicitListItem ( explicitListItem ) ; String parameterizedHost = Joiner . on ( ", " ) . join ( "{Endpoint}" , this . client . endpoint ( ) ) ; return service . updateExplicitListItem ( appId , versionId , entityId , itemId , this . client . acceptLanguage ( ) , item , parameterizedHost , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < OperationStatus > > > ( ) { @ Override public Observable < ServiceResponse < OperationStatus > > call ( Response < ResponseBody > response ) { try { ServiceResponse < OperationStatus > clientResponse = updateExplicitListItemDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class VMath { /** * Subtract component - wise v1 - s1. * @ param v1 original vector * @ param s1 Value to subtract * @ return v1 - s1 */ public static double [ ] minus ( final double [ ] v1 , final double s1 ) { } }
final double [ ] result = new double [ v1 . length ] ; for ( int i = 0 ; i < v1 . length ; i ++ ) { result [ i ] = v1 [ i ] - s1 ; } return result ;
public class ResourceUtil { /** * return the mime type of a file , dont check extension * @ param res * @ param defaultValue * @ return mime type of the file */ public static String getMimeType ( Resource res , String defaultValue ) { } }
return IOUtil . getMimeType ( res , defaultValue ) ;
public class ManyToOneRingBuffer { /** * { @ inheritDoc } */ public int read ( final MessageHandler handler , final int messageCountLimit ) { } }
int messagesRead = 0 ; final AtomicBuffer buffer = this . buffer ; final int headPositionIndex = this . headPositionIndex ; final long head = buffer . getLong ( headPositionIndex ) ; final int capacity = this . capacity ; final int headIndex = ( int ) head & ( capacity - 1 ) ; final int maxBlockLength = capacity - headIndex ; int bytesRead = 0 ; try { while ( ( bytesRead < maxBlockLength ) && ( messagesRead < messageCountLimit ) ) { final int recordIndex = headIndex + bytesRead ; final int recordLength = buffer . getIntVolatile ( lengthOffset ( recordIndex ) ) ; if ( recordLength <= 0 ) { break ; } bytesRead += align ( recordLength , ALIGNMENT ) ; final int messageTypeId = buffer . getInt ( typeOffset ( recordIndex ) ) ; if ( PADDING_MSG_TYPE_ID == messageTypeId ) { continue ; } ++ messagesRead ; handler . onMessage ( messageTypeId , buffer , recordIndex + HEADER_LENGTH , recordLength - HEADER_LENGTH ) ; } } finally { if ( bytesRead != 0 ) { buffer . setMemory ( headIndex , bytesRead , ( byte ) 0 ) ; buffer . putLongOrdered ( headPositionIndex , head + bytesRead ) ; } } return messagesRead ;
public class OtpErlangTuple { /** * Convert this tuple to the equivalent Erlang external representation . * @ param buf * an output stream to which the encoded tuple should be written . */ @ Override public void encode ( final OtpOutputStream buf ) { } }
final int arity = elems . length ; buf . write_tuple_head ( arity ) ; for ( int i = 0 ; i < arity ; i ++ ) { buf . write_any ( elems [ i ] ) ; }
public class DateUtils { /** * Returns whether or not the given { @ link TemporalAccessor } is leap day ( February 29th ) . * @ return whether or not the given { @ link TemporalAccessor } is leap day * @ throws IllegalArgumentException if the given { @ link TemporalAccessor } does not support { @ link * ChronoField # MONTH _ OF _ YEAR } or { @ link ChronoField # DAY _ OF _ MONTH } */ public static boolean isLeapDay ( TemporalAccessor temporal ) { } }
checkArgument ( temporal . isSupported ( MONTH_OF_YEAR ) , "%s does not support MONTH_OF_YEAR" , temporal ) ; checkArgument ( temporal . isSupported ( DAY_OF_MONTH ) , "%s does not support DAY_OF_MONTH" , temporal ) ; MonthDay monthDay = MonthDay . from ( temporal ) ; return monthDay . equals ( LEAP_DAY ) ;
public class TextBox { /** * Compute the width and height of this element . Layout the sub - elements . * @ param widthlimit Maximal width available for the element * @ param force Use the area even if the used width is greater than maxwidth * @ param linestart Indicates whether the element is placed at the line start * @ return < code > true < / code > if the box has been succesfully placed */ @ Override public boolean doLayout ( int widthlimit , boolean force , boolean linestart ) { } }
// Skip if not displayed if ( ! displayed ) { bounds . setSize ( 0 , 0 ) ; return true ; } // reset textEnd if we are doing a new layout if ( ! splitted ) textEnd = text . length ( ) ; setAvailableWidth ( widthlimit ) ; boolean split = false ; // should we split to more boxes ? boolean allow = false ; // allow succesfull result even if nothing has been placed ( line break only ) boolean fail = false ; // failed totally ( nothing fit ) int wlimit = getAvailableContentWidth ( ) ; boolean empty = isempty ; FontMetrics fm = g . getFontMetrics ( ) ; int w = 0 , h = 0 ; int end = textEnd ; int lineend = text . indexOf ( '\r' , textStart ) ; if ( lineend != - 1 && lineend < end ) // preserved end - of - line encountered { end = lineend ; // split at line end ( or earlier ) split = true ; allow = true ; } if ( ! empty || ! linestart ) // ignore empty text elements at the begining of a line { // ignore spaces at the begining of a line if ( ( linestart || ignoreinitialws ) && collapsews ) { while ( textStart < end && isWhitespace ( text . charAt ( textStart ) ) ) textStart ++ ; if ( textStart == end ) { collapsedCompletely = true ; empty = true ; // collapsed to an empty box } } // try to place the text do { w = stringWidth ( fm , text . substring ( textStart , end ) ) ; h = fm . getHeight ( ) ; if ( w > wlimit ) // exceeded - try to split if allowed { if ( empty ) // empty or just spaces - don ' t place at all { w = 0 ; h = 0 ; split = false ; break ; } int wordend = text . substring ( 0 , end ) . lastIndexOf ( ' ' ) ; // find previous word while ( wordend > 0 && text . charAt ( wordend - 1 ) == ' ' ) wordend -- ; // skip trailing spaces if ( wordend <= textStart || ! splitws ) // no previous word , cannot split or splitting not allowed { if ( ! force ) // everything failed { // System . out . println ( " Here for " + this ) ; end = textEnd ; // we will try with the whole rest next time split = false ; allow = false ; // split before the linebreak fail = true ; } else split = true ; break ; } else { end = wordend ; split = true ; } } } while ( end > textStart && w > wlimit ) ; } textEnd = end ; bounds . setSize ( w , h ) ; // if not the whole element was placed , create the rest if ( split ) { // skip the eventual line break int start = textEnd ; if ( start < text . length ( ) && isLineBreak ( text . charAt ( start ) ) ) { start ++ ; lineBreakStop = true ; } // find the start of the next word if ( collapsews ) { while ( start < text . length ( ) && isWhitespace ( text . charAt ( start ) ) ) start ++ ; } // create the rest if something has left if ( start < text . length ( ) ) { TextBox rtext = copyTextBox ( ) ; rtext . splitted = true ; rtext . splitid = splitid + 1 ; rtext . setTextStart ( start ) ; rtext . setTextEnd ( text . length ( ) ) ; rest = rtext ; } else rest = null ; } else rest = null ; return ! fail && ( ( textEnd > textStart ) || empty || allow ) ;
public class FlashScopeStoreAccessor { /** * ( non - Javadoc ) * @ see es . sandbox . ui . messages . store . StoreAccessor # put ( es . sandbox . ui . messages . store . Store ) */ @ Override public void put ( Store store ) { } }
LOGGER . debug ( "Setting [{}] as the store in use." , store ) ; currentRequestFlashMap ( ) . put ( this . parameterName , store ) ;
public class VirtualRouterRefMarshaller { /** * Marshall the given parameter object . */ public void marshall ( VirtualRouterRef virtualRouterRef , ProtocolMarshaller protocolMarshaller ) { } }
if ( virtualRouterRef == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( virtualRouterRef . getArn ( ) , ARN_BINDING ) ; protocolMarshaller . marshall ( virtualRouterRef . getMeshName ( ) , MESHNAME_BINDING ) ; protocolMarshaller . marshall ( virtualRouterRef . getVirtualRouterName ( ) , VIRTUALROUTERNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class BtrpNumber { /** * Check the operand is a number . If not , throws a { @ link UnsupportedOperationException } exception . * @ param e the operand to check */ private void checkType ( BtrpOperand e ) { } }
if ( ! ( e instanceof BtrpNumber ) ) { throw new UnsupportedOperationException ( e + " must be a '" + prettyType ( ) + "' instead of a '" + e . prettyType ( ) + "'" ) ; }
public class DefaultAlipayClient { /** * GET模式下获取跳转链接 * @ param requestHolder * @ return * @ throws AlipayApiException */ private String getRedirectUrl ( RequestParametersHolder requestHolder ) throws AlipayApiException { } }
StringBuffer urlSb = new StringBuffer ( serverUrl ) ; try { Map < String , String > sortedMap = AlipaySignature . getSortedMap ( requestHolder ) ; String sortedQuery = WebUtils . buildQuery ( sortedMap , charset ) ; urlSb . append ( "?" ) ; urlSb . append ( sortedQuery ) ; } catch ( IOException e ) { throw new AlipayApiException ( e ) ; } return urlSb . toString ( ) ;
public class LineParser { /** * Returns a map of all tokens that can be considered being command arguments , using the current token position . * @ return argument map , using ' : ' as key / value separator ( and naturally white spaces as separator between pairs ) */ public Map < String , String > getArgMap ( ) { } }
Map < String , String > ret = new LinkedHashMap < String , String > ( ) ; String [ ] ar = StringUtils . split ( this . getArgs ( ) , ',' ) ; if ( ar != null ) { for ( String s : ar ) { String [ ] kv = StringUtils . split ( s , ":" , 2 ) ; if ( kv != null && kv . length == 2 ) { ret . put ( StringUtils . trim ( kv [ 0 ] ) , StringUtils . trim ( kv [ 1 ] ) ) ; } else { // TODO error log ? } } } return ret ;
public class StreamUtils { /** * Copy bytes from ` is ` to ` file ` but timeout if the copy takes too long . The timeout is best effort and not * guaranteed . Specifically , ` is . read ` will not be interrupted . * @ param is The ` InputStream ` to copy bytes from . It is closed regardless of copy results . * @ param file The ` File ` to copy bytes to * @ param timeout The timeout ( in ms ) of the copy . * @ return The size of bytes written to ` file ` * @ throws IOException * @ throws TimeoutException If ` timeout ` is exceeded */ public static long copyToFileAndClose ( InputStream is , File file , long timeout ) throws IOException , TimeoutException { } }
file . getParentFile ( ) . mkdirs ( ) ; try ( OutputStream os = new BufferedOutputStream ( new FileOutputStream ( file ) ) ) { final long retval = copyWithTimeout ( is , os , timeout ) ; // Workarround for http : / / hg . openjdk . java . net / jdk8 / jdk8 / jdk / rev / 759aa847dcaf os . flush ( ) ; return retval ; } finally { is . close ( ) ; }
public class PrintJobDao { /** * Get Job Record . * @ param id the id * @ param lock whether record should be locked for transaction * @ return the job status or null . */ @ Nullable public final PrintJobStatusExtImpl get ( final String id , final boolean lock ) { } }
final CriteriaBuilder builder = getSession ( ) . getCriteriaBuilder ( ) ; final CriteriaQuery < PrintJobStatusExtImpl > criteria = builder . createQuery ( PrintJobStatusExtImpl . class ) ; final Root < PrintJobStatusExtImpl > root = criteria . from ( PrintJobStatusExtImpl . class ) ; root . alias ( "pj" ) ; root . fetch ( "result" , JoinType . LEFT ) ; criteria . where ( builder . equal ( root . get ( "referenceId" ) , id ) ) ; final Query < PrintJobStatusExtImpl > query = getSession ( ) . createQuery ( criteria ) ; if ( lock ) { // LOCK means SELECT FOR UPDATE which prevents these records to be pulled by different // instances query . setLockMode ( "pj" , LockMode . PESSIMISTIC_READ ) ; } else { query . setReadOnly ( true ) ; // make sure the object is not updated if there is no lock } return query . uniqueResult ( ) ;
public class DefaultEntityHandler { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . mapping . EntityHandler # createBatchInsertContext ( SqlAgent , TableMetadata , Class ) */ @ Override public SqlContext createBatchInsertContext ( final SqlAgent agent , final TableMetadata metadata , final Class < ? extends Object > entityType ) { } }
return agent . contextWith ( buildInsertSQL ( metadata , entityType , agent . getSqlConfig ( ) , false ) ) . setSqlId ( createSqlId ( metadata , entityType ) ) ;
public class Option { /** * Factory method to create a list of Options from a list of * DomainObjects . It is expected that the DomainObjects has */ public static < T > List < Option < T > > createOptions ( Collection < T > domainObjects ) { } }
List < Option < T > > options = new ArrayList < Option < T > > ( ) ; for ( T value : domainObjects ) { String id = String . valueOf ( getId ( value ) ) ; options . add ( new Option < T > ( id , value ) ) ; } return options ;
public class CPRuleLocalServiceUtil { /** * Creates a new cp rule with the primary key . Does not add the cp rule to the database . * @ param CPRuleId the primary key for the new cp rule * @ return the new cp rule */ public static com . liferay . commerce . product . model . CPRule createCPRule ( long CPRuleId ) { } }
return getService ( ) . createCPRule ( CPRuleId ) ;
public class WbEditingAction { /** * Executes the API action " wbsetclaim " for the given parameters . * @ param statement * the JSON serialization of claim to add or delete . * @ param bot * if true , edits will be flagged as " bot edits " provided that * the logged in user is in the bot group ; for regular users , the * flag will just be ignored * @ param baserevid * the revision of the data that the edit refers to or 0 if this * should not be submitted ; when used , the site will ensure that * no edit has happened since this revision to detect edit * conflicts ; it is recommended to use this whenever in all * operations where the outcome depends on the state of the * online data * @ param summary * summary for the edit ; will be prepended by an automatically * generated comment ; the length limit of the autocomment * together with the summary is 260 characters : everything above * that limit will be cut off * @ return the JSON response from the API * @ throws IOException * if there was an IO problem . such as missing network * connection * @ throws MediaWikiApiErrorException * if the API returns an error * @ throws IOException * @ throws MediaWikiApiErrorException */ public JsonNode wbSetClaim ( String statement , boolean bot , long baserevid , String summary ) throws IOException , MediaWikiApiErrorException { } }
Validate . notNull ( statement , "Statement parameter cannot be null when adding or changing a statement" ) ; Map < String , String > parameters = new HashMap < String , String > ( ) ; parameters . put ( "claim" , statement ) ; return performAPIAction ( "wbsetclaim" , null , null , null , null , parameters , summary , baserevid , bot ) ;
public class ImagePipeline { /** * Submits a request for execution and returns a DataSource representing the pending encoded * image ( s ) . * < p > The ResizeOptions in the imageRequest will be ignored for this fetch * < p > The returned DataSource must be closed once the client has finished with it . * @ param imageRequest the request to submit * @ return a DataSource representing the pending encoded image ( s ) */ public DataSource < CloseableReference < PooledByteBuffer > > fetchEncodedImage ( ImageRequest imageRequest , Object callerContext ) { } }
return fetchEncodedImage ( imageRequest , callerContext , null ) ;
public class BuildStepsInner { /** * Creates a build step for a build task . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param buildTaskName The name of the container registry build task . * @ param stepName The name of a build step for a container registry build task . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < BuildStepInner > beginCreateAsync ( String resourceGroupName , String registryName , String buildTaskName , String stepName , final ServiceCallback < BuildStepInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( beginCreateWithServiceResponseAsync ( resourceGroupName , registryName , buildTaskName , stepName ) , serviceCallback ) ;
public class DestinationSessionProxy { /** * Returns the SICoreConnection which created this Session . * @ return SICoreConnection . * @ throws com . ibm . wsspi . sib . core . exception . SISessionUnavailableException * @ throws com . ibm . wsspi . sib . core . exception . SISessionDroppedException * @ throws com . ibm . wsspi . sib . core . exception . SIConnectionUnavailableException * @ throws com . ibm . wsspi . sib . core . exception . SIConnectionDroppedException */ public SICoreConnection getConnection ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConnection" ) ; checkAlreadyClosed ( ) ; ConnectionProxy conn = getConnectionProxy ( ) ; conn . checkAlreadyClosed ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getConnection" , conn ) ; return conn ;
public class RequestDataAccess { /** * TODO : honor status in query */ private String getOutboundRequestsWhere ( Query query ) { } }
StringBuilder clause = new StringBuilder ( ) ; clause . append ( "where d.owner_type = '" + OwnerType . ADAPTER_REQUEST + "'\n" ) ; String find = query . getFind ( ) ; Long id = query . getLongFilter ( "id" ) ; String path = query . getFilter ( "path" ) ; if ( find != null ) { try { Long docId = Long . parseLong ( find ) ; clause . append ( " and d.document_id like '" + docId + "%'\n" ) ; } catch ( NumberFormatException e ) { clause . append ( " and d.path like '" + find + "%'\n" ) ; } } else if ( id != null && id > 0 ) { clause . append ( " and d.document_id = " + id + "\n" ) ; } else if ( path != null ) { clause . append ( " and d.path like '" + path + "%'\n" ) ; } else if ( query . getFilter ( "ownerId" ) != null ) { clause . append ( " and d.owner_id = " + query . getLongFilter ( "ownerId" ) + "\n" ) ; } else { Long [ ] ownerIds = query . getLongArrayFilter ( "ownerIds" ) ; if ( ownerIds != null ) { clause . append ( " and d.owner_id in (" ) ; for ( int i = 0 ; i < ownerIds . length ; i ++ ) { clause . append ( ownerIds [ i ] ) ; if ( i < ownerIds . length - 1 ) clause . append ( ", " ) ; } clause . append ( ")\n" ) ; } } return clause . toString ( ) ;
public class ResourcePath { /** * Takes the specified path fragment and joins it with this ResourcePath to create a new ResourcePath . * The specified path can use either \ or / separator characters ( or a mix of the two ) , and it can include * . or . . elements in the path , which will be traversed appropriately . The path can start and / or end with * a separator character , but it should not start with a windows drive letter or network root . The resulting * path will have the same root as this path . Some examples : * < ul > * < li > " / usr / local " . join ( " lib / java " ) - > " / usr / local / lib / java " < / li > * < li > " / usr / local " . join ( " / . . " ) - > " / usr " < / li > * < li > " / usr / local " . join ( " / . " ) - > " / usr / local < / li > * < / ul > * If . . path elements would lead to traversing backwards past the root element , an IllegalArgumentException will * be thrown . An IllegalArgumentException will also be thrown if otherPath is null . * @ param otherPath the path to join with this one * @ return a ResourcePath that results from appending otherPath to this path and then normalizing the result */ public ResourcePath join ( String otherPath ) { } }
if ( otherPath == null ) { throw new IllegalArgumentException ( "The join(String) method cannot be called with a null argument" ) ; } DynamicArray < String > components = tokenizePathFragment ( otherPath , 0 ) ; ResourcePath result = this ; for ( int i = 0 ; i < components . size ; i ++ ) { String s = ( String ) components . data [ i ] ; if ( s . equals ( "." ) || s . equals ( "/" ) || s . equals ( "\\" ) || s . equals ( "" ) ) { // no - op } else if ( s . equals ( ".." ) ) { result = result . getParent ( ) ; if ( result == null ) { throw new IllegalArgumentException ( "Joining the path [" + otherPath + "] to the base path [" + getPathString ( ) + "] resulted in traversing backwards past the root path element" ) ; } } else { result = new ResourcePath ( result , s ) ; } } return result ;
public class AstyanaxTableDAO { /** * Helper returns the next maintenance operation that should be performed on the specified table uuid / storage . */ @ Nullable private MaintenanceOp getNextMaintenanceOp ( final TableJson json , final Storage storage ) { } }
final StorageState from = storage . getState ( ) ; switch ( from ) { case PRIMARY : return null ; // Nothing to do . This is the common case . case MIRROR_CREATED : { // Initial mirror create / activate failed , retry the operation . from . getTransitionedAt ( storage ) ; Instant when = _clock . instant ( ) ; // Retry immediately . return MaintenanceOp . forMetadata ( "Move:create-mirror" , when , new MaintenanceTask ( ) { @ Override public void run ( Runnable ignored ) { // Retry mirror creation . moveStart ( json , storage . getPrimary ( ) , storage . getUuidString ( ) , storage . getPlacement ( ) , storage . getShardsLog2 ( ) , "doMoveCreateMirror" , Optional . < Audit > absent ( ) , ( storage . isPlacementMove ( ) ) ? MoveType . FULL_PLACEMENT : MoveType . SINGLE_TABLE ) ; // No exceptions ? That means every data center knows about the new mirror . stateTransition ( json , storage , MIRROR_CREATED , MIRROR_ACTIVATED , InvalidationScope . GLOBAL ) ; } } ) ; } case MIRROR_ACTIVATED : { final Instant transitionedAt = storage . getTransitionedTimestamp ( from ) ; Instant when = transitionedAt . plus ( MIN_CONSISTENCY_DELAY ) ; String dataCenter = selectDataCenterForPlacements ( storage . getPlacement ( ) , storage . getPrimary ( ) . getPlacement ( ) ) ; return MaintenanceOp . forData ( "Move:copy-data" , when , dataCenter , new MaintenanceTask ( ) { @ Override public void run ( Runnable progress ) { // Wait until writes in - flight at the time of mirror activation have replicated so copy doesn ' t miss anything . checkPlacementConsistent ( storage . getPrimary ( ) . getPlacement ( ) , transitionedAt ) ; copyData ( json , storage . getPrimary ( ) , storage , progress ) ; // The next step occurs in the same data center so no need to write / flush globally . stateTransition ( json , storage , from , MIRROR_COPIED , InvalidationScope . DATA_CENTER ) ; } } ) ; } case MIRROR_COPIED : { final Instant transitionedAt = storage . getTransitionedTimestamp ( from ) ; Instant when = transitionedAt . plus ( MIN_CONSISTENCY_DELAY ) ; String dataCenter = selectDataCenterForPlacements ( storage . getPlacement ( ) , storage . getPrimary ( ) . getPlacement ( ) ) ; return MaintenanceOp . forData ( "Move:data-consistent" , when , dataCenter , new MaintenanceTask ( ) { @ Override public void run ( Runnable ignored ) { // Throw an exception ( causing retry in a few minutes ) if the copied data hasn ' t propagated to all data centers . // Note : The system data center may not have access to check full consistency of a particular placement . checkPlacementConsistent ( storage . getPlacement ( ) , transitionedAt ) ; stateTransition ( json , storage , from , MIRROR_CONSISTENT , InvalidationScope . GLOBAL ) ; } } ) ; } case MIRROR_CONSISTENT : case PROMOTED : { // If PROMOTED then previous promote was attempted but failed , retry the operation . Instant transitionedAt = storage . getTransitionedTimestamp ( MIRROR_CONSISTENT ) ; Instant when = transitionedAt != null ? transitionedAt . plus ( MIN_DELAY ) : _clock . instant ( ) ; return MaintenanceOp . forMetadata ( "Move:promote-mirror" , when , new MaintenanceTask ( ) { @ Override public void run ( Runnable ignored ) { movePromote ( json , storage ) ; // Moves into the PROMOTED state when it succeeds . // No exceptions ? That means every data center knows about the new primary . // The next step occurs in the same data center so no need to write / flush globally . stateTransition ( json , storage , from , PRIMARY , InvalidationScope . DATA_CENTER ) ; } } ) ; } case MIRROR_DEMOTED : { Instant transitionedAt = storage . getTransitionedTimestamp ( from ) ; Instant when = transitionedAt != null ? transitionedAt . plus ( MIN_DELAY ) : _clock . instant ( ) ; return MaintenanceOp . forMetadata ( "Move:set-expiration" , when , new MaintenanceTask ( ) { @ Override public void run ( Runnable ignored ) { // Note : This is separate from the previous step ( promote mirror ) because it operates on the old primary that // has been demoted to a mirror , and by separating the steps we round trip through Cassandra and verify that // the promotion worked as expected . Instant expiresAt = _clock . instant ( ) . plus ( MOVE_DEMOTE_TO_EXPIRE ) ; // The next step occurs in the same data center so no need to write / flush globally . stateTransition ( json , storage , from , MIRROR_EXPIRING , expiresAt , InvalidationScope . DATA_CENTER ) ; } } ) ; } case MIRROR_EXPIRING : case MIRROR_EXPIRED : { // If MIRROR _ EXPIRED then previous expire was attempted but failed , retry the operation . Instant mirrorExpiresAt = storage . getMirrorExpiresAt ( ) ; Instant when = mirrorExpiresAt != null ? mirrorExpiresAt : _clock . instant ( ) ; return MaintenanceOp . forMetadata ( "Move:expire-mirror" , when , new MaintenanceTask ( ) { @ Override public void run ( Runnable ignored ) { // Perform a global write and cache invalidation to disable reads everywhere ( getSplits ) . stateTransition ( json , storage , from , MIRROR_EXPIRED , InvalidationScope . GLOBAL ) ; // No exceptions ? That means every data center knows the mirror has expired ( reads are disabled ) . // Mark the mirror as dropped to disable writes everywhere . stateTransition ( json , storage , MIRROR_EXPIRED , DROPPED , InvalidationScope . GLOBAL ) ; } } ) ; } case DROPPED : case PURGED_1 : { // Skip PURGE _ 1 and go straight to PURGE _ 2 if enough time has elapsed , // or if we are moving the entire placement , skip the PURGED _ 1 step to move as quickly as possible // and not final Instant droppedAt = storage . getTransitionedTimestamp ( DROPPED ) ; Instant when1 = droppedAt . plus ( DROP_TO_PURGE_1 ) ; Instant when2 = droppedAt . plus ( DROP_TO_PURGE_2 ) ; final int iteration = ! storage . isPlacementMove ( ) && ( from == DROPPED && when2 . isAfter ( _clock . instant ( ) ) ) ? 1 : 2 ; String dataCenter = selectDataCenterForPlacements ( storage . getPlacement ( ) ) ; return MaintenanceOp . forData ( "Drop:purge-" + iteration , iteration == 1 ? when1 : when2 , dataCenter , new MaintenanceTask ( ) { @ Override public void run ( Runnable progress ) { if ( _purgesBlocked ) { throw new IllegalStateException ( "It is unsafe to purge a table during delta migration." ) ; } // Delay the final purge until we ' re confident we ' ll catch everything . if ( iteration == 2 ) { checkPlacementConsistent ( storage . getPlacement ( ) , droppedAt ) ; } purgeData ( json , storage , iteration , progress ) ; if ( iteration == 1 ) { stateTransition ( json , storage , from , PURGED_1 , InvalidationScope . DATA_CENTER ) ; } else { stateTransition ( json , storage , from , PURGED_2 , InvalidationScope . GLOBAL ) ; } } } ) ; } case PURGED_2 : { Instant transitionedAt = storage . getTransitionedTimestamp ( from ) ; Instant when = transitionedAt . plus ( MIN_CONSISTENCY_DELAY ) ; return MaintenanceOp . forMetadata ( "Drop:delete" , when , new MaintenanceTask ( ) { @ Override public void run ( Runnable progress ) { deleteFinal ( json , storage ) ; // End of the line . } } ) ; } default : throw new UnsupportedOperationException ( String . valueOf ( from ) ) ; }
public class Int2IntCounterMap { /** * Iterate over the values to see if any match the provided value . * If value provided is { @ link # initialValue ( ) } then it will always return false . * @ param value the key to check . * @ return true if the map contains value as a mapped value , false otherwise . */ public boolean containsValue ( final int value ) { } }
boolean found = false ; if ( value != initialValue ) { final int [ ] entries = this . entries ; @ DoNotSub final int length = entries . length ; for ( @ DoNotSub int i = 1 ; i < length ; i += 2 ) { if ( value == entries [ i ] ) { found = true ; break ; } } } return found ;
public class EmbeddedNeo4jSequenceGenerator { /** * Ex . : * < pre > * MERGE ( n : hibernate _ sequences : TABLE _ BASED _ SEQUENCE { sequence _ name : { sequenceName } } ) ON CREATE SET n . current _ value = { initialValue } RETURN n * < / pre > */ private void addTableSequence ( NextValueRequest request ) { } }
IdSourceKeyMetadata idSourceKeyMetadata = request . getKey ( ) . getMetadata ( ) ; String query = "MERGE (n" + labels ( idSourceKeyMetadata . getName ( ) , NodeLabel . TABLE_BASED_SEQUENCE . name ( ) ) + " { " + idSourceKeyMetadata . getKeyColumnName ( ) + ": {" + SEQUENCE_NAME_QUERY_PARAM + "}} ) ON CREATE SET n." + idSourceKeyMetadata . getValueColumnName ( ) + " = {" + INITIAL_VALUE_QUERY_PARAM + "} RETURN n" ; neo4jDb . execute ( query , params ( request ) ) ;
public class HistoryFilterPlusDialog { /** * This method initializes btnApply * @ return javax . swing . JButton */ private JButton getBtnApply ( ) { } }
if ( btnApply == null ) { btnApply = new JButton ( ) ; btnApply . setText ( Constant . messages . getString ( "history.filter.button.apply" ) ) ; btnApply . addActionListener ( new java . awt . event . ActionListener ( ) { @ Override public void actionPerformed ( java . awt . event . ActionEvent e ) { try { filter . setMethods ( methodList . getSelectedValuesList ( ) ) ; filter . setCodes ( codeList . getSelectedValuesList ( ) ) ; filter . setTags ( tagList . getSelectedValuesList ( ) ) ; filter . setRisks ( riskList . getSelectedValuesList ( ) ) ; filter . setReliabilities ( confidenceList . getSelectedValuesList ( ) ) ; filter . setNote ( notesComboBox . getSelectedItem ( ) ) ; filter . setUrlIncPatternList ( strToRegexList ( regexInc . getText ( ) ) ) ; filter . setUrlExcPatternList ( strToRegexList ( regexExc . getText ( ) ) ) ; exitResult = JOptionPane . OK_OPTION ; HistoryFilterPlusDialog . this . dispose ( ) ; } catch ( PatternSyntaxException e1 ) { // Invalid regex View . getSingleton ( ) . showWarningDialog ( Constant . messages . getString ( "history.filter.badregex.warning" , e1 . getMessage ( ) ) ) ; } } } ) ; } return btnApply ;
public class Manager { public List < String > getList ( ) { } }
ArrayList < String > ret = new ArrayList < String > ( list . size ( ) ) ; for ( AbstractManager manager : list ) { ret . add ( manager . getClass ( ) . getName ( ) ) ; } return ret ;
public class IoUtils { /** * Copies the { @ link InputStream } to the specified { @ link OutputStream } * for the specified number of bytes or until EOF or exception . * @ param in The { @ link InputStream } to copy from . * @ param out The { @ link OutputStream } to copy to . * @ param originalByteCount The number of bytes to copy . * @ return The number of bytes written . * @ throws IOException If there ' s an IO error copying the bytes . */ public static long copy ( final InputStream in , final OutputStream out , final long originalByteCount ) throws IOException { } }
if ( originalByteCount < 0 ) { throw new IllegalArgumentException ( "Invalid byte count: " + originalByteCount ) ; } final byte buffer [ ] = new byte [ DEFAULT_BUFFER_SIZE ] ; int len = 0 ; long written = 0 ; long byteCount = originalByteCount ; try { while ( byteCount > 0 ) { // len = in . read ( buffer ) ; if ( byteCount < DEFAULT_BUFFER_SIZE ) { len = in . read ( buffer , 0 , ( int ) byteCount ) ; } else { len = in . read ( buffer , 0 , DEFAULT_BUFFER_SIZE ) ; } if ( len == - 1 ) { LOG . debug ( "Breaking on length = -1" ) ; // System . out . println ( " Breaking on - 1 " ) ; break ; } byteCount -= len ; LOG . info ( "Total written: " + written ) ; out . write ( buffer , 0 , len ) ; written += len ; // LOG . debug ( " IoUtils now written : " + written ) ; } // System . out . println ( " Out of while : " + byteCount ) ; return written ; } catch ( final IOException e ) { LOG . debug ( "Got IOException during copy after writing " + written + " of " + originalByteCount , e ) ; e . printStackTrace ( ) ; throw e ; } catch ( final RuntimeException e ) { LOG . debug ( "Runtime error after writing " + written + " of " + originalByteCount , e ) ; e . printStackTrace ( ) ; throw e ; } finally { out . flush ( ) ; }
public class PlanNode { /** * Sets the basic cost for this node to the given value , and sets the cumulative costs * to those costs plus the cost shares of all inputs ( regular and broadcast ) . * @ param nodeCosts The already knows costs for this node * ( this cost a produces by a concrete { @ code OptimizerNode } subclass . */ public void setCosts ( Costs nodeCosts ) { } }
// set the node costs this . nodeCosts = nodeCosts ; // the cumulative costs are the node costs plus the costs of all inputs this . cumulativeCosts = nodeCosts . clone ( ) ; // add all the normal inputs for ( Iterator < PlanNode > preds = getPredecessors ( ) ; preds . hasNext ( ) ; ) { Costs parentCosts = preds . next ( ) . getCumulativeCostsShare ( ) ; if ( parentCosts != null ) { this . cumulativeCosts . addCosts ( parentCosts ) ; } else { throw new CompilerException ( "Trying to set the costs of an operator before the predecessor costs are computed." ) ; } } // add all broadcast variable inputs if ( this . broadcastInputs != null ) { for ( NamedChannel nc : this . broadcastInputs ) { Costs bcInputCost = nc . getSource ( ) . getCumulativeCostsShare ( ) ; if ( bcInputCost != null ) { this . cumulativeCosts . addCosts ( bcInputCost ) ; } else { throw new CompilerException ( "Trying to set the costs of an operator before the broadcast input costs are computed." ) ; } } }
public class LabeledTextFieldPanel { /** * Factory method for create the new { @ link TextField } . This method is invoked in the * constructor from the derived classes and can be overridden so users can provide their own * version of a new { @ link TextField } . * @ param id * the id * @ param model * the model * @ return the new { @ link TextField } */ protected TextField < T > newTextField ( final String id , final IModel < M > model ) { } }
return ComponentFactory . newTextField ( id , new PropertyModel < T > ( model . getObject ( ) , getId ( ) ) ) ;
public class AllFilterPanel { /** * This method initializes tableFilter * @ return javax . swing . JTable */ private JTable getTableFilter ( ) { } }
if ( tableFilter == null ) { tableFilter = new JTable ( ) ; tableFilter . setRowHeight ( DisplayUtils . getScaledSize ( 18 ) ) ; tableFilter . setIntercellSpacing ( new java . awt . Dimension ( 1 , 1 ) ) ; tableFilter . setModel ( getAllFilterTableModel ( ) ) ; for ( int i = 0 ; i < width . length ; i ++ ) { TableColumn column = tableFilter . getColumnModel ( ) . getColumn ( i ) ; column . setPreferredWidth ( width [ i ] ) ; } TableColumn col = tableFilter . getColumnModel ( ) . getColumn ( 2 ) ; col . setCellRenderer ( new AllFilterTableRenderer ( ) ) ; col . setCellEditor ( new AllFilterTableEditor ( getAllFilterTableModel ( ) ) ) ; } return tableFilter ;
public class FileSystemCompiler { /** * Same as main ( args ) except that exceptions are thrown out instead of causing * the VM to exit and the lookup for . groovy files can be controlled */ public static void commandLineCompile ( String [ ] args , boolean lookupUnnamedFiles ) throws Exception { } }
Options options = createCompilationOptions ( ) ; CommandLineParser cliParser = new GroovyInternalPosixParser ( ) ; CommandLine cli ; cli = cliParser . parse ( options , args ) ; if ( cli . hasOption ( 'h' ) ) { displayHelp ( options ) ; return ; } if ( cli . hasOption ( 'v' ) ) { displayVersion ( ) ; return ; } displayStackTraceOnError = cli . hasOption ( 'e' ) ; CompilerConfiguration configuration = generateCompilerConfigurationFromOptions ( cli ) ; // Load the file name list String [ ] filenames = generateFileNamesFromOptions ( cli ) ; boolean fileNameErrors = filenames == null ; if ( ! fileNameErrors && ( filenames . length == 0 ) ) { displayHelp ( options ) ; return ; } fileNameErrors = fileNameErrors && ! validateFiles ( filenames ) ; if ( ! fileNameErrors ) { doCompilation ( configuration , null , filenames , lookupUnnamedFiles ) ; }
public class MDC { /** * Puts the value onto the context . * @ param key the key for the value * @ param val the value * @ return the previous value set or { @ code null } if no value was set */ public static Object put ( String key , Object val ) { } }
return LoggerProviders . PROVIDER . putMdc ( key , val ) ;
public class TopologyMetric { /** * Returns true if field corresponding to fieldID is set ( has been assigned a value ) and false otherwise */ public boolean isSet ( _Fields field ) { } }
if ( field == null ) { throw new IllegalArgumentException ( ) ; } switch ( field ) { case TOPOLOGY_METRIC : return is_set_topologyMetric ( ) ; case COMPONENT_METRIC : return is_set_componentMetric ( ) ; case WORKER_METRIC : return is_set_workerMetric ( ) ; case TASK_METRIC : return is_set_taskMetric ( ) ; case STREAM_METRIC : return is_set_streamMetric ( ) ; case NETTY_METRIC : return is_set_nettyMetric ( ) ; case COMP_STREAM_METRIC : return is_set_compStreamMetric ( ) ; } throw new IllegalStateException ( ) ;
public class AipKnowledgeGraphic { /** * 获取任务详情接口 * 根据任务id获取单个任务的详细信息 * @ param id - 任务ID * @ param options - 可选参数对象 , key : value都为string类型 * options - options列表 : * @ return JSONObject */ public JSONObject getTaskInfo ( int id , HashMap < String , String > options ) { } }
AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; request . addBody ( "id" , id ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( KnowledgeGraphicConsts . TASK_INFO ) ; postOperation ( request ) ; return requestServer ( request ) ;
public class BootstrapAgent { /** * { @ inheritDoc } */ public static void premain ( String arg , Instrumentation inst ) throws Exception { } }
BootstrapAgent . arg = arg ; BootstrapAgent . instrumentation = inst ; setSystemProperties ( ) ; if ( arg == null || arg . length ( ) == 0 ) { return ; } // Find the relative location of the target agent jar and save its // arguments int separator = arg . indexOf ( '=' ) ; String targetAgent = separator < 0 ? arg : arg . substring ( 0 , separator ) ; String targetAgentArgs = separator < 0 ? "" : arg . substring ( separator + 1 ) ; try { loadAgentJar ( targetAgent , targetAgentArgs ) ; } catch ( FileNotFoundException e ) { // if the code cannot find the specified jar file , do nothing . This is the original behavior . }