code
stringlengths
130
281k
code_dependency
stringlengths
182
306k
public class class_name { static public HashMap getErrorCodes ( Class clazz ) { HashMap map = new HashMap(23); // Use reflection to populte the erroCodeMap to have the reverse mapping // of error codes to symbolic names. Field flds[] = clazz.getDeclaredFields(); for (int i = 0; i < flds.length; i++) { int mods = flds[i].getModifiers(); if (Modifier.isFinal(mods) && Modifier.isStatic(mods) && Modifier.isPublic(mods)) { try { map.put(flds[i].get(null), flds[i].getName()); } catch (Throwable t) { // NOPMD // ignore this. } } } return map; } }
public class class_name { static public HashMap getErrorCodes ( Class clazz ) { HashMap map = new HashMap(23); // Use reflection to populte the erroCodeMap to have the reverse mapping // of error codes to symbolic names. Field flds[] = clazz.getDeclaredFields(); for (int i = 0; i < flds.length; i++) { int mods = flds[i].getModifiers(); if (Modifier.isFinal(mods) && Modifier.isStatic(mods) && Modifier.isPublic(mods)) { try { map.put(flds[i].get(null), flds[i].getName()); // depends on control dependency: [try], data = [none] } catch (Throwable t) { // NOPMD // ignore this. } // depends on control dependency: [catch], data = [none] } } return map; } }
public class class_name { public JavaSrcTextBuffer printCommentLinesWithIndent(final String text) { final String[] splitted = text.split("\n", -1); for (final String aSplitted : splitted) { this.indent().print("// ").println(aSplitted); } return this; } }
public class class_name { public JavaSrcTextBuffer printCommentLinesWithIndent(final String text) { final String[] splitted = text.split("\n", -1); for (final String aSplitted : splitted) { this.indent().print("// ").println(aSplitted); } return this; // depends on control dependency: [for], data = [none] } }
public class class_name { @Override protected void doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, Object expressionResult, IElementTagStructureHandler structureHandler) { // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ // <span la:errors="sea"/> // || // vv // <span class="errors" th:each="er : ${errors.part('sea')}" th:text="is required"/> // || // vv // <span class="errors">is required</span> // <span class="errors">is funny</span> // ... // _/_/_/_/_/_/_/_/_/_/ final String specifiedValue = expressionResult.toString(); structureHandler.setAttribute("class", prepareOverridingStyle(tag)); final String eachValue; if ("all".equalsIgnoreCase(specifiedValue)) { eachValue = "er : ${errors.all}"; } else { eachValue = "er : ${errors.part('" + specifiedValue + "')}"; } structureHandler.setAttribute("th:each", eachValue); structureHandler.setAttribute("th:text", "${er.message}"); } }
public class class_name { @Override protected void doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, Object expressionResult, IElementTagStructureHandler structureHandler) { // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ // <span la:errors="sea"/> // || // vv // <span class="errors" th:each="er : ${errors.part('sea')}" th:text="is required"/> // || // vv // <span class="errors">is required</span> // <span class="errors">is funny</span> // ... // _/_/_/_/_/_/_/_/_/_/ final String specifiedValue = expressionResult.toString(); structureHandler.setAttribute("class", prepareOverridingStyle(tag)); final String eachValue; if ("all".equalsIgnoreCase(specifiedValue)) { eachValue = "er : ${errors.all}"; } else { eachValue = "er : ${errors.part('" + specifiedValue + "')}"; } structureHandler.setAttribute("th:each", eachValue); // depends on control dependency: [if], data = [none] structureHandler.setAttribute("th:text", "${er.message}"); // depends on control dependency: [if], data = [none] } }
public class class_name { public DescribeComplianceByConfigRuleResult withComplianceByConfigRules(ComplianceByConfigRule... complianceByConfigRules) { if (this.complianceByConfigRules == null) { setComplianceByConfigRules(new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>(complianceByConfigRules.length)); } for (ComplianceByConfigRule ele : complianceByConfigRules) { this.complianceByConfigRules.add(ele); } return this; } }
public class class_name { public DescribeComplianceByConfigRuleResult withComplianceByConfigRules(ComplianceByConfigRule... complianceByConfigRules) { if (this.complianceByConfigRules == null) { setComplianceByConfigRules(new com.amazonaws.internal.SdkInternalList<ComplianceByConfigRule>(complianceByConfigRules.length)); // depends on control dependency: [if], data = [none] } for (ComplianceByConfigRule ele : complianceByConfigRules) { this.complianceByConfigRules.add(ele); // depends on control dependency: [for], data = [ele] } return this; } }
public class class_name { public static byte[] fileToBytes(Object testClass, String relativePath) { try { URL url = testClass.getClass().getResource(relativePath); if (url == null) { throw new FileNotFoundException(relativePath); } return Files.readAllBytes(Paths.get(url.toURI())); } catch (IOException | URISyntaxException ex) { throw new IllegalStateException(ex); } } }
public class class_name { public static byte[] fileToBytes(Object testClass, String relativePath) { try { URL url = testClass.getClass().getResource(relativePath); if (url == null) { throw new FileNotFoundException(relativePath); } return Files.readAllBytes(Paths.get(url.toURI())); // depends on control dependency: [try], data = [none] } catch (IOException | URISyntaxException ex) { throw new IllegalStateException(ex); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public void setTagsToAdd(java.util.Collection<Tag> tagsToAdd) { if (tagsToAdd == null) { this.tagsToAdd = null; return; } this.tagsToAdd = new com.amazonaws.internal.SdkInternalList<Tag>(tagsToAdd); } }
public class class_name { public void setTagsToAdd(java.util.Collection<Tag> tagsToAdd) { if (tagsToAdd == null) { this.tagsToAdd = null; // depends on control dependency: [if], data = [none] return; // depends on control dependency: [if], data = [none] } this.tagsToAdd = new com.amazonaws.internal.SdkInternalList<Tag>(tagsToAdd); } }
public class class_name { public void writeClassFields(CodeType codeType) { try { ClassInfo classInfo = (ClassInfo)this.getRecord(ClassInfo.CLASS_INFO_FILE); boolean hasAnInterface = classInfo.isARecord(false); Record recClassFields = this.getRecord(ClassFields.CLASS_FIELDS_FILE); recClassFields.close(); while (recClassFields.hasNext()) { recClassFields.next(); if (!((IncludeScopeField)recClassFields.getField(ClassFields.INCLUDE_SCOPE)).includeThis(codeType, hasAnInterface)) continue; String strFieldName = recClassFields.getField(ClassFields.CLASS_FIELD_NAME).getString(); String strFieldClass = recClassFields.getField(ClassFields.CLASS_FIELD_CLASS).getString(); String strReference = ""; String strClassFieldType = recClassFields.getField(ClassFields.CLASS_FIELDS_TYPE).toString(); if ((strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_FIELD)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.NATIVE_FIELD)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_NAME)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.SCREEN_CLASS_NAME))) if (strFieldName.length() != 0) { if (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_FIELD)) strReference = " = null"; else strReference = ""; String strProtection = "protected"; if (recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).getString().equalsIgnoreCase("S")) strProtection = "protected static"; // Static member function else if (!recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).isNull()) strProtection = recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).toString(); String strInitialValue = ""; String strAssignmentOperator = " = "; if ("enum".equals(strFieldClass)) strAssignmentOperator = " "; if (!recClassFields.getField(ClassFields.CLASS_FIELD_INITIAL_VALUE).isNull()) strInitialValue = strAssignmentOperator + recClassFields.getField(ClassFields.CLASS_FIELD_INITIAL_VALUE).toString(); if ((strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_NAME)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.SCREEN_CLASS_NAME))) { if (recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).isNull()) strProtection = "public static final"; // Default ClassInfo recClassInfo2 = new ClassInfo(this); recClassInfo2.setKeyArea(ClassInfo.CLASS_NAME_KEY); recClassInfo2.getField(ClassInfo.CLASS_NAME).setString(strFieldClass); // Class of this record if (recClassInfo2.seek("=")) { strInitialValue = " = \"" + recClassInfo2.getFullClassName() + "\""; strFieldClass = "String"; } } m_StreamOut.writeit(strProtection + " " + strFieldClass + " " + strFieldName + strReference + strInitialValue + ";\n"); } } recClassFields.close(); } catch (DBException ex) { ex.printStackTrace(); } } }
public class class_name { public void writeClassFields(CodeType codeType) { try { ClassInfo classInfo = (ClassInfo)this.getRecord(ClassInfo.CLASS_INFO_FILE); boolean hasAnInterface = classInfo.isARecord(false); Record recClassFields = this.getRecord(ClassFields.CLASS_FIELDS_FILE); recClassFields.close(); // depends on control dependency: [try], data = [none] while (recClassFields.hasNext()) { recClassFields.next(); // depends on control dependency: [while], data = [none] if (!((IncludeScopeField)recClassFields.getField(ClassFields.INCLUDE_SCOPE)).includeThis(codeType, hasAnInterface)) continue; String strFieldName = recClassFields.getField(ClassFields.CLASS_FIELD_NAME).getString(); String strFieldClass = recClassFields.getField(ClassFields.CLASS_FIELD_CLASS).getString(); String strReference = ""; String strClassFieldType = recClassFields.getField(ClassFields.CLASS_FIELDS_TYPE).toString(); if ((strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_FIELD)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.NATIVE_FIELD)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_NAME)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.SCREEN_CLASS_NAME))) if (strFieldName.length() != 0) { if (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_FIELD)) strReference = " = null"; else strReference = ""; String strProtection = "protected"; if (recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).getString().equalsIgnoreCase("S")) strProtection = "protected static"; // Static member function else if (!recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).isNull()) strProtection = recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).toString(); String strInitialValue = ""; String strAssignmentOperator = " = "; if ("enum".equals(strFieldClass)) strAssignmentOperator = " "; if (!recClassFields.getField(ClassFields.CLASS_FIELD_INITIAL_VALUE).isNull()) strInitialValue = strAssignmentOperator + recClassFields.getField(ClassFields.CLASS_FIELD_INITIAL_VALUE).toString(); if ((strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.CLASS_NAME)) || (strClassFieldType.equalsIgnoreCase(ClassFieldsTypeField.SCREEN_CLASS_NAME))) { if (recClassFields.getField(ClassFields.CLASS_FIELD_PROTECT).isNull()) strProtection = "public static final"; // Default ClassInfo recClassInfo2 = new ClassInfo(this); recClassInfo2.setKeyArea(ClassInfo.CLASS_NAME_KEY); // depends on control dependency: [if], data = [none] recClassInfo2.getField(ClassInfo.CLASS_NAME).setString(strFieldClass); // Class of this record // depends on control dependency: [if], data = [none] if (recClassInfo2.seek("=")) { strInitialValue = " = \"" + recClassInfo2.getFullClassName() + "\""; strFieldClass = "String"; // depends on control dependency: [if], data = [none] } } m_StreamOut.writeit(strProtection + " " + strFieldClass + " " + strFieldName + strReference + strInitialValue + ";\n"); // depends on control dependency: [if], data = [none] } } recClassFields.close(); // depends on control dependency: [try], data = [none] } catch (DBException ex) { ex.printStackTrace(); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public void setTerms(java.util.Collection<Term> terms) { if (terms == null) { this.terms = null; return; } this.terms = new java.util.ArrayList<Term>(terms); } }
public class class_name { public void setTerms(java.util.Collection<Term> terms) { if (terms == null) { this.terms = null; // depends on control dependency: [if], data = [none] return; // depends on control dependency: [if], data = [none] } this.terms = new java.util.ArrayList<Term>(terms); } }
public class class_name { private ISMgr findInstanceStateManager(Object instance) { Class<?> clazz = typeDescriptor.getReloadableType().getClazz(); try { Field fieldAccessorField = clazz.getField(Constants.fInstanceFieldsName); if (fieldAccessorField == null) { throw new IllegalStateException("Cant find field accessor for type " + clazz.getName()); } ISMgr stateManager = (ISMgr) fieldAccessorField.get(instance); if (stateManager == null) { // Looks to not have been initialized yet, this can happen if a non standard ctor was used. // We could push this step into the generated ctors... ISMgr instanceStateManager = new ISMgr(instance, typeDescriptor.getReloadableType()); fieldAccessorField.set(instance, instanceStateManager); stateManager = (ISMgr) fieldAccessorField.get(instance); // For some reason it didn't stick! if (stateManager == null) { throw new IllegalStateException("The class '" + clazz.getName() + "' has a null instance state manager object, instance is " + instance); } } return stateManager; } catch (Exception e) { throw new IllegalStateException("Unexpectedly unable to find instance state manager on class " + clazz.getName(), e); } } }
public class class_name { private ISMgr findInstanceStateManager(Object instance) { Class<?> clazz = typeDescriptor.getReloadableType().getClazz(); try { Field fieldAccessorField = clazz.getField(Constants.fInstanceFieldsName); if (fieldAccessorField == null) { throw new IllegalStateException("Cant find field accessor for type " + clazz.getName()); } ISMgr stateManager = (ISMgr) fieldAccessorField.get(instance); if (stateManager == null) { // Looks to not have been initialized yet, this can happen if a non standard ctor was used. // We could push this step into the generated ctors... ISMgr instanceStateManager = new ISMgr(instance, typeDescriptor.getReloadableType()); fieldAccessorField.set(instance, instanceStateManager); // depends on control dependency: [if], data = [none] stateManager = (ISMgr) fieldAccessorField.get(instance); // depends on control dependency: [if], data = [none] // For some reason it didn't stick! if (stateManager == null) { throw new IllegalStateException("The class '" + clazz.getName() + "' has a null instance state manager object, instance is " + instance); } } return stateManager; // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new IllegalStateException("Unexpectedly unable to find instance state manager on class " + clazz.getName(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { protected String argumentTypeString(final Type type) { if (type instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) type; final List<String> subs = new ArrayList<>(); for (final Type actualType : parameterizedType.getActualTypeArguments()) subs.add(argumentTypeString(actualType)); return argumentTypeString(((ParameterizedType) type).getRawType()) + "[" + String.join(",", subs) + "]"; } else if (type instanceof GenericArrayType) { return argumentTypeString(((GenericArrayType) type).getGenericComponentType()) + "[]"; } else if (type instanceof WildcardType) { throw new RuntimeException("We don't support wildcards in arguments: " + type); } else if (type instanceof Class<?>) { return ((Class) type).getSimpleName(); } else { throw new DocException("Unknown type: " + type); } } }
public class class_name { protected String argumentTypeString(final Type type) { if (type instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) type; final List<String> subs = new ArrayList<>(); for (final Type actualType : parameterizedType.getActualTypeArguments()) subs.add(argumentTypeString(actualType)); return argumentTypeString(((ParameterizedType) type).getRawType()) + "[" + String.join(",", subs) + "]"; // depends on control dependency: [if], data = [none] } else if (type instanceof GenericArrayType) { return argumentTypeString(((GenericArrayType) type).getGenericComponentType()) + "[]"; // depends on control dependency: [if], data = [none] } else if (type instanceof WildcardType) { throw new RuntimeException("We don't support wildcards in arguments: " + type); } else if (type instanceof Class<?>) { return ((Class) type).getSimpleName(); // depends on control dependency: [if], data = [)] } else { throw new DocException("Unknown type: " + type); } } }
public class class_name { public static boolean fEq( float a, float b, float epsilon ) { if (isNaN(a) && isNaN(b)) { return true; } float diffAbs = abs(a - b); return a == b ? true : diffAbs < epsilon ? true : diffAbs / Math.max(abs(a), abs(b)) < epsilon; } }
public class class_name { public static boolean fEq( float a, float b, float epsilon ) { if (isNaN(a) && isNaN(b)) { return true; // depends on control dependency: [if], data = [none] } float diffAbs = abs(a - b); return a == b ? true : diffAbs < epsilon ? true : diffAbs / Math.max(abs(a), abs(b)) < epsilon; } }
public class class_name { private Path containsInternal(final String cacheName) throws IOException { // Create a path object from the external name string final Path p = new Path(this.libraryCachePath + File.separator + cacheName); synchronized (this.fs) { if (fs.exists(p)) { return p; } } return null; } }
public class class_name { private Path containsInternal(final String cacheName) throws IOException { // Create a path object from the external name string final Path p = new Path(this.libraryCachePath + File.separator + cacheName); synchronized (this.fs) { if (fs.exists(p)) { return p; // depends on control dependency: [if], data = [none] } } return null; } }
public class class_name { public void broadcast(BehaviorEvent event) { if (event == null) { throw new NullPointerException("event"); } if (_behaviorListeners != null) { // This code prevent listeners from unregistering themselves while processing the event. // I believe it should always be alright in this case. However, the need rise, then it // should be possible to remove that limitation by using a clone for the looping for (int i = 0; i < _behaviorListeners.size() ; i++) { BehaviorListener listener = _behaviorListeners.get(i); if (event.isAppropriateListener(listener)) { event.processListener(listener); } } } } }
public class class_name { public void broadcast(BehaviorEvent event) { if (event == null) { throw new NullPointerException("event"); } if (_behaviorListeners != null) { // This code prevent listeners from unregistering themselves while processing the event. // I believe it should always be alright in this case. However, the need rise, then it // should be possible to remove that limitation by using a clone for the looping for (int i = 0; i < _behaviorListeners.size() ; i++) { BehaviorListener listener = _behaviorListeners.get(i); if (event.isAppropriateListener(listener)) { event.processListener(listener); // depends on control dependency: [if], data = [none] } } } } }
public class class_name { public void fit(INDArray x) { this.data = x; for(int i = 0; i < numTrees; i++) { RPTree tree = new RPTree(data.columns(),maxSize,similarityFunction); tree.buildTree(x); trees.add(tree); } } }
public class class_name { public void fit(INDArray x) { this.data = x; for(int i = 0; i < numTrees; i++) { RPTree tree = new RPTree(data.columns(),maxSize,similarityFunction); tree.buildTree(x); // depends on control dependency: [for], data = [none] trees.add(tree); // depends on control dependency: [for], data = [none] } } }
public class class_name { public LocalDateTime adjustTime(LocalDateTime time, boolean roundUp, DayOfWeek firstDayOfWeek) { requireNonNull(time); if (roundUp) { time = time.plus(getAmount(), getUnit()); } return Util.truncate(time, getUnit(), getAmount(), firstDayOfWeek); } }
public class class_name { public LocalDateTime adjustTime(LocalDateTime time, boolean roundUp, DayOfWeek firstDayOfWeek) { requireNonNull(time); if (roundUp) { time = time.plus(getAmount(), getUnit()); // depends on control dependency: [if], data = [none] } return Util.truncate(time, getUnit(), getAmount(), firstDayOfWeek); } }
public class class_name { boolean doClassNames(Collection<String> classNames) throws IOException { if (verbose) { out.println("List of classes to process:"); classNames.forEach(out::println); out.println("End of class list."); } // TODO: not sure this is necessary... if (fm instanceof JavacFileManager) { ((JavacFileManager)fm).setSymbolFileEnabled(false); } fm.setLocation(StandardLocation.CLASS_PATH, classPath); if (!bootClassPath.isEmpty()) { fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath); } if (!systemModules.isEmpty()) { fm.setLocation(StandardLocation.SYSTEM_MODULES, systemModules); } LoadProc proc = new LoadProc(); JavaCompiler.CompilationTask task = compiler.getTask(null, fm, this, options, classNames, null); task.setProcessors(List.of(proc)); boolean r = task.call(); if (r) { if (forRemoval) { deprList = proc.getDeprecations().stream() .filter(DeprData::isForRemoval) .collect(toList()); } else { deprList = proc.getDeprecations(); } } return r; } }
public class class_name { boolean doClassNames(Collection<String> classNames) throws IOException { if (verbose) { out.println("List of classes to process:"); classNames.forEach(out::println); out.println("End of class list."); } // TODO: not sure this is necessary... if (fm instanceof JavacFileManager) { ((JavacFileManager)fm).setSymbolFileEnabled(false); } fm.setLocation(StandardLocation.CLASS_PATH, classPath); if (!bootClassPath.isEmpty()) { fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath); } if (!systemModules.isEmpty()) { fm.setLocation(StandardLocation.SYSTEM_MODULES, systemModules); } LoadProc proc = new LoadProc(); JavaCompiler.CompilationTask task = compiler.getTask(null, fm, this, options, classNames, null); task.setProcessors(List.of(proc)); boolean r = task.call(); if (r) { if (forRemoval) { deprList = proc.getDeprecations().stream() .filter(DeprData::isForRemoval) .collect(toList()); // depends on control dependency: [if], data = [none] } else { deprList = proc.getDeprecations(); // depends on control dependency: [if], data = [none] } } return r; } }
public class class_name { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Acquire the controller lock to prevent new write ops and wait until current ones are done context.acquireControllerLock(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we have a reference to a // service-fronted 'processState' so tell the controller we are modifying a service final ServiceRegistry registry = context.getServiceRegistry(true); context.completeStep(new OperationContext.ResultHandler() { @Override public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) { if(resultAction == OperationContext.ResultAction.KEEP) { //even if the timeout is zero we still pause the server //to stop new requests being accepted as it is shutting down ServiceController<SuspendController> shutdownController = (ServiceController<SuspendController>) registry.getRequiredService(JBOSS_SUSPEND_CONTROLLER); shutdownController.getValue().resume(); } } }); } }, OperationContext.Stage.RUNTIME); } }
public class class_name { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Acquire the controller lock to prevent new write ops and wait until current ones are done context.acquireControllerLock(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we have a reference to a // service-fronted 'processState' so tell the controller we are modifying a service final ServiceRegistry registry = context.getServiceRegistry(true); context.completeStep(new OperationContext.ResultHandler() { @Override public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) { if(resultAction == OperationContext.ResultAction.KEEP) { //even if the timeout is zero we still pause the server //to stop new requests being accepted as it is shutting down ServiceController<SuspendController> shutdownController = (ServiceController<SuspendController>) registry.getRequiredService(JBOSS_SUSPEND_CONTROLLER); shutdownController.getValue().resume(); // depends on control dependency: [if], data = [none] } } }); } }, OperationContext.Stage.RUNTIME); } }
public class class_name { public static String simpleASName (Class<?> clazz) { if (clazz.isArray()) { Class<?> compoType = clazz.getComponentType(); if (Byte.TYPE.equals(compoType)) { return "ByteArray"; } else if (Object.class.equals(compoType)) { return "Array"; } else { return "TypedArray /* of " + compoType + " */"; } } else if (clazz == Boolean.TYPE) { return "Boolean"; } else if (clazz == Byte.TYPE || clazz == Character.TYPE || clazz == Short.TYPE || clazz == Integer.TYPE) { return "int"; } else if (clazz == Long.TYPE) { return "Long"; } else if (clazz == Float.TYPE || clazz == Double.TYPE) { return "Number"; } else { String cname = clazz.getName(); Package pkg = clazz.getPackage(); int offset = (pkg == null) ? 0 : pkg.getName().length()+1; String name = cname.substring(offset); return name.replace('$', '_'); } } }
public class class_name { public static String simpleASName (Class<?> clazz) { if (clazz.isArray()) { Class<?> compoType = clazz.getComponentType(); if (Byte.TYPE.equals(compoType)) { return "ByteArray"; // depends on control dependency: [if], data = [none] } else if (Object.class.equals(compoType)) { return "Array"; // depends on control dependency: [if], data = [none] } else { return "TypedArray /* of " + compoType + " */"; // depends on control dependency: [if], data = [none] } } else if (clazz == Boolean.TYPE) { return "Boolean"; // depends on control dependency: [if], data = [none] } else if (clazz == Byte.TYPE || clazz == Character.TYPE || clazz == Short.TYPE || clazz == Integer.TYPE) { return "int"; // depends on control dependency: [if], data = [none] } else if (clazz == Long.TYPE) { return "Long"; // depends on control dependency: [if], data = [none] } else if (clazz == Float.TYPE || clazz == Double.TYPE) { return "Number"; // depends on control dependency: [if], data = [none] } else { String cname = clazz.getName(); Package pkg = clazz.getPackage(); int offset = (pkg == null) ? 0 : pkg.getName().length()+1; String name = cname.substring(offset); return name.replace('$', '_'); // depends on control dependency: [if], data = [none] } } }
public class class_name { static void safeEncodeList(final StringBuilder encoder, final List<?> valueAsList) { encoder.append("["); for (Object listValue : valueAsList) { safeEncodeValue(encoder, listValue); encoder.append(","); } if (valueAsList.isEmpty()) { encoder.append("]"); } else { encoder.setCharAt(encoder.length() - 1, ']'); } } }
public class class_name { static void safeEncodeList(final StringBuilder encoder, final List<?> valueAsList) { encoder.append("["); for (Object listValue : valueAsList) { safeEncodeValue(encoder, listValue); // depends on control dependency: [for], data = [listValue] encoder.append(","); // depends on control dependency: [for], data = [none] } if (valueAsList.isEmpty()) { encoder.append("]"); // depends on control dependency: [if], data = [none] } else { encoder.setCharAt(encoder.length() - 1, ']'); // depends on control dependency: [if], data = [none] } } }
public class class_name { private void internalInstallJvmTypeProvider(XtextResourceSet resourceSet, File tmpClassDirectory, boolean skipIndexLookup) { Iterable<String> classPathEntries = concat(getClassPathEntries(), getSourcePathDirectories(), asList(tmpClassDirectory.toString())); classPathEntries = filter(classPathEntries, new Predicate<String>() { public boolean apply(String input) { return !Strings.isEmpty(input.trim()); } }); Function<String, URL> toUrl = new Function<String, URL>() { public URL apply(String from) { try { return new File(from).toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException(e); } } }; Iterable<URL> classPathUrls = Iterables.transform(classPathEntries, toUrl); log.debug("classpath used for Struct compilation : " + classPathUrls); ClassLoader parentClassLoader; if (useCurrentClassLoaderAsParent) { parentClassLoader = currentClassLoader; } else { if (isEmpty(bootClassPath)) { parentClassLoader = ClassLoader.getSystemClassLoader().getParent(); } else { Iterable<URL> bootClassPathUrls = Iterables.transform(getBootClassPathEntries(), toUrl); parentClassLoader = new BootClassLoader(toArray(bootClassPathUrls, URL.class)); } } ClassLoader urlClassLoader = new URLClassLoader(toArray(classPathUrls, URL.class), parentClassLoader); new ClasspathTypeProvider(urlClassLoader, resourceSet, skipIndexLookup ? null : indexedJvmTypeAccess); resourceSet.setClasspathURIContext(urlClassLoader); // for annotation processing we need to have the compiler's classpath as // a parent. URLClassLoader urlClassLoaderForAnnotationProcessing = new URLClassLoader(toArray(classPathUrls, URL.class), currentClassLoader); resourceSet.eAdapters().add(new ProcessorClassloaderAdapter(urlClassLoaderForAnnotationProcessing)); } }
public class class_name { private void internalInstallJvmTypeProvider(XtextResourceSet resourceSet, File tmpClassDirectory, boolean skipIndexLookup) { Iterable<String> classPathEntries = concat(getClassPathEntries(), getSourcePathDirectories(), asList(tmpClassDirectory.toString())); classPathEntries = filter(classPathEntries, new Predicate<String>() { public boolean apply(String input) { return !Strings.isEmpty(input.trim()); } }); Function<String, URL> toUrl = new Function<String, URL>() { public URL apply(String from) { try { return new File(from).toURI().toURL(); // depends on control dependency: [try], data = [none] } catch (MalformedURLException e) { throw new RuntimeException(e); } // depends on control dependency: [catch], data = [none] } }; Iterable<URL> classPathUrls = Iterables.transform(classPathEntries, toUrl); log.debug("classpath used for Struct compilation : " + classPathUrls); ClassLoader parentClassLoader; if (useCurrentClassLoaderAsParent) { parentClassLoader = currentClassLoader; // depends on control dependency: [if], data = [none] } else { if (isEmpty(bootClassPath)) { parentClassLoader = ClassLoader.getSystemClassLoader().getParent(); // depends on control dependency: [if], data = [none] } else { Iterable<URL> bootClassPathUrls = Iterables.transform(getBootClassPathEntries(), toUrl); parentClassLoader = new BootClassLoader(toArray(bootClassPathUrls, URL.class)); // depends on control dependency: [if], data = [none] } } ClassLoader urlClassLoader = new URLClassLoader(toArray(classPathUrls, URL.class), parentClassLoader); new ClasspathTypeProvider(urlClassLoader, resourceSet, skipIndexLookup ? null : indexedJvmTypeAccess); resourceSet.setClasspathURIContext(urlClassLoader); // for annotation processing we need to have the compiler's classpath as // a parent. URLClassLoader urlClassLoaderForAnnotationProcessing = new URLClassLoader(toArray(classPathUrls, URL.class), currentClassLoader); resourceSet.eAdapters().add(new ProcessorClassloaderAdapter(urlClassLoaderForAnnotationProcessing)); } }
public class class_name { public static String[][] getZoneStrings(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } return cachedZoneStrings.get(locale); } }
public class class_name { public static String[][] getZoneStrings(Locale locale) { if (locale == null) { locale = Locale.getDefault(); // depends on control dependency: [if], data = [none] } return cachedZoneStrings.get(locale); } }
public class class_name { private void buildTree(ClassDoc[] classes, Configuration configuration) { for (int i = 0; i < classes.length; i++) { // In the tree page (e.g overview-tree.html) do not include // information of classes which are deprecated or are a part of a // deprecated package. if (configuration.nodeprecated && (Util.isDeprecated(classes[i]) || Util.isDeprecated(classes[i].containingPackage()))) { continue; } if (configuration.javafx && classes[i].tags("treatAsPrivate").length > 0) { continue; } if (classes[i].isEnum()) { processType(classes[i], configuration, baseEnums, subEnums); } else if (classes[i].isClass()) { processType(classes[i], configuration, baseclasses, subclasses); } else if (classes[i].isInterface()) { processInterface(classes[i]); List<ClassDoc> list = implementingclasses.get(classes[i]); if (list != null) { Collections.sort(list); } } else if (classes[i].isAnnotationType()) { processType(classes[i], configuration, baseAnnotationTypes, subAnnotationTypes); } } Collections.sort(baseinterfaces); for (Iterator<List<ClassDoc>> it = subinterfaces.values().iterator(); it.hasNext(); ) { Collections.sort(it.next()); } for (Iterator<List<ClassDoc>> it = subclasses.values().iterator(); it.hasNext(); ) { Collections.sort(it.next()); } } }
public class class_name { private void buildTree(ClassDoc[] classes, Configuration configuration) { for (int i = 0; i < classes.length; i++) { // In the tree page (e.g overview-tree.html) do not include // information of classes which are deprecated or are a part of a // deprecated package. if (configuration.nodeprecated && (Util.isDeprecated(classes[i]) || Util.isDeprecated(classes[i].containingPackage()))) { continue; } if (configuration.javafx && classes[i].tags("treatAsPrivate").length > 0) { continue; } if (classes[i].isEnum()) { processType(classes[i], configuration, baseEnums, subEnums); // depends on control dependency: [if], data = [none] } else if (classes[i].isClass()) { processType(classes[i], configuration, baseclasses, subclasses); // depends on control dependency: [if], data = [none] } else if (classes[i].isInterface()) { processInterface(classes[i]); // depends on control dependency: [if], data = [none] List<ClassDoc> list = implementingclasses.get(classes[i]); if (list != null) { Collections.sort(list); // depends on control dependency: [if], data = [(list] } } else if (classes[i].isAnnotationType()) { processType(classes[i], configuration, baseAnnotationTypes, subAnnotationTypes); // depends on control dependency: [if], data = [none] } } Collections.sort(baseinterfaces); for (Iterator<List<ClassDoc>> it = subinterfaces.values().iterator(); it.hasNext(); ) { Collections.sort(it.next()); // depends on control dependency: [for], data = [it] } for (Iterator<List<ClassDoc>> it = subclasses.values().iterator(); it.hasNext(); ) { Collections.sort(it.next()); // depends on control dependency: [for], data = [it] } } }
public class class_name { public static void tearDownExample(DatabaseClient client) { XMLDocumentManager docMgr = client.newXMLDocumentManager(); for (String filename: filenames) { docMgr.delete("/example/"+filename); } } }
public class class_name { public static void tearDownExample(DatabaseClient client) { XMLDocumentManager docMgr = client.newXMLDocumentManager(); for (String filename: filenames) { docMgr.delete("/example/"+filename); // depends on control dependency: [for], data = [filename] } } }
public class class_name { private static boolean isBEAWithUnsafeSupport() { // This property should be "BEA Systems, Inc." if (vendor.indexOf("BEA") != -1) { /* * Recent 1.4.2 and 5.0 versions of JRockit have a java.vm.version string starting with the "R" JVM version number, i.e. * "R26.2.0-38-57237-1.5.0_06-20060209..." */ String vmVersion = System.getProperty("java.vm.version"); if (vmVersion.startsWith("R")) { /* * We *could* also check that it's R26 or later, but that is implicitly true */ return true; } /* * For older JRockit versions we can check java.vm.info. JRockit 1.4.2 R24 -> "Native Threads, GC strategy: parallel" and JRockit 5.0 R25 * -> "R25.2.0-28". */ String vmInfo = System.getProperty("java.vm.info"); if (vmInfo != null) { // R25.1 or R25.2 supports Unsafe, other versions do not return (vmInfo.startsWith("R25.1") || vmInfo.startsWith("R25.2")); } } // If non-BEA, or possibly some very old JRockit version return false; } }
public class class_name { private static boolean isBEAWithUnsafeSupport() { // This property should be "BEA Systems, Inc." if (vendor.indexOf("BEA") != -1) { /* * Recent 1.4.2 and 5.0 versions of JRockit have a java.vm.version string starting with the "R" JVM version number, i.e. * "R26.2.0-38-57237-1.5.0_06-20060209..." */ String vmVersion = System.getProperty("java.vm.version"); if (vmVersion.startsWith("R")) { /* * We *could* also check that it's R26 or later, but that is implicitly true */ return true; // depends on control dependency: [if], data = [none] } /* * For older JRockit versions we can check java.vm.info. JRockit 1.4.2 R24 -> "Native Threads, GC strategy: parallel" and JRockit 5.0 R25 * -> "R25.2.0-28". */ String vmInfo = System.getProperty("java.vm.info"); if (vmInfo != null) { // R25.1 or R25.2 supports Unsafe, other versions do not return (vmInfo.startsWith("R25.1") || vmInfo.startsWith("R25.2")); // depends on control dependency: [if], data = [(vmInfo] } } // If non-BEA, or possibly some very old JRockit version return false; } }
public class class_name { private boolean checkDeTaxNumber(final String ptaxNumber) { final int fa = Integer.parseInt(StringUtils.substring(ptaxNumber, 2, 4)); final int sb = Integer.parseInt(StringUtils.substring(ptaxNumber, 5, 8)); final int checkSum = ptaxNumber.charAt(12) - '0'; if (StringUtils.startsWith(ptaxNumber, "11")) { // Berlin final int calculatedCheckSum; if (fa >= 27 && fa <= 30 // || fa < 31 && (sb < 201 || sb > 693) // || fa == 19 && (sb < 200 || sb > 639 && sb < 680 || sb > 680 && sb < 684 || sb > 684) // || fa == 37) { calculatedCheckSum = ((ptaxNumber.charAt(5) - '0') * 7 // + (ptaxNumber.charAt(6) - '0') * 6 // + (ptaxNumber.charAt(7) - '0') * 5 // + (ptaxNumber.charAt(8) - '0') * 8 // + (ptaxNumber.charAt(9) - '0') * 4 // + (ptaxNumber.charAt(10) - '0') * 3 // + (ptaxNumber.charAt(11) - '0') * 2) // % MODULO_11; } else { calculatedCheckSum = ((ptaxNumber.charAt(2) - '0') * 3 // + (ptaxNumber.charAt(3) - '0') * 2 // + (ptaxNumber.charAt(4) - '0') * 9 // + (ptaxNumber.charAt(5) - '0') * 8 // + (ptaxNumber.charAt(6) - '0') * 7 // + (ptaxNumber.charAt(7) - '0') * 6 // + (ptaxNumber.charAt(8) - '0') * 5 // + (ptaxNumber.charAt(9) - '0') * 4 // + (ptaxNumber.charAt(10) - '0') * 3 // + (ptaxNumber.charAt(11) - '0') * 2) // % MODULO_11; } return checkSum == calculatedCheckSum; } // TODO find checksum calculation routines for the rest return true; } }
public class class_name { private boolean checkDeTaxNumber(final String ptaxNumber) { final int fa = Integer.parseInt(StringUtils.substring(ptaxNumber, 2, 4)); final int sb = Integer.parseInt(StringUtils.substring(ptaxNumber, 5, 8)); final int checkSum = ptaxNumber.charAt(12) - '0'; if (StringUtils.startsWith(ptaxNumber, "11")) { // Berlin final int calculatedCheckSum; if (fa >= 27 && fa <= 30 // || fa < 31 && (sb < 201 || sb > 693) // || fa == 19 && (sb < 200 || sb > 639 && sb < 680 || sb > 680 && sb < 684 || sb > 684) // || fa == 37) { calculatedCheckSum = ((ptaxNumber.charAt(5) - '0') * 7 // + (ptaxNumber.charAt(6) - '0') * 6 // + (ptaxNumber.charAt(7) - '0') * 5 // + (ptaxNumber.charAt(8) - '0') * 8 // + (ptaxNumber.charAt(9) - '0') * 4 // + (ptaxNumber.charAt(10) - '0') * 3 // + (ptaxNumber.charAt(11) - '0') * 2) // % MODULO_11; // depends on control dependency: [if], data = [none] } else { calculatedCheckSum = ((ptaxNumber.charAt(2) - '0') * 3 // + (ptaxNumber.charAt(3) - '0') * 2 // + (ptaxNumber.charAt(4) - '0') * 9 // + (ptaxNumber.charAt(5) - '0') * 8 // + (ptaxNumber.charAt(6) - '0') * 7 // + (ptaxNumber.charAt(7) - '0') * 6 // + (ptaxNumber.charAt(8) - '0') * 5 // + (ptaxNumber.charAt(9) - '0') * 4 // + (ptaxNumber.charAt(10) - '0') * 3 // + (ptaxNumber.charAt(11) - '0') * 2) // % MODULO_11; // depends on control dependency: [if], data = [none] } return checkSum == calculatedCheckSum; // depends on control dependency: [if], data = [none] } // TODO find checksum calculation routines for the rest return true; } }
public class class_name { private int updateSize() { int size = 0; if (collectionPointer != null) { final OSBTreeBonsai<OIdentifiable, Integer> tree = loadTree(); if (tree == null) { throw new IllegalStateException("RidBag is not properly initialized, can not load tree implementation"); } try { size = tree.getRealBagSize(changes); } finally { releaseTree(); } } else { for (Change change : changes.values()) { size += change.applyTo(0); } } for (OModifiableInteger diff : newEntries.values()) { size += diff.getValue(); } this.size = size; return size; } }
public class class_name { private int updateSize() { int size = 0; if (collectionPointer != null) { final OSBTreeBonsai<OIdentifiable, Integer> tree = loadTree(); if (tree == null) { throw new IllegalStateException("RidBag is not properly initialized, can not load tree implementation"); } try { size = tree.getRealBagSize(changes); // depends on control dependency: [try], data = [none] } finally { releaseTree(); } } else { for (Change change : changes.values()) { size += change.applyTo(0); // depends on control dependency: [for], data = [change] } } for (OModifiableInteger diff : newEntries.values()) { size += diff.getValue(); // depends on control dependency: [for], data = [diff] } this.size = size; return size; } }
public class class_name { @Override public void setAttempts(String projectId, String eventCollection, String attemptsString) { if (attempts == null) { attempts = new HashMap<String, Map<String, String>>(); } Map<String, String> project = attempts.get(projectId); if (project == null) { project = new HashMap<String, String>(); attempts.put(projectId, project); } project.put(eventCollection, attemptsString); } }
public class class_name { @Override public void setAttempts(String projectId, String eventCollection, String attemptsString) { if (attempts == null) { attempts = new HashMap<String, Map<String, String>>(); // depends on control dependency: [if], data = [none] } Map<String, String> project = attempts.get(projectId); if (project == null) { project = new HashMap<String, String>(); // depends on control dependency: [if], data = [none] attempts.put(projectId, project); // depends on control dependency: [if], data = [(project] } project.put(eventCollection, attemptsString); } }
public class class_name { public void getData(final String path, Watcher watcher, DataCallback cb, Object ctx) { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path WatchRegistration wcb = null; if (watcher != null) { wcb = new DataWatchRegistration(watcher, clientPath); } final String serverPath = prependChroot(clientPath); RequestHeader h = new RequestHeader(); h.setType(ZooDefs.OpCode.getData); GetDataRequest request = new GetDataRequest(); request.setPath(serverPath); request.setWatch(watcher != null); GetDataResponse response = new GetDataResponse(); cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, wcb); } }
public class class_name { public void getData(final String path, Watcher watcher, DataCallback cb, Object ctx) { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path WatchRegistration wcb = null; if (watcher != null) { wcb = new DataWatchRegistration(watcher, clientPath); // depends on control dependency: [if], data = [(watcher] } final String serverPath = prependChroot(clientPath); RequestHeader h = new RequestHeader(); h.setType(ZooDefs.OpCode.getData); GetDataRequest request = new GetDataRequest(); request.setPath(serverPath); request.setWatch(watcher != null); GetDataResponse response = new GetDataResponse(); cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, wcb); } }
public class class_name { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void zipFile(String folderToZip, String zipFile, String[] filesToInclude) throws FileNotFoundException, IOException { Logger logger = Logger.getLogger(Utils.class); logger.debug("zipFile: "+folderToZip); ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile)); boolean excludeContainingFolder = false; File srcFile = new File(folderToZip); if(excludeContainingFolder && srcFile.isDirectory()) { for(String fileName : srcFile.list()) { addToZip("", folderToZip + "/" + fileName, zipOut, filesToInclude); } } else { addToZip("", folderToZip, zipOut, filesToInclude); } zipOut.flush(); zipOut.close(); logger.debug("Successfully created zipFile: " + zipFile); } }
public class class_name { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void zipFile(String folderToZip, String zipFile, String[] filesToInclude) throws FileNotFoundException, IOException { Logger logger = Logger.getLogger(Utils.class); logger.debug("zipFile: "+folderToZip); ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile)); boolean excludeContainingFolder = false; File srcFile = new File(folderToZip); if(excludeContainingFolder && srcFile.isDirectory()) { for(String fileName : srcFile.list()) { addToZip("", folderToZip + "/" + fileName, zipOut, filesToInclude); // depends on control dependency: [for], data = [fileName] } } else { addToZip("", folderToZip, zipOut, filesToInclude); } zipOut.flush(); zipOut.close(); logger.debug("Successfully created zipFile: " + zipFile); } }
public class class_name { private void fragmentizeLayout(UserView view, FragmentDefinition fragment) { // if fragment not bound to user or layout empty due to error, return if (view.getUserId() == -1 || view.getLayout() == null) { return; } // Choose what types of content to apply from the fragment Pattern contentPattern = STANDARD_PATTERN; // default boolean allowExpandedContent = Boolean.parseBoolean( PropertiesManager.getProperty(PROPERTY_ALLOW_EXPANDED_CONTENT)); if (allowExpandedContent) { contentPattern = EXPANDED_PATTERN; } // remove all non-regular or hidden top level folders // skip root folder that is only child of top level layout element Element layout = view.getLayout().getDocumentElement(); Element root = (Element) layout.getFirstChild(); NodeList children = root.getChildNodes(); // process the children backwards since as we delete some the indices // shift around for (int i = children.getLength() - 1; i >= 0; i--) { Node node = children.item(i); if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("folder")) { Element folder = (Element) node; // strip out folder types 'header', 'footer' and regular, // hidden folder "User Preferences" since users have their own boolean isApplicable = contentPattern.matcher(folder.getAttribute("type")).matches(); if (!isApplicable || folder.getAttribute("hidden").equals("true")) { try { root.removeChild(folder); } catch (Exception e) { throw new RuntimeException( "Anomaly occurred while stripping out " + " portions of layout for fragment '" + fragment.getName() + "'. The fragment will not be available for " + "inclusion into user layouts.", e); } } } } // now re-lable all remaining nodes below root to have a safe system // wide id. setIdsAndAttribs( layout, layout.getAttribute(Constants.ATT_ID), "" + fragment.getId(), "" + fragment.getPrecedence()); } }
public class class_name { private void fragmentizeLayout(UserView view, FragmentDefinition fragment) { // if fragment not bound to user or layout empty due to error, return if (view.getUserId() == -1 || view.getLayout() == null) { return; // depends on control dependency: [if], data = [none] } // Choose what types of content to apply from the fragment Pattern contentPattern = STANDARD_PATTERN; // default boolean allowExpandedContent = Boolean.parseBoolean( PropertiesManager.getProperty(PROPERTY_ALLOW_EXPANDED_CONTENT)); if (allowExpandedContent) { contentPattern = EXPANDED_PATTERN; // depends on control dependency: [if], data = [none] } // remove all non-regular or hidden top level folders // skip root folder that is only child of top level layout element Element layout = view.getLayout().getDocumentElement(); Element root = (Element) layout.getFirstChild(); NodeList children = root.getChildNodes(); // process the children backwards since as we delete some the indices // shift around for (int i = children.getLength() - 1; i >= 0; i--) { Node node = children.item(i); if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("folder")) { Element folder = (Element) node; // strip out folder types 'header', 'footer' and regular, // hidden folder "User Preferences" since users have their own boolean isApplicable = contentPattern.matcher(folder.getAttribute("type")).matches(); if (!isApplicable || folder.getAttribute("hidden").equals("true")) { try { root.removeChild(folder); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new RuntimeException( "Anomaly occurred while stripping out " + " portions of layout for fragment '" + fragment.getName() + "'. The fragment will not be available for " + "inclusion into user layouts.", e); } // depends on control dependency: [catch], data = [none] } } } // now re-lable all remaining nodes below root to have a safe system // wide id. setIdsAndAttribs( layout, layout.getAttribute(Constants.ATT_ID), "" + fragment.getId(), "" + fragment.getPrecedence()); } }
public class class_name { private void addMetric(TopologyMaster.MetricDatum metricDatum) { String componentName = metricDatum.getComponentName(); String instanceId = metricDatum.getInstanceId(); String metricName = metricDatum.getName(); assureComponentInstance(componentName, instanceId); assureMetricName(metricName); // calc bucket idx int idx1 = idxComponentInstance.get(componentName).get(instanceId); int idx2 = idxMetricName.get(metricName); long bucketId = makeBucketId(idx1, idx2); // fetch the bucket Map.Entry<Long, Map<Long, LinkedList<MetricDatapoint>>> entry = cacheMetric.floorEntry(metricDatum.getTimestamp()); if (entry != null) { Map<Long, LinkedList<MetricDatapoint>> locator = entry.getValue(); if (!locator.containsKey(bucketId)) { locator.put(bucketId, new LinkedList<MetricDatapoint>()); } LinkedList<MetricDatapoint> bucket = locator.get(bucketId); // store the metric MetricDatapoint datum = new MetricDatapoint(metricDatum.getTimestamp(), metricDatum.getValue()); bucket.offerFirst(datum); } else { LOG.warning("too old metric, out of cache timestamp window, drop it: " + metricDatum); } } }
public class class_name { private void addMetric(TopologyMaster.MetricDatum metricDatum) { String componentName = metricDatum.getComponentName(); String instanceId = metricDatum.getInstanceId(); String metricName = metricDatum.getName(); assureComponentInstance(componentName, instanceId); assureMetricName(metricName); // calc bucket idx int idx1 = idxComponentInstance.get(componentName).get(instanceId); int idx2 = idxMetricName.get(metricName); long bucketId = makeBucketId(idx1, idx2); // fetch the bucket Map.Entry<Long, Map<Long, LinkedList<MetricDatapoint>>> entry = cacheMetric.floorEntry(metricDatum.getTimestamp()); if (entry != null) { Map<Long, LinkedList<MetricDatapoint>> locator = entry.getValue(); if (!locator.containsKey(bucketId)) { locator.put(bucketId, new LinkedList<MetricDatapoint>()); // depends on control dependency: [if], data = [none] } LinkedList<MetricDatapoint> bucket = locator.get(bucketId); // store the metric MetricDatapoint datum = new MetricDatapoint(metricDatum.getTimestamp(), metricDatum.getValue()); bucket.offerFirst(datum); // depends on control dependency: [if], data = [none] } else { LOG.warning("too old metric, out of cache timestamp window, drop it: " + metricDatum); // depends on control dependency: [if], data = [none] } } }
public class class_name { private void setWindowManagerString(){ if (android.os.Build.VERSION.SDK_INT >= 17) { windowManagerString = "sDefaultWindowManager"; } else if(android.os.Build.VERSION.SDK_INT >= 13) { windowManagerString = "sWindowManager"; } else { windowManagerString = "mWindowManager"; } } }
public class class_name { private void setWindowManagerString(){ if (android.os.Build.VERSION.SDK_INT >= 17) { windowManagerString = "sDefaultWindowManager"; // depends on control dependency: [if], data = [none] } else if(android.os.Build.VERSION.SDK_INT >= 13) { windowManagerString = "sWindowManager"; // depends on control dependency: [if], data = [none] } else { windowManagerString = "mWindowManager"; // depends on control dependency: [if], data = [none] } } }
public class class_name { public <E extends Edge> Map<Graph<E>,Result> findMotifs(final Graph<E> g, final int motifSize, int numRandomGraphs, MotifFilter filter) { Counter<Graph<E>> inGraph = new IsomorphicGraphCounter<Graph<E>>(); // Select the iterator based on whether the used has asked us to find // motifs that are simple graphs, or motifs that are possibly // multigraphs Iterator<Graph<E>> subgraphIter = new SubgraphIterator<E,Graph<E>>(g, motifSize); // Count all the isomorphic subgraphs while (subgraphIter.hasNext()) { inGraph.count(subgraphIter.next()); } // Create a data structure to hold the motif counts for each of the // random models. We need the counts separately in order to calcuate // the mean and stanard deviation for the Z score. final List<IsomorphicGraphCounter<Graph<E>>> nullModelCounts = new ArrayList<IsomorphicGraphCounter<Graph<E>>>(); // Initialize all the null models' counters ahead of time so they can // access the list in a thread-safe manner for (int j = 0; j < numRandomGraphs; ++j) { // Create a graph counter that will record how many times the motifs // in the original network appear in the randomized networks nullModelCounts.add( new IsomorphicGraphCounter<Graph<E>>(inGraph.items())); } Object taskKey = q.registerTaskGroup(numRandomGraphs); for (int j = 0; j < numRandomGraphs; ++j) { final int j_ = j; q.add(taskKey, new Runnable() { public void run() { verbose(LOGGER, "Computing random model %d", j_); // Create a counter for this graph's motif counts IsomorphicGraphCounter<Graph<E>> nullModelCounter = nullModelCounts.get(j_); // Make a thread-local copy of the graph, which will be // randomized and used to find the motif counts in the // null model Graph<E> nullModel = g.copy(g.vertices()); // Randomize the connections Graphs.shufflePreserve(nullModel, 3); // Select the appropriate method for iterating over the // graph Iterator<Graph<E>> subgraphIter = new SubgraphIterator<E,Graph<E>>(nullModel, motifSize); // Then count the subraphs in the null model. REMINDER: // it might be useful to put a check in here to avoid // counting subgraphs that are not in the base graph // originally. int count = 0; long start = System.currentTimeMillis(); while (subgraphIter.hasNext()) { if (++count % 100000 == 0) { long cur = System.currentTimeMillis(); verbose(LOGGER, "Counted %d subgraphs in null model " + "(%d unique), %f subgraphs/sec", count, nullModelCounter.size(), (double)count / (cur - start / 1000)); } Graph<E> sub = subgraphIter.next(); nullModelCounter.count(sub); } } }); } q.await(taskKey); // Create a map to hold all the motifs that occured a Z-Score above the // threshold Map<Graph<E>,Result> motifToResult = new HashMap<Graph<E>,Result>(); // For each of the motifs, calcuate its Z-Score using the random models. for (Map.Entry<Graph<E>,Integer> motifAndCount : inGraph) { Graph<E> motif = motifAndCount.getKey(); int count = motifAndCount.getValue(); int[] counts = new int[numRandomGraphs]; int i = 0; for (IsomorphicGraphCounter<Graph<E>> mc : nullModelCounts) counts[i++] = mc.getCount(motif); // Calcuate the statistics for the counts double mean = Statistics.mean(counts); double stddev = Statistics.stddev(counts); if (filter.accepts(count, mean, stddev)) { motifToResult.put(motif, new Result(count, mean, stddev, filter.getStatistic(count, mean, stddev))); } } return motifToResult; } }
public class class_name { public <E extends Edge> Map<Graph<E>,Result> findMotifs(final Graph<E> g, final int motifSize, int numRandomGraphs, MotifFilter filter) { Counter<Graph<E>> inGraph = new IsomorphicGraphCounter<Graph<E>>(); // Select the iterator based on whether the used has asked us to find // motifs that are simple graphs, or motifs that are possibly // multigraphs Iterator<Graph<E>> subgraphIter = new SubgraphIterator<E,Graph<E>>(g, motifSize); // Count all the isomorphic subgraphs while (subgraphIter.hasNext()) { inGraph.count(subgraphIter.next()); // depends on control dependency: [while], data = [none] } // Create a data structure to hold the motif counts for each of the // random models. We need the counts separately in order to calcuate // the mean and stanard deviation for the Z score. final List<IsomorphicGraphCounter<Graph<E>>> nullModelCounts = new ArrayList<IsomorphicGraphCounter<Graph<E>>>(); // Initialize all the null models' counters ahead of time so they can // access the list in a thread-safe manner for (int j = 0; j < numRandomGraphs; ++j) { // Create a graph counter that will record how many times the motifs // in the original network appear in the randomized networks nullModelCounts.add( new IsomorphicGraphCounter<Graph<E>>(inGraph.items())); // depends on control dependency: [for], data = [none] } Object taskKey = q.registerTaskGroup(numRandomGraphs); for (int j = 0; j < numRandomGraphs; ++j) { final int j_ = j; q.add(taskKey, new Runnable() { public void run() { verbose(LOGGER, "Computing random model %d", j_); // Create a counter for this graph's motif counts IsomorphicGraphCounter<Graph<E>> nullModelCounter = nullModelCounts.get(j_); // Make a thread-local copy of the graph, which will be // randomized and used to find the motif counts in the // null model Graph<E> nullModel = g.copy(g.vertices()); // Randomize the connections Graphs.shufflePreserve(nullModel, 3); // Select the appropriate method for iterating over the // graph Iterator<Graph<E>> subgraphIter = new SubgraphIterator<E,Graph<E>>(nullModel, motifSize); // Then count the subraphs in the null model. REMINDER: // it might be useful to put a check in here to avoid // counting subgraphs that are not in the base graph // originally. int count = 0; long start = System.currentTimeMillis(); while (subgraphIter.hasNext()) { if (++count % 100000 == 0) { long cur = System.currentTimeMillis(); verbose(LOGGER, "Counted %d subgraphs in null model " + "(%d unique), %f subgraphs/sec", count, nullModelCounter.size(), (double)count / (cur - start / 1000)); // depends on control dependency: [if], data = [0)] } Graph<E> sub = subgraphIter.next(); nullModelCounter.count(sub); // depends on control dependency: [while], data = [none] } } }); // depends on control dependency: [for], data = [none] } q.await(taskKey); // Create a map to hold all the motifs that occured a Z-Score above the // threshold Map<Graph<E>,Result> motifToResult = new HashMap<Graph<E>,Result>(); // For each of the motifs, calcuate its Z-Score using the random models. for (Map.Entry<Graph<E>,Integer> motifAndCount : inGraph) { Graph<E> motif = motifAndCount.getKey(); int count = motifAndCount.getValue(); int[] counts = new int[numRandomGraphs]; int i = 0; for (IsomorphicGraphCounter<Graph<E>> mc : nullModelCounts) counts[i++] = mc.getCount(motif); // Calcuate the statistics for the counts double mean = Statistics.mean(counts); double stddev = Statistics.stddev(counts); if (filter.accepts(count, mean, stddev)) { motifToResult.put(motif, new Result(count, mean, stddev, filter.getStatistic(count, mean, stddev))); // depends on control dependency: [if], data = [none] } } return motifToResult; } }
public class class_name { public static Map<String, Integer> getComponentsToScale(Map<String, Integer> componentChanges, ScalingDirection scalingDirection) { Map<String, Integer> componentsToScale = new HashMap<String, Integer>(); for (String component : componentChanges.keySet()) { int parallelismChange = componentChanges.get(component); if (scalingDirection.includes(parallelismChange)) { componentsToScale.put(component, parallelismChange); } } return componentsToScale; } }
public class class_name { public static Map<String, Integer> getComponentsToScale(Map<String, Integer> componentChanges, ScalingDirection scalingDirection) { Map<String, Integer> componentsToScale = new HashMap<String, Integer>(); for (String component : componentChanges.keySet()) { int parallelismChange = componentChanges.get(component); if (scalingDirection.includes(parallelismChange)) { componentsToScale.put(component, parallelismChange); // depends on control dependency: [if], data = [none] } } return componentsToScale; } }
public class class_name { public List<TransferPerformanceSummary> getTransferPerformance (String stop_id, LocalDate date) { List<StopTime> stopTimes = feed.getStopTimesForStop(stop_id); Map<String, List<StopTime>> routeStopTimeMap = new HashMap<>(); List<TransferPerformanceSummary> transferPerformanceMap = new ArrayList<>(); // TODO: do we need to handle interpolated stop times??? // first stream stopTimes for stop into route -> list of stopTimes map stopTimes.stream() .forEach(st -> { Trip trip = feed.trips.get(st.trip_id); Service service = feed.services.get(trip.service_id); // only add to map if trip is active on given date if (service != null && service.activeOn(date)) { Route route = feed.routes.get(trip.route_id); List<StopTime> times = new ArrayList<>(); if (routeStopTimeMap.containsKey(route.route_id)) { times.addAll(routeStopTimeMap.get(route.route_id)); } times.add(st); routeStopTimeMap.put(route.route_id, times); } }); Map<Fun.Tuple2<String, String>, TIntList> waitTimesByRoute = new HashMap<>(); Map<Fun.Tuple2<String, String>, Set<Fun.Tuple2<StopTime, StopTime>>> missedTransfers = new HashMap<>(); // iterate over every entry in route -> list of stopTimes map for (Map.Entry<String, List<StopTime>> entry : routeStopTimeMap.entrySet()) { final int MISSED_TRANSFER_THRESHOLD = 60 * 10; List<StopTime> currentTimes = entry.getValue(); String currentRoute = entry.getKey(); for (StopTime currentTime : currentTimes) { if (currentTime.arrival_time > 0) { // cycle through all other routes that stop here. for (Map.Entry<String, List<StopTime>> entry2 : routeStopTimeMap.entrySet()) { List<StopTime> compareTimes = entry2.getValue(); String compareRoute = entry2.getKey(); Fun.Tuple2<String, String> routeKey = new Fun.Tuple2(currentRoute, compareRoute); if (compareRoute.equals(currentRoute)) { continue; } if (!waitTimesByRoute.containsKey(routeKey)) { waitTimesByRoute.put(routeKey, new TIntArrayList()); } int shortestWait = Integer.MAX_VALUE; // compare current time against departure times for route for (StopTime compareTime : compareTimes) { if (compareTime.departure_time > 0) { int waitTime = compareTime.departure_time - currentTime.arrival_time; // if non-negative and shortest, save for later if (waitTime >= 0 && waitTime < shortestWait){ shortestWait = waitTime; } // otherwise, check for missed near-transfer opportunities else { if (waitTime < 0 && waitTime * -1 <= MISSED_TRANSFER_THRESHOLD) { Fun.Tuple2<StopTime, StopTime> missedTransfer = new Fun.Tuple2(compareTime, currentTime); // missedTransfer.add(currentTime); // missedTransfer.add(compareTime); if (!missedTransfers.containsKey(routeKey)) { missedTransfers.put(routeKey, new HashSet<>()); } missedTransfers.get(routeKey).add(missedTransfer); } } } } // add shortestWait for currentTime to map if (shortestWait < Integer.MAX_VALUE) waitTimesByRoute.get(routeKey).add(shortestWait); } } } } for (Map.Entry<Fun.Tuple2<String, String>, TIntList> entry : waitTimesByRoute.entrySet()) { Fun.Tuple2<String, String> routeKey = entry.getKey(); TIntList waitTimes = entry.getValue(); if (waitTimes.isEmpty()) { continue; } int min = waitTimes.min(); int max = waitTimes.max(); waitTimes.sort(); int median = waitTimes.get(waitTimes.size() / 2); TransferPerformanceSummary routeTransferPerformance = new TransferPerformanceSummary(routeKey.a, routeKey.b, min, max, median, missedTransfers.get(routeKey)); transferPerformanceMap.add(routeTransferPerformance); } return transferPerformanceMap; } }
public class class_name { public List<TransferPerformanceSummary> getTransferPerformance (String stop_id, LocalDate date) { List<StopTime> stopTimes = feed.getStopTimesForStop(stop_id); Map<String, List<StopTime>> routeStopTimeMap = new HashMap<>(); List<TransferPerformanceSummary> transferPerformanceMap = new ArrayList<>(); // TODO: do we need to handle interpolated stop times??? // first stream stopTimes for stop into route -> list of stopTimes map stopTimes.stream() .forEach(st -> { Trip trip = feed.trips.get(st.trip_id); Service service = feed.services.get(trip.service_id); // only add to map if trip is active on given date if (service != null && service.activeOn(date)) { Route route = feed.routes.get(trip.route_id); List<StopTime> times = new ArrayList<>(); if (routeStopTimeMap.containsKey(route.route_id)) { times.addAll(routeStopTimeMap.get(route.route_id)); // depends on control dependency: [if], data = [none] } times.add(st); // depends on control dependency: [if], data = [none] routeStopTimeMap.put(route.route_id, times); // depends on control dependency: [if], data = [none] } }); Map<Fun.Tuple2<String, String>, TIntList> waitTimesByRoute = new HashMap<>(); Map<Fun.Tuple2<String, String>, Set<Fun.Tuple2<StopTime, StopTime>>> missedTransfers = new HashMap<>(); // iterate over every entry in route -> list of stopTimes map for (Map.Entry<String, List<StopTime>> entry : routeStopTimeMap.entrySet()) { final int MISSED_TRANSFER_THRESHOLD = 60 * 10; List<StopTime> currentTimes = entry.getValue(); String currentRoute = entry.getKey(); for (StopTime currentTime : currentTimes) { if (currentTime.arrival_time > 0) { // cycle through all other routes that stop here. for (Map.Entry<String, List<StopTime>> entry2 : routeStopTimeMap.entrySet()) { List<StopTime> compareTimes = entry2.getValue(); String compareRoute = entry2.getKey(); Fun.Tuple2<String, String> routeKey = new Fun.Tuple2(currentRoute, compareRoute); if (compareRoute.equals(currentRoute)) { continue; } if (!waitTimesByRoute.containsKey(routeKey)) { waitTimesByRoute.put(routeKey, new TIntArrayList()); // depends on control dependency: [if], data = [none] } int shortestWait = Integer.MAX_VALUE; // compare current time against departure times for route for (StopTime compareTime : compareTimes) { if (compareTime.departure_time > 0) { int waitTime = compareTime.departure_time - currentTime.arrival_time; // if non-negative and shortest, save for later if (waitTime >= 0 && waitTime < shortestWait){ shortestWait = waitTime; // depends on control dependency: [if], data = [none] } // otherwise, check for missed near-transfer opportunities else { if (waitTime < 0 && waitTime * -1 <= MISSED_TRANSFER_THRESHOLD) { Fun.Tuple2<StopTime, StopTime> missedTransfer = new Fun.Tuple2(compareTime, currentTime); // missedTransfer.add(currentTime); // missedTransfer.add(compareTime); if (!missedTransfers.containsKey(routeKey)) { missedTransfers.put(routeKey, new HashSet<>()); // depends on control dependency: [if], data = [none] } missedTransfers.get(routeKey).add(missedTransfer); // depends on control dependency: [if], data = [none] } } } } // add shortestWait for currentTime to map if (shortestWait < Integer.MAX_VALUE) waitTimesByRoute.get(routeKey).add(shortestWait); } } } } for (Map.Entry<Fun.Tuple2<String, String>, TIntList> entry : waitTimesByRoute.entrySet()) { Fun.Tuple2<String, String> routeKey = entry.getKey(); TIntList waitTimes = entry.getValue(); if (waitTimes.isEmpty()) { continue; } int min = waitTimes.min(); int max = waitTimes.max(); waitTimes.sort(); int median = waitTimes.get(waitTimes.size() / 2); TransferPerformanceSummary routeTransferPerformance = new TransferPerformanceSummary(routeKey.a, routeKey.b, min, max, median, missedTransfers.get(routeKey)); transferPerformanceMap.add(routeTransferPerformance); } return transferPerformanceMap; } }
public class class_name { public CfgParseTree getBestParseTreeWithSpan(Object root, int spanStart, int spanEnd) { Preconditions.checkState(!sumProduct); Assignment rootAssignment = parentVar.outcomeArrayToAssignment(root); int rootNonterminalNum = parentVar.assignmentToIntArray(rootAssignment)[0]; double prob = insideChart[spanStart][spanEnd][rootNonterminalNum] * outsideChart[spanStart][spanEnd][rootNonterminalNum]; if (prob == 0.0) { return null; } int splitInd = splitBackpointers[spanStart][spanEnd][rootNonterminalNum]; if (splitInd < 0) { long terminalKey = backpointers[spanStart][spanEnd][rootNonterminalNum]; int positiveSplitInd = (-1 * splitInd) - 1; int terminalSpanStart = positiveSplitInd / numTerminals; int terminalSpanEnd = positiveSplitInd % numTerminals; // This is a really sucky way to transform the keys back to objects. VariableNumMap vars = parentVar.union(ruleTypeVar); int[] dimKey = TableFactor.zero(vars).getWeights().keyNumToDimKey(terminalKey); Assignment a = vars.intArrayToAssignment(dimKey); Object ruleType = a.getValue(ruleTypeVar.getOnlyVariableNum()); List<Object> terminalList = Lists.newArrayList(); terminalList.addAll(terminals.subList(terminalSpanStart, terminalSpanEnd + 1)); return new CfgParseTree(root, ruleType, terminalList, prob, spanStart, spanEnd); } else { long binaryRuleKey = backpointers[spanStart][spanEnd][rootNonterminalNum]; int[] binaryRuleComponents = binaryRuleDistribution.coerceToDiscrete() .getWeights().keyNumToDimKey(binaryRuleKey); Assignment best = binaryRuleDistribution.getVars().intArrayToAssignment(binaryRuleComponents); Object leftRoot = best.getValue(leftVar.getOnlyVariableNum()); Object rightRoot = best.getValue(rightVar.getOnlyVariableNum()); Object ruleType = best.getValue(ruleTypeVar.getOnlyVariableNum()); Preconditions.checkArgument(spanStart + splitInd != spanEnd, "CFG parse decoding error: %s %s %s", spanStart, spanEnd, splitInd); CfgParseTree leftTree = getBestParseTreeWithSpan(leftRoot, spanStart, spanStart + splitInd); CfgParseTree rightTree = getBestParseTreeWithSpan(rightRoot, spanStart + splitInd + 1, spanEnd); Preconditions.checkState(leftTree != null); Preconditions.checkState(rightTree != null); return new CfgParseTree(root, ruleType, leftTree, rightTree, prob); } } }
public class class_name { public CfgParseTree getBestParseTreeWithSpan(Object root, int spanStart, int spanEnd) { Preconditions.checkState(!sumProduct); Assignment rootAssignment = parentVar.outcomeArrayToAssignment(root); int rootNonterminalNum = parentVar.assignmentToIntArray(rootAssignment)[0]; double prob = insideChart[spanStart][spanEnd][rootNonterminalNum] * outsideChart[spanStart][spanEnd][rootNonterminalNum]; if (prob == 0.0) { return null; // depends on control dependency: [if], data = [none] } int splitInd = splitBackpointers[spanStart][spanEnd][rootNonterminalNum]; if (splitInd < 0) { long terminalKey = backpointers[spanStart][spanEnd][rootNonterminalNum]; int positiveSplitInd = (-1 * splitInd) - 1; int terminalSpanStart = positiveSplitInd / numTerminals; int terminalSpanEnd = positiveSplitInd % numTerminals; // This is a really sucky way to transform the keys back to objects. VariableNumMap vars = parentVar.union(ruleTypeVar); int[] dimKey = TableFactor.zero(vars).getWeights().keyNumToDimKey(terminalKey); Assignment a = vars.intArrayToAssignment(dimKey); Object ruleType = a.getValue(ruleTypeVar.getOnlyVariableNum()); List<Object> terminalList = Lists.newArrayList(); terminalList.addAll(terminals.subList(terminalSpanStart, terminalSpanEnd + 1)); // depends on control dependency: [if], data = [none] return new CfgParseTree(root, ruleType, terminalList, prob, spanStart, spanEnd); // depends on control dependency: [if], data = [none] } else { long binaryRuleKey = backpointers[spanStart][spanEnd][rootNonterminalNum]; int[] binaryRuleComponents = binaryRuleDistribution.coerceToDiscrete() .getWeights().keyNumToDimKey(binaryRuleKey); Assignment best = binaryRuleDistribution.getVars().intArrayToAssignment(binaryRuleComponents); Object leftRoot = best.getValue(leftVar.getOnlyVariableNum()); Object rightRoot = best.getValue(rightVar.getOnlyVariableNum()); Object ruleType = best.getValue(ruleTypeVar.getOnlyVariableNum()); Preconditions.checkArgument(spanStart + splitInd != spanEnd, "CFG parse decoding error: %s %s %s", spanStart, spanEnd, splitInd); // depends on control dependency: [if], data = [none] CfgParseTree leftTree = getBestParseTreeWithSpan(leftRoot, spanStart, spanStart + splitInd); CfgParseTree rightTree = getBestParseTreeWithSpan(rightRoot, spanStart + splitInd + 1, spanEnd); Preconditions.checkState(leftTree != null); // depends on control dependency: [if], data = [none] Preconditions.checkState(rightTree != null); // depends on control dependency: [if], data = [none] return new CfgParseTree(root, ruleType, leftTree, rightTree, prob); // depends on control dependency: [if], data = [none] } } }
public class class_name { public void handleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws ServletException, IOException { if (!resource.exists() || !passConditionalHeaders(request, response, resource)) return; try { // delete the file if (resource.delete()) { response.setStatus(HttpResponse.__204_No_Content); response.flushBuffer(); } else response.sendError(HttpResponse.__403_Forbidden); } catch (SecurityException sex) { log.warn(LogSupport.EXCEPTION, sex); response.sendError(HttpResponse.__403_Forbidden, sex.getMessage()); } } }
public class class_name { public void handleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws ServletException, IOException { if (!resource.exists() || !passConditionalHeaders(request, response, resource)) return; try { // delete the file if (resource.delete()) { response.setStatus(HttpResponse.__204_No_Content); // depends on control dependency: [if], data = [none] response.flushBuffer(); // depends on control dependency: [if], data = [none] } else response.sendError(HttpResponse.__403_Forbidden); } catch (SecurityException sex) { log.warn(LogSupport.EXCEPTION, sex); response.sendError(HttpResponse.__403_Forbidden, sex.getMessage()); } } }
public class class_name { private Relationship compare(ContextState leftState, ContextState rightState) { long leftClock = leftState.getClock(); long leftCount = leftState.getCount(); long rightClock = rightState.getClock(); long rightCount = rightState.getCount(); if (leftState.isGlobal() || rightState.isGlobal()) { if (leftState.isGlobal() && rightState.isGlobal()) { if (leftClock == rightClock) { // Can happen if an sstable gets lost and disk failure policy is set to 'best effort' if (leftCount != rightCount && CompactionManager.isCompactionManager.get()) { logger.warn("invalid global counter shard detected; ({}, {}, {}) and ({}, {}, {}) differ only in " + "count; will pick highest to self-heal on compaction", leftState.getCounterId(), leftClock, leftCount, rightState.getCounterId(), rightClock, rightCount); } if (leftCount > rightCount) return Relationship.GREATER_THAN; else if (leftCount == rightCount) return Relationship.EQUAL; else return Relationship.LESS_THAN; } else { return leftClock > rightClock ? Relationship.GREATER_THAN : Relationship.LESS_THAN; } } else // only one is global - keep that one { return leftState.isGlobal() ? Relationship.GREATER_THAN : Relationship.LESS_THAN; } } if (leftState.isLocal() || rightState.isLocal()) { // Local id and at least one is a local shard. if (leftState.isLocal() && rightState.isLocal()) return Relationship.DISJOINT; else // only one is local - keep that one return leftState.isLocal() ? Relationship.GREATER_THAN : Relationship.LESS_THAN; } // both are remote shards if (leftClock == rightClock) { // We should never see non-local shards w/ same id+clock but different counts. However, if we do // we should "heal" the problem by being deterministic in our selection of shard - and // log the occurrence so that the operator will know something is wrong. if (leftCount != rightCount && CompactionManager.isCompactionManager.get()) { logger.warn("invalid remote counter shard detected; ({}, {}, {}) and ({}, {}, {}) differ only in " + "count; will pick highest to self-heal on compaction", leftState.getCounterId(), leftClock, leftCount, rightState.getCounterId(), rightClock, rightCount); } if (leftCount > rightCount) return Relationship.GREATER_THAN; else if (leftCount == rightCount) return Relationship.EQUAL; else return Relationship.LESS_THAN; } else { if ((leftClock >= 0 && rightClock > 0 && leftClock >= rightClock) || (leftClock < 0 && (rightClock > 0 || leftClock < rightClock))) return Relationship.GREATER_THAN; else return Relationship.LESS_THAN; } } }
public class class_name { private Relationship compare(ContextState leftState, ContextState rightState) { long leftClock = leftState.getClock(); long leftCount = leftState.getCount(); long rightClock = rightState.getClock(); long rightCount = rightState.getCount(); if (leftState.isGlobal() || rightState.isGlobal()) { if (leftState.isGlobal() && rightState.isGlobal()) { if (leftClock == rightClock) { // Can happen if an sstable gets lost and disk failure policy is set to 'best effort' if (leftCount != rightCount && CompactionManager.isCompactionManager.get()) { logger.warn("invalid global counter shard detected; ({}, {}, {}) and ({}, {}, {}) differ only in " + "count; will pick highest to self-heal on compaction", // depends on control dependency: [if], data = [none] leftState.getCounterId(), leftClock, leftCount, rightState.getCounterId(), rightClock, rightCount); } if (leftCount > rightCount) return Relationship.GREATER_THAN; else if (leftCount == rightCount) return Relationship.EQUAL; else return Relationship.LESS_THAN; } else { return leftClock > rightClock ? Relationship.GREATER_THAN : Relationship.LESS_THAN; // depends on control dependency: [if], data = [none] } } else // only one is global - keep that one { return leftState.isGlobal() ? Relationship.GREATER_THAN : Relationship.LESS_THAN; // depends on control dependency: [if], data = [none] } } if (leftState.isLocal() || rightState.isLocal()) { // Local id and at least one is a local shard. if (leftState.isLocal() && rightState.isLocal()) return Relationship.DISJOINT; else // only one is local - keep that one return leftState.isLocal() ? Relationship.GREATER_THAN : Relationship.LESS_THAN; } // both are remote shards if (leftClock == rightClock) { // We should never see non-local shards w/ same id+clock but different counts. However, if we do // we should "heal" the problem by being deterministic in our selection of shard - and // log the occurrence so that the operator will know something is wrong. if (leftCount != rightCount && CompactionManager.isCompactionManager.get()) { logger.warn("invalid remote counter shard detected; ({}, {}, {}) and ({}, {}, {}) differ only in " + "count; will pick highest to self-heal on compaction", // depends on control dependency: [if], data = [none] leftState.getCounterId(), leftClock, leftCount, rightState.getCounterId(), rightClock, rightCount); } if (leftCount > rightCount) return Relationship.GREATER_THAN; else if (leftCount == rightCount) return Relationship.EQUAL; else return Relationship.LESS_THAN; } else { if ((leftClock >= 0 && rightClock > 0 && leftClock >= rightClock) || (leftClock < 0 && (rightClock > 0 || leftClock < rightClock))) return Relationship.GREATER_THAN; else return Relationship.LESS_THAN; } } }
public class class_name { public <V> V getColumnValue(T instance, String columnName, Class<V> valueClass) { Field field = fields.get(columnName); if (field == null) { throw new IllegalArgumentException("Column not found: " + columnName); } try { return valueClass.cast(field.get(instance)); } catch (IllegalAccessException e) { throw new RuntimeException(e); // should never get here } } }
public class class_name { public <V> V getColumnValue(T instance, String columnName, Class<V> valueClass) { Field field = fields.get(columnName); if (field == null) { throw new IllegalArgumentException("Column not found: " + columnName); } try { return valueClass.cast(field.get(instance)); // depends on control dependency: [try], data = [none] } catch (IllegalAccessException e) { throw new RuntimeException(e); // should never get here } // depends on control dependency: [catch], data = [none] } }
public class class_name { @Override public void setDTDHandler(DTDHandler handler) { if (handler == null) { handler = base; } this.dtdHandler = handler; } }
public class class_name { @Override public void setDTDHandler(DTDHandler handler) { if (handler == null) { handler = base; // depends on control dependency: [if], data = [none] } this.dtdHandler = handler; } }
public class class_name { public void marshall(DeleteBusinessReportScheduleRequest deleteBusinessReportScheduleRequest, ProtocolMarshaller protocolMarshaller) { if (deleteBusinessReportScheduleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteBusinessReportScheduleRequest.getScheduleArn(), SCHEDULEARN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(DeleteBusinessReportScheduleRequest deleteBusinessReportScheduleRequest, ProtocolMarshaller protocolMarshaller) { if (deleteBusinessReportScheduleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteBusinessReportScheduleRequest.getScheduleArn(), SCHEDULEARN_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public Period plusYears(int years) { if (years == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.YEAR_INDEX, values, years); return new Period(values, getPeriodType()); } }
public class class_name { public Period plusYears(int years) { if (years == 0) { return this; // depends on control dependency: [if], data = [none] } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.YEAR_INDEX, values, years); return new Period(values, getPeriodType()); } }
public class class_name { protected String buildAttrName(String colName) { if (dialect instanceof OracleDialect) { colName = colName.toLowerCase(); } return StrKit.toCamelCase(colName); } }
public class class_name { protected String buildAttrName(String colName) { if (dialect instanceof OracleDialect) { colName = colName.toLowerCase(); // depends on control dependency: [if], data = [none] } return StrKit.toCamelCase(colName); } }
public class class_name { private void setTaskOutputDir() { if (this.jobState.contains(ConfigurationKeys.WRITER_OUTPUT_DIR)) { LOG.warn(String.format("Property %s is deprecated. No need to use it if %s is specified.", ConfigurationKeys.WRITER_OUTPUT_DIR, ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY)); } else { String workingDir = this.jobState.getProp(ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY); this.jobState.setProp(ConfigurationKeys.WRITER_OUTPUT_DIR, new Path(workingDir, TASK_OUTPUT_DIR_NAME).toString()); LOG.info(String .format("Writer Output Directory is set to %s.", this.jobState.getProp(ConfigurationKeys.WRITER_OUTPUT_DIR))); } } }
public class class_name { private void setTaskOutputDir() { if (this.jobState.contains(ConfigurationKeys.WRITER_OUTPUT_DIR)) { LOG.warn(String.format("Property %s is deprecated. No need to use it if %s is specified.", ConfigurationKeys.WRITER_OUTPUT_DIR, ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY)); // depends on control dependency: [if], data = [none] } else { String workingDir = this.jobState.getProp(ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY); this.jobState.setProp(ConfigurationKeys.WRITER_OUTPUT_DIR, new Path(workingDir, TASK_OUTPUT_DIR_NAME).toString()); // depends on control dependency: [if], data = [none] LOG.info(String .format("Writer Output Directory is set to %s.", this.jobState.getProp(ConfigurationKeys.WRITER_OUTPUT_DIR))); // depends on control dependency: [if], data = [none] } } }
public class class_name { public static BigDecimal fen2yuan(String num) { if (StringUtils.isEmpty(num)) { return new BigDecimal(0); } return fen2yuan(new BigDecimal(num)); } }
public class class_name { public static BigDecimal fen2yuan(String num) { if (StringUtils.isEmpty(num)) { return new BigDecimal(0); // depends on control dependency: [if], data = [none] } return fen2yuan(new BigDecimal(num)); } }
public class class_name { public static Class getComponentJavaAccess(PageContext pc, Component component, RefBoolean isNew, boolean create, boolean writeLog, boolean suppressWSbeforeArg, boolean output, boolean returnValue) throws PageException { isNew.setValue(false); String classNameOriginal = component.getPageSource().getClassName(); String className = getClassname(component, null).concat("_wrap"); String real = className.replace('.', '/'); String realOriginal = classNameOriginal.replace('.', '/'); Mapping mapping = component.getPageSource().getMapping(); PhysicalClassLoader cl = null; try { cl = (PhysicalClassLoader) ((PageContextImpl) pc).getRPCClassLoader(false); } catch (IOException e) { throw Caster.toPageException(e); } Resource classFile = cl.getDirectory().getRealResource(real.concat(".class")); Resource classFileOriginal = mapping.getClassRootDirectory().getRealResource(realOriginal.concat(".class")); // LOAD CLASS // print.out(className); // check last Mod if (classFile.lastModified() >= classFileOriginal.lastModified()) { try { Class clazz = cl.loadClass(className); if (clazz != null && !hasChangesOfChildren(classFile.lastModified(), clazz)) return registerTypeMapping(clazz); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); } } if (!create) return null; isNew.setValue(true); // print.out("new"); // CREATE CLASS ClassWriter cw = ASMUtil.getClassWriter(); cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC, real, null, "java/lang/Object", null); // GeneratorAdapter ga = new // GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.STATIC_CONSTRUCTOR,null,null,cw); // StaticConstrBytecodeContext statConstr = null;//new // BytecodeContext(null,null,null,cw,real,ga,Page.STATIC_CONSTRUCTOR); /// ga = new GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.CONSTRUCTOR,null,null,cw); ConstrBytecodeContext constr = null;// new BytecodeContext(null,null,null,cw,real,ga,Page.CONSTRUCTOR); // field component // FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE, "c", "Llucee/runtime/ComponentImpl;", null, // null); // fv.visitEnd(); java.util.List<LitString> _keys = new ArrayList<LitString>(); // remote methods Collection.Key[] keys = component.keys(Component.ACCESS_REMOTE); int max; for (int i = 0; i < keys.length; i++) { max = -1; while ((max = createMethod(constr, _keys, cw, real, component.get(keys[i]), max, writeLog, suppressWSbeforeArg, output, returnValue)) != -1) { break;// for overload remove this } } // Constructor GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC, CONSTRUCTOR_OBJECT, null, null, cw); adapter.loadThis(); adapter.invokeConstructor(Types.OBJECT, CONSTRUCTOR_OBJECT); lucee.transformer.bytecode.Page.registerFields( new BytecodeContext(null, constr, getPage(constr), _keys, cw, real, adapter, CONSTRUCTOR_OBJECT, writeLog, suppressWSbeforeArg, output, returnValue), _keys); adapter.returnValue(); adapter.endMethod(); cw.visitEnd(); byte[] barr = cw.toByteArray(); try { ResourceUtil.touch(classFile); IOUtil.copy(new ByteArrayInputStream(barr), classFile, true); cl = (PhysicalClassLoader) ((PageContextImpl) pc).getRPCClassLoader(true); return registerTypeMapping(cl.loadClass(className, barr)); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); throw Caster.toPageException(t); } } }
public class class_name { public static Class getComponentJavaAccess(PageContext pc, Component component, RefBoolean isNew, boolean create, boolean writeLog, boolean suppressWSbeforeArg, boolean output, boolean returnValue) throws PageException { isNew.setValue(false); String classNameOriginal = component.getPageSource().getClassName(); String className = getClassname(component, null).concat("_wrap"); String real = className.replace('.', '/'); String realOriginal = classNameOriginal.replace('.', '/'); Mapping mapping = component.getPageSource().getMapping(); PhysicalClassLoader cl = null; try { cl = (PhysicalClassLoader) ((PageContextImpl) pc).getRPCClassLoader(false); } catch (IOException e) { throw Caster.toPageException(e); } Resource classFile = cl.getDirectory().getRealResource(real.concat(".class")); Resource classFileOriginal = mapping.getClassRootDirectory().getRealResource(realOriginal.concat(".class")); // LOAD CLASS // print.out(className); // check last Mod if (classFile.lastModified() >= classFileOriginal.lastModified()) { try { Class clazz = cl.loadClass(className); if (clazz != null && !hasChangesOfChildren(classFile.lastModified(), clazz)) return registerTypeMapping(clazz); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); } // depends on control dependency: [catch], data = [none] } if (!create) return null; isNew.setValue(true); // print.out("new"); // CREATE CLASS ClassWriter cw = ASMUtil.getClassWriter(); cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC, real, null, "java/lang/Object", null); // GeneratorAdapter ga = new // GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.STATIC_CONSTRUCTOR,null,null,cw); // StaticConstrBytecodeContext statConstr = null;//new // BytecodeContext(null,null,null,cw,real,ga,Page.STATIC_CONSTRUCTOR); /// ga = new GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.CONSTRUCTOR,null,null,cw); ConstrBytecodeContext constr = null;// new BytecodeContext(null,null,null,cw,real,ga,Page.CONSTRUCTOR); // field component // FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE, "c", "Llucee/runtime/ComponentImpl;", null, // null); // fv.visitEnd(); java.util.List<LitString> _keys = new ArrayList<LitString>(); // remote methods Collection.Key[] keys = component.keys(Component.ACCESS_REMOTE); int max; for (int i = 0; i < keys.length; i++) { max = -1; while ((max = createMethod(constr, _keys, cw, real, component.get(keys[i]), max, writeLog, suppressWSbeforeArg, output, returnValue)) != -1) { break;// for overload remove this } } // Constructor GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC, CONSTRUCTOR_OBJECT, null, null, cw); adapter.loadThis(); adapter.invokeConstructor(Types.OBJECT, CONSTRUCTOR_OBJECT); lucee.transformer.bytecode.Page.registerFields( new BytecodeContext(null, constr, getPage(constr), _keys, cw, real, adapter, CONSTRUCTOR_OBJECT, writeLog, suppressWSbeforeArg, output, returnValue), _keys); adapter.returnValue(); adapter.endMethod(); cw.visitEnd(); byte[] barr = cw.toByteArray(); try { ResourceUtil.touch(classFile); IOUtil.copy(new ByteArrayInputStream(barr), classFile, true); cl = (PhysicalClassLoader) ((PageContextImpl) pc).getRPCClassLoader(true); return registerTypeMapping(cl.loadClass(className, barr)); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); throw Caster.toPageException(t); } } }
public class class_name { @SuppressWarnings("unchecked") protected <I> I newHandler(Class<I> theInterface) { if (theInterface == null) return null; String className = null; try { className = Config.getValueWithGlobalDefault(this.getEngine(), theInterface.getSimpleName()); mLog.info(">>> className = " + className); if (Strings.isNullOrEmpty(className)) { mLog.error(String.format("Cannot determine classname for %s from configuration source [%s] %s", theInterface.getSimpleName(), Config.getConfigHandler().getSource(), this.getEngine())); return null; } Class<?> clazz = Class.forName(className); if (Modifier.isAbstract(clazz.getModifiers())) { throw new InstantiationError(String.format("Class %s is abstract and cannot be instantiated", className)); } Constructor<ADDFFunctionalGroupHandler> cons = (Constructor<ADDFFunctionalGroupHandler>) clazz .getDeclaredConstructor(new Class<?>[] { DDF.class }); if (cons != null) cons.setAccessible(true); return cons != null ? (I) cons.newInstance(this) : null; } catch (ClassNotFoundException cnfe) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), cnfe); } catch (NoSuchMethodException nsme) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), nsme); } catch (IllegalAccessException iae) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), iae); } catch (InstantiationException ie) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), ie); } catch (InvocationTargetException ite) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), ite); } return null; } }
public class class_name { @SuppressWarnings("unchecked") protected <I> I newHandler(Class<I> theInterface) { if (theInterface == null) return null; String className = null; try { className = Config.getValueWithGlobalDefault(this.getEngine(), theInterface.getSimpleName()); // depends on control dependency: [try], data = [none] mLog.info(">>> className = " + className); // depends on control dependency: [try], data = [none] if (Strings.isNullOrEmpty(className)) { mLog.error(String.format("Cannot determine classname for %s from configuration source [%s] %s", theInterface.getSimpleName(), Config.getConfigHandler().getSource(), this.getEngine())); // depends on control dependency: [if], data = [none] return null; // depends on control dependency: [if], data = [none] } Class<?> clazz = Class.forName(className); if (Modifier.isAbstract(clazz.getModifiers())) { throw new InstantiationError(String.format("Class %s is abstract and cannot be instantiated", className)); } Constructor<ADDFFunctionalGroupHandler> cons = (Constructor<ADDFFunctionalGroupHandler>) clazz .getDeclaredConstructor(new Class<?>[] { DDF.class }); if (cons != null) cons.setAccessible(true); return cons != null ? (I) cons.newInstance(this) : null; // depends on control dependency: [try], data = [none] } catch (ClassNotFoundException cnfe) { mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), cnfe); } catch (NoSuchMethodException nsme) { // depends on control dependency: [catch], data = [none] mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), nsme); } catch (IllegalAccessException iae) { // depends on control dependency: [catch], data = [none] mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), iae); } catch (InstantiationException ie) { // depends on control dependency: [catch], data = [none] mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), ie); } catch (InvocationTargetException ite) { // depends on control dependency: [catch], data = [none] mLog.error(String.format("Cannot instantiate handler for [%s] %s/%s", this.getEngine(), theInterface.getSimpleName(), className), ite); } // depends on control dependency: [catch], data = [none] return null; } }
public class class_name { private void doSendFile(final AsyncFile file, final OutputGroup group, final int position, final Handler<AsyncResult<Void>> doneHandler) { if (!group.sendQueueFull()) { file.read(new Buffer(BUFFER_SIZE), 0, position, BUFFER_SIZE, new Handler<AsyncResult<Buffer>>() { @Override public void handle(AsyncResult<Buffer> result) { if (result.failed()) { new DefaultFutureResult<Void>(result.cause()).setHandler(doneHandler); } else { Buffer buffer = result.result(); if (buffer.length() > 0) { group.send(buffer); doSendFile(file, group, position+buffer.length(), doneHandler); } else { group.end(); new DefaultFutureResult<Void>((Void) null).setHandler(doneHandler); } } } }); } else { group.drainHandler(new Handler<Void>() { @Override public void handle(Void event) { doSendFile(file, group, position, doneHandler); } }); } } }
public class class_name { private void doSendFile(final AsyncFile file, final OutputGroup group, final int position, final Handler<AsyncResult<Void>> doneHandler) { if (!group.sendQueueFull()) { file.read(new Buffer(BUFFER_SIZE), 0, position, BUFFER_SIZE, new Handler<AsyncResult<Buffer>>() { @Override public void handle(AsyncResult<Buffer> result) { if (result.failed()) { new DefaultFutureResult<Void>(result.cause()).setHandler(doneHandler); // depends on control dependency: [if], data = [none] } else { Buffer buffer = result.result(); if (buffer.length() > 0) { group.send(buffer); // depends on control dependency: [if], data = [none] doSendFile(file, group, position+buffer.length(), doneHandler); // depends on control dependency: [if], data = [none] } else { group.end(); // depends on control dependency: [if], data = [none] new DefaultFutureResult<Void>((Void) null).setHandler(doneHandler); // depends on control dependency: [if], data = [none] } } } }); // depends on control dependency: [if], data = [none] } else { group.drainHandler(new Handler<Void>() { @Override public void handle(Void event) { doSendFile(file, group, position, doneHandler); } }); // depends on control dependency: [if], data = [none] } } }
public class class_name { private List<Tree<K, V>> findDepth(List<Tree<K, V>> zipper, int depth) { if (zipper.isEmpty()) throw new RuntimeException("Defect: unexpected empty zipper while computing range"); if (isBlackTree(zipper.get(0))) { return depth <= 1 ? zipper : findDepth(zipper.subList(1, zipper.size()), depth - 1); } else { return findDepth(zipper.subList(1, zipper.size()), depth); } } }
public class class_name { private List<Tree<K, V>> findDepth(List<Tree<K, V>> zipper, int depth) { if (zipper.isEmpty()) throw new RuntimeException("Defect: unexpected empty zipper while computing range"); if (isBlackTree(zipper.get(0))) { return depth <= 1 ? zipper : findDepth(zipper.subList(1, zipper.size()), depth - 1); // depends on control dependency: [if], data = [none] } else { return findDepth(zipper.subList(1, zipper.size()), depth); // depends on control dependency: [if], data = [none] } } }
public class class_name { public EClass getIfcSoundPowerMeasure() { if (ifcSoundPowerMeasureEClass == null) { ifcSoundPowerMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(738); } return ifcSoundPowerMeasureEClass; } }
public class class_name { public EClass getIfcSoundPowerMeasure() { if (ifcSoundPowerMeasureEClass == null) { ifcSoundPowerMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(738); // depends on control dependency: [if], data = [none] } return ifcSoundPowerMeasureEClass; } }
public class class_name { public boolean trainOnAll() { List<Map<String, String>> trueLabels = loadLabels(_trueLabelsFile); List<String> corpus = loadTrainingCorpus(_trainingCorpusFile); List<List<Acronym>> trainingExtractedCandidates = new ArrayList<List<Acronym>>(); List<Map<String, String>> trueLabelsForTraining = new ArrayList<Map<String, String>>(); for (Integer docID = 0; docID < corpus.size(); ++docID) { // Adds to training examples, all the extracted pairs from the // current document. trainingExtractedCandidates.add(extractCandidatePairs(corpus .get(docID))); trueLabelsForTraining.add(trueLabels.get(docID)); } return _abbvHmm.train(trainingExtractedCandidates, trueLabelsForTraining, true); } }
public class class_name { public boolean trainOnAll() { List<Map<String, String>> trueLabels = loadLabels(_trueLabelsFile); List<String> corpus = loadTrainingCorpus(_trainingCorpusFile); List<List<Acronym>> trainingExtractedCandidates = new ArrayList<List<Acronym>>(); List<Map<String, String>> trueLabelsForTraining = new ArrayList<Map<String, String>>(); for (Integer docID = 0; docID < corpus.size(); ++docID) { // Adds to training examples, all the extracted pairs from the // current document. trainingExtractedCandidates.add(extractCandidatePairs(corpus .get(docID))); // depends on control dependency: [for], data = [none] trueLabelsForTraining.add(trueLabels.get(docID)); // depends on control dependency: [for], data = [docID] } return _abbvHmm.train(trainingExtractedCandidates, trueLabelsForTraining, true); } }
public class class_name { @Override public final org.jdom2.Element addContent(String text) { // ignore empty elements if (text == null) { return null; } return super.addContent(cleanUpString(text)); } }
public class class_name { @Override public final org.jdom2.Element addContent(String text) { // ignore empty elements if (text == null) { return null; // depends on control dependency: [if], data = [none] } return super.addContent(cleanUpString(text)); } }
public class class_name { public int lookup(double minScore,String toFind) { if (!frozen) freeze(); long start = System.currentTimeMillis(); final Map upperBoundOnWeight = new HashMap(); // find all tokens that could be potentially useful for // retrieving similar strings tfidfDistance.prepare( toFind ); Token[] tokens = tfidfDistance.getTokens(); List usefulTokens = new ArrayList(tokens.length); for (int i=0; i<tokens.length; i++) { Token tok = tokens[i]; if (DEBUG) System.out.println("upper-bounding token "+i+"="+tok); // getIndex()<maxTFIDFScore then tok is somewhere in the dictionary if (tok.getIndex() < maxTFIDFScore.length) { // token should be in allTokens and similar tokens should be pre-computed storeUpperBound( tok, tok, usefulTokens, upperBoundOnWeight, 1.0 ); for (int j=0; j<similarTokens[tok.getIndex()].length; j++) { Token simTok = similarTokens[tok.getIndex()][j]; double sim = jaroWinklerDistance.score(tok.getValue(), simTok.getValue()); storeUpperBound( tok, simTok, usefulTokens, upperBoundOnWeight, sim ); } } else { // token should NOT be in allTokens, so we need to computed similarTokens on-the-fly int indexInAllTokens = Arrays.binarySearch( allTokens, tok, LEXICAL_ORDER_FOR_TOKENS ); if (indexInAllTokens<0) indexInAllTokens = -(indexInAllTokens+1); Set likeTokI = findSimilarTokens( tok.getValue(), indexInAllTokens ); if (DEBUG) System.out.println("just found "+likeTokI.size()+" tokens similar to the novel token "+tok); for (Iterator j=likeTokI.iterator(); j.hasNext(); ) { Token simTok = (Token)j.next(); double sim = jaroWinklerDistance.score(tok.getValue(), simTok.getValue()); storeUpperBound( tok, simTok, usefulTokens, upperBoundOnWeight, sim ); } } } if (DEBUG) System.out.println("tokens and upper bounds: "+upperBoundOnWeight); // collect all candidates, but skip the lowest-scoring // "usefulTokens" - scores that add up to 1-minScore Set candidates = new HashSet(); Collections.sort(usefulTokens, new Comparator() { public int compare(Object a,Object b) { Double da = (Double)upperBoundOnWeight.get(a); Double db = (Double)upperBoundOnWeight.get(b); //if (da==null) da = new Double(0); if (db==null) db = new Double(0); double diff = da.doubleValue()-db.doubleValue(); return diff>0 ? +1 : (diff<0? -1 : 0); } }); double totScore = 0; for (Iterator i=usefulTokens.iterator(); i.hasNext(); ) { Token tok = (Token)i.next(); Double ub = (Double)upperBoundOnWeight.get(tok); if (ub!=null) totScore += ub.doubleValue(); if (totScore >= minScore) { Set ii = invertedIndex[tok.getIndex()]; if (maxInvertedIndexSize<=0 || ii.size()<maxInvertedIndexSize) { candidates.addAll( ii ); } } else { if (DEBUG) System.out.println("skip tok "+tok+" upper bound "+ub+" totScore = "+totScore); } if (DEBUG) System.out.println("after "+tok+" with upper bound "+ub+": "+candidates.size()+" candidates"); } // finally collect and score the candidates result = new ArrayList( candidates.size() ); StringWrapper wa = softTFIDFDistance.prepare( toFind ); for (Iterator i=candidates.iterator(); i.hasNext(); ) { String found = (String)i.next(); StringWrapper wb = softTFIDFDistance.prepare( found ); double d = softTFIDFDistance.score( wa, wb ); //if (DEBUG) System.out.println("candidate "+found+" score "+d+" minscore "+minScore); if (d>=minScore) { Set valset = (Set)valueMap.get(found); for (Iterator j=valset.iterator(); j.hasNext(); ) { String valj=(String)j.next(); result.add(new LookupResult(found,valj,d)); } } } if (DEBUG) System.out.println("result="+result); Collections.sort( result ); lookupTime = (System.currentTimeMillis()-start) / 1000.0; return result.size(); } }
public class class_name { public int lookup(double minScore,String toFind) { if (!frozen) freeze(); long start = System.currentTimeMillis(); final Map upperBoundOnWeight = new HashMap(); // find all tokens that could be potentially useful for // retrieving similar strings tfidfDistance.prepare( toFind ); Token[] tokens = tfidfDistance.getTokens(); List usefulTokens = new ArrayList(tokens.length); for (int i=0; i<tokens.length; i++) { Token tok = tokens[i]; if (DEBUG) System.out.println("upper-bounding token "+i+"="+tok); // getIndex()<maxTFIDFScore then tok is somewhere in the dictionary if (tok.getIndex() < maxTFIDFScore.length) { // token should be in allTokens and similar tokens should be pre-computed storeUpperBound( tok, tok, usefulTokens, upperBoundOnWeight, 1.0 ); // depends on control dependency: [if], data = [none] for (int j=0; j<similarTokens[tok.getIndex()].length; j++) { Token simTok = similarTokens[tok.getIndex()][j]; double sim = jaroWinklerDistance.score(tok.getValue(), simTok.getValue()); storeUpperBound( tok, simTok, usefulTokens, upperBoundOnWeight, sim ); // depends on control dependency: [for], data = [none] } } else { // token should NOT be in allTokens, so we need to computed similarTokens on-the-fly int indexInAllTokens = Arrays.binarySearch( allTokens, tok, LEXICAL_ORDER_FOR_TOKENS ); if (indexInAllTokens<0) indexInAllTokens = -(indexInAllTokens+1); Set likeTokI = findSimilarTokens( tok.getValue(), indexInAllTokens ); if (DEBUG) System.out.println("just found "+likeTokI.size()+" tokens similar to the novel token "+tok); for (Iterator j=likeTokI.iterator(); j.hasNext(); ) { Token simTok = (Token)j.next(); double sim = jaroWinklerDistance.score(tok.getValue(), simTok.getValue()); storeUpperBound( tok, simTok, usefulTokens, upperBoundOnWeight, sim ); // depends on control dependency: [for], data = [none] } } } if (DEBUG) System.out.println("tokens and upper bounds: "+upperBoundOnWeight); // collect all candidates, but skip the lowest-scoring // "usefulTokens" - scores that add up to 1-minScore Set candidates = new HashSet(); Collections.sort(usefulTokens, new Comparator() { public int compare(Object a,Object b) { Double da = (Double)upperBoundOnWeight.get(a); Double db = (Double)upperBoundOnWeight.get(b); //if (da==null) da = new Double(0); if (db==null) db = new Double(0); double diff = da.doubleValue()-db.doubleValue(); return diff>0 ? +1 : (diff<0? -1 : 0); } }); double totScore = 0; for (Iterator i=usefulTokens.iterator(); i.hasNext(); ) { Token tok = (Token)i.next(); Double ub = (Double)upperBoundOnWeight.get(tok); if (ub!=null) totScore += ub.doubleValue(); if (totScore >= minScore) { Set ii = invertedIndex[tok.getIndex()]; if (maxInvertedIndexSize<=0 || ii.size()<maxInvertedIndexSize) { candidates.addAll( ii ); } } else { if (DEBUG) System.out.println("skip tok "+tok+" upper bound "+ub+" totScore = "+totScore); } if (DEBUG) System.out.println("after "+tok+" with upper bound "+ub+": "+candidates.size()+" candidates"); } // finally collect and score the candidates result = new ArrayList( candidates.size() ); StringWrapper wa = softTFIDFDistance.prepare( toFind ); for (Iterator i=candidates.iterator(); i.hasNext(); ) { String found = (String)i.next(); StringWrapper wb = softTFIDFDistance.prepare( found ); double d = softTFIDFDistance.score( wa, wb ); //if (DEBUG) System.out.println("candidate "+found+" score "+d+" minscore "+minScore); if (d>=minScore) { Set valset = (Set)valueMap.get(found); for (Iterator j=valset.iterator(); j.hasNext(); ) { String valj=(String)j.next(); result.add(new LookupResult(found,valj,d)); } } } if (DEBUG) System.out.println("result="+result); Collections.sort( result ); lookupTime = (System.currentTimeMillis()-start) / 1000.0; return result.size(); } }
public class class_name { public static Set<Class<? extends Service>> identifyServiceInterfaces(Class<?> clazz, Set<Class<? extends Service>> serviceInterfaces) { if (clazz == null || Object.class.equals(clazz) || BootstrapService.class.equals(clazz)) { return serviceInterfaces; } for (Class<?> interfac3 : clazz.getInterfaces()) { if (Service.class.equals(interfac3) || BootstrapService.class.equals(interfac3)) { serviceInterfaces.add(Reflections.cast(clazz)); } } for (Class<?> interfac3 : clazz.getInterfaces()) { identifyServiceInterfaces(interfac3, serviceInterfaces); } identifyServiceInterfaces(clazz.getSuperclass(), serviceInterfaces); return serviceInterfaces; } }
public class class_name { public static Set<Class<? extends Service>> identifyServiceInterfaces(Class<?> clazz, Set<Class<? extends Service>> serviceInterfaces) { if (clazz == null || Object.class.equals(clazz) || BootstrapService.class.equals(clazz)) { return serviceInterfaces; // depends on control dependency: [if], data = [none] } for (Class<?> interfac3 : clazz.getInterfaces()) { if (Service.class.equals(interfac3) || BootstrapService.class.equals(interfac3)) { serviceInterfaces.add(Reflections.cast(clazz)); // depends on control dependency: [if], data = [none] } } for (Class<?> interfac3 : clazz.getInterfaces()) { identifyServiceInterfaces(interfac3, serviceInterfaces); // depends on control dependency: [for], data = [interfac3] } identifyServiceInterfaces(clazz.getSuperclass(), serviceInterfaces); return serviceInterfaces; } }
public class class_name { private CloseableHttpClient getClient() { if(this.closeableHttpClient != null) { return this.closeableHttpClient; } //Only accept self signed certificate if in Junit test case. String pathToFluidTrustStore = this.getPathToFluidSpecificTrustStore(); //Test mode... if(IS_IN_JUNIT_TEST_MODE || pathToFluidTrustStore != null) { SSLContextBuilder builder = new SSLContextBuilder(); try { //builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); if(pathToFluidTrustStore == null) { builder.loadTrustMaterial(new SSLTrustAll()); } else { String password = this.getFluidSpecificTrustStorePassword(); if(password == null) { password = UtilGlobal.EMPTY; } if(IS_IN_JUNIT_TEST_MODE) { builder.loadTrustMaterial( new File(pathToFluidTrustStore), password.toCharArray(), new SSLTrustAll()); } else { builder.loadTrustMaterial( new File(pathToFluidTrustStore), password.toCharArray()); } } SSLContext sslContext = builder.build(); this.closeableHttpClient = HttpClients.custom().setSSLSocketFactory( new SSLConnectionSocketFactory(sslContext)).build(); } catch (NoSuchAlgorithmException e) { //Changed for Java 1.6 compatibility... throw new FluidClientException( "NoSuchAlgorithm: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (KeyManagementException e) { throw new FluidClientException( "KeyManagement: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (KeyStoreException e) { throw new FluidClientException( "KeyStore: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (CertificateException e) { throw new FluidClientException( "Certificate: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (IOException ioError) { throw new FluidClientException( "IOError: Unable to load self signed trust material. "+ioError.getMessage(), ioError, FluidClientException.ErrorCode.CRYPTOGRAPHY); } } else { //Default HTTP Client... this.closeableHttpClient = HttpClients.createDefault(); } return this.closeableHttpClient; } }
public class class_name { private CloseableHttpClient getClient() { if(this.closeableHttpClient != null) { return this.closeableHttpClient; // depends on control dependency: [if], data = [none] } //Only accept self signed certificate if in Junit test case. String pathToFluidTrustStore = this.getPathToFluidSpecificTrustStore(); //Test mode... if(IS_IN_JUNIT_TEST_MODE || pathToFluidTrustStore != null) { SSLContextBuilder builder = new SSLContextBuilder(); try { //builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); if(pathToFluidTrustStore == null) { builder.loadTrustMaterial(new SSLTrustAll()); // depends on control dependency: [if], data = [none] } else { String password = this.getFluidSpecificTrustStorePassword(); if(password == null) { password = UtilGlobal.EMPTY; // depends on control dependency: [if], data = [none] } if(IS_IN_JUNIT_TEST_MODE) { builder.loadTrustMaterial( new File(pathToFluidTrustStore), password.toCharArray(), new SSLTrustAll()); // depends on control dependency: [if], data = [none] } else { builder.loadTrustMaterial( new File(pathToFluidTrustStore), password.toCharArray()); // depends on control dependency: [if], data = [none] } } SSLContext sslContext = builder.build(); this.closeableHttpClient = HttpClients.custom().setSSLSocketFactory( new SSLConnectionSocketFactory(sslContext)).build(); // depends on control dependency: [try], data = [none] } catch (NoSuchAlgorithmException e) { //Changed for Java 1.6 compatibility... throw new FluidClientException( "NoSuchAlgorithm: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (KeyManagementException e) { // depends on control dependency: [catch], data = [none] throw new FluidClientException( "KeyManagement: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (KeyStoreException e) { // depends on control dependency: [catch], data = [none] throw new FluidClientException( "KeyStore: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (CertificateException e) { // depends on control dependency: [catch], data = [none] throw new FluidClientException( "Certificate: Unable to load self signed trust material. "+e.getMessage(), e, FluidClientException.ErrorCode.CRYPTOGRAPHY); } catch (IOException ioError) { // depends on control dependency: [catch], data = [none] throw new FluidClientException( "IOError: Unable to load self signed trust material. "+ioError.getMessage(), ioError, FluidClientException.ErrorCode.CRYPTOGRAPHY); } // depends on control dependency: [catch], data = [none] } else { //Default HTTP Client... this.closeableHttpClient = HttpClients.createDefault(); // depends on control dependency: [if], data = [none] } return this.closeableHttpClient; } }
public class class_name { public CreateObjectRequest withObjectAttributeList(AttributeKeyAndValue... objectAttributeList) { if (this.objectAttributeList == null) { setObjectAttributeList(new java.util.ArrayList<AttributeKeyAndValue>(objectAttributeList.length)); } for (AttributeKeyAndValue ele : objectAttributeList) { this.objectAttributeList.add(ele); } return this; } }
public class class_name { public CreateObjectRequest withObjectAttributeList(AttributeKeyAndValue... objectAttributeList) { if (this.objectAttributeList == null) { setObjectAttributeList(new java.util.ArrayList<AttributeKeyAndValue>(objectAttributeList.length)); // depends on control dependency: [if], data = [none] } for (AttributeKeyAndValue ele : objectAttributeList) { this.objectAttributeList.add(ele); // depends on control dependency: [for], data = [ele] } return this; } }
public class class_name { public String getDisplayName() { if (group == null) { return Messages.Warnings_ProjectAction_Name(); } else { return ParserRegistry.getParser(group).getLinkName().toString(); } } }
public class class_name { public String getDisplayName() { if (group == null) { return Messages.Warnings_ProjectAction_Name(); // depends on control dependency: [if], data = [none] } else { return ParserRegistry.getParser(group).getLinkName().toString(); // depends on control dependency: [if], data = [(group] } } }
public class class_name { private void addPostParams(final Request request) { if (fallbackActions != null) { request.addPostParam("FallbackActions", Converter.mapToJson(fallbackActions)); } } }
public class class_name { private void addPostParams(final Request request) { if (fallbackActions != null) { request.addPostParam("FallbackActions", Converter.mapToJson(fallbackActions)); // depends on control dependency: [if], data = [(fallbackActions] } } }
public class class_name { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); sb.append(i.next().toString()); } return sb.toString(); } }
public class class_name { public static String join(CharSequence separator, Iterable<?> strings) { Iterator<?> i = strings.iterator(); if (!i.hasNext()) { return ""; // depends on control dependency: [if], data = [none] } StringBuilder sb = new StringBuilder(i.next().toString()); while (i.hasNext()) { sb.append(separator); // depends on control dependency: [while], data = [none] sb.append(i.next().toString()); // depends on control dependency: [while], data = [none] } return sb.toString(); } }
public class class_name { private double[] generatePriors(Random r, int L, double z, boolean skew) { double P[] = new double[L]; for (int i = 0; i < L; i++) { P[i] = r.nextDouble(); //P[i] = 1.0; // @temp } // normalise to z do { double c = Utils.sum(P) / z; for (int i = 0; i < L; i++) { P[i] = Math.min(1.0, P[i] / c); // must be in [0,1] } } while (Utils.sum(P) < z); return P; } }
public class class_name { private double[] generatePriors(Random r, int L, double z, boolean skew) { double P[] = new double[L]; for (int i = 0; i < L; i++) { P[i] = r.nextDouble(); // depends on control dependency: [for], data = [i] //P[i] = 1.0; // @temp } // normalise to z do { double c = Utils.sum(P) / z; for (int i = 0; i < L; i++) { P[i] = Math.min(1.0, P[i] / c); // must be in [0,1] // depends on control dependency: [for], data = [i] } } while (Utils.sum(P) < z); return P; } }
public class class_name { public final EObject ruleAnnotationField() throws RecognitionException { EObject current = null; Token otherlv_7=null; Token otherlv_9=null; Token otherlv_11=null; Token otherlv_14=null; Token otherlv_16=null; Token otherlv_18=null; Token otherlv_20=null; Token otherlv_22=null; Token otherlv_24=null; Token otherlv_26=null; Token otherlv_28=null; Token otherlv_30=null; Token otherlv_33=null; Token otherlv_35=null; Token otherlv_37=null; Token otherlv_39=null; Token otherlv_40=null; Token otherlv_42=null; Token otherlv_44=null; Token otherlv_46=null; Token otherlv_49=null; Token otherlv_51=null; Token otherlv_53=null; Token otherlv_55=null; Token otherlv_56=null; Token otherlv_59=null; Token otherlv_61=null; Token otherlv_63=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; AntlrDatatypeRuleToken lv_name_6_0 = null; EObject lv_type_8_0 = null; EObject lv_initialValue_10_0 = null; AntlrDatatypeRuleToken lv_modifiers_13_0 = null; AntlrDatatypeRuleToken lv_name_15_0 = null; EObject lv_typeParameters_17_0 = null; EObject lv_typeParameters_19_0 = null; EObject lv_extends_23_0 = null; EObject lv_implements_25_0 = null; EObject lv_implements_27_0 = null; EObject lv_members_29_0 = null; AntlrDatatypeRuleToken lv_modifiers_32_0 = null; AntlrDatatypeRuleToken lv_name_34_0 = null; EObject lv_typeParameters_36_0 = null; EObject lv_typeParameters_38_0 = null; EObject lv_extends_41_0 = null; EObject lv_extends_43_0 = null; EObject lv_members_45_0 = null; AntlrDatatypeRuleToken lv_modifiers_48_0 = null; AntlrDatatypeRuleToken lv_name_50_0 = null; EObject lv_members_52_0 = null; EObject lv_members_54_0 = null; AntlrDatatypeRuleToken lv_modifiers_58_0 = null; AntlrDatatypeRuleToken lv_name_60_0 = null; EObject lv_members_62_0 = null; enterRule(); try { // InternalSARL.g:6451:2: ( ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) ) // InternalSARL.g:6452:2: ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) { // InternalSARL.g:6452:2: ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) // InternalSARL.g:6453:3: () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) { // InternalSARL.g:6453:3: () // InternalSARL.g:6454:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getAnnotationFieldAccess().getXtendMemberAction_0(), current); } } // InternalSARL.g:6460:3: ( (lv_annotations_1_0= ruleXAnnotation ) )* loop186: do { int alt186=2; int LA186_0 = input.LA(1); if ( (LA186_0==105) ) { alt186=1; } switch (alt186) { case 1 : // InternalSARL.g:6461:4: (lv_annotations_1_0= ruleXAnnotation ) { // InternalSARL.g:6461:4: (lv_annotations_1_0= ruleXAnnotation ) // InternalSARL.g:6462:5: lv_annotations_1_0= ruleXAnnotation { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getAnnotationsXAnnotationParserRuleCall_1_0()); } pushFollow(FOLLOW_67); lv_annotations_1_0=ruleXAnnotation(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "annotations", lv_annotations_1_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotation"); afterParserOrEnumRuleCall(); } } } break; default : break loop186; } } while (true); // InternalSARL.g:6479:3: ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) int alt210=5; alt210 = dfa210.predict(input); switch (alt210) { case 1 : // InternalSARL.g:6480:4: ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) { // InternalSARL.g:6480:4: ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) // InternalSARL.g:6481:5: () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? { // InternalSARL.g:6481:5: () // InternalSARL.g:6482:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlFieldAnnotationInfoAction_2_0_0(), current); } } // InternalSARL.g:6488:5: ( (lv_modifiers_3_0= ruleCommonModifier ) )* loop187: do { int alt187=2; int LA187_0 = input.LA(1); if ( (LA187_0==25||(LA187_0>=78 && LA187_0<=89)) ) { alt187=1; } switch (alt187) { case 1 : // InternalSARL.g:6489:6: (lv_modifiers_3_0= ruleCommonModifier ) { // InternalSARL.g:6489:6: (lv_modifiers_3_0= ruleCommonModifier ) // InternalSARL.g:6490:7: lv_modifiers_3_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_0_1_0()); } pushFollow(FOLLOW_38); lv_modifiers_3_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_3_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop187; } } while (true); // InternalSARL.g:6507:5: ( (lv_modifiers_4_0= ruleFieldModifier ) ) // InternalSARL.g:6508:6: (lv_modifiers_4_0= ruleFieldModifier ) { // InternalSARL.g:6508:6: (lv_modifiers_4_0= ruleFieldModifier ) // InternalSARL.g:6509:7: lv_modifiers_4_0= ruleFieldModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersFieldModifierParserRuleCall_2_0_2_0()); } pushFollow(FOLLOW_68); lv_modifiers_4_0=ruleFieldModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_4_0, "org.eclipse.xtend.core.Xtend.FieldModifier"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6526:5: ( (lv_modifiers_5_0= ruleCommonModifier ) )* loop188: do { int alt188=2; int LA188_0 = input.LA(1); if ( (LA188_0==25||(LA188_0>=78 && LA188_0<=89)) ) { alt188=1; } switch (alt188) { case 1 : // InternalSARL.g:6527:6: (lv_modifiers_5_0= ruleCommonModifier ) { // InternalSARL.g:6527:6: (lv_modifiers_5_0= ruleCommonModifier ) // InternalSARL.g:6528:7: lv_modifiers_5_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_0_3_0()); } pushFollow(FOLLOW_68); lv_modifiers_5_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_5_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop188; } } while (true); // InternalSARL.g:6545:5: ( (lv_name_6_0= ruleValidID ) ) // InternalSARL.g:6546:6: (lv_name_6_0= ruleValidID ) { // InternalSARL.g:6546:6: (lv_name_6_0= ruleValidID ) // InternalSARL.g:6547:7: lv_name_6_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_0_4_0()); } pushFollow(FOLLOW_44); lv_name_6_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "name", lv_name_6_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6564:5: (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? int alt189=2; int LA189_0 = input.LA(1); if ( (LA189_0==46) ) { alt189=1; } switch (alt189) { case 1 : // InternalSARL.g:6565:6: otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) { otherlv_7=(Token)match(input,46,FOLLOW_41); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_7, grammarAccess.getAnnotationFieldAccess().getColonKeyword_2_0_5_0()); } // InternalSARL.g:6569:6: ( (lv_type_8_0= ruleJvmTypeReference ) ) // InternalSARL.g:6570:7: (lv_type_8_0= ruleJvmTypeReference ) { // InternalSARL.g:6570:7: (lv_type_8_0= ruleJvmTypeReference ) // InternalSARL.g:6571:8: lv_type_8_0= ruleJvmTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeJvmTypeReferenceParserRuleCall_2_0_5_1_0()); } pushFollow(FOLLOW_42); lv_type_8_0=ruleJvmTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "type", lv_type_8_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeReference"); afterParserOrEnumRuleCall(); } } } } break; } // InternalSARL.g:6589:5: (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? int alt190=2; int LA190_0 = input.LA(1); if ( (LA190_0==47) ) { alt190=1; } switch (alt190) { case 1 : // InternalSARL.g:6590:6: otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) { otherlv_9=(Token)match(input,47,FOLLOW_69); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_9, grammarAccess.getAnnotationFieldAccess().getEqualsSignKeyword_2_0_6_0()); } // InternalSARL.g:6594:6: ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) // InternalSARL.g:6595:7: (lv_initialValue_10_0= ruleXAnnotationElementValue ) { // InternalSARL.g:6595:7: (lv_initialValue_10_0= ruleXAnnotationElementValue ) // InternalSARL.g:6596:8: lv_initialValue_10_0= ruleXAnnotationElementValue { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getInitialValueXAnnotationElementValueParserRuleCall_2_0_6_1_0()); } pushFollow(FOLLOW_46); lv_initialValue_10_0=ruleXAnnotationElementValue(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "initialValue", lv_initialValue_10_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationElementValue"); afterParserOrEnumRuleCall(); } } } } break; } // InternalSARL.g:6614:5: (otherlv_11= ';' )? int alt191=2; int LA191_0 = input.LA(1); if ( (LA191_0==26) ) { alt191=1; } switch (alt191) { case 1 : // InternalSARL.g:6615:6: otherlv_11= ';' { otherlv_11=(Token)match(input,26,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_11, grammarAccess.getAnnotationFieldAccess().getSemicolonKeyword_2_0_7()); } } break; } } } break; case 2 : // InternalSARL.g:6622:4: ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) { // InternalSARL.g:6622:4: ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) // InternalSARL.g:6623:5: () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' { // InternalSARL.g:6623:5: () // InternalSARL.g:6624:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlClassAnnotationInfoAction_2_1_0(), current); } } // InternalSARL.g:6630:5: ( (lv_modifiers_13_0= ruleCommonModifier ) )* loop192: do { int alt192=2; int LA192_0 = input.LA(1); if ( (LA192_0==25||(LA192_0>=78 && LA192_0<=89)) ) { alt192=1; } switch (alt192) { case 1 : // InternalSARL.g:6631:6: (lv_modifiers_13_0= ruleCommonModifier ) { // InternalSARL.g:6631:6: (lv_modifiers_13_0= ruleCommonModifier ) // InternalSARL.g:6632:7: lv_modifiers_13_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_1_1_0()); } pushFollow(FOLLOW_26); lv_modifiers_13_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_13_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop192; } } while (true); otherlv_14=(Token)match(input,39,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_14, grammarAccess.getAnnotationFieldAccess().getClassKeyword_2_1_2()); } // InternalSARL.g:6653:5: ( (lv_name_15_0= ruleValidID ) ) // InternalSARL.g:6654:6: (lv_name_15_0= ruleValidID ) { // InternalSARL.g:6654:6: (lv_name_15_0= ruleValidID ) // InternalSARL.g:6655:7: lv_name_15_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_1_3_0()); } pushFollow(FOLLOW_27); lv_name_15_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "name", lv_name_15_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6672:5: (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? int alt194=2; int LA194_0 = input.LA(1); if ( (LA194_0==40) ) { alt194=1; } switch (alt194) { case 1 : // InternalSARL.g:6673:6: otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' { otherlv_16=(Token)match(input,40,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_16, grammarAccess.getAnnotationFieldAccess().getLessThanSignKeyword_2_1_4_0()); } // InternalSARL.g:6677:6: ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6678:7: (lv_typeParameters_17_0= ruleJvmTypeParameter ) { // InternalSARL.g:6678:7: (lv_typeParameters_17_0= ruleJvmTypeParameter ) // InternalSARL.g:6679:8: lv_typeParameters_17_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_1_4_1_0()); } pushFollow(FOLLOW_28); lv_typeParameters_17_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "typeParameters", lv_typeParameters_17_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6696:6: (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* loop193: do { int alt193=2; int LA193_0 = input.LA(1); if ( (LA193_0==32) ) { alt193=1; } switch (alt193) { case 1 : // InternalSARL.g:6697:7: otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) { otherlv_18=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_18, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_1_4_2_0()); } // InternalSARL.g:6701:7: ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6702:8: (lv_typeParameters_19_0= ruleJvmTypeParameter ) { // InternalSARL.g:6702:8: (lv_typeParameters_19_0= ruleJvmTypeParameter ) // InternalSARL.g:6703:9: lv_typeParameters_19_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_1_4_2_1_0()); } pushFollow(FOLLOW_28); lv_typeParameters_19_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "typeParameters", lv_typeParameters_19_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); afterParserOrEnumRuleCall(); } } } } break; default : break loop193; } } while (true); otherlv_20=(Token)match(input,41,FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_20, grammarAccess.getAnnotationFieldAccess().getGreaterThanSignKeyword_2_1_4_3()); } } break; } // InternalSARL.g:6726:5: ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) // InternalSARL.g:6727:6: ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) { // InternalSARL.g:6727:6: ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) // InternalSARL.g:6728:7: ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) { getUnorderedGroupHelper().enter(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); // InternalSARL.g:6731:7: ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) // InternalSARL.g:6732:8: ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* { // InternalSARL.g:6732:8: ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* loop196: do { int alt196=3; int LA196_0 = input.LA(1); if ( LA196_0 == 28 && getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0) ) { alt196=1; } else if ( LA196_0 == 36 && getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1) ) { alt196=2; } switch (alt196) { case 1 : // InternalSARL.g:6733:6: ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) { // InternalSARL.g:6733:6: ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) // InternalSARL.g:6734:7: {...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) { if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0) ) { if (state.backtracking>0) {state.failed=true; return current;} throw new FailedPredicateException(input, "ruleAnnotationField", "getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0)"); } // InternalSARL.g:6734:118: ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) // InternalSARL.g:6735:8: ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) { getUnorderedGroupHelper().select(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0); // InternalSARL.g:6738:11: ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) // InternalSARL.g:6738:12: {...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) { if ( !((true)) ) { if (state.backtracking>0) {state.failed=true; return current;} throw new FailedPredicateException(input, "ruleAnnotationField", "true"); } // InternalSARL.g:6738:21: (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) // InternalSARL.g:6738:22: otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) { otherlv_22=(Token)match(input,28,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_22, grammarAccess.getAnnotationFieldAccess().getExtendsKeyword_2_1_5_0_0()); } // InternalSARL.g:6742:11: ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6743:12: (lv_extends_23_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6743:12: (lv_extends_23_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6744:13: lv_extends_23_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_0_1_0()); } pushFollow(FOLLOW_21); lv_extends_23_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "extends", lv_extends_23_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); afterParserOrEnumRuleCall(); } } } } } getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } } } break; case 2 : // InternalSARL.g:6767:6: ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) { // InternalSARL.g:6767:6: ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) // InternalSARL.g:6768:7: {...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) { if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1) ) { if (state.backtracking>0) {state.failed=true; return current;} throw new FailedPredicateException(input, "ruleAnnotationField", "getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1)"); } // InternalSARL.g:6768:118: ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) // InternalSARL.g:6769:8: ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) { getUnorderedGroupHelper().select(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1); // InternalSARL.g:6772:11: ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) // InternalSARL.g:6772:12: {...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) { if ( !((true)) ) { if (state.backtracking>0) {state.failed=true; return current;} throw new FailedPredicateException(input, "ruleAnnotationField", "true"); } // InternalSARL.g:6772:21: (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) // InternalSARL.g:6772:22: otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* { otherlv_24=(Token)match(input,36,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_24, grammarAccess.getAnnotationFieldAccess().getImplementsKeyword_2_1_5_1_0()); } // InternalSARL.g:6776:11: ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6777:12: (lv_implements_25_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6777:12: (lv_implements_25_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6778:13: lv_implements_25_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getImplementsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_1_1_0()); } pushFollow(FOLLOW_22); lv_implements_25_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "implements", lv_implements_25_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6795:11: (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* loop195: do { int alt195=2; int LA195_0 = input.LA(1); if ( (LA195_0==32) ) { alt195=1; } switch (alt195) { case 1 : // InternalSARL.g:6796:12: otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) { otherlv_26=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_26, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_1_5_1_2_0()); } // InternalSARL.g:6800:12: ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6801:13: (lv_implements_27_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6801:13: (lv_implements_27_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6802:14: lv_implements_27_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getImplementsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_1_2_1_0()); } pushFollow(FOLLOW_22); lv_implements_27_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "implements", lv_implements_27_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); afterParserOrEnumRuleCall(); } } } } break; default : break loop195; } } while (true); } } getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } } } break; default : break loop196; } } while (true); } } getUnorderedGroupHelper().leave(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } otherlv_28=(Token)match(input,29,FOLLOW_29); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_28, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_1_6()); } // InternalSARL.g:6837:5: ( (lv_members_29_0= ruleMember ) )* loop197: do { int alt197=2; int LA197_0 = input.LA(1); if ( (LA197_0==25||LA197_0==39||(LA197_0>=42 && LA197_0<=45)||LA197_0==48||(LA197_0>=65 && LA197_0<=66)||(LA197_0>=78 && LA197_0<=91)||LA197_0==105) ) { alt197=1; } switch (alt197) { case 1 : // InternalSARL.g:6838:6: (lv_members_29_0= ruleMember ) { // InternalSARL.g:6838:6: (lv_members_29_0= ruleMember ) // InternalSARL.g:6839:7: lv_members_29_0= ruleMember { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersMemberParserRuleCall_2_1_7_0()); } pushFollow(FOLLOW_29); lv_members_29_0=ruleMember(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "members", lv_members_29_0, "io.sarl.lang.SARL.Member"); afterParserOrEnumRuleCall(); } } } break; default : break loop197; } } while (true); otherlv_30=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_30, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_1_8()); } } } break; case 3 : // InternalSARL.g:6862:4: ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) { // InternalSARL.g:6862:4: ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) // InternalSARL.g:6863:5: () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' { // InternalSARL.g:6863:5: () // InternalSARL.g:6864:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlInterfaceAnnotationInfoAction_2_2_0(), current); } } // InternalSARL.g:6870:5: ( (lv_modifiers_32_0= ruleCommonModifier ) )* loop198: do { int alt198=2; int LA198_0 = input.LA(1); if ( (LA198_0==25||(LA198_0>=78 && LA198_0<=89)) ) { alt198=1; } switch (alt198) { case 1 : // InternalSARL.g:6871:6: (lv_modifiers_32_0= ruleCommonModifier ) { // InternalSARL.g:6871:6: (lv_modifiers_32_0= ruleCommonModifier ) // InternalSARL.g:6872:7: lv_modifiers_32_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_2_1_0()); } pushFollow(FOLLOW_30); lv_modifiers_32_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_32_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop198; } } while (true); otherlv_33=(Token)match(input,42,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_33, grammarAccess.getAnnotationFieldAccess().getInterfaceKeyword_2_2_2()); } // InternalSARL.g:6893:5: ( (lv_name_34_0= ruleValidID ) ) // InternalSARL.g:6894:6: (lv_name_34_0= ruleValidID ) { // InternalSARL.g:6894:6: (lv_name_34_0= ruleValidID ) // InternalSARL.g:6895:7: lv_name_34_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_2_3_0()); } pushFollow(FOLLOW_31); lv_name_34_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "name", lv_name_34_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6912:5: (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? int alt200=2; int LA200_0 = input.LA(1); if ( (LA200_0==40) ) { alt200=1; } switch (alt200) { case 1 : // InternalSARL.g:6913:6: otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' { otherlv_35=(Token)match(input,40,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_35, grammarAccess.getAnnotationFieldAccess().getLessThanSignKeyword_2_2_4_0()); } // InternalSARL.g:6917:6: ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6918:7: (lv_typeParameters_36_0= ruleJvmTypeParameter ) { // InternalSARL.g:6918:7: (lv_typeParameters_36_0= ruleJvmTypeParameter ) // InternalSARL.g:6919:8: lv_typeParameters_36_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_2_4_1_0()); } pushFollow(FOLLOW_28); lv_typeParameters_36_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "typeParameters", lv_typeParameters_36_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6936:6: (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* loop199: do { int alt199=2; int LA199_0 = input.LA(1); if ( (LA199_0==32) ) { alt199=1; } switch (alt199) { case 1 : // InternalSARL.g:6937:7: otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) { otherlv_37=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_37, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_2_4_2_0()); } // InternalSARL.g:6941:7: ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6942:8: (lv_typeParameters_38_0= ruleJvmTypeParameter ) { // InternalSARL.g:6942:8: (lv_typeParameters_38_0= ruleJvmTypeParameter ) // InternalSARL.g:6943:9: lv_typeParameters_38_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_2_4_2_1_0()); } pushFollow(FOLLOW_28); lv_typeParameters_38_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "typeParameters", lv_typeParameters_38_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); afterParserOrEnumRuleCall(); } } } } break; default : break loop199; } } while (true); otherlv_39=(Token)match(input,41,FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_39, grammarAccess.getAnnotationFieldAccess().getGreaterThanSignKeyword_2_2_4_3()); } } break; } // InternalSARL.g:6966:5: (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? int alt202=2; int LA202_0 = input.LA(1); if ( (LA202_0==28) ) { alt202=1; } switch (alt202) { case 1 : // InternalSARL.g:6967:6: otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* { otherlv_40=(Token)match(input,28,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_40, grammarAccess.getAnnotationFieldAccess().getExtendsKeyword_2_2_5_0()); } // InternalSARL.g:6971:6: ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6972:7: (lv_extends_41_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6972:7: (lv_extends_41_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6973:8: lv_extends_41_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_2_5_1_0()); } pushFollow(FOLLOW_14); lv_extends_41_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "extends", lv_extends_41_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:6990:6: (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* loop201: do { int alt201=2; int LA201_0 = input.LA(1); if ( (LA201_0==32) ) { alt201=1; } switch (alt201) { case 1 : // InternalSARL.g:6991:7: otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) { otherlv_42=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_42, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_2_5_2_0()); } // InternalSARL.g:6995:7: ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6996:8: (lv_extends_43_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6996:8: (lv_extends_43_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6997:9: lv_extends_43_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_2_5_2_1_0()); } pushFollow(FOLLOW_14); lv_extends_43_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "extends", lv_extends_43_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); afterParserOrEnumRuleCall(); } } } } break; default : break loop201; } } while (true); } break; } otherlv_44=(Token)match(input,29,FOLLOW_29); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_44, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_2_6()); } // InternalSARL.g:7020:5: ( (lv_members_45_0= ruleMember ) )* loop203: do { int alt203=2; int LA203_0 = input.LA(1); if ( (LA203_0==25||LA203_0==39||(LA203_0>=42 && LA203_0<=45)||LA203_0==48||(LA203_0>=65 && LA203_0<=66)||(LA203_0>=78 && LA203_0<=91)||LA203_0==105) ) { alt203=1; } switch (alt203) { case 1 : // InternalSARL.g:7021:6: (lv_members_45_0= ruleMember ) { // InternalSARL.g:7021:6: (lv_members_45_0= ruleMember ) // InternalSARL.g:7022:7: lv_members_45_0= ruleMember { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersMemberParserRuleCall_2_2_7_0()); } pushFollow(FOLLOW_29); lv_members_45_0=ruleMember(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "members", lv_members_45_0, "io.sarl.lang.SARL.Member"); afterParserOrEnumRuleCall(); } } } break; default : break loop203; } } while (true); otherlv_46=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_46, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_2_8()); } } } break; case 4 : // InternalSARL.g:7045:4: ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) { // InternalSARL.g:7045:4: ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) // InternalSARL.g:7046:5: () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' { // InternalSARL.g:7046:5: () // InternalSARL.g:7047:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlEnumerationAnnotationInfoAction_2_3_0(), current); } } // InternalSARL.g:7053:5: ( (lv_modifiers_48_0= ruleCommonModifier ) )* loop204: do { int alt204=2; int LA204_0 = input.LA(1); if ( (LA204_0==25||(LA204_0>=78 && LA204_0<=89)) ) { alt204=1; } switch (alt204) { case 1 : // InternalSARL.g:7054:6: (lv_modifiers_48_0= ruleCommonModifier ) { // InternalSARL.g:7054:6: (lv_modifiers_48_0= ruleCommonModifier ) // InternalSARL.g:7055:7: lv_modifiers_48_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_3_1_0()); } pushFollow(FOLLOW_32); lv_modifiers_48_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_48_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop204; } } while (true); otherlv_49=(Token)match(input,43,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_49, grammarAccess.getAnnotationFieldAccess().getEnumKeyword_2_3_2()); } // InternalSARL.g:7076:5: ( (lv_name_50_0= ruleValidID ) ) // InternalSARL.g:7077:6: (lv_name_50_0= ruleValidID ) { // InternalSARL.g:7077:6: (lv_name_50_0= ruleValidID ) // InternalSARL.g:7078:7: lv_name_50_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_3_3_0()); } pushFollow(FOLLOW_17); lv_name_50_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "name", lv_name_50_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } otherlv_51=(Token)match(input,29,FOLLOW_33); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_51, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_3_4()); } // InternalSARL.g:7099:5: ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? int alt206=2; int LA206_0 = input.LA(1); if ( (LA206_0==RULE_ID||LA206_0==44||(LA206_0>=92 && LA206_0<=95)) ) { alt206=1; } switch (alt206) { case 1 : // InternalSARL.g:7100:6: ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* { // InternalSARL.g:7100:6: ( (lv_members_52_0= ruleXtendEnumLiteral ) ) // InternalSARL.g:7101:7: (lv_members_52_0= ruleXtendEnumLiteral ) { // InternalSARL.g:7101:7: (lv_members_52_0= ruleXtendEnumLiteral ) // InternalSARL.g:7102:8: lv_members_52_0= ruleXtendEnumLiteral { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersXtendEnumLiteralParserRuleCall_2_3_5_0_0()); } pushFollow(FOLLOW_34); lv_members_52_0=ruleXtendEnumLiteral(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "members", lv_members_52_0, "io.sarl.lang.SARL.XtendEnumLiteral"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:7119:6: (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* loop205: do { int alt205=2; int LA205_0 = input.LA(1); if ( (LA205_0==32) ) { alt205=1; } switch (alt205) { case 1 : // InternalSARL.g:7120:7: otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) { otherlv_53=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_53, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_3_5_1_0()); } // InternalSARL.g:7124:7: ( (lv_members_54_0= ruleXtendEnumLiteral ) ) // InternalSARL.g:7125:8: (lv_members_54_0= ruleXtendEnumLiteral ) { // InternalSARL.g:7125:8: (lv_members_54_0= ruleXtendEnumLiteral ) // InternalSARL.g:7126:9: lv_members_54_0= ruleXtendEnumLiteral { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersXtendEnumLiteralParserRuleCall_2_3_5_1_1_0()); } pushFollow(FOLLOW_34); lv_members_54_0=ruleXtendEnumLiteral(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "members", lv_members_54_0, "io.sarl.lang.SARL.XtendEnumLiteral"); afterParserOrEnumRuleCall(); } } } } break; default : break loop205; } } while (true); } break; } // InternalSARL.g:7145:5: (otherlv_55= ';' )? int alt207=2; int LA207_0 = input.LA(1); if ( (LA207_0==26) ) { alt207=1; } switch (alt207) { case 1 : // InternalSARL.g:7146:6: otherlv_55= ';' { otherlv_55=(Token)match(input,26,FOLLOW_24); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_55, grammarAccess.getAnnotationFieldAccess().getSemicolonKeyword_2_3_6()); } } break; } otherlv_56=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_56, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_3_7()); } } } break; case 5 : // InternalSARL.g:7157:4: ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) { // InternalSARL.g:7157:4: ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) // InternalSARL.g:7158:5: () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' { // InternalSARL.g:7158:5: () // InternalSARL.g:7159:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlAnnotationTypeAnnotationInfoAction_2_4_0(), current); } } // InternalSARL.g:7165:5: ( (lv_modifiers_58_0= ruleCommonModifier ) )* loop208: do { int alt208=2; int LA208_0 = input.LA(1); if ( (LA208_0==25||(LA208_0>=78 && LA208_0<=89)) ) { alt208=1; } switch (alt208) { case 1 : // InternalSARL.g:7166:6: (lv_modifiers_58_0= ruleCommonModifier ) { // InternalSARL.g:7166:6: (lv_modifiers_58_0= ruleCommonModifier ) // InternalSARL.g:7167:7: lv_modifiers_58_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_4_1_0()); } pushFollow(FOLLOW_35); lv_modifiers_58_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "modifiers", lv_modifiers_58_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); afterParserOrEnumRuleCall(); } } } break; default : break loop208; } } while (true); otherlv_59=(Token)match(input,44,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_59, grammarAccess.getAnnotationFieldAccess().getAnnotationKeyword_2_4_2()); } // InternalSARL.g:7188:5: ( (lv_name_60_0= ruleValidID ) ) // InternalSARL.g:7189:6: (lv_name_60_0= ruleValidID ) { // InternalSARL.g:7189:6: (lv_name_60_0= ruleValidID ) // InternalSARL.g:7190:7: lv_name_60_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_4_3_0()); } pushFollow(FOLLOW_17); lv_name_60_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } set( current, "name", lv_name_60_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } otherlv_61=(Token)match(input,29,FOLLOW_36); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_61, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_4_4()); } // InternalSARL.g:7211:5: ( (lv_members_62_0= ruleAnnotationField ) )* loop209: do { int alt209=2; int LA209_0 = input.LA(1); if ( (LA209_0==25||LA209_0==39||(LA209_0>=42 && LA209_0<=44)||(LA209_0>=65 && LA209_0<=66)||(LA209_0>=78 && LA209_0<=89)||LA209_0==105) ) { alt209=1; } switch (alt209) { case 1 : // InternalSARL.g:7212:6: (lv_members_62_0= ruleAnnotationField ) { // InternalSARL.g:7212:6: (lv_members_62_0= ruleAnnotationField ) // InternalSARL.g:7213:7: lv_members_62_0= ruleAnnotationField { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersAnnotationFieldParserRuleCall_2_4_5_0()); } pushFollow(FOLLOW_36); lv_members_62_0=ruleAnnotationField(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); } add( current, "members", lv_members_62_0, "io.sarl.lang.SARL.AnnotationField"); afterParserOrEnumRuleCall(); } } } break; default : break loop209; } } while (true); otherlv_63=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_63, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_4_6()); } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } }
public class class_name { public final EObject ruleAnnotationField() throws RecognitionException { EObject current = null; Token otherlv_7=null; Token otherlv_9=null; Token otherlv_11=null; Token otherlv_14=null; Token otherlv_16=null; Token otherlv_18=null; Token otherlv_20=null; Token otherlv_22=null; Token otherlv_24=null; Token otherlv_26=null; Token otherlv_28=null; Token otherlv_30=null; Token otherlv_33=null; Token otherlv_35=null; Token otherlv_37=null; Token otherlv_39=null; Token otherlv_40=null; Token otherlv_42=null; Token otherlv_44=null; Token otherlv_46=null; Token otherlv_49=null; Token otherlv_51=null; Token otherlv_53=null; Token otherlv_55=null; Token otherlv_56=null; Token otherlv_59=null; Token otherlv_61=null; Token otherlv_63=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; AntlrDatatypeRuleToken lv_name_6_0 = null; EObject lv_type_8_0 = null; EObject lv_initialValue_10_0 = null; AntlrDatatypeRuleToken lv_modifiers_13_0 = null; AntlrDatatypeRuleToken lv_name_15_0 = null; EObject lv_typeParameters_17_0 = null; EObject lv_typeParameters_19_0 = null; EObject lv_extends_23_0 = null; EObject lv_implements_25_0 = null; EObject lv_implements_27_0 = null; EObject lv_members_29_0 = null; AntlrDatatypeRuleToken lv_modifiers_32_0 = null; AntlrDatatypeRuleToken lv_name_34_0 = null; EObject lv_typeParameters_36_0 = null; EObject lv_typeParameters_38_0 = null; EObject lv_extends_41_0 = null; EObject lv_extends_43_0 = null; EObject lv_members_45_0 = null; AntlrDatatypeRuleToken lv_modifiers_48_0 = null; AntlrDatatypeRuleToken lv_name_50_0 = null; EObject lv_members_52_0 = null; EObject lv_members_54_0 = null; AntlrDatatypeRuleToken lv_modifiers_58_0 = null; AntlrDatatypeRuleToken lv_name_60_0 = null; EObject lv_members_62_0 = null; enterRule(); try { // InternalSARL.g:6451:2: ( ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) ) // InternalSARL.g:6452:2: ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) { // InternalSARL.g:6452:2: ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) ) // InternalSARL.g:6453:3: () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) { // InternalSARL.g:6453:3: () // InternalSARL.g:6454:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getAnnotationFieldAccess().getXtendMemberAction_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:6460:3: ( (lv_annotations_1_0= ruleXAnnotation ) )* loop186: do { int alt186=2; int LA186_0 = input.LA(1); if ( (LA186_0==105) ) { alt186=1; // depends on control dependency: [if], data = [none] } switch (alt186) { case 1 : // InternalSARL.g:6461:4: (lv_annotations_1_0= ruleXAnnotation ) { // InternalSARL.g:6461:4: (lv_annotations_1_0= ruleXAnnotation ) // InternalSARL.g:6462:5: lv_annotations_1_0= ruleXAnnotation { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getAnnotationsXAnnotationParserRuleCall_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_67); lv_annotations_1_0=ruleXAnnotation(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "annotations", lv_annotations_1_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotation"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop186; } } while (true); // InternalSARL.g:6479:3: ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) | ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) | ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) | ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) | ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) ) int alt210=5; alt210 = dfa210.predict(input); switch (alt210) { case 1 : // InternalSARL.g:6480:4: ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) { // InternalSARL.g:6480:4: ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? ) // InternalSARL.g:6481:5: () ( (lv_modifiers_3_0= ruleCommonModifier ) )* ( (lv_modifiers_4_0= ruleFieldModifier ) ) ( (lv_modifiers_5_0= ruleCommonModifier ) )* ( (lv_name_6_0= ruleValidID ) ) (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? (otherlv_11= ';' )? { // InternalSARL.g:6481:5: () // InternalSARL.g:6482:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlFieldAnnotationInfoAction_2_0_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:6488:5: ( (lv_modifiers_3_0= ruleCommonModifier ) )* loop187: do { int alt187=2; int LA187_0 = input.LA(1); if ( (LA187_0==25||(LA187_0>=78 && LA187_0<=89)) ) { alt187=1; // depends on control dependency: [if], data = [none] } switch (alt187) { case 1 : // InternalSARL.g:6489:6: (lv_modifiers_3_0= ruleCommonModifier ) { // InternalSARL.g:6489:6: (lv_modifiers_3_0= ruleCommonModifier ) // InternalSARL.g:6490:7: lv_modifiers_3_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_0_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_38); lv_modifiers_3_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_3_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop187; } } while (true); // InternalSARL.g:6507:5: ( (lv_modifiers_4_0= ruleFieldModifier ) ) // InternalSARL.g:6508:6: (lv_modifiers_4_0= ruleFieldModifier ) { // InternalSARL.g:6508:6: (lv_modifiers_4_0= ruleFieldModifier ) // InternalSARL.g:6509:7: lv_modifiers_4_0= ruleFieldModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersFieldModifierParserRuleCall_2_0_2_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_68); lv_modifiers_4_0=ruleFieldModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_4_0, "org.eclipse.xtend.core.Xtend.FieldModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6526:5: ( (lv_modifiers_5_0= ruleCommonModifier ) )* loop188: do { int alt188=2; int LA188_0 = input.LA(1); if ( (LA188_0==25||(LA188_0>=78 && LA188_0<=89)) ) { alt188=1; // depends on control dependency: [if], data = [none] } switch (alt188) { case 1 : // InternalSARL.g:6527:6: (lv_modifiers_5_0= ruleCommonModifier ) { // InternalSARL.g:6527:6: (lv_modifiers_5_0= ruleCommonModifier ) // InternalSARL.g:6528:7: lv_modifiers_5_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_0_3_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_68); lv_modifiers_5_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_5_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop188; } } while (true); // InternalSARL.g:6545:5: ( (lv_name_6_0= ruleValidID ) ) // InternalSARL.g:6546:6: (lv_name_6_0= ruleValidID ) { // InternalSARL.g:6546:6: (lv_name_6_0= ruleValidID ) // InternalSARL.g:6547:7: lv_name_6_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_0_4_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_44); lv_name_6_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "name", lv_name_6_0, "org.eclipse.xtend.core.Xtend.ValidID"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6564:5: (otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) )? int alt189=2; int LA189_0 = input.LA(1); if ( (LA189_0==46) ) { alt189=1; // depends on control dependency: [if], data = [none] } switch (alt189) { case 1 : // InternalSARL.g:6565:6: otherlv_7= ':' ( (lv_type_8_0= ruleJvmTypeReference ) ) { otherlv_7=(Token)match(input,46,FOLLOW_41); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_7, grammarAccess.getAnnotationFieldAccess().getColonKeyword_2_0_5_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6569:6: ( (lv_type_8_0= ruleJvmTypeReference ) ) // InternalSARL.g:6570:7: (lv_type_8_0= ruleJvmTypeReference ) { // InternalSARL.g:6570:7: (lv_type_8_0= ruleJvmTypeReference ) // InternalSARL.g:6571:8: lv_type_8_0= ruleJvmTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeJvmTypeReferenceParserRuleCall_2_0_5_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_42); lv_type_8_0=ruleJvmTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "type", lv_type_8_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; } // InternalSARL.g:6589:5: (otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) )? int alt190=2; int LA190_0 = input.LA(1); if ( (LA190_0==47) ) { alt190=1; // depends on control dependency: [if], data = [none] } switch (alt190) { case 1 : // InternalSARL.g:6590:6: otherlv_9= '=' ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) { otherlv_9=(Token)match(input,47,FOLLOW_69); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_9, grammarAccess.getAnnotationFieldAccess().getEqualsSignKeyword_2_0_6_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6594:6: ( (lv_initialValue_10_0= ruleXAnnotationElementValue ) ) // InternalSARL.g:6595:7: (lv_initialValue_10_0= ruleXAnnotationElementValue ) { // InternalSARL.g:6595:7: (lv_initialValue_10_0= ruleXAnnotationElementValue ) // InternalSARL.g:6596:8: lv_initialValue_10_0= ruleXAnnotationElementValue { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getInitialValueXAnnotationElementValueParserRuleCall_2_0_6_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_46); lv_initialValue_10_0=ruleXAnnotationElementValue(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "initialValue", lv_initialValue_10_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationElementValue"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; } // InternalSARL.g:6614:5: (otherlv_11= ';' )? int alt191=2; int LA191_0 = input.LA(1); if ( (LA191_0==26) ) { alt191=1; // depends on control dependency: [if], data = [none] } switch (alt191) { case 1 : // InternalSARL.g:6615:6: otherlv_11= ';' { otherlv_11=(Token)match(input,26,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_11, grammarAccess.getAnnotationFieldAccess().getSemicolonKeyword_2_0_7()); // depends on control dependency: [if], data = [none] } } break; } } } break; case 2 : // InternalSARL.g:6622:4: ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) { // InternalSARL.g:6622:4: ( () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' ) // InternalSARL.g:6623:5: () ( (lv_modifiers_13_0= ruleCommonModifier ) )* otherlv_14= 'class' ( (lv_name_15_0= ruleValidID ) ) (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_28= '{' ( (lv_members_29_0= ruleMember ) )* otherlv_30= '}' { // InternalSARL.g:6623:5: () // InternalSARL.g:6624:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlClassAnnotationInfoAction_2_1_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:6630:5: ( (lv_modifiers_13_0= ruleCommonModifier ) )* loop192: do { int alt192=2; int LA192_0 = input.LA(1); if ( (LA192_0==25||(LA192_0>=78 && LA192_0<=89)) ) { alt192=1; // depends on control dependency: [if], data = [none] } switch (alt192) { case 1 : // InternalSARL.g:6631:6: (lv_modifiers_13_0= ruleCommonModifier ) { // InternalSARL.g:6631:6: (lv_modifiers_13_0= ruleCommonModifier ) // InternalSARL.g:6632:7: lv_modifiers_13_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_1_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_26); lv_modifiers_13_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_13_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop192; } } while (true); otherlv_14=(Token)match(input,39,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_14, grammarAccess.getAnnotationFieldAccess().getClassKeyword_2_1_2()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6653:5: ( (lv_name_15_0= ruleValidID ) ) // InternalSARL.g:6654:6: (lv_name_15_0= ruleValidID ) { // InternalSARL.g:6654:6: (lv_name_15_0= ruleValidID ) // InternalSARL.g:6655:7: lv_name_15_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_1_3_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_27); lv_name_15_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "name", lv_name_15_0, "org.eclipse.xtend.core.Xtend.ValidID"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6672:5: (otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' )? int alt194=2; int LA194_0 = input.LA(1); if ( (LA194_0==40) ) { alt194=1; // depends on control dependency: [if], data = [none] } switch (alt194) { case 1 : // InternalSARL.g:6673:6: otherlv_16= '<' ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* otherlv_20= '>' { otherlv_16=(Token)match(input,40,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_16, grammarAccess.getAnnotationFieldAccess().getLessThanSignKeyword_2_1_4_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6677:6: ( (lv_typeParameters_17_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6678:7: (lv_typeParameters_17_0= ruleJvmTypeParameter ) { // InternalSARL.g:6678:7: (lv_typeParameters_17_0= ruleJvmTypeParameter ) // InternalSARL.g:6679:8: lv_typeParameters_17_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_1_4_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeParameters_17_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "typeParameters", lv_typeParameters_17_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6696:6: (otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) )* loop193: do { int alt193=2; int LA193_0 = input.LA(1); if ( (LA193_0==32) ) { alt193=1; // depends on control dependency: [if], data = [none] } switch (alt193) { case 1 : // InternalSARL.g:6697:7: otherlv_18= ',' ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) { otherlv_18=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_18, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_1_4_2_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6701:7: ( (lv_typeParameters_19_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6702:8: (lv_typeParameters_19_0= ruleJvmTypeParameter ) { // InternalSARL.g:6702:8: (lv_typeParameters_19_0= ruleJvmTypeParameter ) // InternalSARL.g:6703:9: lv_typeParameters_19_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_1_4_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeParameters_19_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "typeParameters", lv_typeParameters_19_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop193; } } while (true); otherlv_20=(Token)match(input,41,FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_20, grammarAccess.getAnnotationFieldAccess().getGreaterThanSignKeyword_2_1_4_3()); // depends on control dependency: [if], data = [none] } } break; } // InternalSARL.g:6726:5: ( ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) // InternalSARL.g:6727:6: ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) { // InternalSARL.g:6727:6: ( ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) // InternalSARL.g:6728:7: ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) { getUnorderedGroupHelper().enter(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); // InternalSARL.g:6731:7: ( ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) // InternalSARL.g:6732:8: ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* { // InternalSARL.g:6732:8: ( ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* loop196: do { int alt196=3; int LA196_0 = input.LA(1); if ( LA196_0 == 28 && getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0) ) { alt196=1; // depends on control dependency: [if], data = [none] } else if ( LA196_0 == 36 && getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1) ) { alt196=2; // depends on control dependency: [if], data = [none] } switch (alt196) { case 1 : // InternalSARL.g:6733:6: ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) { // InternalSARL.g:6733:6: ({...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) // InternalSARL.g:6734:7: {...}? => ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) { if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0) ) { if (state.backtracking>0) {state.failed=true; return current;} // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none] throw new FailedPredicateException(input, "ruleAnnotationField", "getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0)"); } // InternalSARL.g:6734:118: ( ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) ) // InternalSARL.g:6735:8: ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) { getUnorderedGroupHelper().select(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 0); // InternalSARL.g:6738:11: ({...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) ) // InternalSARL.g:6738:12: {...}? => (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) { if ( !((true)) ) { if (state.backtracking>0) {state.failed=true; return current;} // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none] throw new FailedPredicateException(input, "ruleAnnotationField", "true"); } // InternalSARL.g:6738:21: (otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) ) // InternalSARL.g:6738:22: otherlv_22= 'extends' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) { otherlv_22=(Token)match(input,28,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_22, grammarAccess.getAnnotationFieldAccess().getExtendsKeyword_2_1_5_0_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6742:11: ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6743:12: (lv_extends_23_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6743:12: (lv_extends_23_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6744:13: lv_extends_23_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_0_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_21); lv_extends_23_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "extends", lv_extends_23_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } } getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } } } break; case 2 : // InternalSARL.g:6767:6: ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) { // InternalSARL.g:6767:6: ({...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) // InternalSARL.g:6768:7: {...}? => ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) { if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1) ) { if (state.backtracking>0) {state.failed=true; return current;} // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none] throw new FailedPredicateException(input, "ruleAnnotationField", "getUnorderedGroupHelper().canSelect(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1)"); } // InternalSARL.g:6768:118: ( ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) // InternalSARL.g:6769:8: ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) { getUnorderedGroupHelper().select(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5(), 1); // InternalSARL.g:6772:11: ({...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) ) // InternalSARL.g:6772:12: {...}? => (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) { if ( !((true)) ) { if (state.backtracking>0) {state.failed=true; return current;} // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none] throw new FailedPredicateException(input, "ruleAnnotationField", "true"); } // InternalSARL.g:6772:21: (otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* ) // InternalSARL.g:6772:22: otherlv_24= 'implements' ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* { otherlv_24=(Token)match(input,36,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_24, grammarAccess.getAnnotationFieldAccess().getImplementsKeyword_2_1_5_1_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6776:11: ( (lv_implements_25_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6777:12: (lv_implements_25_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6777:12: (lv_implements_25_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6778:13: lv_implements_25_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getImplementsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_1_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_22); lv_implements_25_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "implements", lv_implements_25_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6795:11: (otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) )* loop195: do { int alt195=2; int LA195_0 = input.LA(1); if ( (LA195_0==32) ) { alt195=1; // depends on control dependency: [if], data = [none] } switch (alt195) { case 1 : // InternalSARL.g:6796:12: otherlv_26= ',' ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) { otherlv_26=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_26, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_1_5_1_2_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6800:12: ( (lv_implements_27_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6801:13: (lv_implements_27_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6801:13: (lv_implements_27_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6802:14: lv_implements_27_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getImplementsJvmParameterizedTypeReferenceParserRuleCall_2_1_5_1_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_22); lv_implements_27_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "implements", lv_implements_27_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop195; } } while (true); } } getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } } } break; default : break loop196; } } while (true); } } getUnorderedGroupHelper().leave(grammarAccess.getAnnotationFieldAccess().getUnorderedGroup_2_1_5()); } otherlv_28=(Token)match(input,29,FOLLOW_29); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_28, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_1_6()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6837:5: ( (lv_members_29_0= ruleMember ) )* loop197: do { int alt197=2; int LA197_0 = input.LA(1); if ( (LA197_0==25||LA197_0==39||(LA197_0>=42 && LA197_0<=45)||LA197_0==48||(LA197_0>=65 && LA197_0<=66)||(LA197_0>=78 && LA197_0<=91)||LA197_0==105) ) { alt197=1; // depends on control dependency: [if], data = [none] } switch (alt197) { case 1 : // InternalSARL.g:6838:6: (lv_members_29_0= ruleMember ) { // InternalSARL.g:6838:6: (lv_members_29_0= ruleMember ) // InternalSARL.g:6839:7: lv_members_29_0= ruleMember { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersMemberParserRuleCall_2_1_7_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_29); lv_members_29_0=ruleMember(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "members", lv_members_29_0, "io.sarl.lang.SARL.Member"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop197; } } while (true); otherlv_30=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_30, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_1_8()); // depends on control dependency: [if], data = [none] } } } break; case 3 : // InternalSARL.g:6862:4: ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) { // InternalSARL.g:6862:4: ( () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' ) // InternalSARL.g:6863:5: () ( (lv_modifiers_32_0= ruleCommonModifier ) )* otherlv_33= 'interface' ( (lv_name_34_0= ruleValidID ) ) (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_44= '{' ( (lv_members_45_0= ruleMember ) )* otherlv_46= '}' { // InternalSARL.g:6863:5: () // InternalSARL.g:6864:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlInterfaceAnnotationInfoAction_2_2_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:6870:5: ( (lv_modifiers_32_0= ruleCommonModifier ) )* loop198: do { int alt198=2; int LA198_0 = input.LA(1); if ( (LA198_0==25||(LA198_0>=78 && LA198_0<=89)) ) { alt198=1; // depends on control dependency: [if], data = [none] } switch (alt198) { case 1 : // InternalSARL.g:6871:6: (lv_modifiers_32_0= ruleCommonModifier ) { // InternalSARL.g:6871:6: (lv_modifiers_32_0= ruleCommonModifier ) // InternalSARL.g:6872:7: lv_modifiers_32_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_30); lv_modifiers_32_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_32_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop198; } } while (true); otherlv_33=(Token)match(input,42,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_33, grammarAccess.getAnnotationFieldAccess().getInterfaceKeyword_2_2_2()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6893:5: ( (lv_name_34_0= ruleValidID ) ) // InternalSARL.g:6894:6: (lv_name_34_0= ruleValidID ) { // InternalSARL.g:6894:6: (lv_name_34_0= ruleValidID ) // InternalSARL.g:6895:7: lv_name_34_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_2_3_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_31); lv_name_34_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "name", lv_name_34_0, "org.eclipse.xtend.core.Xtend.ValidID"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6912:5: (otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' )? int alt200=2; int LA200_0 = input.LA(1); if ( (LA200_0==40) ) { alt200=1; // depends on control dependency: [if], data = [none] } switch (alt200) { case 1 : // InternalSARL.g:6913:6: otherlv_35= '<' ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* otherlv_39= '>' { otherlv_35=(Token)match(input,40,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_35, grammarAccess.getAnnotationFieldAccess().getLessThanSignKeyword_2_2_4_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6917:6: ( (lv_typeParameters_36_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6918:7: (lv_typeParameters_36_0= ruleJvmTypeParameter ) { // InternalSARL.g:6918:7: (lv_typeParameters_36_0= ruleJvmTypeParameter ) // InternalSARL.g:6919:8: lv_typeParameters_36_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_2_4_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeParameters_36_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "typeParameters", lv_typeParameters_36_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6936:6: (otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) )* loop199: do { int alt199=2; int LA199_0 = input.LA(1); if ( (LA199_0==32) ) { alt199=1; // depends on control dependency: [if], data = [none] } switch (alt199) { case 1 : // InternalSARL.g:6937:7: otherlv_37= ',' ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) { otherlv_37=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_37, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_2_4_2_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6941:7: ( (lv_typeParameters_38_0= ruleJvmTypeParameter ) ) // InternalSARL.g:6942:8: (lv_typeParameters_38_0= ruleJvmTypeParameter ) { // InternalSARL.g:6942:8: (lv_typeParameters_38_0= ruleJvmTypeParameter ) // InternalSARL.g:6943:9: lv_typeParameters_38_0= ruleJvmTypeParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getTypeParametersJvmTypeParameterParserRuleCall_2_2_4_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeParameters_38_0=ruleJvmTypeParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "typeParameters", lv_typeParameters_38_0, "org.eclipse.xtext.xbase.Xtype.JvmTypeParameter"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop199; } } while (true); otherlv_39=(Token)match(input,41,FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_39, grammarAccess.getAnnotationFieldAccess().getGreaterThanSignKeyword_2_2_4_3()); // depends on control dependency: [if], data = [none] } } break; } // InternalSARL.g:6966:5: (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* )? int alt202=2; int LA202_0 = input.LA(1); if ( (LA202_0==28) ) { alt202=1; // depends on control dependency: [if], data = [none] } switch (alt202) { case 1 : // InternalSARL.g:6967:6: otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* { otherlv_40=(Token)match(input,28,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_40, grammarAccess.getAnnotationFieldAccess().getExtendsKeyword_2_2_5_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6971:6: ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6972:7: (lv_extends_41_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6972:7: (lv_extends_41_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6973:8: lv_extends_41_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_2_5_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_14); lv_extends_41_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "extends", lv_extends_41_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:6990:6: (otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) )* loop201: do { int alt201=2; int LA201_0 = input.LA(1); if ( (LA201_0==32) ) { alt201=1; // depends on control dependency: [if], data = [none] } switch (alt201) { case 1 : // InternalSARL.g:6991:7: otherlv_42= ',' ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) { otherlv_42=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_42, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_2_5_2_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:6995:7: ( (lv_extends_43_0= ruleJvmParameterizedTypeReference ) ) // InternalSARL.g:6996:8: (lv_extends_43_0= ruleJvmParameterizedTypeReference ) { // InternalSARL.g:6996:8: (lv_extends_43_0= ruleJvmParameterizedTypeReference ) // InternalSARL.g:6997:9: lv_extends_43_0= ruleJvmParameterizedTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getExtendsJvmParameterizedTypeReferenceParserRuleCall_2_2_5_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_14); lv_extends_43_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "extends", lv_extends_43_0, "org.eclipse.xtext.xbase.Xtype.JvmParameterizedTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop201; } } while (true); } break; } otherlv_44=(Token)match(input,29,FOLLOW_29); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_44, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_2_6()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7020:5: ( (lv_members_45_0= ruleMember ) )* loop203: do { int alt203=2; int LA203_0 = input.LA(1); if ( (LA203_0==25||LA203_0==39||(LA203_0>=42 && LA203_0<=45)||LA203_0==48||(LA203_0>=65 && LA203_0<=66)||(LA203_0>=78 && LA203_0<=91)||LA203_0==105) ) { alt203=1; // depends on control dependency: [if], data = [none] } switch (alt203) { case 1 : // InternalSARL.g:7021:6: (lv_members_45_0= ruleMember ) { // InternalSARL.g:7021:6: (lv_members_45_0= ruleMember ) // InternalSARL.g:7022:7: lv_members_45_0= ruleMember { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersMemberParserRuleCall_2_2_7_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_29); lv_members_45_0=ruleMember(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "members", lv_members_45_0, "io.sarl.lang.SARL.Member"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop203; } } while (true); otherlv_46=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_46, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_2_8()); // depends on control dependency: [if], data = [none] } } } break; case 4 : // InternalSARL.g:7045:4: ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) { // InternalSARL.g:7045:4: ( () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' ) // InternalSARL.g:7046:5: () ( (lv_modifiers_48_0= ruleCommonModifier ) )* otherlv_49= 'enum' ( (lv_name_50_0= ruleValidID ) ) otherlv_51= '{' ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_55= ';' )? otherlv_56= '}' { // InternalSARL.g:7046:5: () // InternalSARL.g:7047:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlEnumerationAnnotationInfoAction_2_3_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:7053:5: ( (lv_modifiers_48_0= ruleCommonModifier ) )* loop204: do { int alt204=2; int LA204_0 = input.LA(1); if ( (LA204_0==25||(LA204_0>=78 && LA204_0<=89)) ) { alt204=1; // depends on control dependency: [if], data = [none] } switch (alt204) { case 1 : // InternalSARL.g:7054:6: (lv_modifiers_48_0= ruleCommonModifier ) { // InternalSARL.g:7054:6: (lv_modifiers_48_0= ruleCommonModifier ) // InternalSARL.g:7055:7: lv_modifiers_48_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_3_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_32); lv_modifiers_48_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_48_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop204; } } while (true); otherlv_49=(Token)match(input,43,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_49, grammarAccess.getAnnotationFieldAccess().getEnumKeyword_2_3_2()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7076:5: ( (lv_name_50_0= ruleValidID ) ) // InternalSARL.g:7077:6: (lv_name_50_0= ruleValidID ) { // InternalSARL.g:7077:6: (lv_name_50_0= ruleValidID ) // InternalSARL.g:7078:7: lv_name_50_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_3_3_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_17); lv_name_50_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "name", lv_name_50_0, "org.eclipse.xtend.core.Xtend.ValidID"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } otherlv_51=(Token)match(input,29,FOLLOW_33); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_51, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_3_4()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7099:5: ( ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* )? int alt206=2; int LA206_0 = input.LA(1); if ( (LA206_0==RULE_ID||LA206_0==44||(LA206_0>=92 && LA206_0<=95)) ) { alt206=1; // depends on control dependency: [if], data = [none] } switch (alt206) { case 1 : // InternalSARL.g:7100:6: ( (lv_members_52_0= ruleXtendEnumLiteral ) ) (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* { // InternalSARL.g:7100:6: ( (lv_members_52_0= ruleXtendEnumLiteral ) ) // InternalSARL.g:7101:7: (lv_members_52_0= ruleXtendEnumLiteral ) { // InternalSARL.g:7101:7: (lv_members_52_0= ruleXtendEnumLiteral ) // InternalSARL.g:7102:8: lv_members_52_0= ruleXtendEnumLiteral { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersXtendEnumLiteralParserRuleCall_2_3_5_0_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_34); lv_members_52_0=ruleXtendEnumLiteral(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "members", lv_members_52_0, "io.sarl.lang.SARL.XtendEnumLiteral"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:7119:6: (otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) )* loop205: do { int alt205=2; int LA205_0 = input.LA(1); if ( (LA205_0==32) ) { alt205=1; // depends on control dependency: [if], data = [none] } switch (alt205) { case 1 : // InternalSARL.g:7120:7: otherlv_53= ',' ( (lv_members_54_0= ruleXtendEnumLiteral ) ) { otherlv_53=(Token)match(input,32,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_53, grammarAccess.getAnnotationFieldAccess().getCommaKeyword_2_3_5_1_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7124:7: ( (lv_members_54_0= ruleXtendEnumLiteral ) ) // InternalSARL.g:7125:8: (lv_members_54_0= ruleXtendEnumLiteral ) { // InternalSARL.g:7125:8: (lv_members_54_0= ruleXtendEnumLiteral ) // InternalSARL.g:7126:9: lv_members_54_0= ruleXtendEnumLiteral { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersXtendEnumLiteralParserRuleCall_2_3_5_1_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_34); lv_members_54_0=ruleXtendEnumLiteral(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "members", lv_members_54_0, "io.sarl.lang.SARL.XtendEnumLiteral"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop205; } } while (true); } break; } // InternalSARL.g:7145:5: (otherlv_55= ';' )? int alt207=2; int LA207_0 = input.LA(1); if ( (LA207_0==26) ) { alt207=1; // depends on control dependency: [if], data = [none] } switch (alt207) { case 1 : // InternalSARL.g:7146:6: otherlv_55= ';' { otherlv_55=(Token)match(input,26,FOLLOW_24); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_55, grammarAccess.getAnnotationFieldAccess().getSemicolonKeyword_2_3_6()); // depends on control dependency: [if], data = [none] } } break; } otherlv_56=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_56, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_3_7()); // depends on control dependency: [if], data = [none] } } } break; case 5 : // InternalSARL.g:7157:4: ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) { // InternalSARL.g:7157:4: ( () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' ) // InternalSARL.g:7158:5: () ( (lv_modifiers_58_0= ruleCommonModifier ) )* otherlv_59= 'annotation' ( (lv_name_60_0= ruleValidID ) ) otherlv_61= '{' ( (lv_members_62_0= ruleAnnotationField ) )* otherlv_63= '}' { // InternalSARL.g:7158:5: () // InternalSARL.g:7159:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getAnnotationFieldAccess().getSarlAnnotationTypeAnnotationInfoAction_2_4_0(), current); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:7165:5: ( (lv_modifiers_58_0= ruleCommonModifier ) )* loop208: do { int alt208=2; int LA208_0 = input.LA(1); if ( (LA208_0==25||(LA208_0>=78 && LA208_0<=89)) ) { alt208=1; // depends on control dependency: [if], data = [none] } switch (alt208) { case 1 : // InternalSARL.g:7166:6: (lv_modifiers_58_0= ruleCommonModifier ) { // InternalSARL.g:7166:6: (lv_modifiers_58_0= ruleCommonModifier ) // InternalSARL.g:7167:7: lv_modifiers_58_0= ruleCommonModifier { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getModifiersCommonModifierParserRuleCall_2_4_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_35); lv_modifiers_58_0=ruleCommonModifier(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "modifiers", lv_modifiers_58_0, "org.eclipse.xtend.core.Xtend.CommonModifier"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop208; } } while (true); otherlv_59=(Token)match(input,44,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_59, grammarAccess.getAnnotationFieldAccess().getAnnotationKeyword_2_4_2()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7188:5: ( (lv_name_60_0= ruleValidID ) ) // InternalSARL.g:7189:6: (lv_name_60_0= ruleValidID ) { // InternalSARL.g:7189:6: (lv_name_60_0= ruleValidID ) // InternalSARL.g:7190:7: lv_name_60_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getNameValidIDParserRuleCall_2_4_3_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_17); lv_name_60_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } set( current, "name", lv_name_60_0, "org.eclipse.xtend.core.Xtend.ValidID"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } otherlv_61=(Token)match(input,29,FOLLOW_36); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_61, grammarAccess.getAnnotationFieldAccess().getLeftCurlyBracketKeyword_2_4_4()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:7211:5: ( (lv_members_62_0= ruleAnnotationField ) )* loop209: do { int alt209=2; int LA209_0 = input.LA(1); if ( (LA209_0==25||LA209_0==39||(LA209_0>=42 && LA209_0<=44)||(LA209_0>=65 && LA209_0<=66)||(LA209_0>=78 && LA209_0<=89)||LA209_0==105) ) { alt209=1; // depends on control dependency: [if], data = [none] } switch (alt209) { case 1 : // InternalSARL.g:7212:6: (lv_members_62_0= ruleAnnotationField ) { // InternalSARL.g:7212:6: (lv_members_62_0= ruleAnnotationField ) // InternalSARL.g:7213:7: lv_members_62_0= ruleAnnotationField { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getAnnotationFieldAccess().getMembersAnnotationFieldParserRuleCall_2_4_5_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_36); lv_members_62_0=ruleAnnotationField(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getAnnotationFieldRule()); // depends on control dependency: [if], data = [none] } add( current, "members", lv_members_62_0, "io.sarl.lang.SARL.AnnotationField"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; default : break loop209; } } while (true); otherlv_63=(Token)match(input,30,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_63, grammarAccess.getAnnotationFieldAccess().getRightCurlyBracketKeyword_2_4_6()); // depends on control dependency: [if], data = [none] } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); // depends on control dependency: [if], data = [none] } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } }
public class class_name { public static INDArrayIndex[] create(INDArray index) { if (index.isMatrix()) { if (index.rows() > Integer.MAX_VALUE) throw new ND4JArraySizeException(); NDArrayIndex[] ret = new NDArrayIndex[(int) index.rows()]; for (int i = 0; i < index.rows(); i++) { INDArray row = index.getRow(i); val nums = new long[(int) index.getRow(i).columns()]; for (int j = 0; j < row.columns(); j++) { nums[j] = (int) row.getFloat(j); } NDArrayIndex idx = new NDArrayIndex(nums); ret[i] = idx; } return ret; } else if (index.isVector()) { long[] indices = NDArrayUtil.toLongs(index); return new NDArrayIndex[] {new NDArrayIndex(indices)}; } throw new IllegalArgumentException("Passed in ndarray must be a matrix or a vector"); } }
public class class_name { public static INDArrayIndex[] create(INDArray index) { if (index.isMatrix()) { if (index.rows() > Integer.MAX_VALUE) throw new ND4JArraySizeException(); NDArrayIndex[] ret = new NDArrayIndex[(int) index.rows()]; for (int i = 0; i < index.rows(); i++) { INDArray row = index.getRow(i); val nums = new long[(int) index.getRow(i).columns()]; for (int j = 0; j < row.columns(); j++) { nums[j] = (int) row.getFloat(j); // depends on control dependency: [for], data = [j] } NDArrayIndex idx = new NDArrayIndex(nums); ret[i] = idx; // depends on control dependency: [for], data = [i] } return ret; // depends on control dependency: [if], data = [none] } else if (index.isVector()) { long[] indices = NDArrayUtil.toLongs(index); return new NDArrayIndex[] {new NDArrayIndex(indices)}; // depends on control dependency: [if], data = [none] } throw new IllegalArgumentException("Passed in ndarray must be a matrix or a vector"); } }
public class class_name { static void setPlaceholder(ImageView target, @Nullable Drawable placeholderDrawable) { target.setImageDrawable(placeholderDrawable); if (target.getDrawable() instanceof Animatable) { ((Animatable) target.getDrawable()).start(); } } }
public class class_name { static void setPlaceholder(ImageView target, @Nullable Drawable placeholderDrawable) { target.setImageDrawable(placeholderDrawable); if (target.getDrawable() instanceof Animatable) { ((Animatable) target.getDrawable()).start(); // depends on control dependency: [if], data = [none] } } }
public class class_name { @Override public final void sendWave(final Wave wave) { // Define the from class if it didn't been done before (manually) if (wave.fromClass() == null) { wave.fromClass(this.getClass()); } sendWaveIntoJit(wave); } }
public class class_name { @Override public final void sendWave(final Wave wave) { // Define the from class if it didn't been done before (manually) if (wave.fromClass() == null) { wave.fromClass(this.getClass()); // depends on control dependency: [if], data = [none] } sendWaveIntoJit(wave); } }
public class class_name { private Set<String> readFolderFilters() { JSONObject storedFilters = readUserFolderFilters(); Set<String> result = null; if (storedFilters.has(getCmsObject().getRequestContext().getSiteRoot())) { try { org.opencms.json.JSONArray folders = storedFilters.getJSONArray( getCmsObject().getRequestContext().getSiteRoot()); result = new HashSet<String>(); for (int i = 0; i < folders.length(); i++) { result.add(folders.getString(i)); } } catch (JSONException e) { LOG.error(e.getLocalizedMessage(), e); } } return result; } }
public class class_name { private Set<String> readFolderFilters() { JSONObject storedFilters = readUserFolderFilters(); Set<String> result = null; if (storedFilters.has(getCmsObject().getRequestContext().getSiteRoot())) { try { org.opencms.json.JSONArray folders = storedFilters.getJSONArray( getCmsObject().getRequestContext().getSiteRoot()); result = new HashSet<String>(); // depends on control dependency: [try], data = [none] for (int i = 0; i < folders.length(); i++) { result.add(folders.getString(i)); // depends on control dependency: [for], data = [i] } } catch (JSONException e) { LOG.error(e.getLocalizedMessage(), e); } // depends on control dependency: [catch], data = [none] } return result; } }
public class class_name { public float getFloat(final int index, final ByteOrder byteOrder) { boundsCheck0(index, SIZE_OF_FLOAT); if (NATIVE_BYTE_ORDER != byteOrder) { final int bits = UNSAFE.getInt(byteArray, ARRAY_BASE_OFFSET + index); return Float.intBitsToFloat(Integer.reverseBytes(bits)); } else { return UNSAFE.getFloat(byteArray, ARRAY_BASE_OFFSET + index); } } }
public class class_name { public float getFloat(final int index, final ByteOrder byteOrder) { boundsCheck0(index, SIZE_OF_FLOAT); if (NATIVE_BYTE_ORDER != byteOrder) { final int bits = UNSAFE.getInt(byteArray, ARRAY_BASE_OFFSET + index); return Float.intBitsToFloat(Integer.reverseBytes(bits)); // depends on control dependency: [if], data = [none] } else { return UNSAFE.getFloat(byteArray, ARRAY_BASE_OFFSET + index); // depends on control dependency: [if], data = [none] } } }
public class class_name { public JvmOperation getElement() { if (element != null && element.eIsProxy()) { InternalEObject oldElement = (InternalEObject)element; element = (JvmOperation)eResolveProxy(oldElement); if (element != oldElement) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, oldElement, element)); } } return element; } }
public class class_name { public JvmOperation getElement() { if (element != null && element.eIsProxy()) { InternalEObject oldElement = (InternalEObject)element; element = (JvmOperation)eResolveProxy(oldElement); // depends on control dependency: [if], data = [none] if (element != oldElement) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, oldElement, element)); } } return element; } }
public class class_name { public Set<Location> parseExportedAPIs(Archive archive, String name) { try { return parse(archive, API_FINDER, name); } catch (IOException e) { throw new UncheckedIOException(e); } } }
public class class_name { public Set<Location> parseExportedAPIs(Archive archive, String name) { try { return parse(archive, API_FINDER, name); // depends on control dependency: [try], data = [none] } catch (IOException e) { throw new UncheckedIOException(e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { protected void close() { assert (fd != null); try { fd.close(); socket.eventClosed(addr.toString(), fd); } catch (IOException e) { socket.eventCloseFailed(addr.toString(), ZError.exccode(e)); } fd = null; } }
public class class_name { protected void close() { assert (fd != null); try { fd.close(); // depends on control dependency: [try], data = [none] socket.eventClosed(addr.toString(), fd); // depends on control dependency: [try], data = [none] } catch (IOException e) { socket.eventCloseFailed(addr.toString(), ZError.exccode(e)); } // depends on control dependency: [catch], data = [none] fd = null; } }
public class class_name { public void releasePermits(long number, Result result, long startNanos, long nanoTime) { resultCounts.write(result, number, nanoTime); resultLatency.write(result, number, nanoTime - startNanos, nanoTime); for (BackPressure<Rejected> backPressure : backPressureList) { backPressure.releasePermit(number, result, nanoTime); } } }
public class class_name { public void releasePermits(long number, Result result, long startNanos, long nanoTime) { resultCounts.write(result, number, nanoTime); resultLatency.write(result, number, nanoTime - startNanos, nanoTime); for (BackPressure<Rejected> backPressure : backPressureList) { backPressure.releasePermit(number, result, nanoTime); // depends on control dependency: [for], data = [backPressure] } } }
public class class_name { public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { boolean declaredLocally = false; for (Annotation annotation : clazz.getDeclaredAnnotations()) { if (annotation.annotationType().equals(annotationType)) { declaredLocally = true; break; } } return declaredLocally; } }
public class class_name { public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { boolean declaredLocally = false; for (Annotation annotation : clazz.getDeclaredAnnotations()) { if (annotation.annotationType().equals(annotationType)) { declaredLocally = true; // depends on control dependency: [if], data = [none] break; } } return declaredLocally; } }
public class class_name { public boolean destinationExists(String destinationName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "destinationExists", destinationName); boolean returnVal = false; try { returnVal = destinationManager.destinationExists(destinationName, messageProcessor.getMessagingEngineBus()); } catch (SIMPNullParameterException e) { // No FFDC code needed } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "destinationExists", new Boolean(returnVal)); return returnVal; } }
public class class_name { public boolean destinationExists(String destinationName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "destinationExists", destinationName); boolean returnVal = false; try { returnVal = destinationManager.destinationExists(destinationName, messageProcessor.getMessagingEngineBus()); // depends on control dependency: [try], data = [none] } catch (SIMPNullParameterException e) { // No FFDC code needed } // depends on control dependency: [catch], data = [none] if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "destinationExists", new Boolean(returnVal)); return returnVal; } }
public class class_name { public int read(long pos) { if (pos >= size) { return -1; } byte[] block = blocks[blockIndex(pos)]; int off = offsetInBlock(pos); return UnsignedBytes.toInt(block[off]); } }
public class class_name { public int read(long pos) { if (pos >= size) { return -1; // depends on control dependency: [if], data = [none] } byte[] block = blocks[blockIndex(pos)]; int off = offsetInBlock(pos); return UnsignedBytes.toInt(block[off]); } }
public class class_name { public void marshall(AcceptCertificateTransferRequest acceptCertificateTransferRequest, ProtocolMarshaller protocolMarshaller) { if (acceptCertificateTransferRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(acceptCertificateTransferRequest.getCertificateId(), CERTIFICATEID_BINDING); protocolMarshaller.marshall(acceptCertificateTransferRequest.getSetAsActive(), SETASACTIVE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(AcceptCertificateTransferRequest acceptCertificateTransferRequest, ProtocolMarshaller protocolMarshaller) { if (acceptCertificateTransferRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(acceptCertificateTransferRequest.getCertificateId(), CERTIFICATEID_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(acceptCertificateTransferRequest.getSetAsActive(), SETASACTIVE_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public Observable<ServiceResponse<CompositeEntityExtractor>> getCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } if (cEntityId == null) { throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CompositeEntityExtractor>>>() { @Override public Observable<ServiceResponse<CompositeEntityExtractor>> call(Response<ResponseBody> response) { try { ServiceResponse<CompositeEntityExtractor> clientResponse = getCompositeEntityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } }
public class class_name { public Observable<ServiceResponse<CompositeEntityExtractor>> getCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } if (cEntityId == null) { throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CompositeEntityExtractor>>>() { @Override public Observable<ServiceResponse<CompositeEntityExtractor>> call(Response<ResponseBody> response) { try { ServiceResponse<CompositeEntityExtractor> clientResponse = getCompositeEntityDelegate(response); return Observable.just(clientResponse); // depends on control dependency: [try], data = [none] } catch (Throwable t) { return Observable.error(t); } // depends on control dependency: [catch], data = [none] } }); } }
public class class_name { @Nullable public static ECKey recoverFromSignature(int recId, ECDSASignature sig, Sha256Hash message, boolean compressed) { Preconditions.checkArgument(recId >= 0, "recId must be positive"); Preconditions.checkArgument(sig.r.signum() >= 0, "r must be positive"); Preconditions.checkArgument(sig.s.signum() >= 0, "s must be positive"); Preconditions.checkNotNull(message); // 1.0 For j from 0 to h (h == recId here and the loop is outside this function) // 1.1 Let x = r + jn BigInteger n = CURVE.getN(); // Curve order. BigInteger i = BigInteger.valueOf((long) recId / 2); BigInteger x = sig.r.add(i.multiply(n)); // 1.2. Convert the integer x to an octet string X of length mlen using the conversion routine // specified in Section 2.3.7, where mlen = ⌈(log2 p)/8⌉ or mlen = ⌈m/8⌉. // 1.3. Convert the octet string (16 set binary digits)||X to an elliptic curve point R using the // conversion routine specified in Section 2.3.4. If this conversion routine outputs “invalid”, then // do another iteration of Step 1. // // More concisely, what these points mean is to use X as a compressed public key. BigInteger prime = SecP256K1Curve.q; if (x.compareTo(prime) >= 0) { // Cannot have point co-ordinates larger than this as everything takes place modulo Q. return null; } // Compressed keys require you to know an extra bit of data about the y-coord as there are two possibilities. // So it's encoded in the recId. ECPoint R = decompressKey(x, (recId & 1) == 1); // 1.4. If nR != point at infinity, then do another iteration of Step 1 (callers responsibility). if (!R.multiply(n).isInfinity()) return null; // 1.5. Compute e from M using Steps 2 and 3 of ECDSA signature verification. BigInteger e = message.toBigInteger(); // 1.6. For k from 1 to 2 do the following. (loop is outside this function via iterating recId) // 1.6.1. Compute a candidate public key as: // Q = mi(r) * (sR - eG) // // Where mi(x) is the modular multiplicative inverse. We transform this into the following: // Q = (mi(r) * s ** R) + (mi(r) * -e ** G) // Where -e is the modular additive inverse of e, that is z such that z + e = 0 (mod n). In the above equation // ** is point multiplication and + is point addition (the EC group operator). // // We can find the additive inverse by subtracting e from zero then taking the mod. For example the additive // inverse of 3 modulo 11 is 8 because 3 + 8 mod 11 = 0, and -3 mod 11 = 8. BigInteger eInv = BigInteger.ZERO.subtract(e).mod(n); BigInteger rInv = sig.r.modInverse(n); BigInteger srInv = rInv.multiply(sig.s).mod(n); BigInteger eInvrInv = rInv.multiply(eInv).mod(n); ECPoint q = ECAlgorithms.sumOfTwoMultiplies(CURVE.getG(), eInvrInv, R, srInv); return ECKey.fromPublicOnly(q.getEncoded(compressed)); } }
public class class_name { @Nullable public static ECKey recoverFromSignature(int recId, ECDSASignature sig, Sha256Hash message, boolean compressed) { Preconditions.checkArgument(recId >= 0, "recId must be positive"); Preconditions.checkArgument(sig.r.signum() >= 0, "r must be positive"); Preconditions.checkArgument(sig.s.signum() >= 0, "s must be positive"); Preconditions.checkNotNull(message); // 1.0 For j from 0 to h (h == recId here and the loop is outside this function) // 1.1 Let x = r + jn BigInteger n = CURVE.getN(); // Curve order. BigInteger i = BigInteger.valueOf((long) recId / 2); BigInteger x = sig.r.add(i.multiply(n)); // 1.2. Convert the integer x to an octet string X of length mlen using the conversion routine // specified in Section 2.3.7, where mlen = ⌈(log2 p)/8⌉ or mlen = ⌈m/8⌉. // 1.3. Convert the octet string (16 set binary digits)||X to an elliptic curve point R using the // conversion routine specified in Section 2.3.4. If this conversion routine outputs “invalid”, then // do another iteration of Step 1. // // More concisely, what these points mean is to use X as a compressed public key. BigInteger prime = SecP256K1Curve.q; if (x.compareTo(prime) >= 0) { // Cannot have point co-ordinates larger than this as everything takes place modulo Q. return null; // depends on control dependency: [if], data = [none] } // Compressed keys require you to know an extra bit of data about the y-coord as there are two possibilities. // So it's encoded in the recId. ECPoint R = decompressKey(x, (recId & 1) == 1); // 1.4. If nR != point at infinity, then do another iteration of Step 1 (callers responsibility). if (!R.multiply(n).isInfinity()) return null; // 1.5. Compute e from M using Steps 2 and 3 of ECDSA signature verification. BigInteger e = message.toBigInteger(); // 1.6. For k from 1 to 2 do the following. (loop is outside this function via iterating recId) // 1.6.1. Compute a candidate public key as: // Q = mi(r) * (sR - eG) // // Where mi(x) is the modular multiplicative inverse. We transform this into the following: // Q = (mi(r) * s ** R) + (mi(r) * -e ** G) // Where -e is the modular additive inverse of e, that is z such that z + e = 0 (mod n). In the above equation // ** is point multiplication and + is point addition (the EC group operator). // // We can find the additive inverse by subtracting e from zero then taking the mod. For example the additive // inverse of 3 modulo 11 is 8 because 3 + 8 mod 11 = 0, and -3 mod 11 = 8. BigInteger eInv = BigInteger.ZERO.subtract(e).mod(n); BigInteger rInv = sig.r.modInverse(n); BigInteger srInv = rInv.multiply(sig.s).mod(n); BigInteger eInvrInv = rInv.multiply(eInv).mod(n); ECPoint q = ECAlgorithms.sumOfTwoMultiplies(CURVE.getG(), eInvrInv, R, srInv); return ECKey.fromPublicOnly(q.getEncoded(compressed)); } }
public class class_name { public void setXMLReader(XMLReader eventsource) { fXMLReader=eventsource; eventsource.setContentHandler(this); eventsource.setDTDHandler(this); eventsource.setErrorHandler(this); // to report fatal errors in filtering mode // Not supported by all SAX2 filters: try { eventsource. setProperty("http://xml.org/sax/properties/lexical-handler", this); } catch(SAXNotRecognizedException e) { // Nothing we can do about it } catch(SAXNotSupportedException e) { // Nothing we can do about it } // Should we also bind as other varieties of handler? // (DTDHandler and so on) } }
public class class_name { public void setXMLReader(XMLReader eventsource) { fXMLReader=eventsource; eventsource.setContentHandler(this); eventsource.setDTDHandler(this); eventsource.setErrorHandler(this); // to report fatal errors in filtering mode // Not supported by all SAX2 filters: try { eventsource. setProperty("http://xml.org/sax/properties/lexical-handler", this); // depends on control dependency: [try], data = [none] } catch(SAXNotRecognizedException e) { // Nothing we can do about it } // depends on control dependency: [catch], data = [none] catch(SAXNotSupportedException e) { // Nothing we can do about it } // depends on control dependency: [catch], data = [none] // Should we also bind as other varieties of handler? // (DTDHandler and so on) } }
public class class_name { @Override public boolean containsKey(Object key) { // key could be not in original or in deltaMap // key could be not in original but in deltaMap // key could be in original but removed from deltaMap // key could be in original but mapped to something else in deltaMap Object value = deltaMap.get(key); if (value == null) { return originalMap.containsKey(key); } if (value == removedValue) { return false; } return true; } }
public class class_name { @Override public boolean containsKey(Object key) { // key could be not in original or in deltaMap // key could be not in original but in deltaMap // key could be in original but removed from deltaMap // key could be in original but mapped to something else in deltaMap Object value = deltaMap.get(key); if (value == null) { return originalMap.containsKey(key); // depends on control dependency: [if], data = [none] } if (value == removedValue) { return false; // depends on control dependency: [if], data = [none] } return true; } }
public class class_name { Expression getVariable( String name ) { for( int i = state.stackIdx - 1; i >= 0; i-- ) { Expression variable = state.stack.get( i ).getVariable( name ); if( variable != null ) { return variable; } } if( name.equals( "@arguments" ) ) { for( int i = state.stackIdx - 1; i >= 0; i-- ) { Scope scope = state.stack.get( i ); if( scope.parameters != null ) { Operation params = new Operation( scope.mixin, ' ' ); for( Expression expr : scope.parameters.values() ) { if( expr.getClass() == Operation.class && scope.parameters.size() == 1 ) { return expr; } params.addOperand( expr ); } return params; } } } return null; } }
public class class_name { Expression getVariable( String name ) { for( int i = state.stackIdx - 1; i >= 0; i-- ) { Expression variable = state.stack.get( i ).getVariable( name ); if( variable != null ) { return variable; // depends on control dependency: [if], data = [none] } } if( name.equals( "@arguments" ) ) { for( int i = state.stackIdx - 1; i >= 0; i-- ) { Scope scope = state.stack.get( i ); if( scope.parameters != null ) { Operation params = new Operation( scope.mixin, ' ' ); for( Expression expr : scope.parameters.values() ) { if( expr.getClass() == Operation.class && scope.parameters.size() == 1 ) { return expr; // depends on control dependency: [if], data = [none] } params.addOperand( expr ); // depends on control dependency: [for], data = [expr] } return params; // depends on control dependency: [if], data = [none] } } } return null; } }
public class class_name { private void get_dev_system_resource() throws DevFailed { // // Try to retrieve resources for device black box depth and device // description // if (Util._UseDb) { try { final String[] prop_names = { "blackbox_depth", "description", "poll_ring_depth", "polled_cmd", "polled_attr", "non_auto_polled_cmd", "non_auto_polled_attr", "poll_old_factor" }; // Call db server final DbDatum[] res_value = db_dev.get_property(prop_names); int i = 0; if (res_value[i].is_empty() == false) { blackbox_depth = res_value[i].extractLong(); } i++; if (res_value[i].is_empty() == false) { desc = res_value[i].extractString(); } i++; if (res_value[i].is_empty() == false) { set_poll_ring_depth(res_value[i].extractLong()); } i++; if (res_value[i].is_empty() == false) { set_polled_cmd(res_value[i].extractStringArray()); } i++; if (res_value[i].is_empty() == false) { set_polled_attr(res_value[i].extractStringArray()); } i++; if (res_value[i].is_empty() == false) { set_non_auto_polled_cmd(res_value[i].extractStringArray()); } i++; if (res_value[i].is_empty() == false) { set_non_auto_polled_attr(res_value[i].extractStringArray()); } i++; if (res_value[i].is_empty() == false) { set_poll_old_factor(res_value[i].extractLong()); } else { set_poll_old_factor(Tango_DEFAULT_POLL_OLD_FACTOR); } } catch (final DevFailed e) { final StringBuffer o = new StringBuffer( "Database error while trying to retrieve device properties for device "); o.append(device_name); Except.throw_exception("API_DatabaseAccess", o.toString(), "DeviceImpl.get_dev_system_resource"); } catch (final BAD_OPERATION ex) { final StringBuffer o = new StringBuffer( "Database error while trying to retrieve device properties for device "); o.append(device_name); Except.throw_exception("API_DatabaseAccess", o.toString(), "DeviceImpl.get_dev_system_resource"); } } } }
public class class_name { private void get_dev_system_resource() throws DevFailed { // // Try to retrieve resources for device black box depth and device // description // if (Util._UseDb) { try { final String[] prop_names = { "blackbox_depth", "description", "poll_ring_depth", "polled_cmd", "polled_attr", "non_auto_polled_cmd", "non_auto_polled_attr", "poll_old_factor" }; // Call db server final DbDatum[] res_value = db_dev.get_property(prop_names); int i = 0; if (res_value[i].is_empty() == false) { blackbox_depth = res_value[i].extractLong(); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { desc = res_value[i].extractString(); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_poll_ring_depth(res_value[i].extractLong()); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_polled_cmd(res_value[i].extractStringArray()); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_polled_attr(res_value[i].extractStringArray()); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_non_auto_polled_cmd(res_value[i].extractStringArray()); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_non_auto_polled_attr(res_value[i].extractStringArray()); // depends on control dependency: [if], data = [none] } i++; if (res_value[i].is_empty() == false) { set_poll_old_factor(res_value[i].extractLong()); // depends on control dependency: [if], data = [none] } else { set_poll_old_factor(Tango_DEFAULT_POLL_OLD_FACTOR); // depends on control dependency: [if], data = [none] } } catch (final DevFailed e) { final StringBuffer o = new StringBuffer( "Database error while trying to retrieve device properties for device "); o.append(device_name); Except.throw_exception("API_DatabaseAccess", o.toString(), "DeviceImpl.get_dev_system_resource"); } catch (final BAD_OPERATION ex) { final StringBuffer o = new StringBuffer( "Database error while trying to retrieve device properties for device "); o.append(device_name); Except.throw_exception("API_DatabaseAccess", o.toString(), "DeviceImpl.get_dev_system_resource"); } } } }
public class class_name { public ValidationMatcherLibrary getLibraryForPrefix(String validationMatcherPrefix) { if (validationMatcherLibraries != null) { for (ValidationMatcherLibrary validationMatcherLibrary : validationMatcherLibraries) { if (validationMatcherLibrary.getPrefix().equals(validationMatcherPrefix)) { return validationMatcherLibrary; } } } throw new NoSuchValidationMatcherLibraryException("Can not find validationMatcher library for prefix " + validationMatcherPrefix); } }
public class class_name { public ValidationMatcherLibrary getLibraryForPrefix(String validationMatcherPrefix) { if (validationMatcherLibraries != null) { for (ValidationMatcherLibrary validationMatcherLibrary : validationMatcherLibraries) { if (validationMatcherLibrary.getPrefix().equals(validationMatcherPrefix)) { return validationMatcherLibrary; // depends on control dependency: [if], data = [none] } } } throw new NoSuchValidationMatcherLibraryException("Can not find validationMatcher library for prefix " + validationMatcherPrefix); } }
public class class_name { private void openNextElementView() { List<CmsElementViewInfo> views = getData().getElementViews(); if (views.size() > 1) { CmsUUID current = m_elementView.getRootViewId(); // look for the current view index int currentIndex = -1; for (int i = 0; i < views.size(); i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot() && current.equals(view.getElementViewId())) { currentIndex = i; break; } } if (currentIndex != -1) { CmsElementViewInfo target = null; // look for the next root view for (int i = currentIndex + 1; i < views.size(); i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot()) { target = view; break; } } if (target == null) { // start at the beginning for (int i = 0; i < currentIndex; i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot()) { target = view; break; } } } if (target != null) { final String viewName = target.getTitle(); Runnable action = new Runnable() { public void run() { CmsNotification.get().send( Type.NORMAL, Messages.get().key(Messages.GUI_SWITCH_ELEMENT_VIEW_NOTIFICATION_1, viewName)); } }; setElementView(target, action); } } } } }
public class class_name { private void openNextElementView() { List<CmsElementViewInfo> views = getData().getElementViews(); if (views.size() > 1) { CmsUUID current = m_elementView.getRootViewId(); // look for the current view index int currentIndex = -1; for (int i = 0; i < views.size(); i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot() && current.equals(view.getElementViewId())) { currentIndex = i; // depends on control dependency: [if], data = [none] break; } } if (currentIndex != -1) { CmsElementViewInfo target = null; // look for the next root view for (int i = currentIndex + 1; i < views.size(); i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot()) { target = view; // depends on control dependency: [if], data = [none] break; } } if (target == null) { // start at the beginning for (int i = 0; i < currentIndex; i++) { CmsElementViewInfo view = views.get(i); if (view.isRoot()) { target = view; // depends on control dependency: [if], data = [none] break; } } } if (target != null) { final String viewName = target.getTitle(); Runnable action = new Runnable() { public void run() { CmsNotification.get().send( Type.NORMAL, Messages.get().key(Messages.GUI_SWITCH_ELEMENT_VIEW_NOTIFICATION_1, viewName)); } }; setElementView(target, action); // depends on control dependency: [if], data = [(target] } } } } }
public class class_name { @Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; c = renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); // Fix for 4238829: should lay out the JPanel. boolean shouldValidate = false; if (c instanceof JPanel) { shouldValidate = true; } if (c instanceof UIResource) { c.setName("ComboBox.renderer"); } boolean force = forceOpaque && c instanceof JComponent; if (force) { ((JComponent) c).setOpaque(false); } int x = bounds.x, y = bounds.y, w = bounds.width, h = bounds.height; if (padding != null) { x = bounds.x + padding.left; y = bounds.y + padding.top; w = bounds.width - (padding.left + padding.right); h = bounds.height - (padding.top + padding.bottom); } currentValuePane.paintComponent(g, c, comboBox, x, y, w, h, shouldValidate); if (force) { ((JComponent) c).setOpaque(true); } } }
public class class_name { @Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; c = renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); // Fix for 4238829: should lay out the JPanel. boolean shouldValidate = false; if (c instanceof JPanel) { shouldValidate = true; // depends on control dependency: [if], data = [none] } if (c instanceof UIResource) { c.setName("ComboBox.renderer"); // depends on control dependency: [if], data = [none] } boolean force = forceOpaque && c instanceof JComponent; if (force) { ((JComponent) c).setOpaque(false); // depends on control dependency: [if], data = [none] } int x = bounds.x, y = bounds.y, w = bounds.width, h = bounds.height; if (padding != null) { x = bounds.x + padding.left; // depends on control dependency: [if], data = [none] y = bounds.y + padding.top; // depends on control dependency: [if], data = [none] w = bounds.width - (padding.left + padding.right); // depends on control dependency: [if], data = [(padding] h = bounds.height - (padding.top + padding.bottom); // depends on control dependency: [if], data = [(padding] } currentValuePane.paintComponent(g, c, comboBox, x, y, w, h, shouldValidate); if (force) { ((JComponent) c).setOpaque(true); // depends on control dependency: [if], data = [none] } } }
public class class_name { boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { if (ring.getFlag(CDKConstants.ISPLACED)) return true; IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class); for (IAtom atom : ring.atoms()) if (atom.getPoint2d() != null) atom.setFlag(CDKConstants.ISPLACED, true); AtomPlacer.copyPlaced(partiallyPlacedRing, ring); if (partiallyPlacedRing.getAtomCount() > 1 && partiallyPlacedRing.getAtomCount() < ring.getAtomCount()) { placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.FUSED, bondLength); placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.BRIDGED, bondLength); placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.SPIRO, bondLength); ring.setFlag(CDKConstants.ISPLACED, true); return true; } else { return false; } } }
public class class_name { boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { if (ring.getFlag(CDKConstants.ISPLACED)) return true; IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class); for (IAtom atom : ring.atoms()) if (atom.getPoint2d() != null) atom.setFlag(CDKConstants.ISPLACED, true); AtomPlacer.copyPlaced(partiallyPlacedRing, ring); if (partiallyPlacedRing.getAtomCount() > 1 && partiallyPlacedRing.getAtomCount() < ring.getAtomCount()) { placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.FUSED, bondLength); // depends on control dependency: [if], data = [none] placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.BRIDGED, bondLength); // depends on control dependency: [if], data = [none] placeConnectedRings(rset, partiallyPlacedRing, RingPlacer.SPIRO, bondLength); // depends on control dependency: [if], data = [none] ring.setFlag(CDKConstants.ISPLACED, true); // depends on control dependency: [if], data = [none] return true; // depends on control dependency: [if], data = [none] } else { return false; // depends on control dependency: [if], data = [none] } } }
public class class_name { public static void multTransAB(DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { if( b.numRows == 1) { // there are significantly faster algorithms when dealing with vectors if( a.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixVectorMult_DDRM.multTransA_reorder(a,b,c); } else { MatrixVectorMult_DDRM.multTransA_small(a,b,c); } } else if( a.numCols >= EjmlParameters.MULT_TRANAB_COLUMN_SWITCH ) { MatrixMatrixMult_DDRM.multTransAB_aux(a, b, c, null); } else { MatrixMatrixMult_DDRM.multTransAB(a, b, c); } } }
public class class_name { public static void multTransAB(DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { if( b.numRows == 1) { // there are significantly faster algorithms when dealing with vectors if( a.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixVectorMult_DDRM.multTransA_reorder(a,b,c); // depends on control dependency: [if], data = [none] } else { MatrixVectorMult_DDRM.multTransA_small(a,b,c); // depends on control dependency: [if], data = [none] } } else if( a.numCols >= EjmlParameters.MULT_TRANAB_COLUMN_SWITCH ) { MatrixMatrixMult_DDRM.multTransAB_aux(a, b, c, null); // depends on control dependency: [if], data = [none] } else { MatrixMatrixMult_DDRM.multTransAB(a, b, c); // depends on control dependency: [if], data = [none] } } }
public class class_name { public static ObjectSize deepSizeOf(Object obj, IObjectSizeFilter filter, int maxObjects) { Map<Object, Object> visited = new IdentityHashMap<Object, Object>(); Stack<ObjectEntry> stack = new Stack<ObjectEntry>(); InvocationCounter sizeHistogram = new InvocationCounter(false); long result = internalSizeOf(new ObjectEntry(obj, "", ""), stack, visited, filter, ""); sizeHistogram.recordInvocation(obj.getClass().getName(), (int)result); int n = 1; while (!stack.isEmpty()) { ObjectEntry entry = stack.pop(); long size = internalSizeOf(entry, stack, visited, filter, entry.indent); result += size; n++; sizeHistogram.recordInvocation(entry.object.getClass().getName(), (int)size); if (n >= maxObjects) { return new ObjectSize(result, false); } } visited.clear(); if (VERBOSE) { System.out.println(); System.out.println("-------------------------------------------------"); sizeHistogram.print(); } return new ObjectSize(result, true); } }
public class class_name { public static ObjectSize deepSizeOf(Object obj, IObjectSizeFilter filter, int maxObjects) { Map<Object, Object> visited = new IdentityHashMap<Object, Object>(); Stack<ObjectEntry> stack = new Stack<ObjectEntry>(); InvocationCounter sizeHistogram = new InvocationCounter(false); long result = internalSizeOf(new ObjectEntry(obj, "", ""), stack, visited, filter, ""); sizeHistogram.recordInvocation(obj.getClass().getName(), (int)result); int n = 1; while (!stack.isEmpty()) { ObjectEntry entry = stack.pop(); long size = internalSizeOf(entry, stack, visited, filter, entry.indent); result += size; // depends on control dependency: [while], data = [none] n++; // depends on control dependency: [while], data = [none] sizeHistogram.recordInvocation(entry.object.getClass().getName(), (int)size); // depends on control dependency: [while], data = [none] if (n >= maxObjects) { return new ObjectSize(result, false); // depends on control dependency: [if], data = [none] } } visited.clear(); if (VERBOSE) { System.out.println(); // depends on control dependency: [if], data = [none] System.out.println("-------------------------------------------------"); sizeHistogram.print(); // depends on control dependency: [if], data = [none] } return new ObjectSize(result, true); } }
public class class_name { protected URI buildUri(final String path, final List<NameValuePair> queryStringParams) { final StringBuilder sb = new StringBuilder(); sb.append(path); if (queryStringParams != null && queryStringParams.size() > 0) { sb.append("?").append(URLEncodedUtils.format(queryStringParams, "UTF-8")); } try { return new URI(sb.toString()); } catch (final URISyntaxException e) { throw new IllegalStateException("Invalid uri", e); } } }
public class class_name { protected URI buildUri(final String path, final List<NameValuePair> queryStringParams) { final StringBuilder sb = new StringBuilder(); sb.append(path); if (queryStringParams != null && queryStringParams.size() > 0) { sb.append("?").append(URLEncodedUtils.format(queryStringParams, "UTF-8")); // depends on control dependency: [if], data = [(queryStringParams] } try { return new URI(sb.toString()); // depends on control dependency: [try], data = [none] } catch (final URISyntaxException e) { throw new IllegalStateException("Invalid uri", e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public static int getIntProperty(Map<String, Object> properties, String key, int defaultVal) { if (properties == null) { return defaultVal; } Object propertyVal = properties.get(key); if (propertyVal == null) { return defaultVal; } if (!(propertyVal instanceof Integer)) { throw new IllegalArgumentException("Property : " + key + " must be an integer"); } return (Integer) propertyVal; } }
public class class_name { public static int getIntProperty(Map<String, Object> properties, String key, int defaultVal) { if (properties == null) { return defaultVal; // depends on control dependency: [if], data = [none] } Object propertyVal = properties.get(key); if (propertyVal == null) { return defaultVal; // depends on control dependency: [if], data = [none] } if (!(propertyVal instanceof Integer)) { throw new IllegalArgumentException("Property : " + key + " must be an integer"); } return (Integer) propertyVal; } }
public class class_name { @Override public void publish(String channel, Tree message) { if (client != null) { try { if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) { logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString()); } client.publish(channel, serializer.write(message)); } catch (Exception cause) { logger.warn("Unable to send message to NATS server!", cause); reconnect(); } } } }
public class class_name { @Override public void publish(String channel, Tree message) { if (client != null) { try { if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) { logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString()); // depends on control dependency: [if], data = [none] } client.publish(channel, serializer.write(message)); // depends on control dependency: [try], data = [none] } catch (Exception cause) { logger.warn("Unable to send message to NATS server!", cause); reconnect(); } // depends on control dependency: [catch], data = [none] } } }
public class class_name { private static String makeId(CSLItemData item, CSLDateParser dateParser) { if (item.getAuthor() == null || item.getAuthor().length == 0) { //there's no author information, return original ID return item.getId(); } //get author's name CSLName firstAuthor = item.getAuthor()[0]; String a = firstAuthor.getFamily(); if (a == null || a.isEmpty()) { a = firstAuthor.getGiven(); if (a == null || a.isEmpty()) { a = firstAuthor.getLiteral(); if (a == null || a.isEmpty()) { //author could not be found, return original ID return item.getId(); } } } a = StringHelper.sanitize(a); //try to get year int year = getYear(item.getIssued(), dateParser); if (year < 0) { year = getYear(item.getContainer(), dateParser); if (year < 0) { year = getYear(item.getOriginalDate(), dateParser); if (year < 0) { year = getYear(item.getEventDate(), dateParser); if (year < 0) { year = getYear(item.getSubmitted(), dateParser); } } } } //append year to author if (year >= 0) { a = a + year; } return a; } }
public class class_name { private static String makeId(CSLItemData item, CSLDateParser dateParser) { if (item.getAuthor() == null || item.getAuthor().length == 0) { //there's no author information, return original ID return item.getId(); // depends on control dependency: [if], data = [none] } //get author's name CSLName firstAuthor = item.getAuthor()[0]; String a = firstAuthor.getFamily(); if (a == null || a.isEmpty()) { a = firstAuthor.getGiven(); // depends on control dependency: [if], data = [none] if (a == null || a.isEmpty()) { a = firstAuthor.getLiteral(); // depends on control dependency: [if], data = [none] if (a == null || a.isEmpty()) { //author could not be found, return original ID return item.getId(); // depends on control dependency: [if], data = [none] } } } a = StringHelper.sanitize(a); //try to get year int year = getYear(item.getIssued(), dateParser); if (year < 0) { year = getYear(item.getContainer(), dateParser); // depends on control dependency: [if], data = [none] if (year < 0) { year = getYear(item.getOriginalDate(), dateParser); // depends on control dependency: [if], data = [none] if (year < 0) { year = getYear(item.getEventDate(), dateParser); // depends on control dependency: [if], data = [none] if (year < 0) { year = getYear(item.getSubmitted(), dateParser); // depends on control dependency: [if], data = [none] } } } } //append year to author if (year >= 0) { a = a + year; // depends on control dependency: [if], data = [none] } return a; } }
public class class_name { @Override public Set<String> getProviderNames() { Set<String> result = new HashSet<>(); for (RoundingProviderSpi prov : Bootstrap.getServices(RoundingProviderSpi.class)) { try { result.add(prov.getProviderName()); } catch (Exception e) { Logger.getLogger(Monetary.class.getName()) .log(Level.SEVERE, "Error loading RoundingProviderSpi from provider: " + prov, e); } } return result; } }
public class class_name { @Override public Set<String> getProviderNames() { Set<String> result = new HashSet<>(); for (RoundingProviderSpi prov : Bootstrap.getServices(RoundingProviderSpi.class)) { try { result.add(prov.getProviderName()); // depends on control dependency: [try], data = [none] } catch (Exception e) { Logger.getLogger(Monetary.class.getName()) .log(Level.SEVERE, "Error loading RoundingProviderSpi from provider: " + prov, e); } // depends on control dependency: [catch], data = [none] } return result; } }
public class class_name { private List<DataDescriptor> decode(List<Short> keyDesc, BufrTableLookup lookup) { if (keyDesc == null) return null; List<DataDescriptor> keys = new ArrayList<DataDescriptor>(); for (short id : keyDesc) { DataDescriptor dd = new DataDescriptor(id, lookup); keys.add( dd); if (dd.f == 3) { TableD.Descriptor tdd = lookup.getDescriptorTableD(dd.fxy); if (tdd == null || tdd.getSequence() == null) { dd.bad = true; } else { dd.name = tdd.getName(); dd.subKeys = decode(tdd.getSequence(), lookup); } } } return keys; } }
public class class_name { private List<DataDescriptor> decode(List<Short> keyDesc, BufrTableLookup lookup) { if (keyDesc == null) return null; List<DataDescriptor> keys = new ArrayList<DataDescriptor>(); for (short id : keyDesc) { DataDescriptor dd = new DataDescriptor(id, lookup); keys.add( dd); // depends on control dependency: [for], data = [none] if (dd.f == 3) { TableD.Descriptor tdd = lookup.getDescriptorTableD(dd.fxy); if (tdd == null || tdd.getSequence() == null) { dd.bad = true; // depends on control dependency: [if], data = [none] } else { dd.name = tdd.getName(); // depends on control dependency: [if], data = [none] dd.subKeys = decode(tdd.getSequence(), lookup); // depends on control dependency: [if], data = [(tdd] } } } return keys; } }
public class class_name { private synchronized boolean beginLookup(Map<String, String> pending, String name) { String canonical = pending.get(name); if (canonical != null) { do { try { canonical.wait(); } catch (InterruptedException e) {} } while (pending.containsKey(name)); } return (canonical == null); } }
public class class_name { private synchronized boolean beginLookup(Map<String, String> pending, String name) { String canonical = pending.get(name); if (canonical != null) { do { try { canonical.wait(); // depends on control dependency: [try], data = [none] } catch (InterruptedException e) {} // depends on control dependency: [catch], data = [none] } while (pending.containsKey(name)); } return (canonical == null); } }
public class class_name { public NotificationConfig withNotificationEvents(NotificationEvent... notificationEvents) { com.amazonaws.internal.SdkInternalList<String> notificationEventsCopy = new com.amazonaws.internal.SdkInternalList<String>(notificationEvents.length); for (NotificationEvent value : notificationEvents) { notificationEventsCopy.add(value.toString()); } if (getNotificationEvents() == null) { setNotificationEvents(notificationEventsCopy); } else { getNotificationEvents().addAll(notificationEventsCopy); } return this; } }
public class class_name { public NotificationConfig withNotificationEvents(NotificationEvent... notificationEvents) { com.amazonaws.internal.SdkInternalList<String> notificationEventsCopy = new com.amazonaws.internal.SdkInternalList<String>(notificationEvents.length); for (NotificationEvent value : notificationEvents) { notificationEventsCopy.add(value.toString()); // depends on control dependency: [for], data = [value] } if (getNotificationEvents() == null) { setNotificationEvents(notificationEventsCopy); // depends on control dependency: [if], data = [none] } else { getNotificationEvents().addAll(notificationEventsCopy); // depends on control dependency: [if], data = [none] } return this; } }
public class class_name { private static int sizeToInt(String size) { int position = size.indexOf('p'); if (position < 0) { return Integer.parseInt(size); } return Integer.parseInt(size.substring(0, position)); } }
public class class_name { private static int sizeToInt(String size) { int position = size.indexOf('p'); if (position < 0) { return Integer.parseInt(size); // depends on control dependency: [if], data = [none] } return Integer.parseInt(size.substring(0, position)); } }
public class class_name { public List<StyledSegment<SEG, S>> getStyledSegments() { if (styledSegments == null) { if (segments.size() == 1 && styles.getSpanCount() == 1) { styledSegments = Collections.singletonList( new StyledSegment<>(segments.get(0), styles.getStyleSpan(0).getStyle()) ); } else { styledSegments = createStyledSegments(); } } return styledSegments; } }
public class class_name { public List<StyledSegment<SEG, S>> getStyledSegments() { if (styledSegments == null) { if (segments.size() == 1 && styles.getSpanCount() == 1) { styledSegments = Collections.singletonList( new StyledSegment<>(segments.get(0), styles.getStyleSpan(0).getStyle()) ); // depends on control dependency: [if], data = [none] } else { styledSegments = createStyledSegments(); // depends on control dependency: [if], data = [none] } } return styledSegments; } }
public class class_name { private void increaseCapacity(boolean allowIllegalSize) { int len = this.content.limit(); int newCapacity = (len == 0) ? DEFAULT_INIT_SIZE : len < 64 ? len * 2 : this.content.limit() < 1067 ? len * 3 / 2 : len * 5 / 4; // do not allocate more than we will ever need if (newCapacity > MappeableArrayContainer.DEFAULT_MAX_SIZE && !allowIllegalSize) { newCapacity = MappeableArrayContainer.DEFAULT_MAX_SIZE; } // if we are within 1/16th of the max., go to max right away to avoid further reallocations if (newCapacity > MappeableArrayContainer.DEFAULT_MAX_SIZE - MappeableArrayContainer.DEFAULT_MAX_SIZE / 16 && !allowIllegalSize) { newCapacity = MappeableArrayContainer.DEFAULT_MAX_SIZE; } final ShortBuffer newContent = ShortBuffer.allocate(newCapacity); this.content.rewind(); newContent.put(this.content); this.content = newContent; } }
public class class_name { private void increaseCapacity(boolean allowIllegalSize) { int len = this.content.limit(); int newCapacity = (len == 0) ? DEFAULT_INIT_SIZE : len < 64 ? len * 2 : this.content.limit() < 1067 ? len * 3 / 2 : len * 5 / 4; // do not allocate more than we will ever need if (newCapacity > MappeableArrayContainer.DEFAULT_MAX_SIZE && !allowIllegalSize) { newCapacity = MappeableArrayContainer.DEFAULT_MAX_SIZE; // depends on control dependency: [if], data = [none] } // if we are within 1/16th of the max., go to max right away to avoid further reallocations if (newCapacity > MappeableArrayContainer.DEFAULT_MAX_SIZE - MappeableArrayContainer.DEFAULT_MAX_SIZE / 16 && !allowIllegalSize) { newCapacity = MappeableArrayContainer.DEFAULT_MAX_SIZE; // depends on control dependency: [if], data = [MappeableArrayContainer.DEFAULT_MAX_SIZE] } final ShortBuffer newContent = ShortBuffer.allocate(newCapacity); this.content.rewind(); newContent.put(this.content); this.content = newContent; } }
public class class_name { private List buildResourceTypeSelectWidgetList() { List fileFormats = new ArrayList(); // get all OpenCms resource types List resourceTypes = OpenCms.getResourceManager().getResourceTypes(); // put for every resource type type id and name into list object for select widget Iterator iter = resourceTypes.iterator(); while (iter.hasNext()) { I_CmsResourceType type = (I_CmsResourceType)iter.next(); // only xml resource types if (type.isDirectEditable() && !type.getTypeName().toUpperCase().equals("JSP")) { CmsSelectWidgetOption option = new CmsSelectWidgetOption( new Integer(type.getTypeId()).toString(), false, type.getTypeName()); fileFormats.add(option); } } return fileFormats; } }
public class class_name { private List buildResourceTypeSelectWidgetList() { List fileFormats = new ArrayList(); // get all OpenCms resource types List resourceTypes = OpenCms.getResourceManager().getResourceTypes(); // put for every resource type type id and name into list object for select widget Iterator iter = resourceTypes.iterator(); while (iter.hasNext()) { I_CmsResourceType type = (I_CmsResourceType)iter.next(); // only xml resource types if (type.isDirectEditable() && !type.getTypeName().toUpperCase().equals("JSP")) { CmsSelectWidgetOption option = new CmsSelectWidgetOption( new Integer(type.getTypeId()).toString(), false, type.getTypeName()); fileFormats.add(option); // depends on control dependency: [if], data = [none] } } return fileFormats; } }
public class class_name { public static void sortDescending(char[] charArray) { int index = 0; char value = 0; for(int i = 1; i < charArray.length; i++) { index = i; value = charArray[index]; while(index > 0 && value > charArray[index - 1]) { charArray[index] = charArray[index - 1]; index--; } charArray[index] = value; } } }
public class class_name { public static void sortDescending(char[] charArray) { int index = 0; char value = 0; for(int i = 1; i < charArray.length; i++) { index = i; // depends on control dependency: [for], data = [i] value = charArray[index]; // depends on control dependency: [for], data = [none] while(index > 0 && value > charArray[index - 1]) { charArray[index] = charArray[index - 1]; // depends on control dependency: [while], data = [none] index--; // depends on control dependency: [while], data = [none] } charArray[index] = value; // depends on control dependency: [for], data = [none] } } }
public class class_name { @SuppressWarnings("unchecked") public Map<BsonValue, ChangeEvent<BsonDocument>> getEvents() { nsLock.readLock().lock(); final Map<BsonValue, ChangeEvent<BsonDocument>> events; try { events = new HashMap<>(this.events); } finally { nsLock.readLock().unlock(); } nsLock.writeLock().lock(); try { this.events.clear(); return events; } finally { nsLock.writeLock().unlock(); } } }
public class class_name { @SuppressWarnings("unchecked") public Map<BsonValue, ChangeEvent<BsonDocument>> getEvents() { nsLock.readLock().lock(); final Map<BsonValue, ChangeEvent<BsonDocument>> events; try { events = new HashMap<>(this.events); // depends on control dependency: [try], data = [none] } finally { nsLock.readLock().unlock(); } nsLock.writeLock().lock(); try { this.events.clear(); // depends on control dependency: [try], data = [none] return events; // depends on control dependency: [try], data = [none] } finally { nsLock.writeLock().unlock(); } } }