signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class BufferedAttributeCollection { /** * Set the attribute value . * @ param name is the name of the attribute * @ param type is the type of the attribute * @ param value is the raw value to store . * @ return the new created attribute * @ throws AttributeException on error . */ protected Attribute setAttributeFromRawValue ( String name , AttributeType type , Object value ) throws AttributeException { } }
AttributeValue oldValue = extractValueForSafe ( name ) ; if ( oldValue != null ) { if ( oldValue . equals ( value ) ) { return null ; } // Clone the value for avoid border effects . oldValue = new AttributeValueImpl ( oldValue ) ; } final Attribute attr = new AttributeImpl ( name , type ) ; attr . setValue ( type . cast ( value ) ) ; saveValue ( name , attr ) ; this . cache . put ( name , attr ) ; if ( oldValue != null ) { fireAttributeChangedEvent ( name , oldValue , attr ) ; } else { fireAttributeAddedEvent ( name , attr ) ; } return attr ;
public class CreateAssociationBatchResult { /** * Information about the associations that succeeded . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSuccessful ( java . util . Collection ) } or { @ link # withSuccessful ( java . util . Collection ) } if you want to * override the existing values . * @ param successful * Information about the associations that succeeded . * @ return Returns a reference to this object so that method calls can be chained together . */ public CreateAssociationBatchResult withSuccessful ( AssociationDescription ... successful ) { } }
if ( this . successful == null ) { setSuccessful ( new com . amazonaws . internal . SdkInternalList < AssociationDescription > ( successful . length ) ) ; } for ( AssociationDescription ele : successful ) { this . successful . add ( ele ) ; } return this ;
public class BlockExpressionBuilderImpl { /** * Add an expression inside the block . * @ return the expression builder . */ public IExpressionBuilder addExpression ( ) { } }
final IExpressionBuilder builder = this . expressionProvider . get ( ) ; builder . eInit ( getXBlockExpression ( ) , new Procedures . Procedure1 < XExpression > ( ) { private int index = - 1 ; public void apply ( XExpression it ) { if ( this . index >= 0 ) { getXBlockExpression ( ) . getExpressions ( ) . set ( index , it ) ; } else { getXBlockExpression ( ) . getExpressions ( ) . add ( it ) ; this . index = getXBlockExpression ( ) . getExpressions ( ) . size ( ) - 1 ; } } } , getTypeResolutionContext ( ) ) ; return builder ;
public class DBUnitDataHandler { /** * - - Private methods */ private void executeScript ( String script ) { } }
try { final StatementSplitter statementSplitter = new StatementSplitterResolver ( scriptConfigurationInstance . get ( ) ) . resolve ( ) ; final ScriptExecutor scriptExecutor = new ScriptExecutor ( databaseConnection . get ( ) . getConnection ( ) , scriptConfigurationInstance . get ( ) , statementSplitter ) ; scriptExecutor . execute ( script ) ; } catch ( SQLException e ) { throw new DBUnitConnectionException ( "Unable to execute script." , e ) ; }
public class AbstractMinMaxTextBox { /** * set maximum allowed value . * @ param pmax maximum value allowed */ public void setMax ( final T pmax ) { } }
if ( pmax == null ) { getInputElement ( ) . removeAttribute ( "max" ) ; } else { getInputElement ( ) . setMax ( this . numberRenderer . render ( pmax ) ) ; }
public class RestServiceExceptionFacade { /** * Add a response message to an existing response . * @ param exception the { @ link WebApplicationException } . * @ return the response with the response message added */ protected Response createResponse ( WebApplicationException exception ) { } }
Response response = exception . getResponse ( ) ; int statusCode = response . getStatus ( ) ; Status status = Status . fromStatusCode ( statusCode ) ; NlsRuntimeException error ; if ( exception instanceof ServerErrorException ) { error = new TechnicalErrorUserException ( exception ) ; LOG . error ( "Service failed on server" , error ) ; return createResponse ( status , error , null ) ; } else { UUID uuid = UUID . randomUUID ( ) ; if ( exception instanceof ClientErrorException ) { LOG . warn ( "Service failed due to unexpected request. UUDI: {}, reason: {} " , uuid , exception . getMessage ( ) ) ; } else { LOG . warn ( "Service caused redirect or other error. UUID: {}, reason: {}" , uuid , exception . getMessage ( ) ) ; } return createResponse ( status , exception . getMessage ( ) , String . valueOf ( statusCode ) , uuid , null ) ; }
public class InBinding { /** * Sets the specified values as the matching value list . * First , the previous list are cleared and all of * the specified values are appended to the list . * @ param values * a collection whose elements are appended * to the matching value list . */ public void setValues ( final Collection < ? > values ) { } }
if ( values != _values ) { clear ( ) ; if ( values == null || values . size ( ) == 0 ) { return ; } for ( Object value : values ) { addValue ( value ) ; } }
public class GenericParser { /** * { @ inheritDoc } */ @ Override public RepositoryResourceWritable parseFileToResource ( File assetFile , File metadataFile , String contentUrl ) throws RepositoryException { } }
File artifactFile = null ; ArtifactMetadata metadata = null ; if ( assetFile . getName ( ) . endsWith ( "metadata.zip" ) ) { metadata = explodeZip ( assetFile ) ; // No artifactFile to set , that ' s fine we just won ' t have a CRC or file size } else { metadata = explodeArtifact ( assetFile , metadataFile ) ; artifactFile = assetFile ; } // Make sure all the required fields are set if ( metadata == null ) { throw new RepositoryArchiveException ( "Unable to find sibling metadata zip for " + assetFile . getName ( ) + " so do not have the required information" , assetFile ) ; } checkPropertySet ( ASSET_TYPE_PROPERTY_KEY , metadata ) ; ResourceType type = ResourceType . valueOf ( metadata . getProperty ( ASSET_TYPE_PROPERTY_KEY ) ) ; RepositoryResourceWritable resource = WritableResourceFactory . createResource ( null , type ) ; setCommonFieldsFromSideZip ( metadata , resource ) ; resource . setProviderName ( "IBM" ) ; resource . setProviderUrl ( "http://www.ibm.com" ) ; attachLicenseData ( metadata , resource ) ; if ( resource instanceof ProductRelatedResourceWritable ) { setProductDetails ( ( ProductRelatedResourceWritable ) resource , metadata ) ; } String appliesTo = metadata . getProperty ( APPLIES_TO_PROPERTY_KEY ) ; if ( appliesTo != null && resource instanceof ApplicableToProductWritable ) { ( ( ApplicableToProductWritable ) resource ) . setAppliesTo ( appliesTo ) ; } addContent ( resource , artifactFile , assetFile . getName ( ) , metadata , contentUrl ) ; processIcons ( metadata , resource ) ; return resource ;
public class IntervalTree { /** * Balancing operations . * Implementations of rebalancings during insertion and deletion are * slightly different than the CLR version . Rather than using dummy * nilnodes , we use a set of accessors that deal properly with null . They * are used to avoid messiness surrounding nullness checks in the main * algorithms . */ private static < V > boolean colorOf ( TreeEntry < V > p ) { } }
return p == null ? BLACK : p . color ;
public class ChangeModelAction { /** * Template method to factorize the execution of the change model * notification . * @ return * @ throws java . lang . Exception */ @ Override public Object execute ( ) throws Exception { } }
Object ret = executeChange ( ) ; if ( changesManager != null ) changesManager . modelChanged ( ) ; return ret ;
public class StereoDisparityWtoNaiveFive { /** * Compute the score for five local regions and just use the center + the two best * @ param leftX X - axis center left image * @ param rightX X - axis center left image * @ param centerY Y - axis center for both images * @ return Fit score for both regions . */ protected double computeScore ( int leftX , int rightX , int centerY ) { } }
double center = computeScoreRect ( leftX , rightX , centerY ) ; four [ 0 ] = computeScoreRect ( leftX - radiusX , rightX - radiusX , centerY - radiusY ) ; four [ 1 ] = computeScoreRect ( leftX + radiusX , rightX + radiusX , centerY - radiusY ) ; four [ 2 ] = computeScoreRect ( leftX - radiusX , rightX - radiusX , centerY + radiusY ) ; four [ 3 ] = computeScoreRect ( leftX + radiusX , rightX + radiusX , centerY + radiusY ) ; Arrays . sort ( four ) ; return four [ 0 ] + four [ 1 ] + center ;
public class ByteUtils { /** * Converts a Collection of Number to a byte array . * @ param bytes * a Collection of Number * @ return byte array */ public static byte [ ] toArray ( Collection < ? extends Number > bytes ) { } }
byte [ ] array = new byte [ bytes . size ( ) ] ; Iterator < ? extends Number > iter = bytes . iterator ( ) ; for ( int i = 0 ; i < bytes . size ( ) ; i ++ ) { array [ i ] = iter . next ( ) . byteValue ( ) ; } return array ;
public class RunPRequest { /** * < code > optional . alluxio . grpc . job . RunPOptions options = 2 ; < / code > */ public alluxio . grpc . RunPOptionsOrBuilder getOptionsOrBuilder ( ) { } }
return options_ == null ? alluxio . grpc . RunPOptions . getDefaultInstance ( ) : options_ ;
public class AbstractVdmBreakpoint { /** * @ see IScriptBreakpoint # removeId ( IDbgpSession ) */ public String removeId ( IDbgpSession session ) { } }
final PerSessionInfo info ; synchronized ( sessions ) { info = ( PerSessionInfo ) sessions . remove ( session ) ; } return info != null ? info . identifier : null ;
public class DOMDifferenceEngine { /** * Compares whether two attributes are specified explicitly . */ private DeferredComparison compareAttributeExplicitness ( final Attr control , final XPathContext controlContext , final Attr test , final XPathContext testContext ) { } }
return new DeferredComparison ( ) { @ Override public ComparisonState apply ( ) { return compare ( new Comparison ( ComparisonType . ATTR_VALUE_EXPLICITLY_SPECIFIED , control , getXPath ( controlContext ) , control . getSpecified ( ) , getParentXPath ( controlContext ) , test , getXPath ( testContext ) , test . getSpecified ( ) , getParentXPath ( testContext ) ) ) ; } } ;
public class SocketGroovyMethods { /** * Accepts a connection and passes the resulting Socket to the closure * which runs in a new Thread or the calling thread , as needed . * @ param serverSocket a ServerSocket * @ param runInANewThread This flag should be true , if the closure should be invoked in a new thread , else false . * @ param closure a Closure * @ return a Socket * @ throws IOException if an IOException occurs . * @ see java . net . ServerSocket # accept ( ) * @ since 1.7.6 */ public static Socket accept ( ServerSocket serverSocket , final boolean runInANewThread , @ ClosureParams ( value = SimpleType . class , options = "java.net.Socket" ) final Closure closure ) throws IOException { } }
final Socket socket = serverSocket . accept ( ) ; if ( runInANewThread ) { new Thread ( new Runnable ( ) { public void run ( ) { invokeClosureWithSocket ( socket , closure ) ; } } ) . start ( ) ; } else { invokeClosureWithSocket ( socket , closure ) ; } return socket ;
public class xen_upgrade { /** * Use this API to fetch filtered set of xen _ upgrade resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static xen_upgrade [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
xen_upgrade obj = new xen_upgrade ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; xen_upgrade [ ] response = ( xen_upgrade [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class LabelIndexer { /** * Convert Index to actual string . */ public Map < String , Double > convertMapKey ( Map < Integer , Double > probs ) { } }
Map < String , Double > stringKeyProb = new HashMap < > ( ) ; probs . entrySet ( ) . forEach ( e -> stringKeyProb . put ( getLabel ( e . getKey ( ) ) , e . getValue ( ) ) ) ; return stringKeyProb ;
public class CmsExportHelper { /** * Writes a single OpenCms VFS file to the export . < p > * @ param file the OpenCms VFS file to write * @ param name the name of the file in the export * @ throws IOException in case of file access issues */ public void writeFile ( CmsFile file , String name ) throws IOException { } }
if ( m_isExportAsFiles ) { writeFile2Rfs ( file , name ) ; } else { writeFile2Zip ( file , name ) ; }
public class MultiProcessCluster { /** * Kills the primary master . * If no master is currently primary , this method blocks until a primary has been elected , then * kills it . * @ param timeoutMs maximum amount of time to wait , in milliseconds * @ return the ID of the killed master */ public synchronized int waitForAndKillPrimaryMaster ( int timeoutMs ) throws TimeoutException , InterruptedException { } }
int index = getPrimaryMasterIndex ( timeoutMs ) ; mMasters . get ( index ) . close ( ) ; return index ;
public class BalancingPolicy { /** * Determines whether or not a given work unit is pegged to this instance . */ public boolean isPeggedToMe ( String workUnitId ) { } }
ObjectNode zkWorkData = cluster . allWorkUnits . get ( workUnitId ) ; if ( zkWorkData == null || zkWorkData . size ( ) == 0 ) { cluster . workUnitsPeggedToMe . remove ( workUnitId ) ; return false ; } try { JsonNode pegged = zkWorkData . get ( cluster . name ) ; final boolean isPegged = ( pegged != null ) && pegged . asText ( ) . equals ( cluster . myNodeID ) ; if ( isPegged ) { cluster . workUnitsPeggedToMe . add ( workUnitId ) ; } else { cluster . workUnitsPeggedToMe . remove ( workUnitId ) ; } return isPegged ; } catch ( Exception e ) { LOG . error ( String . format ( "Error parsing mapping for %s: %s" , workUnitId , zkWorkData ) , e ) ; return false ; }
public class PhaseOneImpl { /** * { @ inheritDoc } */ @ Override public void stage6Expansion ( final Document doc , final ProtoNetwork pn , boolean expandNestedStatements ) { } }
// expand statements , including whether nested statement should be // expanded expansion . expandStatements ( doc , pn , expandNestedStatements ) ; // expand terms if not disabled expansion . expandTerms ( doc , pn ) ;
public class MigrationManager { /** * Retains only the { @ code migrations } in the completed migration list . Acquires the partition service lock . */ void retainCompletedMigrations ( Collection < MigrationInfo > migrations ) { } }
partitionServiceLock . lock ( ) ; try { completedMigrations . retainAll ( migrations ) ; } finally { partitionServiceLock . unlock ( ) ; }
public class FadeDrawable { /** * Starts fading to the specified layer . * @ param index the index of the layer to fade to */ public void fadeToLayer ( int index ) { } }
mTransitionState = TRANSITION_STARTING ; Arrays . fill ( mIsLayerOn , false ) ; mIsLayerOn [ index ] = true ; invalidateSelf ( ) ;
public class TokenQueue { /** * Pulls a string off the queue ( like consumeTo ) , and then pulls off the matched string ( but does not return it ) . * If the queue runs out of characters before finding the seq , will return as much as it can ( and queue will go * isEmpty ( ) = = true ) . * @ param seq String to match up to , and not include in return , and to pull off queue . < b > Case sensitive . < / b > * @ return Data matched from queue . */ public String chompTo ( String seq ) { } }
String data = consumeTo ( seq ) ; matchChomp ( seq ) ; return data ;
public class JSONTokener { /** * Determine if the source string still contains characters that next ( ) * can consume . * @ return true if not yet at the end of the source . * @ throws JSONException thrown if there is an error stepping forward * or backward while checking for more data . */ public boolean more ( ) throws JSONException { } }
if ( this . usePrevious ) { return true ; } try { this . reader . mark ( 1 ) ; } catch ( IOException e ) { throw new JSONException ( "Unable to preserve stream position" , e ) ; } try { // -1 is EOF , but next ( ) can not consume the null character ' \ 0' if ( this . reader . read ( ) <= 0 ) { this . eof = true ; return false ; } this . reader . reset ( ) ; } catch ( IOException e ) { throw new JSONException ( "Unable to read the next character from the stream" , e ) ; } return true ;
public class CompilerUtil { /** * Converts and returns the specified class , if it represents a primitive , to the associated * non - primitive class , or else returns the specified class if it is not a primitive . * @ param clazz * the input class * @ return the associated non - primitive class , or the input class if it is not a primitive */ private static Class < ? > fromPrimitive ( Class < ? > clazz ) { } }
Class < ? > clazz2 = PRIMITIVE_TO_CLASS . get ( clazz ) ; return clazz2 == null ? clazz : clazz2 ;
public class CmsSiteManager { /** * Opens the edit site dialog . < p > * @ param siteRoot the site root of the site to edit , if < code > null < / code > */ public void openEditDialog ( String siteRoot ) { } }
CmsEditSiteForm form ; String caption ; if ( siteRoot != null ) { form = new CmsEditSiteForm ( m_rootCms , this , siteRoot ) ; caption = CmsVaadinUtils . getMessageText ( Messages . GUI_SITE_CONFIGURATION_EDIT_1 , m_sitesTable . getContainer ( ) . getItem ( siteRoot ) . getItemProperty ( TableProperty . Title ) . getValue ( ) ) ; } else { form = new CmsEditSiteForm ( m_rootCms , this ) ; caption = CmsVaadinUtils . getMessageText ( Messages . GUI_SITE_ADD_0 ) ; } openDialog ( form , caption ) ;
import java . util . ArrayList ; import java . util . Collections ; import java . util . Comparator ; class ArrangeTuples { /** * Function to sort a list of tuples based on the total count of digits in each tuple . * Examples : * arrange _ tuples ( [ ( 3 , 4 , 6 , 723 ) , ( 1 , 2 ) , ( 12345 , ) , ( 134 , 234 , 34 ) ] ) * Would return ' [ ( 1 , 2 ) , ( 12345 , ) , ( 3 , 4 , 6 , 723 ) , ( 134 , 234 , 34 ) ] ' . * arrange _ tuples ( [ ( 3 , 4 , 8 ) , ( 1 , 2 ) , ( 1234335 , ) , ( 1345 , 234 , 334 ) ] ) * Would return ' [ ( 1 , 2 ) , ( 3 , 4 , 8 ) , ( 1234335 , ) , ( 1345 , 234 , 334 ) ] ' . * arrange _ tuples ( [ ( 34 , 4 , 61 , 723 ) , ( 1 , 2 ) , ( 145 , ) , ( 134 , 23 ) ] ) * Would return ' [ ( 1 , 2 ) , ( 145 , ) , ( 134 , 23 ) , ( 34 , 4 , 61 , 723 ) ] ' . * Parameters : * input _ list ( list of tuples ) : Each tuple consists of integers . * Returns : * str : A string representation of the sorted list . */ public static String arrangeTuples ( ArrayList < int [ ] > inputList ) { } private static int digitsCount ( int [ ] nums ) { int count = 0 ; for ( int num : nums ) { count += Integer . toString ( num ) . length ( ) ; } return count ; } }
Collections . sort ( inputList , new Comparator < int [ ] > ( ) { @ Override public int compare ( int [ ] o1 , int [ ] o2 ) { return Integer . compare ( digitsCount ( o1 ) , digitsCount ( o2 ) ) ; } } ) ; return inputList . toString ( ) ;
public class LBiBoolFunctionBuilder { /** * Builds the functional interface implementation and if previously provided calls the consumer . */ @ Nonnull public final LBiBoolFunction < R > build ( ) { } }
final LBiBoolFunction < R > eventuallyFinal = this . eventually ; LBiBoolFunction < R > retval ; final Case < LLogicalBinaryOperator , LBiBoolFunction < R > > [ ] casesArray = cases . toArray ( new Case [ cases . size ( ) ] ) ; retval = LBiBoolFunction . < R > biBoolFunc ( ( a1 , a2 ) -> { try { for ( Case < LLogicalBinaryOperator , LBiBoolFunction < R > > aCase : casesArray ) { if ( aCase . casePredicate ( ) . apply ( a1 , a2 ) ) { return aCase . caseFunction ( ) . apply ( a1 , a2 ) ; } } return eventuallyFinal . apply ( a1 , a2 ) ; } catch ( Error e ) { // NOSONAR throw e ; } catch ( Throwable e ) { // NOSONAR throw Handler . handleOrPropagate ( e , handling ) ; } } ) ; if ( consumer != null ) { consumer . accept ( retval ) ; } return retval ;
public class Bits { /** * Reads 2 compressed longs into an array of 2 longs . * Once variable - length encoding has been implemented , this method will probably get dropped as we can simply * read the 2 longs individually . * @ param in the input stream to read from * @ param seqnos the array to read the seqnos into , needs to have a length of 2 * @ param index the index of the first element to be written ; the seqnos are written to seqnos [ index ] and seqnos [ index + 1] */ public static void readLongSequence ( DataInput in , long [ ] seqnos , int index ) throws IOException { } }
byte len = in . readByte ( ) ; if ( len == 0 ) { seqnos [ index ] = seqnos [ index + 1 ] = 0 ; return ; } byte len1 = firstNibble ( len ) , len2 = secondNibble ( len ) ; seqnos [ index ] = makeLong ( in , len1 ) ; seqnos [ index + 1 ] = makeLong ( in , len2 ) + seqnos [ index ] ;
public class MFVec2f { /** * Places a new value at the end of the existing value array , increasing the field length accordingly . * @ param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list */ public void append ( float [ ] newValue ) { } }
if ( ( newValue . length % 2 ) == 0 ) { for ( int i = 0 ; i < ( newValue . length / 2 ) ; i ++ ) { value . add ( new SFVec2f ( newValue [ i * 2 ] , newValue [ i * 2 + 1 ] ) ) ; } } else { Log . e ( TAG , "X3D MFVec3f append set with array length not divisible by 2" ) ; }
public class JPATxEmInvocation { /** * ( non - Javadoc ) * @ see javax . transaction . Synchronization # afterCompletion ( int ) */ @ Override public void afterCompletion ( int status ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "afterCompletion : " + status + " : " + this ) ; // JPA 5.9.1 Container Responsibilities // - After the JTA transaction has completed ( either by transaction commit or rollback ) , // The container closes the entity manager by calling EntityManager . close . [ 39] // [39 ] The container may choose to pool EntityManagers and instead of creating and // closing in each case acquire one from its pool and call clear ( ) on it . // Note : em may be null now , if it was non - transactional . d472866.1 if ( ivEm != null ) { ivJpaEm . closeTxEntityManager ( ivEm , ivPoolEM ) ; // d510184 } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "afterCompletion" ) ;
public class DefaultSwidProcessor { /** * Identifies the tag creator ( tag : tag _ creator ) . * Example data format : < i > “ regid . 2010-04 . com . labs64 , NLIC ” < / i > where : * < ul > * < li > regid = registered id < / li > * < li > 2010-04 = the year and first month the domain was registered ( yyyy - mm ) < / li > * < li > com = the upper level domain < / li > * < li > labs64 = the domain name < / li > * < li > NLIC = the name of the business unit ( BU ) that created the SWID tag < / li > * < / ul > * Note that everything after the comma ‘ , ’ is optional and only required if a software title is specific * @ param tagCreatorName * tag creator name * @ param tagCreatorRegId * tag creator registration ID * @ return a reference to this object . */ public DefaultSwidProcessor setTagCreator ( final String tagCreatorName , final String tagCreatorRegId ) { } }
swidTag . setTagCreator ( new EntityComplexType ( new Token ( tagCreatorName , idGenerator . nextId ( ) ) , new RegistrationId ( tagCreatorRegId , idGenerator . nextId ( ) ) , idGenerator . nextId ( ) ) ) ; return this ;
public class XPathPolicyIndex { /** * FIXME : public for some external testing . - > protected */ public static Map < String , String > getXpathVariables ( Map < String , Collection < AttributeBean > > attributeMap ) { } }
// Set all the bind variables in the query context Map < String , String > variables = new HashMap < String , String > ( ) ; for ( String t : targets ) { int count = 0 ; for ( AttributeBean bean : attributeMap . get ( t . toLowerCase ( ) + "Attributes" ) ) { if ( bean . getId ( ) . equals ( XACML_RESOURCE_ID ) ) { variables . put ( "XacmlResourceId" , bean . getId ( ) ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "XacmlResourceId = '" + bean . getId ( ) + "'" ) ; } int c = 0 ; for ( String value : bean . getValues ( ) ) { variables . put ( "XacmlResourceIdValue" + c , value ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "XacmlResourceIdValue" + c + " = '" + value + "'" ) ; } c ++ ; } } else { variables . put ( t + "Id" + count , bean . getId ( ) ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( t + "Id" + count + " = '" + bean . getId ( ) + "'" ) ; } int valueCount = 0 ; for ( String value : bean . getValues ( ) ) { variables . put ( t + "Id" + count + "-Value" + valueCount , value ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( t + "Id" + count + "-Value" + valueCount + " = '" + value + "'" ) ; } valueCount ++ ; } count ++ ; } } } return variables ;
public class DBTablePropertySheet { /** * GEN - LAST : event _ tfPackageNameFocusLost */ private void tfPackageNameActionPerformed ( java . awt . event . ActionEvent evt ) // GEN - FIRST : event _ tfPackageNameActionPerformed { } }
// GEN - HEADEREND : event _ tfPackageNameActionPerformed // Commit on ENTER aTable . setPackageName ( tfPackageName . getText ( ) ) ;
public class MethodInfo { /** * Check if this method has a parameter with the named annotation . * @ param annotationName * The name of a method parameter annotation . * @ return true if this method has a parameter with the named annotation . */ public boolean hasParameterAnnotation ( final String annotationName ) { } }
for ( final MethodParameterInfo methodParameterInfo : getParameterInfo ( ) ) { if ( methodParameterInfo . hasAnnotation ( annotationName ) ) { return true ; } } return false ;
public class QuickSort { /** * Sorts the given list using the given comparator . */ public static < T > void sort ( List < T > list , Comparator < ? super T > comparator ) { } }
if ( list instanceof RandomAccess ) { quicksort ( list , comparator ) ; } else { List < T > copy = new ArrayList < > ( list ) ; quicksort ( copy , comparator ) ; list . clear ( ) ; list . addAll ( copy ) ; }
public class CPDefinitionOptionRelUtil { /** * Returns the first cp definition option rel in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching cp definition option rel , or < code > null < / code > if a matching cp definition option rel could not be found */ public static CPDefinitionOptionRel fetchByUuid_First ( String uuid , OrderByComparator < CPDefinitionOptionRel > orderByComparator ) { } }
return getPersistence ( ) . fetchByUuid_First ( uuid , orderByComparator ) ;
public class CrossingHelper { /** * the array sorting */ private static void sort ( double [ ] coords1 , int length1 , double [ ] coords2 , int length2 , int [ ] array ) { } }
int temp ; int length = length1 + length2 ; double x1 , y1 , x2 , y2 ; for ( int i = 1 ; i < length ; i ++ ) { if ( array [ i - 1 ] < length1 ) { x1 = coords1 [ 2 * array [ i - 1 ] ] ; y1 = coords1 [ 2 * array [ i - 1 ] + 1 ] ; } else { x1 = coords2 [ 2 * ( array [ i - 1 ] - length1 ) ] ; y1 = coords2 [ 2 * ( array [ i - 1 ] - length1 ) + 1 ] ; } if ( array [ i ] < length1 ) { x2 = coords1 [ 2 * array [ i ] ] ; y2 = coords1 [ 2 * array [ i ] + 1 ] ; } else { x2 = coords2 [ 2 * ( array [ i ] - length1 ) ] ; y2 = coords2 [ 2 * ( array [ i ] - length1 ) + 1 ] ; } int j = i ; while ( j > 0 && compare ( x1 , y1 , x2 , y2 ) <= 0 ) { temp = array [ j ] ; array [ j ] = array [ j - 1 ] ; array [ j - 1 ] = temp ; j -- ; if ( j > 0 ) { if ( array [ j - 1 ] < length1 ) { x1 = coords1 [ 2 * array [ j - 1 ] ] ; y1 = coords1 [ 2 * array [ j - 1 ] + 1 ] ; } else { x1 = coords2 [ 2 * ( array [ j - 1 ] - length1 ) ] ; y1 = coords2 [ 2 * ( array [ j - 1 ] - length1 ) + 1 ] ; } if ( array [ j ] < length1 ) { x2 = coords1 [ 2 * array [ j ] ] ; y2 = coords1 [ 2 * array [ j ] + 1 ] ; } else { x2 = coords2 [ 2 * ( array [ j ] - length1 ) ] ; y2 = coords2 [ 2 * ( array [ j ] - length1 ) + 1 ] ; } } } }
public class Environment { /** * Get the ( optional ) raw data database manager . * @ return The pDatabaseOwner ( returns an object , so this package isn ' t dependent on PDatabaseOwner ) . */ public ThinPhysicalDatabaseParent getPDatabaseParent ( Map < String , Object > properties , boolean bCreateIfNew ) { } }
if ( m_PhysicalDatabaseParent == null ) if ( bCreateIfNew ) { Map < String , Object > map = new Hashtable < String , Object > ( ) ; if ( properties != null ) map . putAll ( properties ) ; if ( map . get ( PhysicalDatabaseParent . APP ) == null ) map . put ( PhysicalDatabaseParent . APP , this . getDefaultApplication ( ) ) ; // Access to the server , etc . m_PhysicalDatabaseParent = new PhysicalDatabaseParent ( map ) ; } if ( properties != null ) { for ( String strKey : properties . keySet ( ) ) { m_PhysicalDatabaseParent . setProperty ( strKey , properties . get ( strKey ) ) ; } } return m_PhysicalDatabaseParent ;
public class GCLINEImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GCLINE__RG : getRg ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ;
public class SftpSubsystemChannel { /** * Make a directory . If the directory exists this method will throw an * exception . * @ param path * @ throws SftpStatusException * , SshException */ public void makeDirectory ( String path ) throws SftpStatusException , SshException { } }
makeDirectory ( path , new SftpFileAttributes ( this , SftpFileAttributes . SSH_FILEXFER_TYPE_DIRECTORY ) ) ;
public class ConfirmationDialog { /** * TenantAwareEvent handler for button clicks . * @ param event * the click event . */ @ Override public void buttonClick ( final ClickEvent event ) { } }
if ( window . getParent ( ) != null ) { isImplicitClose = true ; UI . getCurrent ( ) . removeWindow ( window ) ; } callback . response ( event . getSource ( ) . equals ( okButton ) ) ;
public class CrossValidatedMahoutKNNRecommenderEvaluator { /** * Main method . Parameter is not used . * @ param args the arguments ( not used ) */ public static void main ( final String [ ] args ) { } }
String url = "http://files.grouplens.org/datasets/movielens/ml-100k.zip" ; String folder = "data/ml-100k" ; String modelPath = "data/ml-100k/model/" ; String recPath = "data/ml-100k/recommendations/" ; String dataFile = "data/ml-100k/ml-100k/u.data" ; int nFolds = N_FOLDS ; prepareSplits ( url , nFolds , dataFile , folder , modelPath ) ; recommend ( nFolds , modelPath , recPath ) ; // the strategy files are ( currently ) being ignored prepareStrategy ( nFolds , modelPath , recPath , modelPath ) ; evaluate ( nFolds , modelPath , recPath ) ;
public class CircularQueueCaptureQueriesListener { /** * Log all captured INSERT queries */ public void logInsertQueries ( ) { } }
List < String > queries = getInsertQueries ( ) . stream ( ) . map ( CircularQueueCaptureQueriesListener :: formatQueryAsSql ) . collect ( Collectors . toList ( ) ) ; ourLog . info ( "Insert Queries:\n{}" , String . join ( "\n" , queries ) ) ;
public class ResourceValueFrameModelingVisitor { /** * - return ( areturn ) */ private void handleFieldStore ( FieldInstruction ins ) { } }
try { // If the resource instance is stored in a field , then it escapes ResourceValueFrame frame = getFrame ( ) ; ResourceValue topValue = frame . getTopValue ( ) ; if ( topValue . equals ( ResourceValue . instance ( ) ) ) { frame . setStatus ( ResourceValueFrame . ESCAPED ) ; } } catch ( DataflowAnalysisException e ) { throw new InvalidBytecodeException ( "Stack underflow" , e ) ; } handleNormalInstruction ( ins ) ;
public class LazyArray { /** * Returns the string value stored at the given index or null if there was no such value . * @ param index the location of the value in this array * @ return the value if it could be parsed as a boolean or null if there was no such value * @ throws LazyException if the index is out of bounds */ public String optString ( int index ) { } }
LazyNode token = getOptionalValueToken ( index ) ; if ( token == null ) return null ; if ( token . type == LazyNode . VALUE_NULL ) return null ; return token . getStringValue ( ) ;
public class UTF16 { /** * Number of codepoints in a UTF16 String * @ param source UTF16 string * @ return number of codepoint in string */ public static int countCodePoint ( String source ) { } }
if ( source == null || source . length ( ) == 0 ) { return 0 ; } return findCodePointOffset ( source , source . length ( ) ) ;
public class KieModuleDeploymentHelperImpl { /** * Add class to the { @ link KieFileSystem } . * @ param userClass The class to be added . * @ param kfs The { @ link KieFileSystem } */ private static void addClass ( Class < ? > userClass , KieFileSystem kfs ) { } }
String classSimpleName = userClass . getSimpleName ( ) ; URL classFileUrl = userClass . getResource ( classSimpleName + ".class" ) ; if ( classFileUrl == null ) { throw new RuntimeException ( "Class " + userClass . getCanonicalName ( ) + " can not be found on the classpath." ) ; } byte [ ] classByteCode = null ; if ( "file" . equalsIgnoreCase ( classFileUrl . getProtocol ( ) ) ) { File classFile = new File ( classFileUrl . getPath ( ) ) ; if ( ! classFile . exists ( ) ) { throw new RuntimeException ( "Unable to find path for class " + userClass . getCanonicalName ( ) + " that should be here: " + classFileUrl . toExternalForm ( ) ) ; } try { classByteCode = readStream ( new FileInputStream ( classFile ) ) ; } catch ( Exception e ) { throw new RuntimeException ( "Unable to read in " + classFile . getAbsolutePath ( ) , e ) ; } if ( classByteCode . length == 0 ) { throw new RuntimeException ( "No bytes retrieved from " + classFile . getAbsolutePath ( ) ) ; } } else if ( "jar" . equalsIgnoreCase ( classFileUrl . getProtocol ( ) ) ) { // file : / opt / mavenRepository / org / kie / tests / kie - wb - tests - base / 6.0.0 - SNAPSHOT / kie - wb - tests - base - 6.0.0 - SNAPSHOT . jar ! / org / kie / tests / wb / base / test / MyType . class String path = classFileUrl . getPath ( ) ; int bangIndex = path . indexOf ( '!' ) ; String jarPath = path . substring ( "file:" . length ( ) , bangIndex ) ; String classPath = path . substring ( bangIndex + 2 ) ; // no base / try ( ZipFile zipFile = new ZipFile ( new File ( jarPath ) ) ) { ZipEntry entry = zipFile . getEntry ( classPath ) ; InputStream zipStream = zipFile . getInputStream ( entry ) ; // the zipStream is closed as part of the readStream ( ) method classByteCode = readStream ( zipStream ) ; } catch ( Exception e ) { throw new RuntimeException ( "Unable to read from " + jarPath , e ) ; } } String pkgFolder = userClass . getPackage ( ) . toString ( ) ; // @ # $ % ing Eclipe classloader ! ! The following 2 lines " normalize " the package name from what Eclipse ( and other IDE ' s ? ) do with it pkgFolder = pkgFolder . replace ( "package " , "" ) ; pkgFolder = pkgFolder . replaceAll ( ",.+$" , "" ) ; pkgFolder = pkgFolder . replaceAll ( "\\." , "/" ) ; String classFilePath = pkgFolder + "/" + classSimpleName + ".class" ; if ( classFilePath . contains ( " " ) ) { throw new RuntimeException ( "Invalid class name ('" + classFilePath + "'), contact the developers." ) ; } kfs . write ( classFilePath , classByteCode ) ;
public class AtomEntryIterator { /** * Get next entry . */ @ Override public BlogEntry next ( ) { } }
try { final ClientEntry entry = iterator . next ( ) ; if ( entry instanceof ClientMediaEntry ) { return new AtomResource ( collection , ( ClientMediaEntry ) entry ) ; } else { return new AtomEntry ( collection , entry ) ; } } catch ( final Exception e ) { LOG . error ( "An error occured while fetching entry" , e ) ; } return null ;
public class TransactionTable { /** * TODO : consider returning null instead of throwing exception when the transaction is already completed */ public RemoteTransaction getOrCreateRemoteTransaction ( GlobalTransaction globalTx , WriteCommand [ ] modifications ) { } }
return getOrCreateRemoteTransaction ( globalTx , modifications , currentTopologyId ) ;
public class EvalVisitor { /** * Implementations for collections . */ @ Override protected SoyValue visitListLiteralNode ( ListLiteralNode node ) { } }
List < SoyValue > values = this . visitChildren ( node ) ; return ListImpl . forProviderList ( values ) ;
public class StringHelper { /** * Same as { @ link # replaceAll ( String , String , CharSequence ) } but allowing for a * < code > null < / code > new - value , which is than interpreted as an empty string * instead . * @ param sInputString * The input string where the text should be replace . If this parameter * is < code > null < / code > or empty , no replacement is done . * @ param sSearchText * The string to be replaced . May neither be < code > null < / code > nor empty . * @ param aReplacementText * The string with the replacement . May be < code > null < / code > or empty . * @ return The input string as is , if the input string is empty or if the string * to be replaced is not contained . */ public static String replaceAllSafe ( @ Nullable final String sInputString , @ Nonnull final String sSearchText , @ Nullable final CharSequence aReplacementText ) { } }
return replaceAll ( sInputString , sSearchText , getNotNull ( aReplacementText , "" ) ) ;
public class DatastoreMutationPool { /** * Adds a mutation deleting the entity with the given key . */ public void put ( Entity entity ) { } }
int bytesHere = EntityTranslator . convertToPb ( entity ) . getSerializedSize ( ) ; // Do this before the add so that we guarantee that size is never > sizeLimit if ( putsBytes + bytesHere >= params . getBytesLimit ( ) ) { flushPuts ( ) ; } putsBytes += bytesHere ; puts . add ( entity ) ; if ( puts . size ( ) >= params . getCountLimit ( ) ) { flushPuts ( ) ; }
public class AbstractPluginManager { /** * Returns a copy of plugins with that state . */ @ Override public List < PluginWrapper > getPlugins ( PluginState pluginState ) { } }
List < PluginWrapper > plugins = new ArrayList < > ( ) ; for ( PluginWrapper plugin : getPlugins ( ) ) { if ( pluginState . equals ( plugin . getPluginState ( ) ) ) { plugins . add ( plugin ) ; } } return plugins ;
public class TemplCommandIn { private Method analyse_method_exe ( String cl_name , String exe_method ) throws DevFailed { } }
Method meth = null ; try { // Get the class object for the device class StringBuffer str = new StringBuffer ( cl_name ) ; str . append ( "." ) ; str . append ( cl_name ) ; Class cl = Class . forName ( str . toString ( ) ) ; // Get the device object method list Method [ ] meth_list = cl . getDeclaredMethods ( ) ; if ( meth_list . length == 0 ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; mess . append ( ": Can't find method " ) ; mess . append ( exe_method ) ; Except . throw_exception ( "API_MethodNotFound" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } // Find the execute method in method list meth = find_method ( meth_list , exe_method ) ; // Check if it is public if ( Modifier . isPublic ( meth . getModifiers ( ) ) != true ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; mess . append ( ": The method " ) ; mess . append ( exe_method ) ; mess . append ( " is not public" ) ; Except . throw_exception ( "API_MethodArgument" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } // Check its argument Class [ ] param_type = meth . getParameterTypes ( ) ; if ( param_type . length != 1 ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; if ( param_type . length == 0 ) mess . append ( ": No argument defined for method " ) ; else mess . append ( ": More than one argument defined for method " ) ; mess . append ( exe_method ) ; Except . throw_exception ( "API_MethodArgument" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } // Analyse argument type in_type = get_tango_type ( param_type [ 0 ] ) ; // Check method return type Class ret_type = meth . getReturnType ( ) ; if ( ret_type . equals ( Void . TYPE ) != true ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; mess . append ( ": Return type defined for method " ) ; mess . append ( exe_method ) ; Except . throw_exception ( "API_MethodArgument" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } } catch ( ClassNotFoundException ex ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; mess . append ( ": Can't find class " ) ; mess . append ( cl_name ) ; Except . throw_exception ( "API_ClassNotFound" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } catch ( SecurityException ex ) { StringBuffer mess = new StringBuffer ( "Command " ) ; mess . append ( name ) ; mess . append ( ": Security violation when trying to retrieve method list for class " ) ; mess . append ( cl_name ) ; Except . throw_exception ( "API_JavaRuntimeSecurityException" , mess . toString ( ) , "TemplCommandIn.analyse_method_exe()" ) ; } // Return method reference for later use return meth ;
public class BaseSerializer { /** * Serialize the specified object , such as a { @ link Transform } , { @ link Condition } , { @ link Filter } , etc < br > * < b > NOTE : < / b > For lists use the list methods , such as { @ link # serializeTransformList ( List ) } < br > * To deserialize , use the appropriate method : { @ link # deserializeTransform ( String ) } for example . * @ param o Object to serialize * @ return String ( json / yaml ) representation of the object */ public String serialize ( Object o ) { } }
ObjectMapper om = getObjectMapper ( ) ; try { return om . writeValueAsString ( o ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class DBEntitySequenceFactory { /** * / * ( non - Javadoc ) * @ see com . dell . doradus . search . aggregate . EntitySequenceFactory # getSequence ( com . dell . doradus . common . TableDefinition , java . lang . Iterable , java . util . List , com . dell . doradus . search . aggregate . EntitySequenceOptions [ ] ) */ @ Override public < T > EntitySequence getSequence ( TableDefinition tableDef , Iterable < T > collection , List < String > fields , EntitySequenceOptions options ) { } }
if ( fields == null || fields . contains ( ALLSCALARMARK ) ) fields = ALLSCALARFIELDS ; return new DBEntityRootCollection < T > ( tableDef , fields , collection , this , tableDef . getTableName ( ) , EntitySequenceOptions . getOptions ( options , DBEntitySequenceOptions . defaultOptions ) ) ;
public class ControllersInner { /** * Gets an Azure Dev Spaces Controller . * Gets the properties for an Azure Dev Spaces Controller . * @ param resourceGroupName Resource group to which the resource belongs . * @ param name Name of the resource . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the ControllerInner object */ public Observable < ControllerInner > getByResourceGroupAsync ( String resourceGroupName , String name ) { } }
return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < ControllerInner > , ControllerInner > ( ) { @ Override public ControllerInner call ( ServiceResponse < ControllerInner > response ) { return response . body ( ) ; } } ) ;
public class FSDirectoryManager { /** * { @ inheritDoc } */ public Directory getDirectory ( final String name ) throws IOException { } }
return SecurityHelper . doPrivilegedIOExceptionAction ( new PrivilegedExceptionAction < Directory > ( ) { public Directory run ( ) throws Exception { File dir ; if ( name . equals ( "." ) ) { dir = baseDir ; } else { dir = new File ( baseDir , name ) ; } // FSDirectory itself doesnt create dirs now if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { throw new IOException ( "Cannot create directory: " + dir ) ; } } LockFactory lockFactory = ( LOCK_FACTORY_CLASS == null ) ? new NativeFSLockFactory ( ) : ( LockFactory ) LOCK_FACTORY_CLASS . newInstance ( ) ; if ( FS_DIRECTORY_CLASS == null ) { return FSDirectory . open ( dir , lockFactory ) ; } else { Constructor < ? extends FSDirectory > constructor = FS_DIRECTORY_CLASS . getConstructor ( File . class , LockFactory . class ) ; return constructor . newInstance ( dir , lockFactory ) ; } } } ) ;
public class DynamicManager { /** * Retrieve all dynamic commands * @ return Dynamic commands */ public List < ICommandBehavior > getDynamicCommands ( ) { } }
final List < ICommandBehavior > result = new ArrayList < ICommandBehavior > ( ) ; for ( final CommandImpl cmdImpl : dynamicCommands . values ( ) ) { result . add ( cmdImpl . getBehavior ( ) ) ; } return result ;
public class BELUtilities { /** * Create the provided directory , if it does not already exist . * @ param directory Path to create * @ throws RuntimeException Thrown if directory creation failed */ public static void createDirectory ( final String directory ) { } }
if ( directory == null ) return ; final File f = new File ( directory ) ; if ( ! f . isDirectory ( ) ) { if ( ! f . mkdir ( ) ) throw new RuntimeException ( "couldn't create " + directory ) ; }
public class Serializers { /** * Serializes this class into a data output . * @ param out data output * @ param serializers serializers instance * @ throws IOException if an io error occurs */ static void serialize ( DataOutput out , Serializers serializers ) throws IOException { } }
StringBuilder msg = new StringBuilder ( String . format ( "Serialize %d serializer classes:" , serializers . serializers . values ( ) . size ( ) ) ) ; int size = serializers . serializers . values ( ) . size ( ) ; out . writeInt ( size ) ; if ( size > 0 ) { for ( SerializerWrapper sw : serializers . serializers . values ( ) ) { int index = sw . index ; String name = sw . serializer . getClass ( ) . getName ( ) ; out . writeInt ( index ) ; out . writeUTF ( name ) ; msg . append ( String . format ( "%n (%d) %s" , index , name ) ) ; } LOGGER . info ( msg . toString ( ) ) ; }
public class TreeUtil { /** * Retrieves the context for the component with the given Id . * Searches visible and not visible components . * @ param root the root component to search from . * @ param id the id to search for . * @ return the context for the component with the given id , or null if not found . */ public static ComponentWithContext getComponentWithContextForId ( final WComponent root , final String id ) { } }
return getComponentWithContextForId ( root , id , false ) ;
public class SpdLongImpl { /** * combine the value of this data and other data */ public void combine ( SpdLong other ) { } }
if ( other == null ) return ; if ( stat . isEnabled ( ) && other . isEnabled ( ) ) stat . combine ( ( CountStatisticImpl ) other . getStatistic ( ) ) ;
public class DatasetSink { /** * Not thread - safe . * @ param event * @ param reuse * @ return */ private GenericRecord deserialize ( Event event , GenericRecord reuse ) throws EventDeliveryException { } }
decoder = DecoderFactory . get ( ) . binaryDecoder ( event . getBody ( ) , decoder ) ; // no checked exception is thrown in the CacheLoader DatumReader < GenericRecord > reader = readers . getUnchecked ( schema ( event ) ) ; try { return reader . read ( reuse , decoder ) ; } catch ( IOException ex ) { throw new EventDeliveryException ( "Cannot deserialize event" , ex ) ; }
public class ASpatialDb { /** * Run a generic sql string ( also multiline ) . * @ param sql the sql to run . * @ throws Exception */ public void runSql ( String sql ) throws Exception { } }
String [ ] sqlSplit = sql . split ( "\n" ) ; StringBuilder sb = new StringBuilder ( ) ; for ( String string : sqlSplit ) { String trim = string . trim ( ) ; if ( trim . length ( ) == 0 ) { continue ; } if ( trim . startsWith ( "--" ) ) { continue ; } sb . append ( trim + " " ) ; } String [ ] sqls = sb . toString ( ) . split ( ";" ) ; for ( String single : sqls ) { executeInsertUpdateDeleteSql ( single ) ; }
public class BindDataSourceSubProcessor { /** * for each method with custom bean , check if : * < ul > * < li > bean is not included in schema < / li > * < li > method must have declared with explicit JQL < / li > * < / ul > * @ param currentSchema */ private void analyzeCustomBeanForSelect ( SQLiteDatabaseSchema schema ) { } }
for ( SQLiteDaoDefinition dao : schema . getCollection ( ) ) { for ( SQLiteModelMethod method : dao . getCollection ( ) ) { if ( method . hasCustomProjection ( ) ) { SQLiteEntity entity = method . getEntity ( ) ; AssertKripton . assertTrueOrInvalidMethodSignException ( schema . getEntity ( entity . getName ( ) ) == null , method , "'%s' must be read with its DAO" , entity . getSimpleName ( ) ) ; AssertKripton . assertTrueOrInvalidMethodSignException ( method . jql . declarationType == JQLDeclarationType . JQL_EXPLICIT , method , "select with custom projection must be declared with explicit JQL" ) ; } } }
public class FakeScheduler { /** * using a validateXxx rather than a hideXxx because of https : / / issues . apache . org / jira / browse / ISIS - 1593 */ public String validateRunBackgroundCommands ( final Integer waitFor ) { } }
List < CommandJdo > commands = backgroundCommandRepository . findBackgroundCommandsNotYetStarted ( ) ; return commands . isEmpty ( ) ? "No background commands to run" : null ;
public class PreferenceActivity { /** * Obtains the elevation of the button bar , which is shown when using the activity as a wizard , * from the activity ' s theme . */ private void obtainButtonBarElevation ( ) { } }
int elevation ; try { elevation = ThemeUtil . getDimensionPixelSize ( this , R . attr . buttonBarElevation ) ; } catch ( NotFoundException e ) { elevation = getResources ( ) . getDimensionPixelSize ( R . dimen . button_bar_elevation ) ; } setButtonBarElevation ( pixelsToDp ( this , elevation ) ) ;
public class Jinx { /** * OAuth workflow , step three : Exchange request token for an access token . * < br > * After getting the verification code from the user , call this method to exchange the request token for * an access token . The returned access token can be saved and used until the user revokes access . * @ param requestToken request token to exchange for access token . * @ param verificationCode the verification code . * @ return access token . * @ throws JinxException if any parameter is null , or if there are any errors . */ public OAuthAccessToken getAccessToken ( Token requestToken , String verificationCode ) throws JinxException { } }
JinxUtils . validateParams ( requestToken , verificationCode ) ; try { Verifier verifier = new Verifier ( verificationCode ) ; Token accessToken = this . oAuthService . getAccessToken ( requestToken , verifier ) ; if ( accessToken != null ) { this . oAuthAccessToken = new OAuthAccessToken ( ) ; this . oAuthAccessToken . setOauthToken ( accessToken . getToken ( ) ) ; this . oAuthAccessToken . setOauthTokenSecret ( accessToken . getSecret ( ) ) ; // parse the raw response to get nsid , username , fullname // flickr response looks like this : // fullname = Jeremy % 20Brooks & oauth _ token = 72157632924811715 - b9b1f0bf94982fba & oauth _ token _ secret = d25a168a2e923649 & user _ nsid = 85853333%40N00 & username = Jeremy % 20Brooks StringTokenizer tok = new StringTokenizer ( accessToken . getRawResponse ( ) , "&" ) ; while ( tok . hasMoreTokens ( ) ) { String token = tok . nextToken ( ) ; int index = token . indexOf ( "=" ) ; String key = token . substring ( 0 , index ) ; String value = URLDecoder . decode ( token . substring ( index + 1 ) , "UTF-8" ) . trim ( ) ; if ( key . equals ( "fullname" ) ) { this . oAuthAccessToken . setFullname ( value ) ; } else if ( key . equals ( "user_nsid" ) ) { this . oAuthAccessToken . setNsid ( value ) ; } else if ( key . equals ( "username" ) ) { this . oAuthAccessToken . setUsername ( value ) ; } } } } catch ( Exception e ) { throw new JinxException ( "Error while getting access token." , e ) ; } return this . oAuthAccessToken ;
public class MapRow { /** * { @ inheritDoc } */ @ Override public String getString ( String name ) { } }
Object value = getObject ( name ) ; String result ; if ( value instanceof byte [ ] ) { result = new String ( ( byte [ ] ) value ) ; } else { result = ( String ) value ; } return ( result ) ;
public class PolicyChecker { /** * Processes certificate policies in the certificate . * @ param certIndex the index of the certificate * @ param initPolicies the initial policies required by the user * @ param explicitPolicy an integer which indicates if a non - null * valid policy tree is required * @ param policyMapping an integer which indicates if policy * mapping is inhibited * @ param inhibitAnyPolicy an integer which indicates whether * " any - policy " is considered a match * @ param rejectPolicyQualifiers a boolean indicating whether the * user wants to reject policies that have qualifiers * @ param origRootNode the root node of the valid policy tree * @ param currCert the Certificate to be processed * @ param finalCert a boolean indicating whether currCert is the final * cert in the cert path * @ return the root node of the valid policy tree after modification * @ exception CertPathValidatorException Exception thrown if an * error occurs while processing policies . */ static PolicyNodeImpl processPolicies ( int certIndex , Set < String > initPolicies , int explicitPolicy , int policyMapping , int inhibitAnyPolicy , boolean rejectPolicyQualifiers , PolicyNodeImpl origRootNode , X509CertImpl currCert , boolean finalCert ) throws CertPathValidatorException { } }
boolean policiesCritical = false ; List < PolicyInformation > policyInfo ; PolicyNodeImpl rootNode = null ; Set < PolicyQualifierInfo > anyQuals = new HashSet < > ( ) ; if ( origRootNode == null ) rootNode = null ; else rootNode = origRootNode . copyTree ( ) ; // retrieve policyOIDs from currCert CertificatePoliciesExtension currCertPolicies = currCert . getCertificatePoliciesExtension ( ) ; // PKIX : Section 6.1.3 : Step ( d ) if ( ( currCertPolicies != null ) && ( rootNode != null ) ) { policiesCritical = currCertPolicies . isCritical ( ) ; if ( debug != null ) debug . println ( "PolicyChecker.processPolicies() " + "policiesCritical = " + policiesCritical ) ; try { policyInfo = currCertPolicies . get ( CertificatePoliciesExtension . POLICIES ) ; } catch ( IOException ioe ) { throw new CertPathValidatorException ( "Exception while " + "retrieving policyOIDs" , ioe ) ; } if ( debug != null ) debug . println ( "PolicyChecker.processPolicies() " + "rejectPolicyQualifiers = " + rejectPolicyQualifiers ) ; boolean foundAnyPolicy = false ; // process each policy in cert for ( PolicyInformation curPolInfo : policyInfo ) { String curPolicy = curPolInfo . getPolicyIdentifier ( ) . getIdentifier ( ) . toString ( ) ; if ( curPolicy . equals ( ANY_POLICY ) ) { foundAnyPolicy = true ; anyQuals = curPolInfo . getPolicyQualifiers ( ) ; } else { // PKIX : Section 6.1.3 : Step ( d ) ( 1) if ( debug != null ) debug . println ( "PolicyChecker.processPolicies() " + "processing policy: " + curPolicy ) ; // retrieve policy qualifiers from cert Set < PolicyQualifierInfo > pQuals = curPolInfo . getPolicyQualifiers ( ) ; // reject cert if we find critical policy qualifiers and // the policyQualifiersRejected flag is set in the params if ( ! pQuals . isEmpty ( ) && rejectPolicyQualifiers && policiesCritical ) { throw new CertPathValidatorException ( "critical policy qualifiers present in certificate" , null , null , - 1 , PKIXReason . INVALID_POLICY ) ; } // PKIX : Section 6.1.3 : Step ( d ) ( 1 ) ( i ) boolean foundMatch = processParents ( certIndex , policiesCritical , rejectPolicyQualifiers , rootNode , curPolicy , pQuals , false ) ; if ( ! foundMatch ) { // PKIX : Section 6.1.3 : Step ( d ) ( 1 ) ( ii ) processParents ( certIndex , policiesCritical , rejectPolicyQualifiers , rootNode , curPolicy , pQuals , true ) ; } } } // PKIX : Section 6.1.3 : Step ( d ) ( 2) if ( foundAnyPolicy ) { if ( ( inhibitAnyPolicy > 0 ) || ( ! finalCert && X509CertImpl . isSelfIssued ( currCert ) ) ) { if ( debug != null ) { debug . println ( "PolicyChecker.processPolicies() " + "processing policy: " + ANY_POLICY ) ; } processParents ( certIndex , policiesCritical , rejectPolicyQualifiers , rootNode , ANY_POLICY , anyQuals , true ) ; } } // PKIX : Section 6.1.3 : Step ( d ) ( 3) rootNode . prune ( certIndex ) ; if ( ! rootNode . getChildren ( ) . hasNext ( ) ) { rootNode = null ; } } else if ( currCertPolicies == null ) { if ( debug != null ) debug . println ( "PolicyChecker.processPolicies() " + "no policies present in cert" ) ; // PKIX : Section 6.1.3 : Step ( e ) rootNode = null ; } // We delay PKIX : Section 6.1.3 : Step ( f ) to the end // because the code that follows may delete some nodes // resulting in a null tree if ( rootNode != null ) { if ( ! finalCert ) { // PKIX : Section 6.1.4 : Steps ( a ) - ( b ) rootNode = processPolicyMappings ( currCert , certIndex , policyMapping , rootNode , policiesCritical , anyQuals ) ; } } // At this point , we optimize the PKIX algorithm by // removing those nodes which would later have // been removed by PKIX : Section 6.1.5 : Step ( g ) ( iii ) if ( ( rootNode != null ) && ( ! initPolicies . contains ( ANY_POLICY ) ) && ( currCertPolicies != null ) ) { rootNode = removeInvalidNodes ( rootNode , certIndex , initPolicies , currCertPolicies ) ; // PKIX : Section 6.1.5 : Step ( g ) ( iii ) if ( ( rootNode != null ) && finalCert ) { // rewrite anyPolicy leaf nodes ( see method comments ) rootNode = rewriteLeafNodes ( certIndex , initPolicies , rootNode ) ; } } if ( finalCert ) { // PKIX : Section 6.1.5 : Steps ( a ) and ( b ) explicitPolicy = mergeExplicitPolicy ( explicitPolicy , currCert , finalCert ) ; } // PKIX : Section 6.1.3 : Step ( f ) // verify that either explicit policy is greater than 0 or // the valid _ policy _ tree is not equal to NULL if ( ( explicitPolicy == 0 ) && ( rootNode == null ) ) { throw new CertPathValidatorException ( "non-null policy tree required and policy tree is null" , null , null , - 1 , PKIXReason . INVALID_POLICY ) ; } return rootNode ;
public class FunctionConfigurationEnvironmentMarshaller { /** * Marshall the given parameter object . */ public void marshall ( FunctionConfigurationEnvironment functionConfigurationEnvironment , ProtocolMarshaller protocolMarshaller ) { } }
if ( functionConfigurationEnvironment == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( functionConfigurationEnvironment . getAccessSysfs ( ) , ACCESSSYSFS_BINDING ) ; protocolMarshaller . marshall ( functionConfigurationEnvironment . getExecution ( ) , EXECUTION_BINDING ) ; protocolMarshaller . marshall ( functionConfigurationEnvironment . getResourceAccessPolicies ( ) , RESOURCEACCESSPOLICIES_BINDING ) ; protocolMarshaller . marshall ( functionConfigurationEnvironment . getVariables ( ) , VARIABLES_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CleverTapAPI { /** * Push a profile update . * @ param profile A { @ link Map } , with keys as strings , and values as { @ link String } , * { @ link Integer } , { @ link Long } , { @ link Boolean } , { @ link Float } , { @ link Double } , * { @ link java . util . Date } , or { @ link Character } */ @ SuppressWarnings ( { } }
"unused" , "WeakerAccess" } ) public void pushProfile ( final Map < String , Object > profile ) { if ( profile == null || profile . isEmpty ( ) ) return ; postAsyncSafely ( "profilePush" , new Runnable ( ) { @ Override public void run ( ) { _push ( profile ) ; } } ) ;
public class BucketConfigurationXmlFactory { /** * Converts the specified notification configuration into an XML byte array . * @ param notificationConfiguration * The configuration to convert . * @ return The XML byte array representation . */ public byte [ ] convertToXmlByteArray ( BucketNotificationConfiguration notificationConfiguration ) { } }
XmlWriter xml = new XmlWriter ( ) ; xml . start ( "NotificationConfiguration" , "xmlns" , Constants . XML_NAMESPACE ) ; Map < String , NotificationConfiguration > configurations = notificationConfiguration . getConfigurations ( ) ; for ( Map . Entry < String , NotificationConfiguration > entry : configurations . entrySet ( ) ) { String configName = entry . getKey ( ) ; NotificationConfiguration config = entry . getValue ( ) ; if ( config instanceof TopicConfiguration ) { xml . start ( "TopicConfiguration" ) ; xml . start ( "Id" ) . value ( configName ) . end ( ) ; xml . start ( "Topic" ) . value ( ( ( TopicConfiguration ) config ) . getTopicARN ( ) ) . end ( ) ; addEventsAndFilterCriteria ( xml , config ) ; xml . end ( ) ; } else if ( config instanceof QueueConfiguration ) { xml . start ( "QueueConfiguration" ) ; xml . start ( "Id" ) . value ( configName ) . end ( ) ; xml . start ( "Queue" ) . value ( ( ( QueueConfiguration ) config ) . getQueueARN ( ) ) . end ( ) ; addEventsAndFilterCriteria ( xml , config ) ; xml . end ( ) ; } else if ( config instanceof CloudFunctionConfiguration ) { xml . start ( "CloudFunctionConfiguration" ) ; xml . start ( "Id" ) . value ( configName ) . end ( ) ; xml . start ( "InvocationRole" ) . value ( ( ( CloudFunctionConfiguration ) config ) . getInvocationRoleARN ( ) ) . end ( ) ; xml . start ( "CloudFunction" ) . value ( ( ( CloudFunctionConfiguration ) config ) . getCloudFunctionARN ( ) ) . end ( ) ; addEventsAndFilterCriteria ( xml , config ) ; xml . end ( ) ; } else if ( config instanceof LambdaConfiguration ) { xml . start ( "CloudFunctionConfiguration" ) ; xml . start ( "Id" ) . value ( configName ) . end ( ) ; xml . start ( "CloudFunction" ) . value ( ( ( LambdaConfiguration ) config ) . getFunctionARN ( ) ) . end ( ) ; addEventsAndFilterCriteria ( xml , config ) ; xml . end ( ) ; } } xml . end ( ) ; return xml . getBytes ( ) ;
public class Node { /** * Guava Functions */ public static Function < Node , String > toDotFunction ( ) { } }
return new Function < Node , String > ( ) { @ Override public String apply ( Node input ) { return input . toDot ( ) ; } } ;
public class PLRenderHelper { /** * Render a single border * @ param aElement * The element currently rendered . May not be < code > null < / code > . * @ param aContentStream * Content stream * @ param fLeft * Left position ( including left border width ) * @ param fTop * Top position ( including top border width ) * @ param fWidth * Width ( excluding left and right border width ) * @ param fHeight * Height ( excluding top and bottom border width ) * @ param aBorder * Border to use . May not be < code > null < / code > . * @ throws IOException * In case of a PDFBox error */ public static void renderBorder ( @ Nonnull final IPLObject < ? > aElement , @ Nonnull final PDPageContentStreamWithCache aContentStream , final float fLeft , final float fTop , final float fWidth , final float fHeight , @ Nonnull final BorderSpec aBorder ) throws IOException { } }
final float fRight = fLeft + fWidth ; final float fBottom = fTop - fHeight ; if ( aBorder . hasAllBorders ( ) && aBorder . areAllBordersEqual ( ) ) { // draw full rect final BorderStyleSpec aAll = aBorder . getLeft ( ) ; // The border position must be in the middle of the line final float fLineWidth = aAll . getLineWidth ( ) ; final float fHalfLineWidth = fLineWidth / 2f ; if ( PLDebugLog . isDebugRender ( ) ) PLDebugLog . debugRender ( aElement , "Border around " + PLDebugLog . getXYWH ( fLeft , fTop , fWidth , fHeight ) + " with line width " + fLineWidth ) ; aContentStream . setStrokingColor ( aAll . getColor ( ) ) ; aContentStream . setLineDashPattern ( aAll . getLineDashPattern ( ) ) ; aContentStream . setLineWidth ( fLineWidth ) ; aContentStream . addRect ( fLeft + fHalfLineWidth , fBottom + fHalfLineWidth , fWidth - fLineWidth , fHeight - fLineWidth ) ; aContentStream . stroke ( ) ; } else if ( aBorder . hasAnyBorder ( ) ) { // partially final BorderStyleSpec aTop = aBorder . getTop ( ) ; final BorderStyleSpec aRight = aBorder . getRight ( ) ; final BorderStyleSpec aBottom = aBorder . getBottom ( ) ; final BorderStyleSpec aLeft = aBorder . getLeft ( ) ; final float fTopWidth = aTop == null ? 0 : aTop . getLineWidth ( ) ; final float fRightWidth = aRight == null ? 0 : aRight . getLineWidth ( ) ; final float fBottomWidth = aBottom == null ? 0 : aBottom . getLineWidth ( ) ; final float fLeftWidth = aLeft == null ? 0 : aLeft . getLineWidth ( ) ; if ( aTop != null ) { if ( PLDebugLog . isDebugRender ( ) ) PLDebugLog . debugRender ( aElement , "Border top " + PLDebugLog . getXYWH ( fLeft , fTop , fWidth , 0 ) + " with line width " + fTopWidth ) ; final float fDelta = fTopWidth / 2f ; aContentStream . setStrokingColor ( aTop . getColor ( ) ) ; aContentStream . setLineDashPattern ( aTop . getLineDashPattern ( ) ) ; aContentStream . setLineWidth ( fTopWidth ) ; aContentStream . drawLine ( fLeft , fTop - fDelta , fRight - fRightWidth , fTop - fDelta ) ; } if ( aRight != null ) { if ( PLDebugLog . isDebugRender ( ) ) PLDebugLog . debugRender ( aElement , "Border right " + PLDebugLog . getXYWH ( fRight , fTop , 0 , fHeight ) + " with line width " + fRightWidth ) ; final float fDelta = fRightWidth / 2f ; aContentStream . setStrokingColor ( aRight . getColor ( ) ) ; aContentStream . setLineDashPattern ( aRight . getLineDashPattern ( ) ) ; aContentStream . setLineWidth ( fRightWidth ) ; aContentStream . drawLine ( fRight - fDelta , fTop , fRight - fDelta , fBottom + fBottomWidth ) ; } if ( aBottom != null ) { if ( PLDebugLog . isDebugRender ( ) ) PLDebugLog . debugRender ( aElement , "Border bottom " + PLDebugLog . getXYWH ( fLeft , fBottom , fWidth , 0 ) + " with line width " + fBottomWidth ) ; final float fDelta = fBottomWidth / 2f ; aContentStream . setStrokingColor ( aBottom . getColor ( ) ) ; aContentStream . setLineDashPattern ( aBottom . getLineDashPattern ( ) ) ; aContentStream . setLineWidth ( fBottomWidth ) ; aContentStream . drawLine ( fLeft + fLeftWidth , fBottom + fDelta , fRight , fBottom + fDelta ) ; } if ( aLeft != null ) { if ( PLDebugLog . isDebugRender ( ) ) PLDebugLog . debugRender ( aElement , "Border left " + PLDebugLog . getXYWH ( fLeft , fTop , 0 , fHeight ) + " with line width " + fLeftWidth ) ; final float fDelta = fLeftWidth / 2f ; aContentStream . setStrokingColor ( aLeft . getColor ( ) ) ; aContentStream . setLineDashPattern ( aLeft . getLineDashPattern ( ) ) ; aContentStream . setLineWidth ( fLeftWidth ) ; aContentStream . drawLine ( fLeft + fDelta , fTop - fTopWidth , fLeft + fDelta , fBottom ) ; } aContentStream . stroke ( ) ; }
public class GPARCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setXCENT ( Integer newXCENT ) { } }
Integer oldXCENT = xcent ; xcent = newXCENT ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . GPARC__XCENT , oldXCENT , xcent ) ) ;
public class MDMoleculeCustomizer { /** * Customize Molecule . */ @ Override public void customize ( IAtomContainer molecule , Object nodeToAdd ) throws Exception { } }
if ( ! ( nodeToAdd instanceof CMLMolecule ) ) throw new CDKException ( "NodeToAdd must be of type nu.xom.Element!" ) ; // The nodeToAdd CMLMolecule molToCustomize = ( CMLMolecule ) nodeToAdd ; if ( ( molecule instanceof MDMolecule ) ) { MDMolecule mdmol = ( MDMolecule ) molecule ; molToCustomize . setConvention ( "md:mdMolecule" ) ; molToCustomize . addNamespaceDeclaration ( "md" , "http://www.bioclipse.net/mdmolecule/" ) ; // Residues if ( mdmol . getResidues ( ) . size ( ) > 0 ) { Iterator it = mdmol . getResidues ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Residue residue = ( Residue ) it . next ( ) ; int number = residue . getNumber ( ) ; CMLMolecule resMol = new CMLMolecule ( ) ; resMol . setDictRef ( "md:residue" ) ; resMol . setTitle ( residue . getName ( ) ) ; // Append resNo CMLScalar residueNumber = new CMLScalar ( number ) ; residueNumber . addAttribute ( new Attribute ( "dictRef" , "md:resNumber" ) ) ; resMol . addScalar ( residueNumber ) ; // prefix for residue atom id String rprefix = "r" + number ; // Append atoms CMLAtomArray ar = new CMLAtomArray ( ) ; for ( int i = 0 ; i < residue . getAtomCount ( ) ; i ++ ) { CMLAtom cmlAtom = new CMLAtom ( ) ; // System . out . println ( " atom ID : " + residue . getAtom ( i ) . getID ( ) ) ; // cmlAtom . addAttribute ( new Attribute ( " ref " , residue . getAtom ( i ) . getID ( ) ) ) ; // the next thing is better , but throws an exception // setRef to keep consistent usage // setId to satisfy Jumbo 54 . need for all atoms to have id cmlAtom . setRef ( residue . getAtom ( i ) . getID ( ) ) ; cmlAtom . setId ( rprefix + "_" + residue . getAtom ( i ) . getID ( ) ) ; ar . addAtom ( cmlAtom ) ; } resMol . addAtomArray ( ar ) ; molToCustomize . appendChild ( resMol ) ; } } // Chargegroups if ( mdmol . getChargeGroups ( ) . size ( ) > 0 ) { Iterator it = mdmol . getChargeGroups ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { ChargeGroup chargeGroup = ( ChargeGroup ) it . next ( ) ; int number = chargeGroup . getNumber ( ) ; // FIXME : persist the ChargeGroup CMLMolecule cgMol = new CMLMolecule ( ) ; cgMol . setDictRef ( "md:chargeGroup" ) ; // etc : add name , refs to atoms etc // Append chgrpNo CMLScalar cgNo = new CMLScalar ( number ) ; cgNo . addAttribute ( new Attribute ( "dictRef" , "md:cgNumber" ) ) ; cgMol . appendChild ( cgNo ) ; // prefix for residue atom id String cprefix = "cg" + number ; // Append atoms from chargeGroup as it is an AC CMLAtomArray ar = new CMLAtomArray ( ) ; for ( int i = 0 ; i < chargeGroup . getAtomCount ( ) ; i ++ ) { CMLAtom cmlAtom = new CMLAtom ( ) ; // setRef to keep consistent usage // setId to satisfy Jumbo 5.4 need for all atoms to have id cmlAtom . setRef ( chargeGroup . getAtom ( i ) . getID ( ) ) ; cmlAtom . setId ( cprefix + "_" + chargeGroup . getAtom ( i ) . getID ( ) ) ; // Append switching atom ? if ( chargeGroup . getAtom ( i ) . equals ( chargeGroup . getSwitchingAtom ( ) ) ) { CMLScalar scalar = new CMLScalar ( ) ; scalar . setDictRef ( "md:switchingAtom" ) ; cmlAtom . addScalar ( scalar ) ; } ar . addAtom ( cmlAtom ) ; } cgMol . addAtomArray ( ar ) ; molToCustomize . appendChild ( cgMol ) ; } } }
public class NavigationPresenter { /** * { @ inheritDoc } */ @ Override public void initializeViewParts ( ) { } }
initializeTreeItems ( ) ; setSelectedCategory ( model . getDisplayedCategory ( ) ) ; searchHandler . init ( model , navigationView . searchFld . textProperty ( ) , navigationView . rootItem . predicateProperty ( ) ) ; setupCellValueFactory ( ) ;
public class DL4JResources { /** * Get the URL relative to the base URL as a String . < br > * For example , if baseURL is " http : / / blob . deeplearning4j . org / " , and relativeToBase is " / datasets / iris . dat " * this simply returns " http : / / blob . deeplearning4j . org / datasets / iris . dat " * @ param relativeToBase Relative URL * @ return URL * @ throws MalformedURLException For bad URL */ public static String getURLString ( String relativeToBase ) { } }
if ( relativeToBase . startsWith ( "/" ) ) { relativeToBase = relativeToBase . substring ( 1 ) ; } return baseURL + relativeToBase ;
public class BatchDeletePhoneNumberRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BatchDeletePhoneNumberRequest batchDeletePhoneNumberRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( batchDeletePhoneNumberRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchDeletePhoneNumberRequest . getPhoneNumberIds ( ) , PHONENUMBERIDS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Maps2 { /** * Creates a { @ code LinkedHashMap } instance , with a high enough " initial capacity " that it < i > should < / i > hold * { @ code expectedSize } elements without growth . This behavior cannot be broadly guaranteed , but it is observed to * be true for OpenJDK 1.6 . It also can ' t be guaranteed that the method isn ' t inadvertently < i > oversizing < / i > the * returned map . * @ param expectedSize * the number of elements you expect to add to the returned map * @ return a new , empty { @ code LinkedHashMap } with enough capacity to hold { @ code expectedSize } elements without resizing * @ throws IllegalArgumentException * if { @ code expectedSize } is negative */ public static < K , V > LinkedHashMap < K , V > newLinkedHashMapWithExpectedSize ( int expectedSize ) { } }
return new LinkedHashMap < K , V > ( capacity ( expectedSize ) ) { private static final long serialVersionUID = 1L ; @ Override public void clear ( ) { if ( isEmpty ( ) ) return ; super . clear ( ) ; } } ;
public class ColorSpaces { /** * Tests whether an ICC color profile is equal to the default sRGB profile . * @ param profile the ICC profile to test . May not be { @ code null } . * @ return { @ code true } if { @ code profile } is equal to the default sRGB profile . * @ throws IllegalArgumentException if { @ code profile } is { @ code null } * @ see java . awt . color . ColorSpace # isCS _ sRGB ( ) */ public static boolean isCS_sRGB ( final ICC_Profile profile ) { } }
Validate . notNull ( profile , "profile" ) ; return profile . getColorSpaceType ( ) == ColorSpace . TYPE_RGB && Arrays . equals ( getProfileHeaderWithProfileId ( profile ) , sRGB . header ) ;
public class CreateTagOptionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateTagOptionRequest createTagOptionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createTagOptionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createTagOptionRequest . getKey ( ) , KEY_BINDING ) ; protocolMarshaller . marshall ( createTagOptionRequest . getValue ( ) , VALUE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class InternalSARLParser { /** * InternalSARL . g : 2244:1 : ruleCapacityMember returns [ EObject current = null ] : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? ( ( lv _ name _ 11_0 = ruleFunctionID ) ) ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? ) ; */ public final EObject ruleCapacityMember ( ) throws RecognitionException { } }
EObject current = null ; Token otherlv_6 = null ; Token otherlv_8 = null ; Token otherlv_10 = null ; Token otherlv_12 = null ; Token otherlv_14 = null ; Token otherlv_16 = null ; Token otherlv_17 = null ; Token otherlv_21 = null ; Token otherlv_23 = null ; Token otherlv_25 = null ; Token otherlv_27 = null ; Token otherlv_29 = null ; Token otherlv_31 = null ; Token otherlv_34 = null ; EObject lv_annotations_1_0 = null ; AntlrDatatypeRuleToken lv_modifiers_3_0 = null ; AntlrDatatypeRuleToken lv_modifiers_4_0 = null ; AntlrDatatypeRuleToken lv_modifiers_5_0 = null ; EObject lv_typeParameters_7_0 = null ; EObject lv_typeParameters_9_0 = null ; AntlrDatatypeRuleToken lv_name_11_0 = null ; EObject lv_parameters_13_0 = null ; EObject lv_parameters_15_0 = null ; EObject lv_returnType_18_0 = null ; EObject lv_returnType_19_0 = null ; EObject lv_exceptions_22_0 = null ; EObject lv_exceptions_24_0 = null ; EObject lv_firedEvents_26_0 = null ; EObject lv_firedEvents_28_0 = null ; EObject lv_typeParameters_30_0 = null ; EObject lv_typeParameters_32_0 = null ; EObject lv_expression_33_0 = null ; enterRule ( ) ; try { // InternalSARL . g : 2250:2 : ( ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? ( ( lv _ name _ 11_0 = ruleFunctionID ) ) ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? ) ) // InternalSARL . g : 2251:2 : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? ( ( lv _ name _ 11_0 = ruleFunctionID ) ) ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? ) { // InternalSARL . g : 2251:2 : ( ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? ( ( lv _ name _ 11_0 = ruleFunctionID ) ) ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? ) // InternalSARL . g : 2252:3 : ( ) ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * ( ) ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? ( ( lv _ name _ 11_0 = ruleFunctionID ) ) ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? { // InternalSARL . g : 2252:3 : ( ) // InternalSARL . g : 2253:4: { if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getCapacityMemberAccess ( ) . getXtendMemberAction_0 ( ) , current ) ; } } // InternalSARL . g : 2259:3 : ( ( lv _ annotations _ 1_0 = ruleXAnnotation ) ) * loop64 : do { int alt64 = 2 ; int LA64_0 = input . LA ( 1 ) ; if ( ( LA64_0 == 105 ) ) { alt64 = 1 ; } switch ( alt64 ) { case 1 : // InternalSARL . g : 2260:4 : ( lv _ annotations _ 1_0 = ruleXAnnotation ) { // InternalSARL . g : 2260:4 : ( lv _ annotations _ 1_0 = ruleXAnnotation ) // InternalSARL . g : 2261:5 : lv _ annotations _ 1_0 = ruleXAnnotation { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getAnnotationsXAnnotationParserRuleCall_1_0 ( ) ) ; } pushFollow ( FOLLOW_55 ) ; lv_annotations_1_0 = ruleXAnnotation ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "annotations" , lv_annotations_1_0 , "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotation" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop64 ; } } while ( true ) ; // InternalSARL . g : 2278:3 : ( ) // InternalSARL . g : 2279:4: { if ( state . backtracking == 0 ) { current = forceCreateModelElementAndSet ( grammarAccess . getCapacityMemberAccess ( ) . getSarlActionAnnotationInfoAction_2 ( ) , current ) ; } } // InternalSARL . g : 2285:3 : ( ( lv _ modifiers _ 3_0 = ruleCommonModifier ) ) * loop65 : do { int alt65 = 2 ; int LA65_0 = input . LA ( 1 ) ; if ( ( LA65_0 == 25 || ( LA65_0 >= 78 && LA65_0 <= 89 ) ) ) { alt65 = 1 ; } switch ( alt65 ) { case 1 : // InternalSARL . g : 2286:4 : ( lv _ modifiers _ 3_0 = ruleCommonModifier ) { // InternalSARL . g : 2286:4 : ( lv _ modifiers _ 3_0 = ruleCommonModifier ) // InternalSARL . g : 2287:5 : lv _ modifiers _ 3_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_3_0 ( ) ) ; } pushFollow ( FOLLOW_55 ) ; lv_modifiers_3_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_3_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop65 ; } } while ( true ) ; // InternalSARL . g : 2304:3 : ( ( lv _ modifiers _ 4_0 = ruleMethodModifier ) ) // InternalSARL . g : 2305:4 : ( lv _ modifiers _ 4_0 = ruleMethodModifier ) { // InternalSARL . g : 2305:4 : ( lv _ modifiers _ 4_0 = ruleMethodModifier ) // InternalSARL . g : 2306:5 : lv _ modifiers _ 4_0 = ruleMethodModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getModifiersMethodModifierParserRuleCall_4_0 ( ) ) ; } pushFollow ( FOLLOW_56 ) ; lv_modifiers_4_0 = ruleMethodModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_4_0 , "org.eclipse.xtend.core.Xtend.MethodModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2323:3 : ( ( lv _ modifiers _ 5_0 = ruleCommonModifier ) ) * loop66 : do { int alt66 = 2 ; int LA66_0 = input . LA ( 1 ) ; if ( ( LA66_0 == 25 || ( LA66_0 >= 78 && LA66_0 <= 89 ) ) ) { alt66 = 1 ; } switch ( alt66 ) { case 1 : // InternalSARL . g : 2324:4 : ( lv _ modifiers _ 5_0 = ruleCommonModifier ) { // InternalSARL . g : 2324:4 : ( lv _ modifiers _ 5_0 = ruleCommonModifier ) // InternalSARL . g : 2325:5 : lv _ modifiers _ 5_0 = ruleCommonModifier { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getModifiersCommonModifierParserRuleCall_5_0 ( ) ) ; } pushFollow ( FOLLOW_56 ) ; lv_modifiers_5_0 = ruleCommonModifier ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "modifiers" , lv_modifiers_5_0 , "org.eclipse.xtend.core.Xtend.CommonModifier" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; default : break loop66 ; } } while ( true ) ; // InternalSARL . g : 2342:3 : ( otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' ) ? int alt68 = 2 ; int LA68_0 = input . LA ( 1 ) ; if ( ( LA68_0 == 40 ) ) { int LA68_1 = input . LA ( 2 ) ; if ( ( LA68_1 == RULE_ID || LA68_1 == 44 || ( LA68_1 >= 92 && LA68_1 <= 95 ) ) ) { alt68 = 1 ; } } switch ( alt68 ) { case 1 : // InternalSARL . g : 2343:4 : otherlv _ 6 = ' < ' ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * otherlv _ 10 = ' > ' { otherlv_6 = ( Token ) match ( input , 40 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_6 , grammarAccess . getCapacityMemberAccess ( ) . getLessThanSignKeyword_6_0 ( ) ) ; } // InternalSARL . g : 2347:4 : ( ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2348:5 : ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2348:5 : ( lv _ typeParameters _ 7_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2349:6 : lv _ typeParameters _ 7_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_6_1_0 ( ) ) ; } pushFollow ( FOLLOW_28 ) ; lv_typeParameters_7_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_7_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2366:4 : ( otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) ) * loop67 : do { int alt67 = 2 ; int LA67_0 = input . LA ( 1 ) ; if ( ( LA67_0 == 32 ) ) { alt67 = 1 ; } switch ( alt67 ) { case 1 : // InternalSARL . g : 2367:5 : otherlv _ 8 = ' , ' ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) { otherlv_8 = ( Token ) match ( input , 32 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_8 , grammarAccess . getCapacityMemberAccess ( ) . getCommaKeyword_6_2_0 ( ) ) ; } // InternalSARL . g : 2371:5 : ( ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2372:6 : ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2372:6 : ( lv _ typeParameters _ 9_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2373:7 : lv _ typeParameters _ 9_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_6_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_28 ) ; lv_typeParameters_9_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_9_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop67 ; } } while ( true ) ; otherlv_10 = ( Token ) match ( input , 41 , FOLLOW_56 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_10 , grammarAccess . getCapacityMemberAccess ( ) . getGreaterThanSignKeyword_6_3 ( ) ) ; } } break ; } // InternalSARL . g : 2396:3 : ( ( lv _ name _ 11_0 = ruleFunctionID ) ) // InternalSARL . g : 2397:4 : ( lv _ name _ 11_0 = ruleFunctionID ) { // InternalSARL . g : 2397:4 : ( lv _ name _ 11_0 = ruleFunctionID ) // InternalSARL . g : 2398:5 : lv _ name _ 11_0 = ruleFunctionID { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getNameFunctionIDParserRuleCall_7_0 ( ) ) ; } pushFollow ( FOLLOW_57 ) ; lv_name_11_0 = ruleFunctionID ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } set ( current , "name" , lv_name_11_0 , "org.eclipse.xtend.core.Xtend.FunctionID" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2415:3 : ( otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' ) ? int alt71 = 2 ; int LA71_0 = input . LA ( 1 ) ; if ( ( LA71_0 == 49 ) ) { alt71 = 1 ; } switch ( alt71 ) { case 1 : // InternalSARL . g : 2416:4 : otherlv _ 12 = ' ( ' ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? otherlv _ 16 = ' ) ' { otherlv_12 = ( Token ) match ( input , 49 , FOLLOW_50 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_12 , grammarAccess . getCapacityMemberAccess ( ) . getLeftParenthesisKeyword_8_0 ( ) ) ; } // InternalSARL . g : 2420:4 : ( ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * ) ? int alt70 = 2 ; int LA70_0 = input . LA ( 1 ) ; if ( ( LA70_0 == RULE_ID || ( LA70_0 >= 44 && LA70_0 <= 45 ) || ( LA70_0 >= 92 && LA70_0 <= 95 ) || LA70_0 == 105 ) ) { alt70 = 1 ; } switch ( alt70 ) { case 1 : // InternalSARL . g : 2421:5 : ( ( lv _ parameters _ 13_0 = ruleParameter ) ) ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * { // InternalSARL . g : 2421:5 : ( ( lv _ parameters _ 13_0 = ruleParameter ) ) // InternalSARL . g : 2422:6 : ( lv _ parameters _ 13_0 = ruleParameter ) { // InternalSARL . g : 2422:6 : ( lv _ parameters _ 13_0 = ruleParameter ) // InternalSARL . g : 2423:7 : lv _ parameters _ 13_0 = ruleParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getParametersParameterParserRuleCall_8_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_parameters_13_0 = ruleParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "parameters" , lv_parameters_13_0 , "io.sarl.lang.SARL.Parameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2440:5 : ( otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) ) * loop69 : do { int alt69 = 2 ; int LA69_0 = input . LA ( 1 ) ; if ( ( LA69_0 == 32 ) ) { alt69 = 1 ; } switch ( alt69 ) { case 1 : // InternalSARL . g : 2441:6 : otherlv _ 14 = ' , ' ( ( lv _ parameters _ 15_0 = ruleParameter ) ) { otherlv_14 = ( Token ) match ( input , 32 , FOLLOW_52 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_14 , grammarAccess . getCapacityMemberAccess ( ) . getCommaKeyword_8_1_1_0 ( ) ) ; } // InternalSARL . g : 2445:6 : ( ( lv _ parameters _ 15_0 = ruleParameter ) ) // InternalSARL . g : 2446:7 : ( lv _ parameters _ 15_0 = ruleParameter ) { // InternalSARL . g : 2446:7 : ( lv _ parameters _ 15_0 = ruleParameter ) // InternalSARL . g : 2447:8 : lv _ parameters _ 15_0 = ruleParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getParametersParameterParserRuleCall_8_1_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_51 ) ; lv_parameters_15_0 = ruleParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "parameters" , lv_parameters_15_0 , "io.sarl.lang.SARL.Parameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop69 ; } } while ( true ) ; } break ; } otherlv_16 = ( Token ) match ( input , 50 , FOLLOW_58 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_16 , grammarAccess . getCapacityMemberAccess ( ) . getRightParenthesisKeyword_8_2 ( ) ) ; } } break ; } // InternalSARL . g : 2471:3 : ( otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) ) ? int alt73 = 2 ; int LA73_0 = input . LA ( 1 ) ; if ( ( LA73_0 == 46 ) ) { alt73 = 1 ; } switch ( alt73 ) { case 1 : // InternalSARL . g : 2472:4 : otherlv _ 17 = ' : ' ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) { otherlv_17 = ( Token ) match ( input , 46 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_17 , grammarAccess . getCapacityMemberAccess ( ) . getColonKeyword_9_0 ( ) ) ; } // InternalSARL . g : 2476:4 : ( ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) | ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) ) int alt72 = 2 ; alt72 = dfa72 . predict ( input ) ; switch ( alt72 ) { case 1 : // InternalSARL . g : 2477:5 : ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) { // InternalSARL . g : 2477:5 : ( ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) ) // InternalSARL . g : 2478:6 : ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) { // InternalSARL . g : 2478:6 : ( lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs ) // InternalSARL . g : 2479:7 : lv _ returnType _ 18_0 = ruleTypeReferenceWithTypeArgs { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getReturnTypeTypeReferenceWithTypeArgsParserRuleCall_9_1_0_0 ( ) ) ; } pushFollow ( FOLLOW_59 ) ; lv_returnType_18_0 = ruleTypeReferenceWithTypeArgs ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } set ( current , "returnType" , lv_returnType_18_0 , "org.eclipse.xtend.core.Xtend.TypeReferenceWithTypeArgs" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; case 2 : // InternalSARL . g : 2497:5 : ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) { // InternalSARL . g : 2497:5 : ( ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) ) // InternalSARL . g : 2498:6 : ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) { // InternalSARL . g : 2498:6 : ( lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs ) // InternalSARL . g : 2499:7 : lv _ returnType _ 19_0 = ruleTypeReferenceNoTypeArgs { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getReturnTypeTypeReferenceNoTypeArgsParserRuleCall_9_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_59 ) ; lv_returnType_19_0 = ruleTypeReferenceNoTypeArgs ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } set ( current , "returnType" , lv_returnType_19_0 , "org.eclipse.xtend.core.Xtend.TypeReferenceNoTypeArgs" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; } } break ; } // InternalSARL . g : 2518:3 : ( ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) ) // InternalSARL . g : 2519:4 : ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) { // InternalSARL . g : 2519:4 : ( ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) ) // InternalSARL . g : 2520:5 : ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) { getUnorderedGroupHelper ( ) . enter ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) ) ; // InternalSARL . g : 2523:5 : ( ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * ) // InternalSARL . g : 2524:6 : ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * { // InternalSARL . g : 2524:6 : ( ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) | ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) ) * loop77 : do { int alt77 = 4 ; int LA77_0 = input . LA ( 1 ) ; if ( LA77_0 == 51 && getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 0 ) ) { alt77 = 1 ; } else if ( LA77_0 == 53 && getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 1 ) ) { alt77 = 2 ; } else if ( LA77_0 == 52 && getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 2 ) ) { alt77 = 3 ; } switch ( alt77 ) { case 1 : // InternalSARL . g : 2525:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) { // InternalSARL . g : 2525:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) // InternalSARL . g : 2526:5 : { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) { if ( ! getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 0 ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "getUnorderedGroupHelper().canSelect(grammarAccess.getCapacityMemberAccess().getUnorderedGroup_10(), 0)" ) ; } // InternalSARL . g : 2526:112 : ( ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) ) // InternalSARL . g : 2527:6 : ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) { getUnorderedGroupHelper ( ) . select ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 0 ) ; // InternalSARL . g : 2530:9 : ( { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) ) // InternalSARL . g : 2530:10 : { . . . } ? = > ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) { if ( ! ( ( true ) ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "true" ) ; } // InternalSARL . g : 2530:19 : ( otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * ) // InternalSARL . g : 2530:20 : otherlv _ 21 = ' throws ' ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * { otherlv_21 = ( Token ) match ( input , 51 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_21 , grammarAccess . getCapacityMemberAccess ( ) . getThrowsKeyword_10_0_0 ( ) ) ; } // InternalSARL . g : 2534:9 : ( ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2535:10 : ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2535:10 : ( lv _ exceptions _ 22_0 = ruleJvmTypeReference ) // InternalSARL . g : 2536:11 : lv _ exceptions _ 22_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getExceptionsJvmTypeReferenceParserRuleCall_10_0_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_exceptions_22_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "exceptions" , lv_exceptions_22_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2553:9 : ( otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) ) * loop74 : do { int alt74 = 2 ; int LA74_0 = input . LA ( 1 ) ; if ( ( LA74_0 == 32 ) ) { alt74 = 1 ; } switch ( alt74 ) { case 1 : // InternalSARL . g : 2554:10 : otherlv _ 23 = ' , ' ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) { otherlv_23 = ( Token ) match ( input , 32 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_23 , grammarAccess . getCapacityMemberAccess ( ) . getCommaKeyword_10_0_2_0 ( ) ) ; } // InternalSARL . g : 2558:10 : ( ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2559:11 : ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2559:11 : ( lv _ exceptions _ 24_0 = ruleJvmTypeReference ) // InternalSARL . g : 2560:12 : lv _ exceptions _ 24_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getExceptionsJvmTypeReferenceParserRuleCall_10_0_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_exceptions_24_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "exceptions" , lv_exceptions_24_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop74 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . returnFromSelection ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) ) ; } } } break ; case 2 : // InternalSARL . g : 2584:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) { // InternalSARL . g : 2584:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) ) // InternalSARL . g : 2585:5 : { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) { if ( ! getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 1 ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "getUnorderedGroupHelper().canSelect(grammarAccess.getCapacityMemberAccess().getUnorderedGroup_10(), 1)" ) ; } // InternalSARL . g : 2585:112 : ( ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) ) // InternalSARL . g : 2586:6 : ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) { getUnorderedGroupHelper ( ) . select ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 1 ) ; // InternalSARL . g : 2589:9 : ( { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) ) // InternalSARL . g : 2589:10 : { . . . } ? = > ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) { if ( ! ( ( true ) ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "true" ) ; } // InternalSARL . g : 2589:19 : ( otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * ) // InternalSARL . g : 2589:20 : otherlv _ 25 = ' fires ' ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * { otherlv_25 = ( Token ) match ( input , 53 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_25 , grammarAccess . getCapacityMemberAccess ( ) . getFiresKeyword_10_1_0 ( ) ) ; } // InternalSARL . g : 2593:9 : ( ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2594:10 : ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2594:10 : ( lv _ firedEvents _ 26_0 = ruleJvmTypeReference ) // InternalSARL . g : 2595:11 : lv _ firedEvents _ 26_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getFiredEventsJvmTypeReferenceParserRuleCall_10_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_firedEvents_26_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "firedEvents" , lv_firedEvents_26_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2612:9 : ( otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) ) * loop75 : do { int alt75 = 2 ; int LA75_0 = input . LA ( 1 ) ; if ( ( LA75_0 == 32 ) ) { alt75 = 1 ; } switch ( alt75 ) { case 1 : // InternalSARL . g : 2613:10 : otherlv _ 27 = ' , ' ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) { otherlv_27 = ( Token ) match ( input , 32 , FOLLOW_41 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_27 , grammarAccess . getCapacityMemberAccess ( ) . getCommaKeyword_10_1_2_0 ( ) ) ; } // InternalSARL . g : 2617:10 : ( ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) ) // InternalSARL . g : 2618:11 : ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) { // InternalSARL . g : 2618:11 : ( lv _ firedEvents _ 28_0 = ruleJvmTypeReference ) // InternalSARL . g : 2619:12 : lv _ firedEvents _ 28_0 = ruleJvmTypeReference { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getFiredEventsJvmTypeReferenceParserRuleCall_10_1_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_firedEvents_28_0 = ruleJvmTypeReference ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "firedEvents" , lv_firedEvents_28_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeReference" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop75 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . returnFromSelection ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) ) ; } } } break ; case 3 : // InternalSARL . g : 2643:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) { // InternalSARL . g : 2643:4 : ( { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) ) // InternalSARL . g : 2644:5 : { . . . } ? = > ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) { if ( ! getUnorderedGroupHelper ( ) . canSelect ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 2 ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "getUnorderedGroupHelper().canSelect(grammarAccess.getCapacityMemberAccess().getUnorderedGroup_10(), 2)" ) ; } // InternalSARL . g : 2644:112 : ( ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) ) // InternalSARL . g : 2645:6 : ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) { getUnorderedGroupHelper ( ) . select ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) , 2 ) ; // InternalSARL . g : 2648:9 : ( { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) ) // InternalSARL . g : 2648:10 : { . . . } ? = > ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) { if ( ! ( ( true ) ) ) { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } throw new FailedPredicateException ( input , "ruleCapacityMember" , "true" ) ; } // InternalSARL . g : 2648:19 : ( otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * ) // InternalSARL . g : 2648:20 : otherlv _ 29 = ' with ' ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * { otherlv_29 = ( Token ) match ( input , 52 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_29 , grammarAccess . getCapacityMemberAccess ( ) . getWithKeyword_10_2_0 ( ) ) ; } // InternalSARL . g : 2652:9 : ( ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2653:10 : ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2653:10 : ( lv _ typeParameters _ 30_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2654:11 : lv _ typeParameters _ 30_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_10_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_typeParameters_30_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_30_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalSARL . g : 2671:9 : ( otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) ) * loop76 : do { int alt76 = 2 ; int LA76_0 = input . LA ( 1 ) ; if ( ( LA76_0 == 32 ) ) { alt76 = 1 ; } switch ( alt76 ) { case 1 : // InternalSARL . g : 2672:10 : otherlv _ 31 = ' , ' ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) { otherlv_31 = ( Token ) match ( input , 32 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_31 , grammarAccess . getCapacityMemberAccess ( ) . getCommaKeyword_10_2_2_0 ( ) ) ; } // InternalSARL . g : 2676:10 : ( ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) ) // InternalSARL . g : 2677:11 : ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) { // InternalSARL . g : 2677:11 : ( lv _ typeParameters _ 32_0 = ruleJvmTypeParameter ) // InternalSARL . g : 2678:12 : lv _ typeParameters _ 32_0 = ruleJvmTypeParameter { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getTypeParametersJvmTypeParameterParserRuleCall_10_2_2_1_0 ( ) ) ; } pushFollow ( FOLLOW_60 ) ; lv_typeParameters_32_0 = ruleJvmTypeParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } add ( current , "typeParameters" , lv_typeParameters_32_0 , "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop76 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . returnFromSelection ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) ) ; } } } break ; default : break loop77 ; } } while ( true ) ; } } getUnorderedGroupHelper ( ) . leave ( grammarAccess . getCapacityMemberAccess ( ) . getUnorderedGroup_10 ( ) ) ; } // InternalSARL . g : 2709:3 : ( ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) | otherlv _ 34 = ' ; ' ) ? int alt78 = 3 ; int LA78_0 = input . LA ( 1 ) ; if ( ( LA78_0 == 29 ) ) { alt78 = 1 ; } else if ( ( LA78_0 == 26 ) ) { alt78 = 2 ; } switch ( alt78 ) { case 1 : // InternalSARL . g : 2710:4 : ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) { // InternalSARL . g : 2710:4 : ( ( lv _ expression _ 33_0 = ruleXBlockExpression ) ) // InternalSARL . g : 2711:5 : ( lv _ expression _ 33_0 = ruleXBlockExpression ) { // InternalSARL . g : 2711:5 : ( lv _ expression _ 33_0 = ruleXBlockExpression ) // InternalSARL . g : 2712:6 : lv _ expression _ 33_0 = ruleXBlockExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getCapacityMemberAccess ( ) . getExpressionXBlockExpressionParserRuleCall_11_0_0 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; lv_expression_33_0 = ruleXBlockExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getCapacityMemberRule ( ) ) ; } set ( current , "expression" , lv_expression_33_0 , "org.eclipse.xtext.xbase.Xbase.XBlockExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; case 2 : // InternalSARL . g : 2730:4 : otherlv _ 34 = ' ; ' { otherlv_34 = ( Token ) match ( input , 26 , FOLLOW_2 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_34 , grammarAccess . getCapacityMemberAccess ( ) . getSemicolonKeyword_11_1 ( ) ) ; } } break ; } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
public class UpdateTarget { /** * A list of operations supported by the maintenance track . * @ param supportedOperations * A list of operations supported by the maintenance track . */ public void setSupportedOperations ( java . util . Collection < SupportedOperation > supportedOperations ) { } }
if ( supportedOperations == null ) { this . supportedOperations = null ; return ; } this . supportedOperations = new com . amazonaws . internal . SdkInternalList < SupportedOperation > ( supportedOperations ) ;
public class GenerateJsonSchemaMojo { /** * Generate JSON schema for given POJO * @ param clazz POJO class */ private void generateSchema ( Class clazz ) { } }
try { File targetFile = new File ( getGeneratedResourcesDirectory ( ) , clazz . getName ( ) + ".json" ) ; getLog ( ) . info ( "Generate JSON schema: " + targetFile . getName ( ) ) ; SchemaFactoryWrapper schemaFactory = new SchemaFactoryWrapper ( ) ; OBJECT_MAPPER . acceptJsonFormatVisitor ( OBJECT_MAPPER . constructType ( clazz ) , schemaFactory ) ; JsonSchema jsonSchema = schemaFactory . finalSchema ( ) ; OBJECT_MAPPER . writerWithDefaultPrettyPrinter ( ) . writeValue ( targetFile , jsonSchema ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; }
public class StatementManager { /** * bind a Query based Select Statement */ public int bindStatement ( PreparedStatement stmt , Query query , ClassDescriptor cld , int param ) throws SQLException { } }
int result ; result = bindStatement ( stmt , query . getCriteria ( ) , cld , param ) ; result = bindStatement ( stmt , query . getHavingCriteria ( ) , cld , result ) ; return result ;
public class Ui { /** * Get the attribute have enabled value * Form android styles namespace * @ param attrs AttributeSet * @ param attribute The attribute to retrieve * @ param defaultValue What to return if the attribute isn ' t found * @ return Resulting value */ public static boolean isTrueFromAttribute ( AttributeSet attrs , String attribute , boolean defaultValue ) { } }
return attrs . getAttributeBooleanValue ( Ui . androidStyleNameSpace , attribute , defaultValue ) ;
public class JmsBytesMessageImpl { /** * Read a signed 64 - bit integer from the stream message . * @ return the next eight bytes from the stream message , interpreted as * a < code > long < / code > . * @ exception MessageNotReadableException if message in write - only mode . * @ exception MessageEOFException if end of message stream * @ exception JMSException if JMS fails to read message due to * some internal JMS error . */ @ Override public long readLong ( ) throws JMSException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readLong" ) ; try { // Check that we are in read mode checkBodyReadable ( "readLong" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Mark the current position , so we can return to it if there ' s an error readStream . mark ( 8 ) ; // the argument appears to be ignored long result = readStream . readLong ( ) ; // Byte swap the long if required if ( integerEncoding == ApiJmsConstants . ENC_INTEGER_REVERSED ) { result = Long . reverseBytes ( result ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "readLong" , result ) ; return result ; } catch ( IOException e ) { try { readStream . reset ( ) ; } catch ( IOException e2 ) { } throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "EXCEPTION_RECEIVED_CWSIA0190" , new Object [ ] { e , "JmsBytesMessageImpl.readLong" } , e , "JmsBytesMessageImpl.readLong#1" , this , tc ) ; }
public class BaseRegistrationScreen { /** * SetupUserProperties Method . */ public RunRemoteProcessMessageData setupUserProperties ( Map < String , Object > properties ) { } }
try { Record recUser = this . getMainRecord ( ) ; String processClassName = ( String ) properties . get ( RunRemoteProcessMessageData . PROCESS_CLASS_NAME ) ; // Step 1 - Get the web site prefix String sitePrefix = ( String ) properties . get ( MenusMessageData . SITE_PREFIX ) ; String fullSitePrefix = sitePrefix ; String strDomain = ( String ) properties . get ( DBParams . DOMAIN ) ; if ( strDomain == null ) { strDomain = this . getProperty ( DBParams . DOMAIN ) ; if ( ( strDomain == null ) || ( strDomain . length ( ) == 0 ) ) strDomain = DEFAULT_DOMAIN ; if ( strDomain . indexOf ( '.' ) != strDomain . lastIndexOf ( '.' ) ) strDomain = strDomain . substring ( strDomain . indexOf ( '.' ) + 1 ) ; } String homeMenu = ( String ) properties . get ( MenusMessageData . SITE_HOME_MENU ) ; // Next , Create a main site menu for this new domain . Record recMenus = this . getRecord ( Menus . MENUS_FILE ) ; recMenus . addNew ( ) ; String siteTemplate = ( String ) properties . get ( SITE_TEMPLATE_CODE_PARAM ) ; recMenus . getField ( Menus . CODE ) . setString ( siteTemplate ) ; int iOldOrder = recMenus . getDefaultOrder ( ) ; recMenus . setKeyArea ( Menus . CODE_KEY ) ; BaseBuffer buffer = null ; if ( recMenus . seek ( null ) ) { buffer = new VectorBuffer ( null ) ; buffer . fieldsToBuffer ( recMenus ) ; } else return null ; // Error - Site template does not exist recMenus . setKeyArea ( iOldOrder ) ; recMenus . addNew ( ) ; if ( buffer != null ) // Always buffer . bufferToFields ( recMenus , DBConstants . DISPLAY , DBConstants . INIT_MOVE ) ; recMenus . getField ( Menus . SEQUENCE ) . setValue ( 100 ) ; String siteNameTemplate = ( String ) properties . get ( SITE_NAME_TEMPLATE_PARAM ) ; if ( siteNameTemplate == null ) siteNameTemplate = "{0}''s Demo site" ; String siteName = MessageFormat . format ( siteNameTemplate , sitePrefix . toUpperCase ( ) . substring ( 0 , 1 ) + sitePrefix . substring ( 1 ) ) ; recMenus . getField ( Menus . NAME ) . setString ( siteName ) ; ( ( PropertiesField ) recMenus . getField ( Menus . PARAMS ) ) . setProperty ( MAIN_USER_PARAM , recUser . getField ( UserInfo . USER_NAME ) . toString ( ) ) ; String templateArchivePath = ( ( PropertiesField ) recMenus . getField ( Menus . PARAMS ) ) . getProperty ( DBConstants . USER_ARCHIVE_FOLDER ) ; if ( ( templateArchivePath == null ) || ( templateArchivePath . length ( ) == 0 ) ) templateArchivePath = Utility . addToPath ( DEFAULT_ARCHIVE_FOLDER , CURRENT_TEST_DATA_DIR ) ; int iErrorCode = DBConstants . DUPLICATE_KEY ; int iCounter = 0 ; while ( iErrorCode == DBConstants . DUPLICATE_KEY ) { try { fullSitePrefix = sitePrefix ; if ( iCounter > 0 ) fullSitePrefix += Integer . toString ( iCounter ) ; recMenus . getField ( Menus . CODE ) . setString ( fullSitePrefix + '.' + strDomain ) ; recMenus . add ( ) ; iErrorCode = DBConstants . NORMAL_RETURN ; } catch ( DBException ex ) { iErrorCode = ex . getErrorCode ( ) ; if ( iErrorCode != DBConstants . DUPLICATE_KEY ) { ex . printStackTrace ( ) ; return null ; // Error } iCounter ++ ; if ( iCounter >= 100 ) break ; } } // Now we have this user ' s domain : sitePrefix // Update the user ' s account to show they own this new domain if ( iErrorCode == DBConstants . NORMAL_RETURN ) { iOldOrder = recUser . getDefaultOrder ( ) ; recUser . setKeyArea ( UserInfo . ID_KEY ) ; recUser . edit ( ) ; ( ( PropertiesField ) recUser . getField ( UserInfo . PROPERTIES ) ) . setProperty ( MenusMessageData . DOMAIN_NAME , recMenus . getField ( Menus . CODE ) . toString ( ) ) ; ( ( PropertiesField ) recUser . getField ( UserInfo . PROPERTIES ) ) . setProperty ( DBParams . HOME , homeMenu ) ; recUser . set ( ) ; recUser . setKeyArea ( iOldOrder ) ; } TreeMessage message = new TreeMessage ( null , null ) ; RunRemoteProcessMessageData runRemoteProcessRequest = new RunRemoteProcessMessageData ( message , null ) ; CreateSiteMessageData createSiteRequest = new CreateSiteMessageData ( runRemoteProcessRequest , null ) ; runRemoteProcessRequest . addMessageDataDesc ( createSiteRequest ) ; MessageRecordDesc userInfoMessageData = ( MessageRecordDesc ) createSiteRequest . getMessageDataDesc ( UserInfo . USER_INFO_FILE ) ; MessageRecordDesc menusMessageData = ( MessageRecordDesc ) createSiteRequest . getMessageDataDesc ( Menus . MENUS_FILE ) ; String user = this . getProperty ( DBParams . USER_NAME ) ; String auth = this . getProperty ( DBParams . AUTH_TOKEN ) ; runRemoteProcessRequest . put ( RunRemoteProcessMessageData . PROCESS_CLASS_NAME , processClassName ) ; runRemoteProcessRequest . put ( DBParams . USER_NAME , user ) ; runRemoteProcessRequest . put ( DBParams . AUTH_TOKEN , auth ) ; userInfoMessageData . putRawRecordData ( recUser ) ; // User , password menusMessageData . put ( MenusMessageData . DOMAIN_NAME , fullSitePrefix + '.' + strDomain ) ; menusMessageData . put ( MenusMessageData . SITE_PREFIX , fullSitePrefix ) ; menusMessageData . put ( MenusMessageData . SITE_NAME , siteName ) ; menusMessageData . put ( MenusMessageData . XSL_TEMPLATE_PATH , templateArchivePath ) ; menusMessageData . put ( MenusMessageData . SITE_TEMPLATE_MENU , siteTemplate ) ; menusMessageData . put ( MenusMessageData . SITE_HOME_MENU , homeMenu ) ; return runRemoteProcessRequest ; } catch ( DBException ex ) { return null ; }
public class ScrollableLayout { /** * Helper method to animate scroll state of ScrollableLayout . * Please note , that returned { @ link ValueAnimator } is not fully configured - * it needs at least ` duration ` property . * Also , there is no checks if the current scrollY is equal to the requested one . * @ param scrollY the final scroll y to animate to * @ return { @ link ValueAnimator } configured to animate scroll state */ public ValueAnimator animateScroll ( final int scrollY ) { } }
// create an instance of this animator that is shared between calls if ( mManualScrollAnimator == null ) { mManualScrollAnimator = ValueAnimator . ofFloat ( .0F , 1.F ) ; mManualScrollAnimator . setEvaluator ( new FloatEvaluator ( ) ) ; mManualScrollAnimator . addListener ( new SelfUpdateAnimationListener ( ) ) ; } else { // unregister our update listener if ( mManualScrollUpdateListener != null ) { mManualScrollAnimator . removeUpdateListener ( mManualScrollUpdateListener ) ; } // cancel if running if ( mManualScrollAnimator . isRunning ( ) ) { mManualScrollAnimator . end ( ) ; } } final int y ; if ( scrollY < 0 ) { y = 0 ; } else if ( scrollY > mMaxScrollY ) { y = mMaxScrollY ; } else { y = scrollY ; } final int startY = getScrollY ( ) ; final int diff = y - startY ; mManualScrollUpdateListener = new ValueAnimator . AnimatorUpdateListener ( ) { @ Override public void onAnimationUpdate ( ValueAnimator animation ) { final float fraction = animation . getAnimatedFraction ( ) ; scrollTo ( 0 , ( int ) ( startY + ( diff * fraction ) + .5F ) ) ; } } ; mManualScrollAnimator . addUpdateListener ( mManualScrollUpdateListener ) ; return mManualScrollAnimator ;
public class FeatureIO { /** * Takes a two - dimensional double array with features and writes them in a binary file . * @ param featuresFileName * The binary file ' s name . * @ param features * The features . * @ throws Exception */ public static void writeBinary ( String featuresFileName , double [ ] [ ] features ) throws Exception { } }
DataOutputStream out = new DataOutputStream ( new BufferedOutputStream ( new FileOutputStream ( featuresFileName ) ) ) ; for ( int i = 0 ; i < features . length ; i ++ ) { for ( int j = 0 ; j < features [ i ] . length ; j ++ ) { out . writeDouble ( features [ i ] [ j ] ) ; } } out . close ( ) ;
public class ApacheMultipartParser { /** * Retrieves the file name from the < code > Content - disposition < / code > * header . * @ param headers A < code > Map < / code > containing the HTTP request headers . * @ return The file name for the current < code > encapsulation < / code > . */ private String getFileName ( Map /* String , String */ headers ) { } }
String fileName = null ; String cd = getHeader ( headers , CONTENT_DISPOSITION ) ; if ( cd != null ) { String cdl = cd . toLowerCase ( ) ; if ( cdl . startsWith ( FORM_DATA ) || cdl . startsWith ( ATTACHMENT ) ) { ParameterParser parser = new ParameterParser ( ) ; parser . setLowerCaseNames ( true ) ; // Parameter parser can handle null input Map params = parser . parse ( cd , ';' ) ; if ( params . containsKey ( "filename" ) ) { fileName = ( String ) params . get ( "filename" ) ; if ( fileName != null ) { fileName = fileName . trim ( ) ; // IE7 returning fullpath name ( # 300920) if ( fileName . indexOf ( '\\' ) != - 1 ) { fileName = fileName . substring ( fileName . lastIndexOf ( '\\' ) + 1 ) ; } } else { // Even if there is no value , the parameter is present , // so we return an empty file name rather than no file // name . fileName = "" ; } } } } return fileName ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link GridFunctionType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link GridFunctionType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "GridFunction" ) public JAXBElement < GridFunctionType > createGridFunction ( GridFunctionType value ) { } }
return new JAXBElement < GridFunctionType > ( _GridFunction_QNAME , GridFunctionType . class , null , value ) ;
public class MethodCall { /** * Gets an attribute attached to a call . Attributes are arbitrary contextual * objects attached to a call . * @ param key * attribute key / name * @ return attached attribute or null if there is none */ public Object getAttribute ( String key ) { } }
Object result ; if ( attributes == null ) { result = null ; } else { result = attributes . get ( key ) ; } return result ;
public class ProxyBuilder { /** * hence this cast is safe . */ @ SuppressWarnings ( "unchecked" ) private static < T > Constructor < T > [ ] getConstructorsToOverwrite ( Class < T > clazz ) { } }
return ( Constructor < T > [ ] ) clazz . getDeclaredConstructors ( ) ;