code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
Shape atLocation(float x, float y) { start.setLocation(x, y); // Store new start p.reset(); // Erase current path createStar(); // create new path return p; // Return the path }
class class_name[name] begin[{] method[atLocation, return_type[type[Shape]], modifier[default], parameter[x, y]] begin[{] call[start.setLocation, parameter[member[.x], member[.y]]] call[p.reset, parameter[]] call[.createStar, parameter[]] return[member[.p]] end[}] END[}]
identifier[Shape] identifier[atLocation] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] { identifier[start] operator[SEP] identifier[setLocation] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[createStar] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[p] operator[SEP] }
public final DatastoreConfig getDatastoreConfig(String id) { try{ return m_moduleContext.getBean(id,DatastoreConfiguration.class); } catch (Throwable t){ logger.info(t.getMessage(),t); return null; } }
class class_name[name] begin[{] method[getDatastoreConfig, return_type[type[DatastoreConfig]], modifier[final public], parameter[id]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatastoreConfiguration, sub_type=None))], member=getBean, postfix_operators=[], prefix_operators=[], qualifier=m_moduleContext, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] identifier[DatastoreConfig] identifier[getDatastoreConfig] operator[SEP] identifier[String] identifier[id] operator[SEP] { Keyword[try] { Keyword[return] identifier[m_moduleContext] operator[SEP] identifier[getBean] operator[SEP] identifier[id] , identifier[DatastoreConfiguration] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[t] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public static void moveChildren(Element from, Element to) { if (from == null || to == null || from == to) return; for (int k = from.getChildCount() - 1; k >= 0; k--) { Node node = from.getChild(k); from.removeChild(node); to.insertFirst(node); } }
class class_name[name] begin[{] method[moveChildren, return_type[void], modifier[public static], parameter[from, to]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.from], ==, literal[null]], ||, binary_operation[member[.to], ==, literal[null]]], ||, binary_operation[member[.from], ==, member[.to]]]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChild, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insertFirst, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getChildCount, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[moveChildren] operator[SEP] identifier[Element] identifier[from] , identifier[Element] identifier[to] operator[SEP] { Keyword[if] operator[SEP] identifier[from] operator[==] Other[null] operator[||] identifier[to] operator[==] Other[null] operator[||] identifier[from] operator[==] identifier[to] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] identifier[from] operator[SEP] identifier[getChildCount] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[k] operator[>=] Other[0] operator[SEP] identifier[k] operator[--] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[from] operator[SEP] identifier[getChild] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[from] operator[SEP] identifier[removeChild] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[to] operator[SEP] identifier[insertFirst] operator[SEP] identifier[node] operator[SEP] operator[SEP] } }
private AuditEntityAttribute attributes(Entity e) { AuditEntityAttribute auditEntityAttributes = new AuditEntityAttribute(); matchCreationAuthor(e, auditEntityAttributes); matchCreationDate(e, auditEntityAttributes); matchLastModificationAuthor(e, auditEntityAttributes); matchLastModificationDate(e, auditEntityAttributes); return auditEntityAttributes; }
class class_name[name] begin[{] method[attributes, return_type[type[AuditEntityAttribute]], modifier[private], parameter[e]] begin[{] local_variable[type[AuditEntityAttribute], auditEntityAttributes] call[.matchCreationAuthor, parameter[member[.e], member[.auditEntityAttributes]]] call[.matchCreationDate, parameter[member[.e], member[.auditEntityAttributes]]] call[.matchLastModificationAuthor, parameter[member[.e], member[.auditEntityAttributes]]] call[.matchLastModificationDate, parameter[member[.e], member[.auditEntityAttributes]]] return[member[.auditEntityAttributes]] end[}] END[}]
Keyword[private] identifier[AuditEntityAttribute] identifier[attributes] operator[SEP] identifier[Entity] identifier[e] operator[SEP] { identifier[AuditEntityAttribute] identifier[auditEntityAttributes] operator[=] Keyword[new] identifier[AuditEntityAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[matchCreationAuthor] operator[SEP] identifier[e] , identifier[auditEntityAttributes] operator[SEP] operator[SEP] identifier[matchCreationDate] operator[SEP] identifier[e] , identifier[auditEntityAttributes] operator[SEP] operator[SEP] identifier[matchLastModificationAuthor] operator[SEP] identifier[e] , identifier[auditEntityAttributes] operator[SEP] operator[SEP] identifier[matchLastModificationDate] operator[SEP] identifier[e] , identifier[auditEntityAttributes] operator[SEP] operator[SEP] Keyword[return] identifier[auditEntityAttributes] operator[SEP] }
public ServiceFuture<PolicyEventsQueryResultsInner> listQueryResultsForSubscriptionAsync(String subscriptionId, final ServiceCallback<PolicyEventsQueryResultsInner> serviceCallback) { return ServiceFuture.fromResponse(listQueryResultsForSubscriptionWithServiceResponseAsync(subscriptionId), serviceCallback); }
class class_name[name] begin[{] method[listQueryResultsForSubscriptionAsync, return_type[type[ServiceFuture]], modifier[public], parameter[subscriptionId, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.listQueryResultsForSubscriptionWithServiceResponseAsync, parameter[member[.subscriptionId]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[PolicyEventsQueryResultsInner] operator[>] identifier[listQueryResultsForSubscriptionAsync] operator[SEP] identifier[String] identifier[subscriptionId] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[PolicyEventsQueryResultsInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[listQueryResultsForSubscriptionWithServiceResponseAsync] operator[SEP] identifier[subscriptionId] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
private int readMethod( final ClassVisitor classVisitor, final Context context, final int methodInfoOffset) { char[] charBuffer = context.charBuffer; // Read the access_flags, name_index and descriptor_index fields. int currentOffset = methodInfoOffset; context.currentMethodAccessFlags = readUnsignedShort(currentOffset); context.currentMethodName = readUTF8(currentOffset + 2, charBuffer); context.currentMethodDescriptor = readUTF8(currentOffset + 4, charBuffer); currentOffset += 6; // Read the method attributes (the variables are ordered as in Section 4.7 of the JVMS). // Attribute offsets exclude the attribute_name_index and attribute_length fields. // - The offset of the Code attribute, or 0. int codeOffset = 0; // - The offset of the Exceptions attribute, or 0. int exceptionsOffset = 0; // - The strings corresponding to the Exceptions attribute, or null. String[] exceptions = null; // - Whether the method has a Synthetic attribute. boolean synthetic = false; // - The constant pool index contained in the Signature attribute, or 0. int signatureIndex = 0; // - The offset of the RuntimeVisibleAnnotations attribute, or 0. int runtimeVisibleAnnotationsOffset = 0; // - The offset of the RuntimeInvisibleAnnotations attribute, or 0. int runtimeInvisibleAnnotationsOffset = 0; // - The offset of the RuntimeVisibleParameterAnnotations attribute, or 0. int runtimeVisibleParameterAnnotationsOffset = 0; // - The offset of the RuntimeInvisibleParameterAnnotations attribute, or 0. int runtimeInvisibleParameterAnnotationsOffset = 0; // - The offset of the RuntimeVisibleTypeAnnotations attribute, or 0. int runtimeVisibleTypeAnnotationsOffset = 0; // - The offset of the RuntimeInvisibleTypeAnnotations attribute, or 0. int runtimeInvisibleTypeAnnotationsOffset = 0; // - The offset of the AnnotationDefault attribute, or 0. int annotationDefaultOffset = 0; // - The offset of the MethodParameters attribute, or 0. int methodParametersOffset = 0; // - The non standard attributes (linked with their {@link Attribute#nextAttribute} field). // This list in the <i>reverse order</i> or their order in the ClassFile structure. Attribute attributes = null; int attributesCount = readUnsignedShort(currentOffset); currentOffset += 2; while (attributesCount-- > 0) { // Read the attribute_info's attribute_name and attribute_length fields. String attributeName = readUTF8(currentOffset, charBuffer); int attributeLength = readInt(currentOffset + 2); currentOffset += 6; // The tests are sorted in decreasing frequency order (based on frequencies observed on // typical classes). if (Constants.CODE.equals(attributeName)) { if ((context.parsingOptions & SKIP_CODE) == 0) { codeOffset = currentOffset; } } else if (Constants.EXCEPTIONS.equals(attributeName)) { exceptionsOffset = currentOffset; exceptions = new String[readUnsignedShort(exceptionsOffset)]; int currentExceptionOffset = exceptionsOffset + 2; for (int i = 0; i < exceptions.length; ++i) { exceptions[i] = readClass(currentExceptionOffset, charBuffer); currentExceptionOffset += 2; } } else if (Constants.SIGNATURE.equals(attributeName)) { signatureIndex = readUnsignedShort(currentOffset); } else if (Constants.DEPRECATED.equals(attributeName)) { context.currentMethodAccessFlags |= Opcodes.ACC_DEPRECATED; } else if (Constants.RUNTIME_VISIBLE_ANNOTATIONS.equals(attributeName)) { runtimeVisibleAnnotationsOffset = currentOffset; } else if (Constants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS.equals(attributeName)) { runtimeVisibleTypeAnnotationsOffset = currentOffset; } else if (Constants.ANNOTATION_DEFAULT.equals(attributeName)) { annotationDefaultOffset = currentOffset; } else if (Constants.SYNTHETIC.equals(attributeName)) { synthetic = true; context.currentMethodAccessFlags |= Opcodes.ACC_SYNTHETIC; } else if (Constants.RUNTIME_INVISIBLE_ANNOTATIONS.equals(attributeName)) { runtimeInvisibleAnnotationsOffset = currentOffset; } else if (Constants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS.equals(attributeName)) { runtimeInvisibleTypeAnnotationsOffset = currentOffset; } else if (Constants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS.equals(attributeName)) { runtimeVisibleParameterAnnotationsOffset = currentOffset; } else if (Constants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS.equals(attributeName)) { runtimeInvisibleParameterAnnotationsOffset = currentOffset; } else if (Constants.METHOD_PARAMETERS.equals(attributeName)) { methodParametersOffset = currentOffset; } else { Attribute attribute = readAttribute( context.attributePrototypes, attributeName, currentOffset, attributeLength, charBuffer, -1, null); attribute.nextAttribute = attributes; attributes = attribute; } currentOffset += attributeLength; } // Visit the method declaration. MethodVisitor methodVisitor = classVisitor.visitMethod( context.currentMethodAccessFlags, context.currentMethodName, context.currentMethodDescriptor, signatureIndex == 0 ? null : readUtf(signatureIndex, charBuffer), exceptions); if (methodVisitor == null) { return currentOffset; } // If the returned MethodVisitor is in fact a MethodWriter, it means there is no method // adapter between the reader and the writer. In this case, it might be possible to copy // the method attributes directly into the writer. If so, return early without visiting // the content of these attributes. if (methodVisitor instanceof MethodWriter) { MethodWriter methodWriter = (MethodWriter) methodVisitor; if (methodWriter.canCopyMethodAttributes( this, methodInfoOffset, currentOffset - methodInfoOffset, synthetic, (context.currentMethodAccessFlags & Opcodes.ACC_DEPRECATED) != 0, readUnsignedShort(methodInfoOffset + 4), signatureIndex, exceptionsOffset)) { return currentOffset; } } // Visit the MethodParameters attribute. if (methodParametersOffset != 0) { int parametersCount = readByte(methodParametersOffset); int currentParameterOffset = methodParametersOffset + 1; while (parametersCount-- > 0) { // Read the name_index and access_flags fields and visit them. methodVisitor.visitParameter( readUTF8(currentParameterOffset, charBuffer), readUnsignedShort(currentParameterOffset + 2)); currentParameterOffset += 4; } } // Visit the AnnotationDefault attribute. if (annotationDefaultOffset != 0) { AnnotationVisitor annotationVisitor = methodVisitor.visitAnnotationDefault(); readElementValue(annotationVisitor, annotationDefaultOffset, null, charBuffer); if (annotationVisitor != null) { annotationVisitor.visitEnd(); } } // Visit the RuntimeVisibleAnnotations attribute. if (runtimeVisibleAnnotationsOffset != 0) { int numAnnotations = readUnsignedShort(runtimeVisibleAnnotationsOffset); int currentAnnotationOffset = runtimeVisibleAnnotationsOffset + 2; while (numAnnotations-- > 0) { // Parse the type_index field. String annotationDescriptor = readUTF8(currentAnnotationOffset, charBuffer); currentAnnotationOffset += 2; // Parse num_element_value_pairs and element_value_pairs and visit these values. currentAnnotationOffset = readElementValues( methodVisitor.visitAnnotation(annotationDescriptor, /* visible = */ true), currentAnnotationOffset, /* named = */ true, charBuffer); } } // Visit the RuntimeInvisibleAnnotations attribute. if (runtimeInvisibleAnnotationsOffset != 0) { int numAnnotations = readUnsignedShort(runtimeInvisibleAnnotationsOffset); int currentAnnotationOffset = runtimeInvisibleAnnotationsOffset + 2; while (numAnnotations-- > 0) { // Parse the type_index field. String annotationDescriptor = readUTF8(currentAnnotationOffset, charBuffer); currentAnnotationOffset += 2; // Parse num_element_value_pairs and element_value_pairs and visit these values. currentAnnotationOffset = readElementValues( methodVisitor.visitAnnotation(annotationDescriptor, /* visible = */ false), currentAnnotationOffset, /* named = */ true, charBuffer); } } // Visit the RuntimeVisibleTypeAnnotations attribute. if (runtimeVisibleTypeAnnotationsOffset != 0) { int numAnnotations = readUnsignedShort(runtimeVisibleTypeAnnotationsOffset); int currentAnnotationOffset = runtimeVisibleTypeAnnotationsOffset + 2; while (numAnnotations-- > 0) { // Parse the target_type, target_info and target_path fields. currentAnnotationOffset = readTypeAnnotationTarget(context, currentAnnotationOffset); // Parse the type_index field. String annotationDescriptor = readUTF8(currentAnnotationOffset, charBuffer); currentAnnotationOffset += 2; // Parse num_element_value_pairs and element_value_pairs and visit these values. currentAnnotationOffset = readElementValues( methodVisitor.visitTypeAnnotation( context.currentTypeAnnotationTarget, context.currentTypeAnnotationTargetPath, annotationDescriptor, /* visible = */ true), currentAnnotationOffset, /* named = */ true, charBuffer); } } // Visit the RuntimeInvisibleTypeAnnotations attribute. if (runtimeInvisibleTypeAnnotationsOffset != 0) { int numAnnotations = readUnsignedShort(runtimeInvisibleTypeAnnotationsOffset); int currentAnnotationOffset = runtimeInvisibleTypeAnnotationsOffset + 2; while (numAnnotations-- > 0) { // Parse the target_type, target_info and target_path fields. currentAnnotationOffset = readTypeAnnotationTarget(context, currentAnnotationOffset); // Parse the type_index field. String annotationDescriptor = readUTF8(currentAnnotationOffset, charBuffer); currentAnnotationOffset += 2; // Parse num_element_value_pairs and element_value_pairs and visit these values. currentAnnotationOffset = readElementValues( methodVisitor.visitTypeAnnotation( context.currentTypeAnnotationTarget, context.currentTypeAnnotationTargetPath, annotationDescriptor, /* visible = */ false), currentAnnotationOffset, /* named = */ true, charBuffer); } } // Visit the RuntimeVisibleParameterAnnotations attribute. if (runtimeVisibleParameterAnnotationsOffset != 0) { readParameterAnnotations( methodVisitor, context, runtimeVisibleParameterAnnotationsOffset, /* visible = */ true); } // Visit the RuntimeInvisibleParameterAnnotations attribute. if (runtimeInvisibleParameterAnnotationsOffset != 0) { readParameterAnnotations( methodVisitor, context, runtimeInvisibleParameterAnnotationsOffset, /* visible = */ false); } // Visit the non standard attributes. while (attributes != null) { // Copy and reset the nextAttribute field so that it can also be used in MethodWriter. Attribute nextAttribute = attributes.nextAttribute; attributes.nextAttribute = null; methodVisitor.visitAttribute(attributes); attributes = nextAttribute; } // Visit the Code attribute. if (codeOffset != 0) { methodVisitor.visitCode(); readCode(methodVisitor, context, codeOffset); } // Visit the end of the method. methodVisitor.visitEnd(); return currentOffset; }
class class_name[name] begin[{] method[readMethod, return_type[type[int]], modifier[private], parameter[classVisitor, context, methodInfoOffset]] begin[{] local_variable[type[char], charBuffer] local_variable[type[int], currentOffset] assign[member[context.currentMethodAccessFlags], call[.readUnsignedShort, parameter[member[.currentOffset]]]] assign[member[context.currentMethodName], call[.readUTF8, parameter[binary_operation[member[.currentOffset], +, literal[2]], member[.charBuffer]]]] assign[member[context.currentMethodDescriptor], call[.readUTF8, parameter[binary_operation[member[.currentOffset], +, literal[4]], member[.charBuffer]]]] assign[member[.currentOffset], literal[6]] local_variable[type[int], codeOffset] local_variable[type[int], exceptionsOffset] local_variable[type[String], exceptions] local_variable[type[boolean], synthetic] local_variable[type[int], signatureIndex] local_variable[type[int], runtimeVisibleAnnotationsOffset] local_variable[type[int], runtimeInvisibleAnnotationsOffset] local_variable[type[int], runtimeVisibleParameterAnnotationsOffset] local_variable[type[int], runtimeInvisibleParameterAnnotationsOffset] local_variable[type[int], runtimeVisibleTypeAnnotationsOffset] local_variable[type[int], runtimeInvisibleTypeAnnotationsOffset] local_variable[type[int], annotationDefaultOffset] local_variable[type[int], methodParametersOffset] local_variable[type[Attribute], attributes] local_variable[type[int], attributesCount] assign[member[.currentOffset], literal[2]] while[binary_operation[member[.attributesCount], >, literal[0]]] begin[{] local_variable[type[String], attributeName] local_variable[type[int], attributeLength] assign[member[.currentOffset], literal[6]] if[call[Constants.CODE.equals, parameter[member[.attributeName]]]] begin[{] if[binary_operation[binary_operation[member[context.parsingOptions], &, member[.SKIP_CODE]], ==, literal[0]]] begin[{] assign[member[.codeOffset], member[.currentOffset]] else begin[{] None end[}] else begin[{] if[call[Constants.EXCEPTIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.exceptionsOffset], member[.currentOffset]] assign[member[.exceptions], ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=exceptionsOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] local_variable[type[int], currentExceptionOffset] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=currentExceptionOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentExceptionOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=exceptions, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) else begin[{] if[call[Constants.SIGNATURE.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.signatureIndex], call[.readUnsignedShort, parameter[member[.currentOffset]]]] else begin[{] if[call[Constants.DEPRECATED.equals, parameter[member[.attributeName]]]] begin[{] assign[member[context.currentMethodAccessFlags], member[Opcodes.ACC_DEPRECATED]] else begin[{] if[call[Constants.RUNTIME_VISIBLE_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeVisibleAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeVisibleTypeAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.ANNOTATION_DEFAULT.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.annotationDefaultOffset], member[.currentOffset]] else begin[{] if[call[Constants.SYNTHETIC.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.synthetic], literal[true]] assign[member[context.currentMethodAccessFlags], member[Opcodes.ACC_SYNTHETIC]] else begin[{] if[call[Constants.RUNTIME_INVISIBLE_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeInvisibleAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeInvisibleTypeAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeVisibleParameterAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.runtimeInvisibleParameterAnnotationsOffset], member[.currentOffset]] else begin[{] if[call[Constants.METHOD_PARAMETERS.equals, parameter[member[.attributeName]]]] begin[{] assign[member[.methodParametersOffset], member[.currentOffset]] else begin[{] local_variable[type[Attribute], attribute] assign[member[attribute.nextAttribute], member[.attributes]] assign[member[.attributes], member[.attribute]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] assign[member[.currentOffset], member[.attributeLength]] end[}] local_variable[type[MethodVisitor], methodVisitor] if[binary_operation[member[.methodVisitor], ==, literal[null]]] begin[{] return[member[.currentOffset]] else begin[{] None end[}] if[binary_operation[member[.methodVisitor], instanceof, type[MethodWriter]]] begin[{] local_variable[type[MethodWriter], methodWriter] if[call[methodWriter.canCopyMethodAttributes, parameter[THIS[], member[.methodInfoOffset], binary_operation[member[.currentOffset], -, member[.methodInfoOffset]], member[.synthetic], binary_operation[binary_operation[member[context.currentMethodAccessFlags], &, member[Opcodes.ACC_DEPRECATED]], !=, literal[0]], call[.readUnsignedShort, parameter[binary_operation[member[.methodInfoOffset], +, literal[4]]]], member[.signatureIndex], member[.exceptionsOffset]]]] begin[{] return[member[.currentOffset]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.methodParametersOffset], !=, literal[0]]] begin[{] local_variable[type[int], parametersCount] local_variable[type[int], currentParameterOffset] while[binary_operation[member[.parametersCount], >, literal[0]]] begin[{] call[methodVisitor.visitParameter, parameter[call[.readUTF8, parameter[member[.currentParameterOffset], member[.charBuffer]]], call[.readUnsignedShort, parameter[binary_operation[member[.currentParameterOffset], +, literal[2]]]]]] assign[member[.currentParameterOffset], literal[4]] end[}] else begin[{] None end[}] if[binary_operation[member[.annotationDefaultOffset], !=, literal[0]]] begin[{] local_variable[type[AnnotationVisitor], annotationVisitor] call[.readElementValue, parameter[member[.annotationVisitor], member[.annotationDefaultOffset], literal[null], member[.charBuffer]]] if[binary_operation[member[.annotationVisitor], !=, literal[null]]] begin[{] call[annotationVisitor.visitEnd, parameter[]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.runtimeVisibleAnnotationsOffset], !=, literal[0]]] begin[{] local_variable[type[int], numAnnotations] local_variable[type[int], currentAnnotationOffset] while[binary_operation[member[.numAnnotations], >, literal[0]]] begin[{] local_variable[type[String], annotationDescriptor] assign[member[.currentAnnotationOffset], literal[2]] assign[member[.currentAnnotationOffset], call[.readElementValues, parameter[call[methodVisitor.visitAnnotation, parameter[member[.annotationDescriptor], literal[true]]], member[.currentAnnotationOffset], literal[true], member[.charBuffer]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.runtimeInvisibleAnnotationsOffset], !=, literal[0]]] begin[{] local_variable[type[int], numAnnotations] local_variable[type[int], currentAnnotationOffset] while[binary_operation[member[.numAnnotations], >, literal[0]]] begin[{] local_variable[type[String], annotationDescriptor] assign[member[.currentAnnotationOffset], literal[2]] assign[member[.currentAnnotationOffset], call[.readElementValues, parameter[call[methodVisitor.visitAnnotation, parameter[member[.annotationDescriptor], literal[false]]], member[.currentAnnotationOffset], literal[true], member[.charBuffer]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.runtimeVisibleTypeAnnotationsOffset], !=, literal[0]]] begin[{] local_variable[type[int], numAnnotations] local_variable[type[int], currentAnnotationOffset] while[binary_operation[member[.numAnnotations], >, literal[0]]] begin[{] assign[member[.currentAnnotationOffset], call[.readTypeAnnotationTarget, parameter[member[.context], member[.currentAnnotationOffset]]]] local_variable[type[String], annotationDescriptor] assign[member[.currentAnnotationOffset], literal[2]] assign[member[.currentAnnotationOffset], call[.readElementValues, parameter[call[methodVisitor.visitTypeAnnotation, parameter[member[context.currentTypeAnnotationTarget], member[context.currentTypeAnnotationTargetPath], member[.annotationDescriptor], literal[true]]], member[.currentAnnotationOffset], literal[true], member[.charBuffer]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.runtimeInvisibleTypeAnnotationsOffset], !=, literal[0]]] begin[{] local_variable[type[int], numAnnotations] local_variable[type[int], currentAnnotationOffset] while[binary_operation[member[.numAnnotations], >, literal[0]]] begin[{] assign[member[.currentAnnotationOffset], call[.readTypeAnnotationTarget, parameter[member[.context], member[.currentAnnotationOffset]]]] local_variable[type[String], annotationDescriptor] assign[member[.currentAnnotationOffset], literal[2]] assign[member[.currentAnnotationOffset], call[.readElementValues, parameter[call[methodVisitor.visitTypeAnnotation, parameter[member[context.currentTypeAnnotationTarget], member[context.currentTypeAnnotationTargetPath], member[.annotationDescriptor], literal[false]]], member[.currentAnnotationOffset], literal[true], member[.charBuffer]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.runtimeVisibleParameterAnnotationsOffset], !=, literal[0]]] begin[{] call[.readParameterAnnotations, parameter[member[.methodVisitor], member[.context], member[.runtimeVisibleParameterAnnotationsOffset], literal[true]]] else begin[{] None end[}] if[binary_operation[member[.runtimeInvisibleParameterAnnotationsOffset], !=, literal[0]]] begin[{] call[.readParameterAnnotations, parameter[member[.methodVisitor], member[.context], member[.runtimeInvisibleParameterAnnotationsOffset], literal[false]]] else begin[{] None end[}] while[binary_operation[member[.attributes], !=, literal[null]]] begin[{] local_variable[type[Attribute], nextAttribute] assign[member[attributes.nextAttribute], literal[null]] call[methodVisitor.visitAttribute, parameter[member[.attributes]]] assign[member[.attributes], member[.nextAttribute]] end[}] if[binary_operation[member[.codeOffset], !=, literal[0]]] begin[{] call[methodVisitor.visitCode, parameter[]] call[.readCode, parameter[member[.methodVisitor], member[.context], member[.codeOffset]]] else begin[{] None end[}] call[methodVisitor.visitEnd, parameter[]] return[member[.currentOffset]] end[}] END[}]
Keyword[private] Keyword[int] identifier[readMethod] operator[SEP] Keyword[final] identifier[ClassVisitor] identifier[classVisitor] , Keyword[final] identifier[Context] identifier[context] , Keyword[final] Keyword[int] identifier[methodInfoOffset] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[charBuffer] operator[=] identifier[context] operator[SEP] identifier[charBuffer] operator[SEP] Keyword[int] identifier[currentOffset] operator[=] identifier[methodInfoOffset] operator[SEP] identifier[context] operator[SEP] identifier[currentMethodAccessFlags] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[currentOffset] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[currentMethodName] operator[=] identifier[readUTF8] operator[SEP] identifier[currentOffset] operator[+] Other[2] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[currentMethodDescriptor] operator[=] identifier[readUTF8] operator[SEP] identifier[currentOffset] operator[+] Other[4] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentOffset] operator[+=] Other[6] operator[SEP] Keyword[int] identifier[codeOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[exceptionsOffset] operator[=] Other[0] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[exceptions] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[synthetic] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[signatureIndex] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeVisibleAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeInvisibleAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeVisibleParameterAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeInvisibleParameterAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeVisibleTypeAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[runtimeInvisibleTypeAnnotationsOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[annotationDefaultOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[methodParametersOffset] operator[=] Other[0] operator[SEP] identifier[Attribute] identifier[attributes] operator[=] Other[null] operator[SEP] Keyword[int] identifier[attributesCount] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[currentOffset] operator[SEP] operator[SEP] identifier[currentOffset] operator[+=] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[attributesCount] operator[--] operator[>] Other[0] operator[SEP] { identifier[String] identifier[attributeName] operator[=] identifier[readUTF8] operator[SEP] identifier[currentOffset] , identifier[charBuffer] operator[SEP] operator[SEP] Keyword[int] identifier[attributeLength] operator[=] identifier[readInt] operator[SEP] identifier[currentOffset] operator[+] Other[2] operator[SEP] operator[SEP] identifier[currentOffset] operator[+=] Other[6] operator[SEP] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[CODE] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[parsingOptions] operator[&] identifier[SKIP_CODE] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[codeOffset] operator[=] identifier[currentOffset] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[EXCEPTIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[exceptionsOffset] operator[=] identifier[currentOffset] operator[SEP] identifier[exceptions] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[readUnsignedShort] operator[SEP] identifier[exceptionsOffset] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[currentExceptionOffset] operator[=] identifier[exceptionsOffset] operator[+] Other[2] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[exceptions] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[exceptions] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[readClass] operator[SEP] identifier[currentExceptionOffset] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentExceptionOffset] operator[+=] Other[2] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[SIGNATURE] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[signatureIndex] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[currentOffset] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[DEPRECATED] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[context] operator[SEP] identifier[currentMethodAccessFlags] operator[|=] identifier[Opcodes] operator[SEP] identifier[ACC_DEPRECATED] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_VISIBLE_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeVisibleAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_VISIBLE_TYPE_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeVisibleTypeAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[ANNOTATION_DEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[annotationDefaultOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[SYNTHETIC] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[synthetic] operator[=] literal[boolean] operator[SEP] identifier[context] operator[SEP] identifier[currentMethodAccessFlags] operator[|=] identifier[Opcodes] operator[SEP] identifier[ACC_SYNTHETIC] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_INVISIBLE_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeInvisibleAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_INVISIBLE_TYPE_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeInvisibleTypeAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeVisibleParameterAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[runtimeInvisibleParameterAnnotationsOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[METHOD_PARAMETERS] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] { identifier[methodParametersOffset] operator[=] identifier[currentOffset] operator[SEP] } Keyword[else] { identifier[Attribute] identifier[attribute] operator[=] identifier[readAttribute] operator[SEP] identifier[context] operator[SEP] identifier[attributePrototypes] , identifier[attributeName] , identifier[currentOffset] , identifier[attributeLength] , identifier[charBuffer] , operator[-] Other[1] , Other[null] operator[SEP] operator[SEP] identifier[attribute] operator[SEP] identifier[nextAttribute] operator[=] identifier[attributes] operator[SEP] identifier[attributes] operator[=] identifier[attribute] operator[SEP] } identifier[currentOffset] operator[+=] identifier[attributeLength] operator[SEP] } identifier[MethodVisitor] identifier[methodVisitor] operator[=] identifier[classVisitor] operator[SEP] identifier[visitMethod] operator[SEP] identifier[context] operator[SEP] identifier[currentMethodAccessFlags] , identifier[context] operator[SEP] identifier[currentMethodName] , identifier[context] operator[SEP] identifier[currentMethodDescriptor] , identifier[signatureIndex] operator[==] Other[0] operator[?] Other[null] operator[:] identifier[readUtf] operator[SEP] identifier[signatureIndex] , identifier[charBuffer] operator[SEP] , identifier[exceptions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methodVisitor] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[currentOffset] operator[SEP] } Keyword[if] operator[SEP] identifier[methodVisitor] Keyword[instanceof] identifier[MethodWriter] operator[SEP] { identifier[MethodWriter] identifier[methodWriter] operator[=] operator[SEP] identifier[MethodWriter] operator[SEP] identifier[methodVisitor] operator[SEP] Keyword[if] operator[SEP] identifier[methodWriter] operator[SEP] identifier[canCopyMethodAttributes] operator[SEP] Keyword[this] , identifier[methodInfoOffset] , identifier[currentOffset] operator[-] identifier[methodInfoOffset] , identifier[synthetic] , operator[SEP] identifier[context] operator[SEP] identifier[currentMethodAccessFlags] operator[&] identifier[Opcodes] operator[SEP] identifier[ACC_DEPRECATED] operator[SEP] operator[!=] Other[0] , identifier[readUnsignedShort] operator[SEP] identifier[methodInfoOffset] operator[+] Other[4] operator[SEP] , identifier[signatureIndex] , identifier[exceptionsOffset] operator[SEP] operator[SEP] { Keyword[return] identifier[currentOffset] operator[SEP] } } Keyword[if] operator[SEP] identifier[methodParametersOffset] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[parametersCount] operator[=] identifier[readByte] operator[SEP] identifier[methodParametersOffset] operator[SEP] operator[SEP] Keyword[int] identifier[currentParameterOffset] operator[=] identifier[methodParametersOffset] operator[+] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[parametersCount] operator[--] operator[>] Other[0] operator[SEP] { identifier[methodVisitor] operator[SEP] identifier[visitParameter] operator[SEP] identifier[readUTF8] operator[SEP] identifier[currentParameterOffset] , identifier[charBuffer] operator[SEP] , identifier[readUnsignedShort] operator[SEP] identifier[currentParameterOffset] operator[+] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[currentParameterOffset] operator[+=] Other[4] operator[SEP] } } Keyword[if] operator[SEP] identifier[annotationDefaultOffset] operator[!=] Other[0] operator[SEP] { identifier[AnnotationVisitor] identifier[annotationVisitor] operator[=] identifier[methodVisitor] operator[SEP] identifier[visitAnnotationDefault] operator[SEP] operator[SEP] operator[SEP] identifier[readElementValue] operator[SEP] identifier[annotationVisitor] , identifier[annotationDefaultOffset] , Other[null] , identifier[charBuffer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[annotationVisitor] operator[!=] Other[null] operator[SEP] { identifier[annotationVisitor] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[runtimeVisibleAnnotationsOffset] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[numAnnotations] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[runtimeVisibleAnnotationsOffset] operator[SEP] operator[SEP] Keyword[int] identifier[currentAnnotationOffset] operator[=] identifier[runtimeVisibleAnnotationsOffset] operator[+] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[numAnnotations] operator[--] operator[>] Other[0] operator[SEP] { identifier[String] identifier[annotationDescriptor] operator[=] identifier[readUTF8] operator[SEP] identifier[currentAnnotationOffset] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentAnnotationOffset] operator[+=] Other[2] operator[SEP] identifier[currentAnnotationOffset] operator[=] identifier[readElementValues] operator[SEP] identifier[methodVisitor] operator[SEP] identifier[visitAnnotation] operator[SEP] identifier[annotationDescriptor] , literal[boolean] operator[SEP] , identifier[currentAnnotationOffset] , literal[boolean] , identifier[charBuffer] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[runtimeInvisibleAnnotationsOffset] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[numAnnotations] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[runtimeInvisibleAnnotationsOffset] operator[SEP] operator[SEP] Keyword[int] identifier[currentAnnotationOffset] operator[=] identifier[runtimeInvisibleAnnotationsOffset] operator[+] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[numAnnotations] operator[--] operator[>] Other[0] operator[SEP] { identifier[String] identifier[annotationDescriptor] operator[=] identifier[readUTF8] operator[SEP] identifier[currentAnnotationOffset] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentAnnotationOffset] operator[+=] Other[2] operator[SEP] identifier[currentAnnotationOffset] operator[=] identifier[readElementValues] operator[SEP] identifier[methodVisitor] operator[SEP] identifier[visitAnnotation] operator[SEP] identifier[annotationDescriptor] , literal[boolean] operator[SEP] , identifier[currentAnnotationOffset] , literal[boolean] , identifier[charBuffer] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[runtimeVisibleTypeAnnotationsOffset] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[numAnnotations] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[runtimeVisibleTypeAnnotationsOffset] operator[SEP] operator[SEP] Keyword[int] identifier[currentAnnotationOffset] operator[=] identifier[runtimeVisibleTypeAnnotationsOffset] operator[+] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[numAnnotations] operator[--] operator[>] Other[0] operator[SEP] { identifier[currentAnnotationOffset] operator[=] identifier[readTypeAnnotationTarget] operator[SEP] identifier[context] , identifier[currentAnnotationOffset] operator[SEP] operator[SEP] identifier[String] identifier[annotationDescriptor] operator[=] identifier[readUTF8] operator[SEP] identifier[currentAnnotationOffset] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentAnnotationOffset] operator[+=] Other[2] operator[SEP] identifier[currentAnnotationOffset] operator[=] identifier[readElementValues] operator[SEP] identifier[methodVisitor] operator[SEP] identifier[visitTypeAnnotation] operator[SEP] identifier[context] operator[SEP] identifier[currentTypeAnnotationTarget] , identifier[context] operator[SEP] identifier[currentTypeAnnotationTargetPath] , identifier[annotationDescriptor] , literal[boolean] operator[SEP] , identifier[currentAnnotationOffset] , literal[boolean] , identifier[charBuffer] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[runtimeInvisibleTypeAnnotationsOffset] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[numAnnotations] operator[=] identifier[readUnsignedShort] operator[SEP] identifier[runtimeInvisibleTypeAnnotationsOffset] operator[SEP] operator[SEP] Keyword[int] identifier[currentAnnotationOffset] operator[=] identifier[runtimeInvisibleTypeAnnotationsOffset] operator[+] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[numAnnotations] operator[--] operator[>] Other[0] operator[SEP] { identifier[currentAnnotationOffset] operator[=] identifier[readTypeAnnotationTarget] operator[SEP] identifier[context] , identifier[currentAnnotationOffset] operator[SEP] operator[SEP] identifier[String] identifier[annotationDescriptor] operator[=] identifier[readUTF8] operator[SEP] identifier[currentAnnotationOffset] , identifier[charBuffer] operator[SEP] operator[SEP] identifier[currentAnnotationOffset] operator[+=] Other[2] operator[SEP] identifier[currentAnnotationOffset] operator[=] identifier[readElementValues] operator[SEP] identifier[methodVisitor] operator[SEP] identifier[visitTypeAnnotation] operator[SEP] identifier[context] operator[SEP] identifier[currentTypeAnnotationTarget] , identifier[context] operator[SEP] identifier[currentTypeAnnotationTargetPath] , identifier[annotationDescriptor] , literal[boolean] operator[SEP] , identifier[currentAnnotationOffset] , literal[boolean] , identifier[charBuffer] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[runtimeVisibleParameterAnnotationsOffset] operator[!=] Other[0] operator[SEP] { identifier[readParameterAnnotations] operator[SEP] identifier[methodVisitor] , identifier[context] , identifier[runtimeVisibleParameterAnnotationsOffset] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[runtimeInvisibleParameterAnnotationsOffset] operator[!=] Other[0] operator[SEP] { identifier[readParameterAnnotations] operator[SEP] identifier[methodVisitor] , identifier[context] , identifier[runtimeInvisibleParameterAnnotationsOffset] , literal[boolean] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[attributes] operator[!=] Other[null] operator[SEP] { identifier[Attribute] identifier[nextAttribute] operator[=] identifier[attributes] operator[SEP] identifier[nextAttribute] operator[SEP] identifier[attributes] operator[SEP] identifier[nextAttribute] operator[=] Other[null] operator[SEP] identifier[methodVisitor] operator[SEP] identifier[visitAttribute] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] identifier[attributes] operator[=] identifier[nextAttribute] operator[SEP] } Keyword[if] operator[SEP] identifier[codeOffset] operator[!=] Other[0] operator[SEP] { identifier[methodVisitor] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[readCode] operator[SEP] identifier[methodVisitor] , identifier[context] , identifier[codeOffset] operator[SEP] operator[SEP] } identifier[methodVisitor] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[currentOffset] operator[SEP] }
public static DynamicClassLoader create(ClassLoader parent, PathImpl path, String prefix) { DynamicClassLoader loader = new DynamicClassLoader(parent, false, true); SimpleLoader simpleLoader = new SimpleLoader(loader, path, prefix); simpleLoader.init(); loader.addLoader(simpleLoader); loader.init(); return loader; }
class class_name[name] begin[{] method[create, return_type[type[DynamicClassLoader]], modifier[public static], parameter[parent, path, prefix]] begin[{] local_variable[type[DynamicClassLoader], loader] local_variable[type[SimpleLoader], simpleLoader] call[simpleLoader.init, parameter[]] call[loader.addLoader, parameter[member[.simpleLoader]]] call[loader.init, parameter[]] return[member[.loader]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DynamicClassLoader] identifier[create] operator[SEP] identifier[ClassLoader] identifier[parent] , identifier[PathImpl] identifier[path] , identifier[String] identifier[prefix] operator[SEP] { identifier[DynamicClassLoader] identifier[loader] operator[=] Keyword[new] identifier[DynamicClassLoader] operator[SEP] identifier[parent] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[SimpleLoader] identifier[simpleLoader] operator[=] Keyword[new] identifier[SimpleLoader] operator[SEP] identifier[loader] , identifier[path] , identifier[prefix] operator[SEP] operator[SEP] identifier[simpleLoader] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] identifier[loader] operator[SEP] identifier[addLoader] operator[SEP] identifier[simpleLoader] operator[SEP] operator[SEP] identifier[loader] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[loader] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.CPC__DEF_CHAR_ID: setDefCharID(DEF_CHAR_ID_EDEFAULT); return; case AfplibPackage.CPC__PRT_FLAGS: setPrtFlags(PRT_FLAGS_EDEFAULT); return; case AfplibPackage.CPC__CPIRG_LEN: setCPIRGLen(CPIRG_LEN_EDEFAULT); return; case AfplibPackage.CPC__VS_CHAR_SN: setVSCharSN(VS_CHAR_SN_EDEFAULT); return; case AfplibPackage.CPC__VS_CHAR: setVSChar(VS_CHAR_EDEFAULT); return; case AfplibPackage.CPC__VS_FLAGS: setVSFlags(VS_FLAGS_EDEFAULT); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=CPC__DEF_CHAR_ID, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DEF_CHAR_ID_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDefCharID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CPC__PRT_FLAGS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PRT_FLAGS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPrtFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CPC__CPIRG_LEN, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CPIRG_LEN_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCPIRGLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CPC__VS_CHAR_SN, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VS_CHAR_SN_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVSCharSN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CPC__VS_CHAR, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VS_CHAR_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVSChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CPC__VS_FLAGS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VS_FLAGS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVSFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__DEF_CHAR_ID] operator[:] identifier[setDefCharID] operator[SEP] identifier[DEF_CHAR_ID_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__PRT_FLAGS] operator[:] identifier[setPrtFlags] operator[SEP] identifier[PRT_FLAGS_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__CPIRG_LEN] operator[:] identifier[setCPIRGLen] operator[SEP] identifier[CPIRG_LEN_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__VS_CHAR_SN] operator[:] identifier[setVSCharSN] operator[SEP] identifier[VS_CHAR_SN_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__VS_CHAR] operator[:] identifier[setVSChar] operator[SEP] identifier[VS_CHAR_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[CPC__VS_FLAGS] operator[:] identifier[setVSFlags] operator[SEP] identifier[VS_FLAGS_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
protected byte[] getAnonymousObjectId(long n) { String s = anonOidPrefix + Long.toString(n); return s.getBytes(StandardCharsets.UTF_8); }
class class_name[name] begin[{] method[getAnonymousObjectId, return_type[type[byte]], modifier[protected], parameter[n]] begin[{] local_variable[type[String], s] return[call[s.getBytes, parameter[member[StandardCharsets.UTF_8]]]] end[}] END[}]
Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[getAnonymousObjectId] operator[SEP] Keyword[long] identifier[n] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[anonOidPrefix] operator[+] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] }
private String redisKey(ModelExt<?> m) { Table table = m.table(); StringBuilder key = new StringBuilder(); key.append(RECORDS); key.append(table.getName()); key.append(":"); //fetch primary keys' values String[] primaryKeys = table.getPrimaryKey(); //format key for (int idx = 0; idx < primaryKeys.length; idx++) { Object primaryKeyVal = m.get(primaryKeys[idx]); if (null != primaryKeyVal) { if (idx > 0) { key.append("|"); } key.append(primaryKeyVal); } } return key.toString(); }
class class_name[name] begin[{] method[redisKey, return_type[type[String]], modifier[private], parameter[m]] begin[{] local_variable[type[Table], table] local_variable[type[StringBuilder], key] call[key.append, parameter[member[.RECORDS]]] call[key.append, parameter[call[table.getName, parameter[]]]] call[key.append, parameter[literal[":"]]] local_variable[type[String], primaryKeys] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=primaryKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), name=primaryKeyVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=primaryKeyVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="|")], member=append, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=primaryKeyVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=primaryKeys, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=idx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[key.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[redisKey] operator[SEP] identifier[ModelExt] operator[<] operator[?] operator[>] identifier[m] operator[SEP] { identifier[Table] identifier[table] operator[=] identifier[m] operator[SEP] identifier[table] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[key] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[append] operator[SEP] identifier[RECORDS] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[append] operator[SEP] identifier[table] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[primaryKeys] operator[=] identifier[table] operator[SEP] identifier[getPrimaryKey] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[idx] operator[=] Other[0] operator[SEP] identifier[idx] operator[<] identifier[primaryKeys] operator[SEP] identifier[length] operator[SEP] identifier[idx] operator[++] operator[SEP] { identifier[Object] identifier[primaryKeyVal] operator[=] identifier[m] operator[SEP] identifier[get] operator[SEP] identifier[primaryKeys] operator[SEP] identifier[idx] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[primaryKeyVal] operator[SEP] { Keyword[if] operator[SEP] identifier[idx] operator[>] Other[0] operator[SEP] { identifier[key] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[key] operator[SEP] identifier[append] operator[SEP] identifier[primaryKeyVal] operator[SEP] operator[SEP] } } Keyword[return] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private static boolean variableIsParameter(Var variable) { Node variableParent = variable.getParentNode(); return variableParent != null && variableParent.isParamList(); }
class class_name[name] begin[{] method[variableIsParameter, return_type[type[boolean]], modifier[private static], parameter[variable]] begin[{] local_variable[type[Node], variableParent] return[binary_operation[binary_operation[member[.variableParent], !=, literal[null]], &&, call[variableParent.isParamList, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[variableIsParameter] operator[SEP] identifier[Var] identifier[variable] operator[SEP] { identifier[Node] identifier[variableParent] operator[=] identifier[variable] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[variableParent] operator[!=] Other[null] operator[&&] identifier[variableParent] operator[SEP] identifier[isParamList] operator[SEP] operator[SEP] operator[SEP] }
public boolean isWrapperFor( java.lang.Class<?> iface) throws java.sql.SQLException { checkClosed(); return (iface != null && iface.isAssignableFrom(this.getClass())); }
class class_name[name] begin[{] method[isWrapperFor, return_type[type[boolean]], modifier[public], parameter[iface]] begin[{] call[.checkClosed, parameter[]] return[binary_operation[binary_operation[member[.iface], !=, literal[null]], &&, call[iface.isAssignableFrom, parameter[THIS[call[None.getClass, parameter[]]]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isWrapperFor] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[iface] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLException] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[iface] operator[!=] Other[null] operator[&&] identifier[iface] operator[SEP] identifier[isAssignableFrom] operator[SEP] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property) { generateWriteProperty2ContentValues(methodBuilder, beanName, beanClass, property); }
class class_name[name] begin[{] method[generateWriteProperty2WhereCondition, return_type[void], modifier[public], parameter[methodBuilder, beanName, beanClass, property]] begin[{] call[.generateWriteProperty2ContentValues, parameter[member[.methodBuilder], member[.beanName], member[.beanClass], member[.property]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[generateWriteProperty2WhereCondition] operator[SEP] identifier[Builder] identifier[methodBuilder] , identifier[String] identifier[beanName] , identifier[TypeName] identifier[beanClass] , identifier[ModelProperty] identifier[property] operator[SEP] { identifier[generateWriteProperty2ContentValues] operator[SEP] identifier[methodBuilder] , identifier[beanName] , identifier[beanClass] , identifier[property] operator[SEP] operator[SEP] }
@Override public Tuple7<T1, T2, T3, T4, T5, T6, T7> get() throws PromiseException { return _task.get(); }
class class_name[name] begin[{] method[get, return_type[type[Tuple7]], modifier[public], parameter[]] begin[{] return[call[_task.get, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Tuple7] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[T7] operator[>] identifier[get] operator[SEP] operator[SEP] Keyword[throws] identifier[PromiseException] { Keyword[return] identifier[_task] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] }
public static ByteBuffer toBuffer(byte[] array) { if (array == null) return EMPTY_BUFFER; return toBuffer(array, 0, array.length); }
class class_name[name] begin[{] method[toBuffer, return_type[type[ByteBuffer]], modifier[public static], parameter[array]] begin[{] if[binary_operation[member[.array], ==, literal[null]]] begin[{] return[member[.EMPTY_BUFFER]] else begin[{] None end[}] return[call[.toBuffer, parameter[member[.array], literal[0], member[array.length]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[toBuffer] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[==] Other[null] operator[SEP] Keyword[return] identifier[EMPTY_BUFFER] operator[SEP] Keyword[return] identifier[toBuffer] operator[SEP] identifier[array] , Other[0] , identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
@Override public final void generate(final Module module, final Element element) { final DCModule dcModule = (DCModule) module; final String title = dcModule.getTitle(); if (title != null) { element.addContent(generateSimpleElementList("title", dcModule.getTitles())); } final String creator = dcModule.getCreator(); if (creator != null) { element.addContent(generateSimpleElementList("creator", dcModule.getCreators())); } final List<DCSubject> subjects = dcModule.getSubjects(); for (final DCSubject dcSubject : subjects) { element.addContent(generateSubjectElement(dcSubject)); } final String description = dcModule.getDescription(); if (description != null) { element.addContent(generateSimpleElementList("description", dcModule.getDescriptions())); } final String publisher = dcModule.getPublisher(); if (publisher != null) { element.addContent(generateSimpleElementList("publisher", dcModule.getPublishers())); } final List<String> contributors = dcModule.getContributors(); if (contributors != null) { element.addContent(generateSimpleElementList("contributor", contributors)); } final Date dcDate = dcModule.getDate(); if (dcDate != null) { for (final Date date : dcModule.getDates()) { element.addContent(generateSimpleElement("date", DateParser.formatW3CDateTime(date, Locale.US))); } } final String type = dcModule.getType(); if (type != null) { element.addContent(generateSimpleElementList("type", dcModule.getTypes())); } final String format = dcModule.getFormat(); if (format != null) { element.addContent(generateSimpleElementList("format", dcModule.getFormats())); } final String identifier = dcModule.getIdentifier(); if (identifier != null) { element.addContent(generateSimpleElementList("identifier", dcModule.getIdentifiers())); } final String source = dcModule.getSource(); if (source != null) { element.addContent(generateSimpleElementList("source", dcModule.getSources())); } final String language = dcModule.getLanguage(); if (language != null) { element.addContent(generateSimpleElementList("language", dcModule.getLanguages())); } final String relation = dcModule.getRelation(); if (relation != null) { element.addContent(generateSimpleElementList("relation", dcModule.getRelations())); } final String coverage = dcModule.getCoverage(); if (coverage != null) { element.addContent(generateSimpleElementList("coverage", dcModule.getCoverages())); } final String rights = dcModule.getRights(); if (rights != null) { element.addContent(generateSimpleElementList("rights", dcModule.getRightsList())); } }
class class_name[name] begin[{] method[generate, return_type[void], modifier[final public], parameter[module, element]] begin[{] local_variable[type[DCModule], dcModule] local_variable[type[String], title] if[binary_operation[member[.title], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["title"], call[dcModule.getTitles, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], creator] if[binary_operation[member[.creator], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["creator"], call[dcModule.getCreators, parameter[]]]]]] else begin[{] None end[}] local_variable[type[List], subjects] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dcSubject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateSubjectElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=subjects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dcSubject)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DCSubject, sub_type=None))), label=None) local_variable[type[String], description] if[binary_operation[member[.description], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["description"], call[dcModule.getDescriptions, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], publisher] if[binary_operation[member[.publisher], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["publisher"], call[dcModule.getPublishers, parameter[]]]]]] else begin[{] None end[}] local_variable[type[List], contributors] if[binary_operation[member[.contributors], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["contributor"], member[.contributors]]]]] else begin[{] None end[}] local_variable[type[Date], dcDate] if[binary_operation[member[.dcDate], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="date"), MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=US, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=formatW3CDateTime, postfix_operators=[], prefix_operators=[], qualifier=DateParser, selectors=[], type_arguments=None)], member=generateSimpleElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDates, postfix_operators=[], prefix_operators=[], qualifier=dcModule, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=date)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[String], type] if[binary_operation[member[.type], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["type"], call[dcModule.getTypes, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], format] if[binary_operation[member[.format], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["format"], call[dcModule.getFormats, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], identifier] if[binary_operation[member[.identifier], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["identifier"], call[dcModule.getIdentifiers, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], source] if[binary_operation[member[.source], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["source"], call[dcModule.getSources, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], language] if[binary_operation[member[.language], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["language"], call[dcModule.getLanguages, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], relation] if[binary_operation[member[.relation], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["relation"], call[dcModule.getRelations, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], coverage] if[binary_operation[member[.coverage], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["coverage"], call[dcModule.getCoverages, parameter[]]]]]] else begin[{] None end[}] local_variable[type[String], rights] if[binary_operation[member[.rights], !=, literal[null]]] begin[{] call[element.addContent, parameter[call[.generateSimpleElementList, parameter[literal["rights"], call[dcModule.getRightsList, parameter[]]]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[generate] operator[SEP] Keyword[final] identifier[Module] identifier[module] , Keyword[final] identifier[Element] identifier[element] operator[SEP] { Keyword[final] identifier[DCModule] identifier[dcModule] operator[=] operator[SEP] identifier[DCModule] operator[SEP] identifier[module] operator[SEP] Keyword[final] identifier[String] identifier[title] operator[=] identifier[dcModule] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[title] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getTitles] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[creator] operator[=] identifier[dcModule] operator[SEP] identifier[getCreator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[creator] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getCreators] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[DCSubject] operator[>] identifier[subjects] operator[=] identifier[dcModule] operator[SEP] identifier[getSubjects] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[DCSubject] identifier[dcSubject] operator[:] identifier[subjects] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSubjectElement] operator[SEP] identifier[dcSubject] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[description] operator[=] identifier[dcModule] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[description] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getDescriptions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[publisher] operator[=] identifier[dcModule] operator[SEP] identifier[getPublisher] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[publisher] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getPublishers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[contributors] operator[=] identifier[dcModule] operator[SEP] identifier[getContributors] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contributors] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[contributors] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[Date] identifier[dcDate] operator[=] identifier[dcModule] operator[SEP] identifier[getDate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dcDate] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Date] identifier[date] operator[:] identifier[dcModule] operator[SEP] identifier[getDates] operator[SEP] operator[SEP] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElement] operator[SEP] literal[String] , identifier[DateParser] operator[SEP] identifier[formatW3CDateTime] operator[SEP] identifier[date] , identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[final] identifier[String] identifier[type] operator[=] identifier[dcModule] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[format] operator[=] identifier[dcModule] operator[SEP] identifier[getFormat] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[format] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getFormats] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[identifier] operator[=] identifier[dcModule] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[identifier] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getIdentifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[source] operator[=] identifier[dcModule] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getSources] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[language] operator[=] identifier[dcModule] operator[SEP] identifier[getLanguage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[language] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getLanguages] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[relation] operator[=] identifier[dcModule] operator[SEP] identifier[getRelation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relation] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getRelations] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[coverage] operator[=] identifier[dcModule] operator[SEP] identifier[getCoverage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[coverage] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getCoverages] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[rights] operator[=] identifier[dcModule] operator[SEP] identifier[getRights] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rights] operator[!=] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[addContent] operator[SEP] identifier[generateSimpleElementList] operator[SEP] literal[String] , identifier[dcModule] operator[SEP] identifier[getRightsList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) { final MapStoreWrapper store = mapStoreContext.getMapStoreWrapper(); final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext(); final NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); final InternalSerializationService serializationService = ((InternalSerializationService) nodeEngine.getSerializationService()); return (MapDataStore<K, V>) new WriteThroughStore(store, serializationService); }
class class_name[name] begin[{] method[createWriteThroughStore, return_type[type[MapDataStore]], modifier[public static], parameter[mapStoreContext]] begin[{] local_variable[type[MapStoreWrapper], store] local_variable[type[MapServiceContext], mapServiceContext] local_variable[type[NodeEngine], nodeEngine] local_variable[type[InternalSerializationService], serializationService] return[Cast(expression=ClassCreator(arguments=[MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=serializationService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WriteThroughStore, sub_type=None)), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=MapDataStore, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[MapDataStore] operator[<] identifier[K] , identifier[V] operator[>] identifier[createWriteThroughStore] operator[SEP] identifier[MapStoreContext] identifier[mapStoreContext] operator[SEP] { Keyword[final] identifier[MapStoreWrapper] identifier[store] operator[=] identifier[mapStoreContext] operator[SEP] identifier[getMapStoreWrapper] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[MapServiceContext] identifier[mapServiceContext] operator[=] identifier[mapStoreContext] operator[SEP] identifier[getMapServiceContext] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[NodeEngine] identifier[nodeEngine] operator[=] identifier[mapServiceContext] operator[SEP] identifier[getNodeEngine] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[InternalSerializationService] identifier[serializationService] operator[=] operator[SEP] operator[SEP] identifier[InternalSerializationService] operator[SEP] identifier[nodeEngine] operator[SEP] identifier[getSerializationService] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[MapDataStore] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] Keyword[new] identifier[WriteThroughStore] operator[SEP] identifier[store] , identifier[serializationService] operator[SEP] operator[SEP] }
void moveBlockToHead(BlockInfo b) { blockList = b.listRemove(blockList, this); blockList = b.listInsert(blockList, this, -1); }
class class_name[name] begin[{] method[moveBlockToHead, return_type[void], modifier[default], parameter[b]] begin[{] assign[member[.blockList], call[b.listRemove, parameter[member[.blockList], THIS[]]]] assign[member[.blockList], call[b.listInsert, parameter[member[.blockList], THIS[], literal[1]]]] end[}] END[}]
Keyword[void] identifier[moveBlockToHead] operator[SEP] identifier[BlockInfo] identifier[b] operator[SEP] { identifier[blockList] operator[=] identifier[b] operator[SEP] identifier[listRemove] operator[SEP] identifier[blockList] , Keyword[this] operator[SEP] operator[SEP] identifier[blockList] operator[=] identifier[b] operator[SEP] identifier[listInsert] operator[SEP] identifier[blockList] , Keyword[this] , operator[-] Other[1] operator[SEP] operator[SEP] }
@Override public String getPrefix() { String prefix = ""; switch (nodeKind) { case ELEMENT: case ATTRIBUTE: prefix = qName.getPrefix(); break; default: /* * Change nothing, return empty String in case of a treeData which isn't * an element or attribute. */ } return prefix; }
class class_name[name] begin[{] method[getPrefix, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], prefix] SwitchStatement(cases=[SwitchStatementCase(case=['ELEMENT', 'ATTRIBUTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPrefix, postfix_operators=[], prefix_operators=[], qualifier=qName, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[])], expression=MemberReference(member=nodeKind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[member[.prefix]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getPrefix] operator[SEP] operator[SEP] { identifier[String] identifier[prefix] operator[=] literal[String] operator[SEP] Keyword[switch] operator[SEP] identifier[nodeKind] operator[SEP] { Keyword[case] identifier[ELEMENT] operator[:] Keyword[case] identifier[ATTRIBUTE] operator[:] identifier[prefix] operator[=] identifier[qName] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] } Keyword[return] identifier[prefix] operator[SEP] }
@Override public void registerResources(String alias, String name, HttpContext context) throws NamespaceException { if (!isNameValid(name)) { throw new IllegalArgumentException("Malformed resource name [" + name + "]"); } try { Servlet servlet = new ResourceServlet(name); registerServlet(alias, servlet, null, context); } catch (ServletException e) { SystemLogger.error("Failed to register resources", e); } }
class class_name[name] begin[{] method[registerResources, return_type[void], modifier[public], parameter[alias, name, context]] begin[{] if[call[.isNameValid, parameter[member[.name]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Malformed resource name ["), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceServlet, sub_type=None)), name=servlet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Servlet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=alias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=servlet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerServlet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to register resources"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=SystemLogger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ServletException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[registerResources] operator[SEP] identifier[String] identifier[alias] , identifier[String] identifier[name] , identifier[HttpContext] identifier[context] operator[SEP] Keyword[throws] identifier[NamespaceException] { Keyword[if] operator[SEP] operator[!] identifier[isNameValid] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[Servlet] identifier[servlet] operator[=] Keyword[new] identifier[ResourceServlet] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[registerServlet] operator[SEP] identifier[alias] , identifier[servlet] , Other[null] , identifier[context] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ServletException] identifier[e] operator[SEP] { identifier[SystemLogger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public String formatThroughput(int theNumOperations, TimeUnit theUnit) { double throughput = getThroughput(theNumOperations, theUnit); return new DecimalFormat("0.0").format(throughput); }
class class_name[name] begin[{] method[formatThroughput, return_type[type[String]], modifier[public], parameter[theNumOperations, theUnit]] begin[{] local_variable[type[double], throughput] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0.0")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=throughput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DecimalFormat, sub_type=None))] end[}] END[}]
Keyword[public] identifier[String] identifier[formatThroughput] operator[SEP] Keyword[int] identifier[theNumOperations] , identifier[TimeUnit] identifier[theUnit] operator[SEP] { Keyword[double] identifier[throughput] operator[=] identifier[getThroughput] operator[SEP] identifier[theNumOperations] , identifier[theUnit] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DecimalFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[format] operator[SEP] identifier[throughput] operator[SEP] operator[SEP] }
public final CompletionStage<V> getOrTimeout(Duration timeout, ScheduledExecutorService timeoutExecutor) { if (GATE_UPDATER.get(this) == GATE_OPEN && timeoutScheduleFuture == null) { this.timeoutScheduleFuture = timeoutExecutor.schedule(this::emit, timeout.toNanos(), TimeUnit.NANOSECONDS); } return selfFuture; }
class class_name[name] begin[{] method[getOrTimeout, return_type[type[CompletionStage]], modifier[final public], parameter[timeout, timeoutExecutor]] begin[{] if[binary_operation[binary_operation[call[GATE_UPDATER.get, parameter[THIS[]]], ==, member[.GATE_OPEN]], &&, binary_operation[member[.timeoutScheduleFuture], ==, literal[null]]]] begin[{] assign[THIS[member[None.timeoutScheduleFuture]], call[timeoutExecutor.schedule, parameter[MethodReference(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), method=MemberReference(member=emit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), call[timeout.toNanos, parameter[]], member[TimeUnit.NANOSECONDS]]]] else begin[{] None end[}] return[member[.selfFuture]] end[}] END[}]
Keyword[public] Keyword[final] identifier[CompletionStage] operator[<] identifier[V] operator[>] identifier[getOrTimeout] operator[SEP] identifier[Duration] identifier[timeout] , identifier[ScheduledExecutorService] identifier[timeoutExecutor] operator[SEP] { Keyword[if] operator[SEP] identifier[GATE_UPDATER] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] operator[==] identifier[GATE_OPEN] operator[&&] identifier[timeoutScheduleFuture] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[timeoutScheduleFuture] operator[=] identifier[timeoutExecutor] operator[SEP] identifier[schedule] operator[SEP] Keyword[this] operator[::] identifier[emit] , identifier[timeout] operator[SEP] identifier[toNanos] operator[SEP] operator[SEP] , identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] operator[SEP] } Keyword[return] identifier[selfFuture] operator[SEP] }
public static Progression subToEnd(Progression model) { if (model != null) { return model.subTask(model.getMaximum() - model.getValue()); } return null; }
class class_name[name] begin[{] method[subToEnd, return_type[type[Progression]], modifier[public static], parameter[model]] begin[{] if[binary_operation[member[.model], !=, literal[null]]] begin[{] return[call[model.subTask, parameter[binary_operation[call[model.getMaximum, parameter[]], -, call[model.getValue, parameter[]]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Progression] identifier[subToEnd] operator[SEP] identifier[Progression] identifier[model] operator[SEP] { Keyword[if] operator[SEP] identifier[model] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[model] operator[SEP] identifier[subTask] operator[SEP] identifier[model] operator[SEP] identifier[getMaximum] operator[SEP] operator[SEP] operator[-] identifier[model] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static ExpectedCondition<WebElement> elementToBeClickable(final WebElement element) { return new ExpectedCondition<WebElement>() { @Override public WebElement apply(WebDriver driver) { WebElement visibleElement = visibilityOf(element).apply(driver); try { if (visibleElement != null && visibleElement.isEnabled()) { return visibleElement; } return null; } catch (StaleElementReferenceException e) { return null; } } @Override public String toString() { return "element to be clickable: " + element; } }; }
class class_name[name] begin[{] method[elementToBeClickable, return_type[type[ExpectedCondition]], modifier[public static], parameter[element]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visibilityOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=driver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=visibleElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebElement, sub_type=None)), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=visibleElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEnabled, postfix_operators=[], prefix_operators=[], qualifier=visibleElement, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=visibleElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StaleElementReferenceException']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=driver, type=ReferenceType(arguments=None, dimensions=[], name=WebDriver, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=WebElement, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="element to be clickable: "), operandr=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), label=None)], documentation=None, modifiers={'public'}, name=toString, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WebElement, sub_type=None))], dimensions=None, name=ExpectedCondition, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ExpectedCondition] operator[<] identifier[WebElement] operator[>] identifier[elementToBeClickable] operator[SEP] Keyword[final] identifier[WebElement] identifier[element] operator[SEP] { Keyword[return] Keyword[new] identifier[ExpectedCondition] operator[<] identifier[WebElement] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[WebElement] identifier[apply] operator[SEP] identifier[WebDriver] identifier[driver] operator[SEP] { identifier[WebElement] identifier[visibleElement] operator[=] identifier[visibilityOf] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[apply] operator[SEP] identifier[driver] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[visibleElement] operator[!=] Other[null] operator[&&] identifier[visibleElement] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[visibleElement] operator[SEP] } Keyword[return] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[StaleElementReferenceException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[toString] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[element] operator[SEP] } } operator[SEP] }
public Observable<Page<SiteInner>> beginSuspendNextAsync(final String nextPageLink) { return beginSuspendNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<SiteInner>>, Page<SiteInner>>() { @Override public Page<SiteInner> call(ServiceResponse<Page<SiteInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginSuspendNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.beginSuspendNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[SiteInner] operator[>] operator[>] identifier[beginSuspendNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[beginSuspendNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[SiteInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[SiteInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[SiteInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[SiteInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public DbxClientV2 asAdmin(String adminId) { if (adminId == null) { throw new IllegalArgumentException("'adminId' should not be null"); } DbxRawClientV2 asAdminClient = new DbxTeamRawClientV2( _client.getRequestConfig(), credential, _client.getHost(), _client.getUserId(), null, adminId, null ); return new DbxClientV2(asAdminClient); }
class class_name[name] begin[{] method[asAdmin, return_type[type[DbxClientV2]], modifier[public], parameter[adminId]] begin[{] if[binary_operation[member[.adminId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'adminId' should not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[DbxRawClientV2], asAdminClient] return[ClassCreator(arguments=[MemberReference(member=asAdminClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DbxClientV2, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DbxClientV2] identifier[asAdmin] operator[SEP] identifier[String] identifier[adminId] operator[SEP] { Keyword[if] operator[SEP] identifier[adminId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[DbxRawClientV2] identifier[asAdminClient] operator[=] Keyword[new] identifier[DbxTeamRawClientV2] operator[SEP] identifier[_client] operator[SEP] identifier[getRequestConfig] operator[SEP] operator[SEP] , identifier[credential] , identifier[_client] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] , identifier[_client] operator[SEP] identifier[getUserId] operator[SEP] operator[SEP] , Other[null] , identifier[adminId] , Other[null] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DbxClientV2] operator[SEP] identifier[asAdminClient] operator[SEP] operator[SEP] }
public void setOptions(Set<Option> options) { this.options = (options == null) ? Collections.<Option>emptySet() : new HashSet<Option>(options); }
class class_name[name] begin[{] method[setOptions, return_type[void], modifier[public], parameter[options]] begin[{] assign[THIS[member[None.options]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Option, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), if_true=MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Option, sub_type=None))]))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOptions] operator[SEP] identifier[Set] operator[<] identifier[Option] operator[>] identifier[options] operator[SEP] { Keyword[this] operator[SEP] identifier[options] operator[=] operator[SEP] identifier[options] operator[==] Other[null] operator[SEP] operator[?] identifier[Collections] operator[SEP] operator[<] identifier[Option] operator[>] identifier[emptySet] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[HashSet] operator[<] identifier[Option] operator[>] operator[SEP] identifier[options] operator[SEP] operator[SEP] }
private void sendPipelineCheckMaster() throws IOException { if (urlParser.getHaMode() == HaMode.AURORA) { writer.startPacket(0); writer.write(COM_QUERY); writer.write(IS_MASTER_QUERY); writer.flush(); } }
class class_name[name] begin[{] method[sendPipelineCheckMaster, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[urlParser.getHaMode, parameter[]], ==, member[HaMode.AURORA]]] begin[{] call[writer.startPacket, parameter[literal[0]]] call[writer.write, parameter[member[.COM_QUERY]]] call[writer.write, parameter[member[.IS_MASTER_QUERY]]] call[writer.flush, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[sendPipelineCheckMaster] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[urlParser] operator[SEP] identifier[getHaMode] operator[SEP] operator[SEP] operator[==] identifier[HaMode] operator[SEP] identifier[AURORA] operator[SEP] { identifier[writer] operator[SEP] identifier[startPacket] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[COM_QUERY] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[IS_MASTER_QUERY] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } }
public final void entryRuleXConstructorCall() throws RecognitionException { try { // InternalXbase.g:1259:1: ( ruleXConstructorCall EOF ) // InternalXbase.g:1260:1: ruleXConstructorCall EOF { if ( state.backtracking==0 ) { before(grammarAccess.getXConstructorCallRule()); } pushFollow(FOLLOW_1); ruleXConstructorCall(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getXConstructorCallRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleXConstructorCall, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXConstructorCallRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleXConstructorCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXConstructorCallRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleXConstructorCall] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXConstructorCallRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleXConstructorCall] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXConstructorCallRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] operator[SEP] }
ElementKind getAnnotationKindForName(AnnotationMirror annotation) { String annotationName = annotation.getAnnotationType().toString(); ElementKind kind; if (annotationName.equals("com.google.java.contract.Invariant")) { kind = ElementKind.INVARIANT; } else if (annotationName.equals("com.google.java.contract.Requires")) { kind = ElementKind.REQUIRES; } else if (annotationName.equals("com.google.java.contract.Ensures")) { kind = ElementKind.ENSURES; } else if (annotationName.equals("com.google.java.contract.ThrowEnsures")) { kind = ElementKind.THROW_ENSURES; } else { kind = null; } return kind; }
class class_name[name] begin[{] method[getAnnotationKindForName, return_type[type[ElementKind]], modifier[default], parameter[annotation]] begin[{] local_variable[type[String], annotationName] local_variable[type[ElementKind], kind] if[call[annotationName.equals, parameter[literal["com.google.java.contract.Invariant"]]]] begin[{] assign[member[.kind], member[ElementKind.INVARIANT]] else begin[{] if[call[annotationName.equals, parameter[literal["com.google.java.contract.Requires"]]]] begin[{] assign[member[.kind], member[ElementKind.REQUIRES]] else begin[{] if[call[annotationName.equals, parameter[literal["com.google.java.contract.Ensures"]]]] begin[{] assign[member[.kind], member[ElementKind.ENSURES]] else begin[{] if[call[annotationName.equals, parameter[literal["com.google.java.contract.ThrowEnsures"]]]] begin[{] assign[member[.kind], member[ElementKind.THROW_ENSURES]] else begin[{] assign[member[.kind], literal[null]] end[}] end[}] end[}] end[}] return[member[.kind]] end[}] END[}]
identifier[ElementKind] identifier[getAnnotationKindForName] operator[SEP] identifier[AnnotationMirror] identifier[annotation] operator[SEP] { identifier[String] identifier[annotationName] operator[=] identifier[annotation] operator[SEP] identifier[getAnnotationType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[ElementKind] identifier[kind] operator[SEP] Keyword[if] operator[SEP] identifier[annotationName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[kind] operator[=] identifier[ElementKind] operator[SEP] identifier[INVARIANT] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[annotationName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[kind] operator[=] identifier[ElementKind] operator[SEP] identifier[REQUIRES] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[annotationName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[kind] operator[=] identifier[ElementKind] operator[SEP] identifier[ENSURES] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[annotationName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[kind] operator[=] identifier[ElementKind] operator[SEP] identifier[THROW_ENSURES] operator[SEP] } Keyword[else] { identifier[kind] operator[=] Other[null] operator[SEP] } Keyword[return] identifier[kind] operator[SEP] }
@VisibleForTesting ByteMap<ByteMap<List<GetRequest>>> prepareRequestsNoMeta(final List<byte[][]> tagv_compounds, final List<Long> base_time_list) { final int row_size = (Const.SALT_WIDTH() + tsdb.metrics.width() + Const.TIMESTAMP_BYTES + (tsdb.tag_names.width() * tags.get(0).size()) + (tsdb.tag_values.width() * tags.get(0).size())); final ByteMap<List<GetRequest>> tsuid_rows = new ByteMap<List<GetRequest>>(); for (final byte[][] tagvs : tagv_compounds) { // TSUID's don't have salts // TODO: we reallly don't have to allocate tsuid's here. // we can use the row_key array to fetch the tsuid. // This will just double the memory utilization per time series. final byte[] tsuid = new byte[tsdb.metrics.width() + (tags.get(0).size() * tsdb.tag_names.width()) + tags.get(0).size() * tsdb.tag_values.width()]; final byte[] row_key = new byte[row_size]; // metric System.arraycopy(metric, 0, row_key, Const.SALT_WIDTH(), tsdb.metrics.width()); System.arraycopy(metric, 0, tsuid, 0, tsdb.metrics.width()); final List<GetRequest> rows = new ArrayList<GetRequest>(base_time_list.size()); // copy tagks and tagvs to the row key int tag_index = 0; int row_key_copy_offset = Const.SALT_WIDTH() + tsdb.metrics.width() + Const.TIMESTAMP_BYTES; int tsuid_copy_offset = tsdb.metrics.width(); for (Map.Entry<byte[], byte[][]> tag : tags.get(0)) { // tagk byte[] tagk = tag.getKey(); System.arraycopy(tagk, 0, row_key, row_key_copy_offset, tsdb.tag_names.width()); System.arraycopy(tagk, 0, tsuid, tsuid_copy_offset, tsdb.tag_names.width()); row_key_copy_offset += tsdb.tag_names.width(); tsuid_copy_offset += tsdb.tag_names.width(); // tagv System.arraycopy(tagvs[tag_index], 0, row_key, row_key_copy_offset, tsdb.tag_values.width()); System.arraycopy(tagvs[tag_index], 0, tsuid, tsuid_copy_offset, tsdb.tag_values.width()); row_key_copy_offset += tsdb.tag_values.width(); tsuid_copy_offset += tsdb.tag_values.width(); // move to the next tag ++tag_index; } // iterate for each timestamp, making a copy of the key and tweaking it's // timestamp. for (final long row_base_time : base_time_list) { final byte[] key_copy = Arrays.copyOf(row_key, row_key.length); // base time Internal.setBaseTime(key_copy, (int) row_base_time); if (get_all_salts) { for (int i = 0; i < Const.SALT_BUCKETS(); i++) { final byte[] copy = Arrays.copyOf(key_copy, key_copy.length); // TODO - handle multi byte salts copy[0] = (byte) i; rows.add(new GetRequest(table_to_fetch, copy, TSDB.FAMILY)); } } else { // salt RowKey.prefixKeyWithSalt(key_copy); rows.add(new GetRequest(table_to_fetch, key_copy, TSDB.FAMILY)); } } // end for tsuid_rows.put(tsuid, rows); } // end for ByteMap<ByteMap<List<GetRequest>>> return_obj = new ByteMap<ByteMap<List<GetRequest>>>(); // byte[] salt = new byte[Const.SALT_WIDTH()]; // System.arraycopy("1".getBytes(), 0, salt, 0, Const.SALT_WIDTH()); return_obj.put("0".getBytes(), tsuid_rows); return return_obj; }
class class_name[name] begin[{] method[prepareRequestsNoMeta, return_type[type[ByteMap]], modifier[default], parameter[tagv_compounds, base_time_list]] begin[{] local_variable[type[int], row_size] local_variable[type[ByteMap], tsuid_rows] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.metrics, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_names, selectors=[], type_arguments=None), operator=*), operator=+), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_values, selectors=[], type_arguments=None), operator=*), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=tsuid)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=row_size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=row_key)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=metric, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=row_key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=SALT_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.metrics, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=metric, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=tsuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.metrics, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=base_time_list, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GetRequest, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=rows)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GetRequest, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=tag_index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=SALT_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.metrics, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=TIMESTAMP_BYTES, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), operator=+), name=row_key_copy_offset)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.metrics, selectors=[], type_arguments=None), name=tsuid_copy_offset)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), name=tagk)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tagk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=row_key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=row_key_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_names, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tagk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=tsuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tsuid_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_names, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row_key_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_names, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tsuid_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_names, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tagvs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tag_index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=row_key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=row_key_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_values, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tagvs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tag_index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=tsuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tsuid_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_values, selectors=[], type_arguments=None)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row_key_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_values, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tsuid_copy_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=tsdb.tag_values, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=tag_index, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tag)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=BasicType(dimensions=[None], name=byte)), TypeArgument(pattern_type=None, type=BasicType(dimensions=[None, None], name=byte))], dimensions=None, name=Entry, sub_type=None)))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=row_key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=row_key, selectors=[])], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), name=key_copy)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key_copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=row_base_time, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))], member=setBaseTime, postfix_operators=[], prefix_operators=[], qualifier=Internal, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=get_all_salts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key_copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prefixKeyWithSalt, postfix_operators=[], prefix_operators=[], qualifier=RowKey, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=table_to_fetch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key_copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FAMILY, postfix_operators=[], prefix_operators=[], qualifier=TSDB, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetRequest, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rows, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key_copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=key_copy, selectors=[])], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), name=copy)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=Cast(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=table_to_fetch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FAMILY, postfix_operators=[], prefix_operators=[], qualifier=TSDB, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetRequest, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rows, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=SALT_BUCKETS, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=base_time_list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=row_base_time)], modifiers={'final'}, type=BasicType(dimensions=[], name=long))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tsuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=tsuid_rows, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tagv_compounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tagvs)], modifiers={'final'}, type=BasicType(dimensions=[None, None], name=byte))), label=None) local_variable[type[ByteMap], return_obj] call[return_obj.put, parameter[literal["0"], member[.tsuid_rows]]] return[member[.return_obj]] end[}] END[}]
annotation[@] identifier[VisibleForTesting] identifier[ByteMap] operator[<] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] operator[>] identifier[prepareRequestsNoMeta] operator[SEP] Keyword[final] identifier[List] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[>] identifier[tagv_compounds] , Keyword[final] identifier[List] operator[<] identifier[Long] operator[>] identifier[base_time_list] operator[SEP] { Keyword[final] Keyword[int] identifier[row_size] operator[=] operator[SEP] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[+] identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[+] identifier[Const] operator[SEP] identifier[TIMESTAMP_BYTES] operator[+] operator[SEP] identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[*] identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[*] identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] identifier[tsuid_rows] operator[=] Keyword[new] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tagvs] operator[:] identifier[tagv_compounds] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[tsuid] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[*] identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[+] identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[*] identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[row_key] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[row_size] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[metric] , Other[0] , identifier[row_key] , identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] , identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[metric] , Other[0] , identifier[tsuid] , Other[0] , identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[GetRequest] operator[>] identifier[rows] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[GetRequest] operator[>] operator[SEP] identifier[base_time_list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[tag_index] operator[=] Other[0] operator[SEP] Keyword[int] identifier[row_key_copy_offset] operator[=] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[+] identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[+] identifier[Const] operator[SEP] identifier[TIMESTAMP_BYTES] operator[SEP] Keyword[int] identifier[tsuid_copy_offset] operator[=] identifier[tsdb] operator[SEP] identifier[metrics] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] Keyword[byte] operator[SEP] operator[SEP] , Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[>] identifier[tag] operator[:] identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[tagk] operator[=] identifier[tag] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[tagk] , Other[0] , identifier[row_key] , identifier[row_key_copy_offset] , identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[tagk] , Other[0] , identifier[tsuid] , identifier[tsuid_copy_offset] , identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[row_key_copy_offset] operator[+=] identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] identifier[tsuid_copy_offset] operator[+=] identifier[tsdb] operator[SEP] identifier[tag_names] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[tagvs] operator[SEP] identifier[tag_index] operator[SEP] , Other[0] , identifier[row_key] , identifier[row_key_copy_offset] , identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[tagvs] operator[SEP] identifier[tag_index] operator[SEP] , Other[0] , identifier[tsuid] , identifier[tsuid_copy_offset] , identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[row_key_copy_offset] operator[+=] identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] identifier[tsuid_copy_offset] operator[+=] identifier[tsdb] operator[SEP] identifier[tag_values] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[tag_index] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] Keyword[long] identifier[row_base_time] operator[:] identifier[base_time_list] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key_copy] operator[=] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[row_key] , identifier[row_key] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[Internal] operator[SEP] identifier[setBaseTime] operator[SEP] identifier[key_copy] , operator[SEP] Keyword[int] operator[SEP] identifier[row_base_time] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[get_all_salts] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[Const] operator[SEP] identifier[SALT_BUCKETS] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[copy] operator[=] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[key_copy] , identifier[key_copy] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[copy] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[i] operator[SEP] identifier[rows] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GetRequest] operator[SEP] identifier[table_to_fetch] , identifier[copy] , identifier[TSDB] operator[SEP] identifier[FAMILY] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[RowKey] operator[SEP] identifier[prefixKeyWithSalt] operator[SEP] identifier[key_copy] operator[SEP] operator[SEP] identifier[rows] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GetRequest] operator[SEP] identifier[table_to_fetch] , identifier[key_copy] , identifier[TSDB] operator[SEP] identifier[FAMILY] operator[SEP] operator[SEP] operator[SEP] } } identifier[tsuid_rows] operator[SEP] identifier[put] operator[SEP] identifier[tsuid] , identifier[rows] operator[SEP] operator[SEP] } identifier[ByteMap] operator[<] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] operator[>] identifier[return_obj] operator[=] Keyword[new] identifier[ByteMap] operator[<] identifier[ByteMap] operator[<] identifier[List] operator[<] identifier[GetRequest] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[return_obj] operator[SEP] identifier[put] operator[SEP] literal[String] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] , identifier[tsuid_rows] operator[SEP] operator[SEP] Keyword[return] identifier[return_obj] operator[SEP] }
@Override public void begin() throws TransactionManagementException { logger.entering(CLASSNAME, "begin"); try { userTran.begin(); logger.log(Level.FINE, "javax.transaction.Status: {0}", userTran.getStatus()); } catch (NotSupportedException e) { throw new TransactionManagementException(e); } catch (SystemException e) { throw new TransactionManagementException(e); } logger.exiting(CLASSNAME, "begin"); }
class class_name[name] begin[{] method[begin, return_type[void], modifier[public], parameter[]] begin[{] call[logger.entering, parameter[member[.CLASSNAME], literal["begin"]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=begin, postfix_operators=[], prefix_operators=[], qualifier=userTran, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.transaction.Status: {0}"), MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=userTran, selectors=[], type_arguments=None)], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactionManagementException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NotSupportedException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactionManagementException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SystemException']))], finally_block=None, label=None, resources=None) call[logger.exiting, parameter[member[.CLASSNAME], literal["begin"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[begin] operator[SEP] operator[SEP] Keyword[throws] identifier[TransactionManagementException] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[userTran] operator[SEP] identifier[begin] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] , identifier[userTran] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NotSupportedException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TransactionManagementException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SystemException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TransactionManagementException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<DatabaseInner>> getByRecommendedElasticPoolWithServiceResponseAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (serverName == null) { throw new IllegalArgumentException("Parameter serverName is required and cannot be null."); } if (recommendedElasticPoolName == null) { throw new IllegalArgumentException("Parameter recommendedElasticPoolName is required and cannot be null."); } if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.getByRecommendedElasticPool(this.client.subscriptionId(), resourceGroupName, serverName, recommendedElasticPoolName, databaseName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<DatabaseInner>>>() { @Override public Observable<ServiceResponse<DatabaseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<DatabaseInner> clientResponse = getByRecommendedElasticPoolDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[getByRecommendedElasticPoolWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, recommendedElasticPoolName, databaseName]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.serverName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter serverName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.recommendedElasticPoolName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter recommendedElasticPoolName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.databaseName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter databaseName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.getByRecommendedElasticPool, parameter[THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], member[.serverName], member[.recommendedElasticPoolName], member[.databaseName], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DatabaseInner] operator[>] operator[>] identifier[getByRecommendedElasticPoolWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[recommendedElasticPoolName] , identifier[String] identifier[databaseName] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[serverName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[recommendedElasticPoolName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[databaseName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[getByRecommendedElasticPool] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[serverName] , identifier[recommendedElasticPoolName] , identifier[databaseName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DatabaseInner] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DatabaseInner] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[DatabaseInner] operator[>] identifier[clientResponse] operator[=] identifier[getByRecommendedElasticPoolDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static Request newUploadPhotoRequest(Session session, Bitmap image, Callback callback) { Bundle parameters = new Bundle(1); parameters.putParcelable(PICTURE_PARAM, image); return new Request(session, MY_PHOTOS, parameters, HttpMethod.POST, callback); }
class class_name[name] begin[{] method[newUploadPhotoRequest, return_type[type[Request]], modifier[public static], parameter[session, image, callback]] begin[{] local_variable[type[Bundle], parameters] call[parameters.putParcelable, parameter[member[.PICTURE_PARAM], member[.image]]] return[ClassCreator(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MY_PHOTOS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=POST, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[]), MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Request, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Request] identifier[newUploadPhotoRequest] operator[SEP] identifier[Session] identifier[session] , identifier[Bitmap] identifier[image] , identifier[Callback] identifier[callback] operator[SEP] { identifier[Bundle] identifier[parameters] operator[=] Keyword[new] identifier[Bundle] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[putParcelable] operator[SEP] identifier[PICTURE_PARAM] , identifier[image] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Request] operator[SEP] identifier[session] , identifier[MY_PHOTOS] , identifier[parameters] , identifier[HttpMethod] operator[SEP] identifier[POST] , identifier[callback] operator[SEP] operator[SEP] }
public List<PvPLeaderBoard> getPvPSeasonLeaderboardInfo(String id, String type, World.Region region) throws GuildWars2Exception { try { Response<List<PvPLeaderBoard>> response = gw2API.getPvPSeasonLeaderBoardInfo(id, type, region.name().toLowerCase()).execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody()); return response.body(); } catch (IOException e) { throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage()); } }
class class_name[name] begin[{] method[getPvPSeasonLeaderboardInfo, return_type[type[List]], modifier[public], parameter[id, type, region]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=region, selectors=[MethodInvocation(arguments=[], member=toLowerCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getPvPSeasonLeaderBoardInfo, postfix_operators=[], prefix_operators=[], qualifier=gw2API, selectors=[MethodInvocation(arguments=[], member=execute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PvPLeaderBoard, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=[], name=Response, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isSuccessful, postfix_operators=[], prefix_operators=['!'], qualifier=response, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=errorBody, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], member=throwError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=body, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=Network, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Network Error: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GuildWars2Exception, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[PvPLeaderBoard] operator[>] identifier[getPvPSeasonLeaderboardInfo] operator[SEP] identifier[String] identifier[id] , identifier[String] identifier[type] , identifier[World] operator[SEP] identifier[Region] identifier[region] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] { Keyword[try] { identifier[Response] operator[<] identifier[List] operator[<] identifier[PvPLeaderBoard] operator[>] operator[>] identifier[response] operator[=] identifier[gw2API] operator[SEP] identifier[getPvPSeasonLeaderBoardInfo] operator[SEP] identifier[id] , identifier[type] , identifier[region] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[response] operator[SEP] identifier[isSuccessful] operator[SEP] operator[SEP] operator[SEP] identifier[throwError] operator[SEP] identifier[response] operator[SEP] identifier[code] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[errorBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[GuildWars2Exception] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[Network] , literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static base_response add(nitro_service client, dnskey resource) throws Exception { dnskey addresource = new dnskey(); addresource.keyname = resource.keyname; addresource.publickey = resource.publickey; addresource.privatekey = resource.privatekey; addresource.expires = resource.expires; addresource.units1 = resource.units1; addresource.notificationperiod = resource.notificationperiod; addresource.units2 = resource.units2; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
class class_name[name] begin[{] method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[dnskey], addresource] assign[member[addresource.keyname], member[resource.keyname]] assign[member[addresource.publickey], member[resource.publickey]] assign[member[addresource.privatekey], member[resource.privatekey]] assign[member[addresource.expires], member[resource.expires]] assign[member[addresource.units1], member[resource.units1]] assign[member[addresource.notificationperiod], member[resource.notificationperiod]] assign[member[addresource.units2], member[resource.units2]] assign[member[addresource.ttl], member[resource.ttl]] return[call[addresource.add_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnskey] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[dnskey] identifier[addresource] operator[=] Keyword[new] identifier[dnskey] operator[SEP] operator[SEP] operator[SEP] identifier[addresource] operator[SEP] identifier[keyname] operator[=] identifier[resource] operator[SEP] identifier[keyname] operator[SEP] identifier[addresource] operator[SEP] identifier[publickey] operator[=] identifier[resource] operator[SEP] identifier[publickey] operator[SEP] identifier[addresource] operator[SEP] identifier[privatekey] operator[=] identifier[resource] operator[SEP] identifier[privatekey] operator[SEP] identifier[addresource] operator[SEP] identifier[expires] operator[=] identifier[resource] operator[SEP] identifier[expires] operator[SEP] identifier[addresource] operator[SEP] identifier[units1] operator[=] identifier[resource] operator[SEP] identifier[units1] operator[SEP] identifier[addresource] operator[SEP] identifier[notificationperiod] operator[=] identifier[resource] operator[SEP] identifier[notificationperiod] operator[SEP] identifier[addresource] operator[SEP] identifier[units2] operator[=] identifier[resource] operator[SEP] identifier[units2] operator[SEP] identifier[addresource] operator[SEP] identifier[ttl] operator[=] identifier[resource] operator[SEP] identifier[ttl] operator[SEP] Keyword[return] identifier[addresource] operator[SEP] identifier[add_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
@Override @SuppressWarnings("unchecked") public void run(Object... otherArgs) { try { //only use facts of the specified type FactMap<T> typeFilteredFacts = new FactMap<T>((Map<String, NameValueReferable<T>>)_facts.values().stream() .filter((Object fact) -> _factType.isAssignableFrom(((Fact)fact).getValue().getClass())) .collect(Collectors.toMap(fact -> ((Fact)fact).getName(), fact -> (Fact<T>)fact))); //invoke then() action(s) if when() is true or if when() was never specified if (getWhen() == null || getWhen().test(typeFilteredFacts)) { //iterate through the then() actions specified List<Object> actionList = getThen(); for (int i = 0; i < (getThen()).size(); i++) { Object action = actionList.get(i); List<String> factNames = _factNameMap.get(i); //if using() fact names were specified for the specific then(), use only those facts specified FactMap<T> usingFacts; if (factNames != null) { usingFacts = new FactMap<T>(factNames.stream() .filter(typeFilteredFacts::containsKey) .collect(Collectors.toMap(name -> name, name -> _facts.get(name)))); } else { usingFacts = typeFilteredFacts; } //invoke the action Stream.of(action.getClass().getMethods()) .filter(method -> method.getName().equals("accept")) .findFirst() .ifPresent(method -> { try { method.setAccessible(true); method.invoke(action, ArrayUtils.combine(new Object[]{usingFacts}, otherArgs, method.getParameterCount())); } catch (IllegalAccessException | InvocationTargetException err) { LOGGER.error("Error invoking action on " + action.getClass(), err); } }); } //if stop() was invoked, stop the rule chain after then is finished executing if (_ruleState == BREAK) { return; } } } catch (Exception ex) { //catch errors in case something like one rule was chained expecting a Fact that doesn't exist //eventually, we'll have to resolve that kind of issue ahead of time LOGGER.error("Error occurred when trying to evaluate rule!", ex); } //continue down the rule chain _nextRule.ifPresent(rule -> rule.given(_facts)); _nextRule.ifPresent(Rule::run); }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[otherArgs]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=_facts, selectors=[MethodInvocation(arguments=[], member=stream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[Cast(expression=MemberReference(member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Fact, sub_type=None))], member=isAssignableFrom, postfix_operators=[], prefix_operators=[], qualifier=_factType, selectors=[], type_arguments=None), parameters=[FormalParameter(annotations=[], modifiers=set(), name=fact, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[LambdaExpression(body=Cast(expression=MemberReference(member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Fact, sub_type=None)), parameters=[MemberReference(member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), LambdaExpression(body=Cast(expression=MemberReference(member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Fact, sub_type=None)), parameters=[MemberReference(member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=toMap, postfix_operators=[], prefix_operators=[], qualifier=Collectors, selectors=[], type_arguments=None)], member=collect, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=NameValueReferable, sub_type=None))], dimensions=[], name=Map, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=FactMap, sub_type=None)), name=typeFilteredFacts)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=FactMap, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWhen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getWhen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=typeFilteredFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=test, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getThen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=actionList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=actionList, selectors=[], type_arguments=None), name=action)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_factNameMap, selectors=[], type_arguments=None), name=factNames)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=usingFacts)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=FactMap, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=factNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=usingFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=typeFilteredFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=usingFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=factNames, selectors=[MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=typeFilteredFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[LambdaExpression(body=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), parameters=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_facts, selectors=[], type_arguments=None), parameters=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=toMap, postfix_operators=[], prefix_operators=[], qualifier=Collectors, selectors=[], type_arguments=None)], member=collect, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=FactMap, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[MethodInvocation(arguments=[], member=getMethods, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Stream, selectors=[MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="accept")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=findFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=usingFacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), MemberReference(member=otherArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getParameterCount, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=combine, postfix_operators=[], prefix_operators=[], qualifier=ArrayUtils, selectors=[], type_arguments=None)], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error invoking action on "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), operator=+), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=err, types=['IllegalAccessException', 'InvocationTargetException']))], finally_block=None, label=None, resources=None)], parameters=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=ifPresent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getThen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_ruleState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BREAK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error occurred when trying to evaluate rule!"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) call[_nextRule.ifPresent, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=_facts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=given, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), parameters=[MemberReference(member=rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] call[_nextRule.ifPresent, parameter[MethodReference(expression=MemberReference(member=Rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=run, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[run] operator[SEP] identifier[Object] operator[...] identifier[otherArgs] operator[SEP] { Keyword[try] { identifier[FactMap] operator[<] identifier[T] operator[>] identifier[typeFilteredFacts] operator[=] Keyword[new] identifier[FactMap] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[NameValueReferable] operator[<] identifier[T] operator[>] operator[>] operator[SEP] identifier[_facts] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[Object] identifier[fact] operator[SEP] operator[->] identifier[_factType] operator[SEP] identifier[isAssignableFrom] operator[SEP] operator[SEP] operator[SEP] identifier[Fact] operator[SEP] identifier[fact] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toMap] operator[SEP] identifier[fact] operator[->] operator[SEP] operator[SEP] identifier[Fact] operator[SEP] identifier[fact] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[fact] operator[->] operator[SEP] identifier[Fact] operator[<] identifier[T] operator[>] operator[SEP] identifier[fact] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getWhen] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[getWhen] operator[SEP] operator[SEP] operator[SEP] identifier[test] operator[SEP] identifier[typeFilteredFacts] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[actionList] operator[=] identifier[getThen] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] operator[SEP] identifier[getThen] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Object] identifier[action] operator[=] identifier[actionList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[factNames] operator[=] identifier[_factNameMap] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[FactMap] operator[<] identifier[T] operator[>] identifier[usingFacts] operator[SEP] Keyword[if] operator[SEP] identifier[factNames] operator[!=] Other[null] operator[SEP] { identifier[usingFacts] operator[=] Keyword[new] identifier[FactMap] operator[<] identifier[T] operator[>] operator[SEP] identifier[factNames] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[typeFilteredFacts] operator[::] identifier[containsKey] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toMap] operator[SEP] identifier[name] operator[->] identifier[name] , identifier[name] operator[->] identifier[_facts] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[usingFacts] operator[=] identifier[typeFilteredFacts] operator[SEP] } identifier[Stream] operator[SEP] identifier[of] operator[SEP] identifier[action] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[method] operator[->] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[method] operator[->] { Keyword[try] { identifier[method] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[action] , identifier[ArrayUtils] operator[SEP] identifier[combine] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[usingFacts] } , identifier[otherArgs] , identifier[method] operator[SEP] identifier[getParameterCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] operator[|] identifier[InvocationTargetException] identifier[err] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[action] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[err] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_ruleState] operator[==] identifier[BREAK] operator[SEP] { Keyword[return] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } identifier[_nextRule] operator[SEP] identifier[ifPresent] operator[SEP] identifier[rule] operator[->] identifier[rule] operator[SEP] identifier[given] operator[SEP] identifier[_facts] operator[SEP] operator[SEP] operator[SEP] identifier[_nextRule] operator[SEP] identifier[ifPresent] operator[SEP] identifier[Rule] operator[::] identifier[run] operator[SEP] operator[SEP] }
static HeapCompactDoublesSketch createFromUpdateSketch(final UpdateDoublesSketch sketch) { final int k = sketch.getK(); final long n = sketch.getN(); final HeapCompactDoublesSketch hcds = new HeapCompactDoublesSketch(k); // checks k hcds.n_ = n; hcds.bitPattern_ = computeBitPattern(k, n); assert hcds.bitPattern_ == sketch.getBitPattern(); hcds.minValue_ = sketch.getMinValue(); hcds.maxValue_ = sketch.getMaxValue(); hcds.baseBufferCount_ = computeBaseBufferItems(k, n); assert hcds.baseBufferCount_ == sketch.getBaseBufferCount(); //if (sketch.isEmpty()) { // hcds.combinedBuffer_ = null; // return hcds; //} final int retainedItems = computeRetainedItems(k, n); final double[] combinedBuffer = new double[retainedItems]; final DoublesSketchAccessor accessor = DoublesSketchAccessor.wrap(sketch); assert hcds.baseBufferCount_ == accessor.numItems(); // copy and sort base buffer System.arraycopy(accessor.getArray(0, hcds.baseBufferCount_), 0, combinedBuffer, 0, hcds.baseBufferCount_); Arrays.sort(combinedBuffer, 0, hcds.baseBufferCount_); int combinedBufferOffset = hcds.baseBufferCount_; long bitPattern = hcds.bitPattern_; for (int lvl = 0; bitPattern > 0; ++lvl, bitPattern >>>= 1) { if ((bitPattern & 1L) > 0L) { accessor.setLevel(lvl); System.arraycopy(accessor.getArray(0, k), 0, combinedBuffer, combinedBufferOffset, k); combinedBufferOffset += k; } } hcds.combinedBuffer_ = combinedBuffer; return hcds; }
class class_name[name] begin[{] method[createFromUpdateSketch, return_type[type[HeapCompactDoublesSketch]], modifier[static], parameter[sketch]] begin[{] local_variable[type[int], k] local_variable[type[long], n] local_variable[type[HeapCompactDoublesSketch], hcds] assign[member[hcds.n_], member[.n]] assign[member[hcds.bitPattern_], call[.computeBitPattern, parameter[member[.k], member[.n]]]] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=bitPattern_, postfix_operators=[], prefix_operators=[], qualifier=hcds, selectors=[]), operandr=MethodInvocation(arguments=[], member=getBitPattern, postfix_operators=[], prefix_operators=[], qualifier=sketch, selectors=[], type_arguments=None), operator===), label=None, value=None) assign[member[hcds.minValue_], call[sketch.getMinValue, parameter[]]] assign[member[hcds.maxValue_], call[sketch.getMaxValue, parameter[]]] assign[member[hcds.baseBufferCount_], call[.computeBaseBufferItems, parameter[member[.k], member[.n]]]] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=baseBufferCount_, postfix_operators=[], prefix_operators=[], qualifier=hcds, selectors=[]), operandr=MethodInvocation(arguments=[], member=getBaseBufferCount, postfix_operators=[], prefix_operators=[], qualifier=sketch, selectors=[], type_arguments=None), operator===), label=None, value=None) local_variable[type[int], retainedItems] local_variable[type[double], combinedBuffer] local_variable[type[DoublesSketchAccessor], accessor] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=baseBufferCount_, postfix_operators=[], prefix_operators=[], qualifier=hcds, selectors=[]), operandr=MethodInvocation(arguments=[], member=numItems, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None), operator===), label=None, value=None) call[System.arraycopy, parameter[call[accessor.getArray, parameter[literal[0], member[hcds.baseBufferCount_]]], literal[0], member[.combinedBuffer], literal[0], member[hcds.baseBufferCount_]]] call[Arrays.sort, parameter[member[.combinedBuffer], literal[0], member[hcds.baseBufferCount_]]] local_variable[type[int], combinedBufferOffset] local_variable[type[long], bitPattern] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=bitPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0L), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lvl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLevel, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getArray, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=combinedBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=combinedBufferOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=combinedBufferOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=bitPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=lvl)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=lvl, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), Assignment(expressionl=MemberReference(member=bitPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=>>>=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), label=None) assign[member[hcds.combinedBuffer_], member[.combinedBuffer]] return[member[.hcds]] end[}] END[}]
Keyword[static] identifier[HeapCompactDoublesSketch] identifier[createFromUpdateSketch] operator[SEP] Keyword[final] identifier[UpdateDoublesSketch] identifier[sketch] operator[SEP] { Keyword[final] Keyword[int] identifier[k] operator[=] identifier[sketch] operator[SEP] identifier[getK] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[n] operator[=] identifier[sketch] operator[SEP] identifier[getN] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[HeapCompactDoublesSketch] identifier[hcds] operator[=] Keyword[new] identifier[HeapCompactDoublesSketch] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[hcds] operator[SEP] identifier[n_] operator[=] identifier[n] operator[SEP] identifier[hcds] operator[SEP] identifier[bitPattern_] operator[=] identifier[computeBitPattern] operator[SEP] identifier[k] , identifier[n] operator[SEP] operator[SEP] Keyword[assert] identifier[hcds] operator[SEP] identifier[bitPattern_] operator[==] identifier[sketch] operator[SEP] identifier[getBitPattern] operator[SEP] operator[SEP] operator[SEP] identifier[hcds] operator[SEP] identifier[minValue_] operator[=] identifier[sketch] operator[SEP] identifier[getMinValue] operator[SEP] operator[SEP] operator[SEP] identifier[hcds] operator[SEP] identifier[maxValue_] operator[=] identifier[sketch] operator[SEP] identifier[getMaxValue] operator[SEP] operator[SEP] operator[SEP] identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[=] identifier[computeBaseBufferItems] operator[SEP] identifier[k] , identifier[n] operator[SEP] operator[SEP] Keyword[assert] identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[==] identifier[sketch] operator[SEP] identifier[getBaseBufferCount] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[retainedItems] operator[=] identifier[computeRetainedItems] operator[SEP] identifier[k] , identifier[n] operator[SEP] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[combinedBuffer] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[retainedItems] operator[SEP] operator[SEP] Keyword[final] identifier[DoublesSketchAccessor] identifier[accessor] operator[=] identifier[DoublesSketchAccessor] operator[SEP] identifier[wrap] operator[SEP] identifier[sketch] operator[SEP] operator[SEP] Keyword[assert] identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[==] identifier[accessor] operator[SEP] identifier[numItems] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[accessor] operator[SEP] identifier[getArray] operator[SEP] Other[0] , identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[SEP] , Other[0] , identifier[combinedBuffer] , Other[0] , identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[combinedBuffer] , Other[0] , identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[SEP] operator[SEP] Keyword[int] identifier[combinedBufferOffset] operator[=] identifier[hcds] operator[SEP] identifier[baseBufferCount_] operator[SEP] Keyword[long] identifier[bitPattern] operator[=] identifier[hcds] operator[SEP] identifier[bitPattern_] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[lvl] operator[=] Other[0] operator[SEP] identifier[bitPattern] operator[>] Other[0] operator[SEP] operator[++] identifier[lvl] , identifier[bitPattern] operator[>>>=] Other[1] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[bitPattern] operator[&] Other[1L] operator[SEP] operator[>] Other[0L] operator[SEP] { identifier[accessor] operator[SEP] identifier[setLevel] operator[SEP] identifier[lvl] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[accessor] operator[SEP] identifier[getArray] operator[SEP] Other[0] , identifier[k] operator[SEP] , Other[0] , identifier[combinedBuffer] , identifier[combinedBufferOffset] , identifier[k] operator[SEP] operator[SEP] identifier[combinedBufferOffset] operator[+=] identifier[k] operator[SEP] } } identifier[hcds] operator[SEP] identifier[combinedBuffer_] operator[=] identifier[combinedBuffer] operator[SEP] Keyword[return] identifier[hcds] operator[SEP] }
public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) { this.marginLeft = marginLeft; this.marginRight = marginRight; this.marginTop = marginTop; this.marginBottom = marginBottom; DocListener listener; for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { listener = (DocListener) iterator.next(); listener.setMargins(marginLeft, marginRight, marginTop, marginBottom); } return true; }
class class_name[name] begin[{] method[setMargins, return_type[type[boolean]], modifier[public], parameter[marginLeft, marginRight, marginTop, marginBottom]] begin[{] assign[THIS[member[None.marginLeft]], member[.marginLeft]] assign[THIS[member[None.marginRight]], member[.marginRight]] assign[THIS[member[None.marginTop]], member[.marginTop]] assign[THIS[member[None.marginBottom]], member[.marginBottom]] local_variable[type[DocListener], listener] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DocListener, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=marginLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=marginRight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=marginTop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=marginBottom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMargins, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=listeners, selectors=[], type_arguments=None), name=iterator)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[setMargins] operator[SEP] Keyword[float] identifier[marginLeft] , Keyword[float] identifier[marginRight] , Keyword[float] identifier[marginTop] , Keyword[float] identifier[marginBottom] operator[SEP] { Keyword[this] operator[SEP] identifier[marginLeft] operator[=] identifier[marginLeft] operator[SEP] Keyword[this] operator[SEP] identifier[marginRight] operator[=] identifier[marginRight] operator[SEP] Keyword[this] operator[SEP] identifier[marginTop] operator[=] identifier[marginTop] operator[SEP] Keyword[this] operator[SEP] identifier[marginBottom] operator[=] identifier[marginBottom] operator[SEP] identifier[DocListener] identifier[listener] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[iterator] operator[=] identifier[listeners] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[listener] operator[=] operator[SEP] identifier[DocListener] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[setMargins] operator[SEP] identifier[marginLeft] , identifier[marginRight] , identifier[marginTop] , identifier[marginBottom] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static void putValue(String registryName, String key, Object value) { if (StringUtils.isBlank(registryName) || StringUtils.isBlank(key) || value == null) { return; } Sysprop registryObject = readRegistryObject(registryName); if (registryObject == null) { registryObject = new Sysprop(getRegistryID(registryName)); registryObject.addProperty(key, value); CoreUtils.getInstance().getDao().create(REGISTRY_APP_ID, registryObject); } else { registryObject.addProperty(key, value); CoreUtils.getInstance().getDao().update(REGISTRY_APP_ID, registryObject); } }
class class_name[name] begin[{] method[putValue, return_type[void], modifier[public static], parameter[registryName, key, value]] begin[{] if[binary_operation[binary_operation[call[StringUtils.isBlank, parameter[member[.registryName]]], ||, call[StringUtils.isBlank, parameter[member[.key]]]], ||, binary_operation[member[.value], ==, literal[null]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Sysprop], registryObject] if[binary_operation[member[.registryObject], ==, literal[null]]] begin[{] assign[member[.registryObject], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=registryName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRegistryID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Sysprop, sub_type=None))] call[registryObject.addProperty, parameter[member[.key], member[.value]]] call[CoreUtils.getInstance, parameter[]] else begin[{] call[registryObject.addProperty, parameter[member[.key], member[.value]]] call[CoreUtils.getInstance, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[putValue] operator[SEP] identifier[String] identifier[registryName] , identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[registryName] operator[SEP] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[key] operator[SEP] operator[||] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[Sysprop] identifier[registryObject] operator[=] identifier[readRegistryObject] operator[SEP] identifier[registryName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[registryObject] operator[==] Other[null] operator[SEP] { identifier[registryObject] operator[=] Keyword[new] identifier[Sysprop] operator[SEP] identifier[getRegistryID] operator[SEP] identifier[registryName] operator[SEP] operator[SEP] operator[SEP] identifier[registryObject] operator[SEP] identifier[addProperty] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] identifier[CoreUtils] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getDao] operator[SEP] operator[SEP] operator[SEP] identifier[create] operator[SEP] identifier[REGISTRY_APP_ID] , identifier[registryObject] operator[SEP] operator[SEP] } Keyword[else] { identifier[registryObject] operator[SEP] identifier[addProperty] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] identifier[CoreUtils] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getDao] operator[SEP] operator[SEP] operator[SEP] identifier[update] operator[SEP] identifier[REGISTRY_APP_ID] , identifier[registryObject] operator[SEP] operator[SEP] } }
public final Position[] getEarthLimb(int radials) { Position[] result = new Position[radials]; double radialDegrees = 0.0; double incDegrees = 360.0 / radials; double quarterEarthKm = circumferenceEarthKm / 4.0; Position surfacePosition = new Position(this.lat, this.lon, 0.0); // Assert( this.alt>0.0, "getEarthLimb() requires Position a positive // altitude"); for (int i = 0; i < radials; i++) { // TODO: base the distance on the altitude above the Earth result[i] = surfacePosition.predict(quarterEarthKm, radialDegrees); radialDegrees += incDegrees; } return result; }
class class_name[name] begin[{] method[getEarthLimb, return_type[type[Position]], modifier[final public], parameter[radials]] begin[{] local_variable[type[Position], result] local_variable[type[double], radialDegrees] local_variable[type[double], incDegrees] local_variable[type[double], quarterEarthKm] local_variable[type[Position], surfacePosition] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=quarterEarthKm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=radialDegrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predict, postfix_operators=[], prefix_operators=[], qualifier=surfacePosition, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=radialDegrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=incDegrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=radials, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Position] operator[SEP] operator[SEP] identifier[getEarthLimb] operator[SEP] Keyword[int] identifier[radials] operator[SEP] { identifier[Position] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[Position] operator[SEP] identifier[radials] operator[SEP] operator[SEP] Keyword[double] identifier[radialDegrees] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[incDegrees] operator[=] literal[Float] operator[/] identifier[radials] operator[SEP] Keyword[double] identifier[quarterEarthKm] operator[=] identifier[circumferenceEarthKm] operator[/] literal[Float] operator[SEP] identifier[Position] identifier[surfacePosition] operator[=] Keyword[new] identifier[Position] operator[SEP] Keyword[this] operator[SEP] identifier[lat] , Keyword[this] operator[SEP] identifier[lon] , literal[Float] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[radials] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[surfacePosition] operator[SEP] identifier[predict] operator[SEP] identifier[quarterEarthKm] , identifier[radialDegrees] operator[SEP] operator[SEP] identifier[radialDegrees] operator[+=] identifier[incDegrees] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public ServiceFuture<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter, final ServiceCallback<List<EntityExtractor>> serviceCallback) { return ServiceFuture.fromResponse(listEntitiesWithServiceResponseAsync(appId, versionId, listEntitiesOptionalParameter), serviceCallback); }
class class_name[name] begin[{] method[listEntitiesAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, listEntitiesOptionalParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.listEntitiesWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.listEntitiesOptionalParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[EntityExtractor] operator[>] operator[>] identifier[listEntitiesAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[ListEntitiesOptionalParameter] identifier[listEntitiesOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[List] operator[<] identifier[EntityExtractor] operator[>] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[listEntitiesWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[listEntitiesOptionalParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static boolean matchPath(String pattern, String str, boolean isCaseSensitive) { String[] patDirs = tokenizePathAsArray(pattern); String[] strDirs = tokenizePathAsArray(str); int patIdxStart = 0; int patIdxEnd = patDirs.length - 1; int strIdxStart = 0; int strIdxEnd = strDirs.length - 1; // up to first '**' while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) { String patDir = patDirs[patIdxStart]; if (patDir.equals("**")) { break; } if (!match(patDir, strDirs[strIdxStart], isCaseSensitive)) { patDirs = null; strDirs = null; return false; } patIdxStart++; strIdxStart++; } if (strIdxStart > strIdxEnd) { // String is exhausted for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!patDirs[i].equals("**")) { patDirs = null; strDirs = null; return false; } } return true; } else { if (patIdxStart > patIdxEnd) { // String not exhausted, but pattern is. Failure. patDirs = null; strDirs = null; return false; } } // up to last '**' while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) { String patDir = patDirs[patIdxEnd]; if (patDir.equals("**")) { break; } if (!match(patDir, strDirs[strIdxEnd], isCaseSensitive)) { patDirs = null; strDirs = null; return false; } patIdxEnd--; strIdxEnd--; } if (strIdxStart > strIdxEnd) { // String is exhausted for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!patDirs[i].equals("**")) { patDirs = null; strDirs = null; return false; } } return true; } while (patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd) { int patIdxTmp = -1; for (int i = patIdxStart + 1; i <= patIdxEnd; i++) { if (patDirs[i].equals("**")) { patIdxTmp = i; break; } } if (patIdxTmp == patIdxStart + 1) { // '**/**' situation, so skip one patIdxStart++; continue; } // Find the pattern between padIdxStart & padIdxTmp in str between // strIdxStart & strIdxEnd int patLength = (patIdxTmp - patIdxStart - 1); int strLength = (strIdxEnd - strIdxStart + 1); int foundIdx = -1; strLoop: for (int i = 0; i <= strLength - patLength; i++) { for (int j = 0; j < patLength; j++) { String subPat = patDirs[patIdxStart + j + 1]; String subStr = strDirs[strIdxStart + i + j]; if (!match(subPat, subStr, isCaseSensitive)) { continue strLoop; } } foundIdx = strIdxStart + i; break; } if (foundIdx == -1) { patDirs = null; strDirs = null; return false; } patIdxStart = patIdxTmp; strIdxStart = foundIdx + patLength; } for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!patDirs[i].equals("**")) { patDirs = null; strDirs = null; return false; } } return true; }
class class_name[name] begin[{] method[matchPath, return_type[type[boolean]], modifier[public static], parameter[pattern, str, isCaseSensitive]] begin[{] local_variable[type[String], patDirs] local_variable[type[String], strDirs] local_variable[type[int], patIdxStart] local_variable[type[int], patIdxEnd] local_variable[type[int], strIdxStart] local_variable[type[int], strIdxEnd] while[binary_operation[binary_operation[member[.patIdxStart], <=, member[.patIdxEnd]], &&, binary_operation[member[.strIdxStart], <=, member[.strIdxEnd]]]] begin[{] local_variable[type[String], patDir] if[call[patDir.equals, parameter[literal["**"]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[call[.match, parameter[member[.patDir], member[.strDirs], member[.isCaseSensitive]]]] begin[{] assign[member[.patDirs], literal[null]] assign[member[.strDirs], literal[null]] return[literal[false]] else begin[{] None end[}] member[.patIdxStart] member[.strIdxStart] end[}] if[binary_operation[member[.strIdxStart], >, member[.strIdxEnd]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="**")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patIdxEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=patIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[true]] else begin[{] if[binary_operation[member[.patIdxStart], >, member[.patIdxEnd]]] begin[{] assign[member[.patDirs], literal[null]] assign[member[.strDirs], literal[null]] return[literal[false]] else begin[{] None end[}] end[}] while[binary_operation[binary_operation[member[.patIdxStart], <=, member[.patIdxEnd]], &&, binary_operation[member[.strIdxStart], <=, member[.strIdxEnd]]]] begin[{] local_variable[type[String], patDir] if[call[patDir.equals, parameter[literal["**"]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[call[.match, parameter[member[.patDir], member[.strDirs], member[.isCaseSensitive]]]] begin[{] assign[member[.patDirs], literal[null]] assign[member[.strDirs], literal[null]] return[literal[false]] else begin[{] None end[}] member[.patIdxEnd] member[.strIdxEnd] end[}] if[binary_operation[member[.strIdxStart], >, member[.strIdxEnd]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="**")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patIdxEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=patIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[true]] else begin[{] None end[}] while[binary_operation[binary_operation[member[.patIdxStart], !=, member[.patIdxEnd]], &&, binary_operation[member[.strIdxStart], <=, member[.strIdxEnd]]]] begin[{] local_variable[type[int], patIdxTmp] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="**")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=patIdxTmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patIdxEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=patIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.patIdxTmp], ==, binary_operation[member[.patIdxStart], +, literal[1]]]] begin[{] member[.patIdxStart] ContinueStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[int], patLength] local_variable[type[int], strLength] local_variable[type[int], foundIdx] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=patIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), name=subPat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=strDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=strIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), name=subStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=subPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isCaseSensitive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=strLoop, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=strIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), BreakStatement(goto=None, label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=strLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=strLoop) if[binary_operation[member[.foundIdx], ==, literal[1]]] begin[{] assign[member[.patDirs], literal[null]] assign[member[.strDirs], literal[null]] return[literal[false]] else begin[{] None end[}] assign[member[.patIdxStart], member[.patIdxTmp]] assign[member[.strIdxStart], binary_operation[member[.foundIdx], +, member[.patLength]]] end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="**")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=patDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=patIdxEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=patIdxStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[matchPath] operator[SEP] identifier[String] identifier[pattern] , identifier[String] identifier[str] , Keyword[boolean] identifier[isCaseSensitive] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[patDirs] operator[=] identifier[tokenizePathAsArray] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[strDirs] operator[=] identifier[tokenizePathAsArray] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[int] identifier[patIdxStart] operator[=] Other[0] operator[SEP] Keyword[int] identifier[patIdxEnd] operator[=] identifier[patDirs] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] Keyword[int] identifier[strIdxStart] operator[=] Other[0] operator[SEP] Keyword[int] identifier[strIdxEnd] operator[=] identifier[strDirs] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[patIdxStart] operator[<=] identifier[patIdxEnd] operator[&&] identifier[strIdxStart] operator[<=] identifier[strIdxEnd] operator[SEP] { identifier[String] identifier[patDir] operator[=] identifier[patDirs] operator[SEP] identifier[patIdxStart] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[patDir] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[match] operator[SEP] identifier[patDir] , identifier[strDirs] operator[SEP] identifier[strIdxStart] operator[SEP] , identifier[isCaseSensitive] operator[SEP] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[patIdxStart] operator[++] operator[SEP] identifier[strIdxStart] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[strIdxStart] operator[>] identifier[strIdxEnd] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[patIdxStart] operator[SEP] identifier[i] operator[<=] identifier[patIdxEnd] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[patDirs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[patIdxStart] operator[>] identifier[patIdxEnd] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[while] operator[SEP] identifier[patIdxStart] operator[<=] identifier[patIdxEnd] operator[&&] identifier[strIdxStart] operator[<=] identifier[strIdxEnd] operator[SEP] { identifier[String] identifier[patDir] operator[=] identifier[patDirs] operator[SEP] identifier[patIdxEnd] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[patDir] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[match] operator[SEP] identifier[patDir] , identifier[strDirs] operator[SEP] identifier[strIdxEnd] operator[SEP] , identifier[isCaseSensitive] operator[SEP] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[patIdxEnd] operator[--] operator[SEP] identifier[strIdxEnd] operator[--] operator[SEP] } Keyword[if] operator[SEP] identifier[strIdxStart] operator[>] identifier[strIdxEnd] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[patIdxStart] operator[SEP] identifier[i] operator[<=] identifier[patIdxEnd] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[patDirs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] } Keyword[while] operator[SEP] identifier[patIdxStart] operator[!=] identifier[patIdxEnd] operator[&&] identifier[strIdxStart] operator[<=] identifier[strIdxEnd] operator[SEP] { Keyword[int] identifier[patIdxTmp] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[patIdxStart] operator[+] Other[1] operator[SEP] identifier[i] operator[<=] identifier[patIdxEnd] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[patDirs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[patIdxTmp] operator[=] identifier[i] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[patIdxTmp] operator[==] identifier[patIdxStart] operator[+] Other[1] operator[SEP] { identifier[patIdxStart] operator[++] operator[SEP] Keyword[continue] operator[SEP] } Keyword[int] identifier[patLength] operator[=] operator[SEP] identifier[patIdxTmp] operator[-] identifier[patIdxStart] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[strLength] operator[=] operator[SEP] identifier[strIdxEnd] operator[-] identifier[strIdxStart] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[foundIdx] operator[=] operator[-] Other[1] operator[SEP] identifier[strLoop] operator[:] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<=] identifier[strLength] operator[-] identifier[patLength] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[patLength] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[String] identifier[subPat] operator[=] identifier[patDirs] operator[SEP] identifier[patIdxStart] operator[+] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[subStr] operator[=] identifier[strDirs] operator[SEP] identifier[strIdxStart] operator[+] identifier[i] operator[+] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[match] operator[SEP] identifier[subPat] , identifier[subStr] , identifier[isCaseSensitive] operator[SEP] operator[SEP] { Keyword[continue] identifier[strLoop] operator[SEP] } } identifier[foundIdx] operator[=] identifier[strIdxStart] operator[+] identifier[i] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[foundIdx] operator[==] operator[-] Other[1] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[patIdxStart] operator[=] identifier[patIdxTmp] operator[SEP] identifier[strIdxStart] operator[=] identifier[foundIdx] operator[+] identifier[patLength] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[patIdxStart] operator[SEP] identifier[i] operator[<=] identifier[patIdxEnd] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[patDirs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[patDirs] operator[=] Other[null] operator[SEP] identifier[strDirs] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static <T, K> Func1<Iterable<T>, SolidMap<K, T>> toSolidMap(final Func1<T, K> keyExtractor) { return toSolidMap(keyExtractor, new Func1<T, T>() { @Override public T call(T value) { return value; } }); }
class class_name[name] begin[{] method[toSolidMap, return_type[type[Func1]], modifier[public static], parameter[keyExtractor]] begin[{] return[call[.toSolidMap, parameter[member[.keyExtractor], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=call, parameters=[FormalParameter(annotations=[], modifiers=set(), name=value, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Func1, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] operator[>] identifier[Func1] operator[<] identifier[Iterable] operator[<] identifier[T] operator[>] , identifier[SolidMap] operator[<] identifier[K] , identifier[T] operator[>] operator[>] identifier[toSolidMap] operator[SEP] Keyword[final] identifier[Func1] operator[<] identifier[T] , identifier[K] operator[>] identifier[keyExtractor] operator[SEP] { Keyword[return] identifier[toSolidMap] operator[SEP] identifier[keyExtractor] , Keyword[new] identifier[Func1] operator[<] identifier[T] , identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[call] operator[SEP] identifier[T] identifier[value] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public void verify(Statement s) throws SymbolWarning, IndexingFailure, ResourceDownloadError { List<Parameter> parameters = s.getAllParameters(); // first iteration to open all namespaces for (Parameter p : parameters) { if (p.getNamespace() == null || p.getNamespace().getResourceLocation() == null) { continue; } String resourceLocation = p.getNamespace().getResourceLocation(); synchronized (resourceLocation) { if (!isOpen(resourceLocation)) { final String indexPath = doCompile(resourceLocation); openNamespace(resourceLocation, indexPath); } } } final List<NamespaceSyntaxWarning> exceptions = new ArrayList<NamespaceSyntaxWarning>(); for (Parameter p : s.getAllParameters()) { Namespace ns = p.getNamespace(); if (ns == null) { continue; } try { doVerify(p); } catch (NamespaceSyntaxWarning w) { exceptions.add(w); } } if (!exceptions.isEmpty()) { // TODO review name final String name = s.toString(); final String fmt = INVALID_SYMBOLS; final String msg = format(fmt, exceptions.size()); throw new SymbolWarning(name, msg, exceptions); } }
class class_name[name] begin[{] method[verify, return_type[void], modifier[public], parameter[s]] begin[{] local_variable[type[List], parameters] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[MethodInvocation(arguments=[], member=getResourceLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[MethodInvocation(arguments=[], member=getResourceLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=resourceLocation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), SynchronizedStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=resourceLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isOpen, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=resourceLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doCompile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=indexPath)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resourceLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=indexPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=openNamespace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, lock=MemberReference(member=resourceLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), control=EnhancedForControl(iterable=MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))), label=None) local_variable[type[List], exceptions] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), name=ns)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Namespace, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doVerify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=exceptions, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=w, types=['NamespaceSyntaxWarning']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAllParameters, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))), label=None) if[call[exceptions.isEmpty, parameter[]]] begin[{] local_variable[type[String], name] local_variable[type[String], fmt] local_variable[type[String], msg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SymbolWarning, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[verify] operator[SEP] identifier[Statement] identifier[s] operator[SEP] Keyword[throws] identifier[SymbolWarning] , identifier[IndexingFailure] , identifier[ResourceDownloadError] { identifier[List] operator[<] identifier[Parameter] operator[>] identifier[parameters] operator[=] identifier[s] operator[SEP] identifier[getAllParameters] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Parameter] identifier[p] operator[:] identifier[parameters] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[p] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[resourceLocation] operator[=] identifier[p] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[resourceLocation] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isOpen] operator[SEP] identifier[resourceLocation] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[indexPath] operator[=] identifier[doCompile] operator[SEP] identifier[resourceLocation] operator[SEP] operator[SEP] identifier[openNamespace] operator[SEP] identifier[resourceLocation] , identifier[indexPath] operator[SEP] operator[SEP] } } } Keyword[final] identifier[List] operator[<] identifier[NamespaceSyntaxWarning] operator[>] identifier[exceptions] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[NamespaceSyntaxWarning] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Parameter] identifier[p] operator[:] identifier[s] operator[SEP] identifier[getAllParameters] operator[SEP] operator[SEP] operator[SEP] { identifier[Namespace] identifier[ns] operator[=] identifier[p] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ns] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[try] { identifier[doVerify] operator[SEP] identifier[p] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NamespaceSyntaxWarning] identifier[w] operator[SEP] { identifier[exceptions] operator[SEP] identifier[add] operator[SEP] identifier[w] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[exceptions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[name] operator[=] identifier[s] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[fmt] operator[=] identifier[INVALID_SYMBOLS] operator[SEP] Keyword[final] identifier[String] identifier[msg] operator[=] identifier[format] operator[SEP] identifier[fmt] , identifier[exceptions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SymbolWarning] operator[SEP] identifier[name] , identifier[msg] , identifier[exceptions] operator[SEP] operator[SEP] } }
@Override public void serialize(Relationship relationship, JsonGenerator jg, SerializerProvider serializerProvider) throws IOException { jg.writeStartObject(); jg.writeFieldName(FIELD_ID); jg.writeString(relationship.getId()); jg.writeFieldName(FIELD_NAME); jg.writeString(relationship.getName()); jg.writeFieldName(FIELD_SOURCE); jg.writeString(relationship.getSource().toString()); jg.writeFieldName(FIELD_TARGET); jg.writeString(relationship.getTarget().toString()); if (relationship.getProperties() != null && !relationship.getProperties().isEmpty()) { jg.writeFieldName(FIELD_PROPERTIES); jg.writeStartObject(); for (Map.Entry<String, Object> property : relationship.getProperties().entrySet()) { jg.writeFieldName(property.getKey()); jg.writeObject(property.getValue()); } jg.writeEndObject(); } jg.writeEndObject(); }
class class_name[name] begin[{] method[serialize, return_type[void], modifier[public], parameter[relationship, jg, serializerProvider]] begin[{] call[jg.writeStartObject, parameter[]] call[jg.writeFieldName, parameter[member[.FIELD_ID]]] call[jg.writeString, parameter[call[relationship.getId, parameter[]]]] call[jg.writeFieldName, parameter[member[.FIELD_NAME]]] call[jg.writeString, parameter[call[relationship.getName, parameter[]]]] call[jg.writeFieldName, parameter[member[.FIELD_SOURCE]]] call[jg.writeString, parameter[call[relationship.getSource, parameter[]]]] call[jg.writeFieldName, parameter[member[.FIELD_TARGET]]] call[jg.writeString, parameter[call[relationship.getTarget, parameter[]]]] if[binary_operation[binary_operation[call[relationship.getProperties, parameter[]], !=, literal[null]], &&, call[relationship.getProperties, parameter[]]]] begin[{] call[jg.writeFieldName, parameter[member[.FIELD_PROPERTIES]]] call[jg.writeStartObject, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=writeFieldName, postfix_operators=[], prefix_operators=[], qualifier=jg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=writeObject, postfix_operators=[], prefix_operators=[], qualifier=jg, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=relationship, selectors=[MethodInvocation(arguments=[], member=entrySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) call[jg.writeEndObject, parameter[]] else begin[{] None end[}] call[jg.writeEndObject, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serialize] operator[SEP] identifier[Relationship] identifier[relationship] , identifier[JsonGenerator] identifier[jg] , identifier[SerializerProvider] identifier[serializerProvider] operator[SEP] Keyword[throws] identifier[IOException] { identifier[jg] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[FIELD_ID] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeString] operator[SEP] identifier[relationship] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[FIELD_NAME] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeString] operator[SEP] identifier[relationship] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[FIELD_SOURCE] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeString] operator[SEP] identifier[relationship] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[FIELD_TARGET] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeString] operator[SEP] identifier[relationship] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relationship] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[relationship] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[FIELD_PROPERTIES] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[property] operator[:] identifier[relationship] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[jg] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[property] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jg] operator[SEP] identifier[writeObject] operator[SEP] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[jg] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] } identifier[jg] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] }
public SDVariable pad(SDVariable input, int[][] padding, double constant){ return pad(input, sd.constant(Nd4j.createFromArray(padding)), constant); }
class class_name[name] begin[{] method[pad, return_type[type[SDVariable]], modifier[public], parameter[input, padding, constant]] begin[{] return[call[.pad, parameter[member[.input], call[sd.constant, parameter[call[Nd4j.createFromArray, parameter[member[.padding]]]]], member[.constant]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[pad] operator[SEP] identifier[SDVariable] identifier[input] , Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[padding] , Keyword[double] identifier[constant] operator[SEP] { Keyword[return] identifier[pad] operator[SEP] identifier[input] , identifier[sd] operator[SEP] identifier[constant] operator[SEP] identifier[Nd4j] operator[SEP] identifier[createFromArray] operator[SEP] identifier[padding] operator[SEP] operator[SEP] , identifier[constant] operator[SEP] operator[SEP] }
private static ImmutableSortedSet<String> buildNodeModulesFoldersRegistry( Iterable<String> modulePaths, Iterable<String> moduleRootPaths) { SortedSet<String> registry = new TreeSet<>( // TODO(b/28382956): Take better advantage of Java8 comparing() to simplify this (a, b) -> { // Order longest path first int comparison = Integer.compare(b.length(), a.length()); if (comparison != 0) { return comparison; } return a.compareTo(b); }); // For each modulePath, find all the node_modules folders // There might be more than one: // /foo/node_modules/bar/node_modules/baz/foo_bar_baz.js // Should add: // /foo/ -> bar/node_modules/baz/foo_bar_baz.js // /foo/node_modules/bar/ -> baz/foo_bar_baz.js // // If there are root paths provided - they should be ignored from paths. For example if // root paths contains "/generated" root then the following module path should produce exact // same result as above: // /generated/foo/node_modules/bar/node_modules/baz/foo_bar_baz.js for (String modulePath : modulePaths) { // Strip root path from the beginning if it matches any. for (String moduleRootPath : moduleRootPaths) { if (modulePath.startsWith(moduleRootPath)) { modulePath = modulePath.substring(moduleRootPath.length()); break; } } String[] nodeModulesDirs = modulePath.split("/node_modules/"); String parentPath = ""; for (int i = 0; i < nodeModulesDirs.length - 1; i++) { if (i + 1 < nodeModulesDirs.length) { parentPath += nodeModulesDirs[i] + "/"; } registry.add(parentPath); parentPath += "node_modules/"; } } return ImmutableSortedSet.copyOfSorted(registry); }
class class_name[name] begin[{] method[buildNodeModulesFoldersRegistry, return_type[type[ImmutableSortedSet]], modifier[private static], parameter[modulePaths, moduleRootPaths]] begin[{] local_variable[type[SortedSet], registry] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=moduleRootPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=modulePath, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=modulePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=moduleRootPath, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=modulePath, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=moduleRootPaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=moduleRootPath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/node_modules/")], member=split, postfix_operators=[], prefix_operators=[], qualifier=modulePath, selectors=[], type_arguments=None), name=nodeModulesDirs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=parentPath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=nodeModulesDirs, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parentPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=nodeModulesDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parentPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=registry, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=parentPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="node_modules/")), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=nodeModulesDirs, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=modulePaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=modulePath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[ImmutableSortedSet.copyOfSorted, parameter[member[.registry]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ImmutableSortedSet] operator[<] identifier[String] operator[>] identifier[buildNodeModulesFoldersRegistry] operator[SEP] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[modulePaths] , identifier[Iterable] operator[<] identifier[String] operator[>] identifier[moduleRootPaths] operator[SEP] { identifier[SortedSet] operator[<] identifier[String] operator[>] identifier[registry] operator[=] Keyword[new] identifier[TreeSet] operator[<] operator[>] operator[SEP] operator[SEP] identifier[a] , identifier[b] operator[SEP] operator[->] { Keyword[int] identifier[comparison] operator[=] identifier[Integer] operator[SEP] identifier[compare] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comparison] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[comparison] operator[SEP] } Keyword[return] identifier[a] operator[SEP] identifier[compareTo] operator[SEP] identifier[b] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[modulePath] operator[:] identifier[modulePaths] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[moduleRootPath] operator[:] identifier[moduleRootPaths] operator[SEP] { Keyword[if] operator[SEP] identifier[modulePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[moduleRootPath] operator[SEP] operator[SEP] { identifier[modulePath] operator[=] identifier[modulePath] operator[SEP] identifier[substring] operator[SEP] identifier[moduleRootPath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } identifier[String] operator[SEP] operator[SEP] identifier[nodeModulesDirs] operator[=] identifier[modulePath] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[parentPath] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nodeModulesDirs] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[+] Other[1] operator[<] identifier[nodeModulesDirs] operator[SEP] identifier[length] operator[SEP] { identifier[parentPath] operator[+=] identifier[nodeModulesDirs] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[SEP] } identifier[registry] operator[SEP] identifier[add] operator[SEP] identifier[parentPath] operator[SEP] operator[SEP] identifier[parentPath] operator[+=] literal[String] operator[SEP] } } Keyword[return] identifier[ImmutableSortedSet] operator[SEP] identifier[copyOfSorted] operator[SEP] identifier[registry] operator[SEP] operator[SEP] }
protected String getCommonSuperClass(final String type1, final String type2) { ClassLoader classLoader = getClassLoader(); Class<?> class1; try { class1 = Class.forName(type1.replace('/', '.'), false, classLoader); } catch (ClassNotFoundException e) { throw new TypeNotPresentException(type1, e); } Class<?> class2; try { class2 = Class.forName(type2.replace('/', '.'), false, classLoader); } catch (ClassNotFoundException e) { throw new TypeNotPresentException(type2, e); } if (class1.isAssignableFrom(class2)) { return type1; } if (class2.isAssignableFrom(class1)) { return type2; } if (class1.isInterface() || class2.isInterface()) { return "java/lang/Object"; } else { do { class1 = class1.getSuperclass(); } while (!class1.isAssignableFrom(class2)); return class1.getName().replace('.', '/'); } }
class class_name[name] begin[{] method[getCommonSuperClass, return_type[type[String]], modifier[protected], parameter[type1, type2]] begin[{] local_variable[type[ClassLoader], classLoader] local_variable[type[Class], class1] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=class1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=replace, postfix_operators=[], prefix_operators=[], qualifier=type1, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=classLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=type1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeNotPresentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) local_variable[type[Class], class2] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=class2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=replace, postfix_operators=[], prefix_operators=[], qualifier=type2, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=classLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=type2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeNotPresentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) if[call[class1.isAssignableFrom, parameter[member[.class2]]]] begin[{] return[member[.type1]] else begin[{] None end[}] if[call[class2.isAssignableFrom, parameter[member[.class1]]]] begin[{] return[member[.type2]] else begin[{] None end[}] if[binary_operation[call[class1.isInterface, parameter[]], ||, call[class2.isInterface, parameter[]]]] begin[{] return[literal["java/lang/Object"]] else begin[{] do[call[class1.isAssignableFrom, parameter[member[.class2]]]] begin[{] assign[member[.class1], call[class1.getSuperclass, parameter[]]] end[}] return[call[class1.getName, parameter[]]] end[}] end[}] END[}]
Keyword[protected] identifier[String] identifier[getCommonSuperClass] operator[SEP] Keyword[final] identifier[String] identifier[type1] , Keyword[final] identifier[String] identifier[type2] operator[SEP] { identifier[ClassLoader] identifier[classLoader] operator[=] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[class1] operator[SEP] Keyword[try] { identifier[class1] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[type1] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] , literal[boolean] , identifier[classLoader] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TypeNotPresentException] operator[SEP] identifier[type1] , identifier[e] operator[SEP] operator[SEP] } identifier[Class] operator[<] operator[?] operator[>] identifier[class2] operator[SEP] Keyword[try] { identifier[class2] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[type2] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] , literal[boolean] , identifier[classLoader] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TypeNotPresentException] operator[SEP] identifier[type2] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[class1] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[class2] operator[SEP] operator[SEP] { Keyword[return] identifier[type1] operator[SEP] } Keyword[if] operator[SEP] identifier[class2] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[class1] operator[SEP] operator[SEP] { Keyword[return] identifier[type2] operator[SEP] } Keyword[if] operator[SEP] identifier[class1] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[||] identifier[class2] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[else] { Keyword[do] { identifier[class1] operator[=] identifier[class1] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[!] identifier[class1] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[class2] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[class1] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } }
public static TransformSplit ofSearchReplace(@NonNull BaseInputSplit sourceSplit, @NonNull final String search, @NonNull final String replace) throws URISyntaxException { return new TransformSplit(sourceSplit, new URITransform() { @Override public URI apply(URI uri) throws URISyntaxException { return new URI(uri.toString().replace(search, replace)); } }); }
class class_name[name] begin[{] method[ofSearchReplace, return_type[type[TransformSplit]], modifier[public static], parameter[sourceSplit, search, replace]] begin[{] return[ClassCreator(arguments=[MemberReference(member=sourceSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=uri, selectors=[MethodInvocation(arguments=[MemberReference(member=search, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URI, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=uri, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None), throws=['URISyntaxException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URITransform, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransformSplit, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[TransformSplit] identifier[ofSearchReplace] operator[SEP] annotation[@] identifier[NonNull] identifier[BaseInputSplit] identifier[sourceSplit] , annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[search] , annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[replace] operator[SEP] Keyword[throws] identifier[URISyntaxException] { Keyword[return] Keyword[new] identifier[TransformSplit] operator[SEP] identifier[sourceSplit] , Keyword[new] identifier[URITransform] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[URI] identifier[apply] operator[SEP] identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[URISyntaxException] { Keyword[return] Keyword[new] identifier[URI] operator[SEP] identifier[uri] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] identifier[search] , identifier[replace] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void addNode(N node) { if(!nodes.containsKey(node)) nodes.put(node, new Pair<HashSet<N>, HashSet<N>>(new HashSet<N>(), new HashSet<N>())); }
class class_name[name] begin[{] method[addNode, return_type[void], modifier[public], parameter[node]] begin[{] if[call[nodes.containsKey, parameter[member[.node]]]] begin[{] call[nodes.put, parameter[member[.node], ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=N, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=N, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=N, sub_type=None))], dimensions=[], name=HashSet, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=N, sub_type=None))], dimensions=[], name=HashSet, sub_type=None))], dimensions=None, name=Pair, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addNode] operator[SEP] identifier[N] identifier[node] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[nodes] operator[SEP] identifier[containsKey] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[nodes] operator[SEP] identifier[put] operator[SEP] identifier[node] , Keyword[new] identifier[Pair] operator[<] identifier[HashSet] operator[<] identifier[N] operator[>] , identifier[HashSet] operator[<] identifier[N] operator[>] operator[>] operator[SEP] Keyword[new] identifier[HashSet] operator[<] identifier[N] operator[>] operator[SEP] operator[SEP] , Keyword[new] identifier[HashSet] operator[<] identifier[N] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void addAnyAttachments(final List<EmailAttachment<? extends DataSource>> attachments, final MimeMultipart multipart) throws MessagingException { for (final EmailAttachment<? extends DataSource> attachment : attachments) { final MimeBodyPart bodyPart = createAttachmentBodyPart(attachment); multipart.addBodyPart(bodyPart); } }
class class_name[name] begin[{] method[addAnyAttachments, return_type[void], modifier[private], parameter[attachments, multipart]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=attachment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createAttachmentBodyPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=bodyPart)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MimeBodyPart, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bodyPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addBodyPart, postfix_operators=[], prefix_operators=[], qualifier=multipart, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=attachments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attachment)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=DataSource, sub_type=None))], dimensions=[], name=EmailAttachment, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[addAnyAttachments] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[EmailAttachment] operator[<] operator[?] Keyword[extends] identifier[DataSource] operator[>] operator[>] identifier[attachments] , Keyword[final] identifier[MimeMultipart] identifier[multipart] operator[SEP] Keyword[throws] identifier[MessagingException] { Keyword[for] operator[SEP] Keyword[final] identifier[EmailAttachment] operator[<] operator[?] Keyword[extends] identifier[DataSource] operator[>] identifier[attachment] operator[:] identifier[attachments] operator[SEP] { Keyword[final] identifier[MimeBodyPart] identifier[bodyPart] operator[=] identifier[createAttachmentBodyPart] operator[SEP] identifier[attachment] operator[SEP] operator[SEP] identifier[multipart] operator[SEP] identifier[addBodyPart] operator[SEP] identifier[bodyPart] operator[SEP] operator[SEP] } }
public void save(HttpServletRequest req, HttpServletResponse res, AuthenticationResult authResult, boolean keepInput) { if (!req.getMethod().equalsIgnoreCase("POST")) { return; } if (!(req instanceof IExtendedRequest)) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "It is not an IExtendedRequest object"); } return; } restorePostParams((SRTServletRequest) req); String reqURL = req.getRequestURI(); try { String postParamSaveMethod = webAppSecurityConfig.getPostParamSaveMethod(); if (postParamSaveMethod.equalsIgnoreCase(WebAppSecurityConfig.POST_PARAM_SAVE_TO_COOKIE)) { saveToCookie((IExtendedRequest) req, reqURL, authResult, keepInput); } else if (postParamSaveMethod.equalsIgnoreCase(WebAppSecurityConfig.POST_PARAM_SAVE_TO_SESSION)) { IExtendedRequest extRequest = (IExtendedRequest) req; Map params = extRequest.getInputStreamData(); saveToSession(req, reqURL, params); } } catch (IOException exc) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "IO Exception storing POST parameters onto a cookie or session: ", new Object[] { exc }); } } }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[req, res, authResult, keepInput]] begin[{] if[call[req.getMethod, parameter[]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.req], instanceof, type[IExtendedRequest]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["It is not an IExtendedRequest object"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] call[.restorePostParams, parameter[Cast(expression=MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SRTServletRequest, sub_type=None))]] local_variable[type[String], reqURL] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPostParamSaveMethod, postfix_operators=[], prefix_operators=[], qualifier=webAppSecurityConfig, selectors=[], type_arguments=None), name=postParamSaveMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=POST_PARAM_SAVE_TO_COOKIE, postfix_operators=[], prefix_operators=[], qualifier=WebAppSecurityConfig, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=postParamSaveMethod, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=POST_PARAM_SAVE_TO_SESSION, postfix_operators=[], prefix_operators=[], qualifier=WebAppSecurityConfig, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=postParamSaveMethod, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IExtendedRequest, sub_type=None)), name=extRequest)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IExtendedRequest, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputStreamData, postfix_operators=[], prefix_operators=[], qualifier=extRequest, selectors=[], type_arguments=None), name=params)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reqURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=saveToSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IExtendedRequest, sub_type=None)), MemberReference(member=reqURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=authResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keepInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=saveToCookie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IO Exception storing POST parameters onto a cookie or session: "), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] , identifier[AuthenticationResult] identifier[authResult] , Keyword[boolean] identifier[keepInput] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[req] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[req] Keyword[instanceof] identifier[IExtendedRequest] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[restorePostParams] operator[SEP] operator[SEP] identifier[SRTServletRequest] operator[SEP] identifier[req] operator[SEP] operator[SEP] identifier[String] identifier[reqURL] operator[=] identifier[req] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[postParamSaveMethod] operator[=] identifier[webAppSecurityConfig] operator[SEP] identifier[getPostParamSaveMethod] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[postParamSaveMethod] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[WebAppSecurityConfig] operator[SEP] identifier[POST_PARAM_SAVE_TO_COOKIE] operator[SEP] operator[SEP] { identifier[saveToCookie] operator[SEP] operator[SEP] identifier[IExtendedRequest] operator[SEP] identifier[req] , identifier[reqURL] , identifier[authResult] , identifier[keepInput] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[postParamSaveMethod] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[WebAppSecurityConfig] operator[SEP] identifier[POST_PARAM_SAVE_TO_SESSION] operator[SEP] operator[SEP] { identifier[IExtendedRequest] identifier[extRequest] operator[=] operator[SEP] identifier[IExtendedRequest] operator[SEP] identifier[req] operator[SEP] identifier[Map] identifier[params] operator[=] identifier[extRequest] operator[SEP] identifier[getInputStreamData] operator[SEP] operator[SEP] operator[SEP] identifier[saveToSession] operator[SEP] identifier[req] , identifier[reqURL] , identifier[params] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[exc] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[exc] } operator[SEP] operator[SEP] } } }
@VisibleForTesting static void pretendValidateResource(String resourceName, ContentKind kind) { int index = resourceName.lastIndexOf('.'); Preconditions.checkArgument( index >= 0, "Currently, we only validate resources with explicit extensions."); String fileExtension = resourceName.substring(index + 1).toLowerCase(); switch (kind) { case JS: Preconditions.checkArgument(fileExtension.equals("js")); break; case HTML: Preconditions.checkArgument(SAFE_HTML_FILE_EXTENSIONS.contains(fileExtension)); break; case CSS: Preconditions.checkArgument(fileExtension.equals("css")); break; default: throw new IllegalArgumentException("Don't know how to validate resources of kind " + kind); } }
class class_name[name] begin[{] method[pretendValidateResource, return_type[void], modifier[static], parameter[resourceName, kind]] begin[{] local_variable[type[int], index] call[Preconditions.checkArgument, parameter[binary_operation[member[.index], >=, literal[0]], literal["Currently, we only validate resources with explicit extensions."]]] local_variable[type[String], fileExtension] SwitchStatement(cases=[SwitchStatementCase(case=['JS'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="js")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=fileExtension, selectors=[], type_arguments=None)], member=checkArgument, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['HTML'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=fileExtension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=SAFE_HTML_FILE_EXTENSIONS, selectors=[], type_arguments=None)], member=checkArgument, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CSS'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="css")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=fileExtension, selectors=[], type_arguments=None)], member=checkArgument, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Don't know how to validate resources of kind "), operandr=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[static] Keyword[void] identifier[pretendValidateResource] operator[SEP] identifier[String] identifier[resourceName] , identifier[ContentKind] identifier[kind] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[resourceName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[index] operator[>=] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[fileExtension] operator[=] identifier[resourceName] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[kind] operator[SEP] { Keyword[case] identifier[JS] operator[:] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[fileExtension] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[HTML] operator[:] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[SAFE_HTML_FILE_EXTENSIONS] operator[SEP] identifier[contains] operator[SEP] identifier[fileExtension] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CSS] operator[:] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[fileExtension] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[kind] operator[SEP] operator[SEP] } }
public static OffsetDateTime getCreationTime(long entityId) { long timestamp = (entityId >>> TIMESTAMP_OFFSET) + DISCORD_EPOCH; Calendar gmt = Calendar.getInstance(TimeZone.getTimeZone("GMT")); gmt.setTimeInMillis(timestamp); return OffsetDateTime.ofInstant(gmt.toInstant(), gmt.getTimeZone().toZoneId()); }
class class_name[name] begin[{] method[getCreationTime, return_type[type[OffsetDateTime]], modifier[public static], parameter[entityId]] begin[{] local_variable[type[long], timestamp] local_variable[type[Calendar], gmt] call[gmt.setTimeInMillis, parameter[member[.timestamp]]] return[call[OffsetDateTime.ofInstant, parameter[call[gmt.toInstant, parameter[]], call[gmt.getTimeZone, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OffsetDateTime] identifier[getCreationTime] operator[SEP] Keyword[long] identifier[entityId] operator[SEP] { Keyword[long] identifier[timestamp] operator[=] operator[SEP] identifier[entityId] operator[>] operator[>] operator[>] identifier[TIMESTAMP_OFFSET] operator[SEP] operator[+] identifier[DISCORD_EPOCH] operator[SEP] identifier[Calendar] identifier[gmt] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] identifier[TimeZone] operator[SEP] identifier[getTimeZone] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[gmt] operator[SEP] identifier[setTimeInMillis] operator[SEP] identifier[timestamp] operator[SEP] operator[SEP] Keyword[return] identifier[OffsetDateTime] operator[SEP] identifier[ofInstant] operator[SEP] identifier[gmt] operator[SEP] identifier[toInstant] operator[SEP] operator[SEP] , identifier[gmt] operator[SEP] identifier[getTimeZone] operator[SEP] operator[SEP] operator[SEP] identifier[toZoneId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static String lowPart(final String text) { final String sector; final String[] sectors = MediaType.sectors(text); if (sectors.length > 1) { sector = sectors[1].trim(); } else { sector = ""; } return sector; }
class class_name[name] begin[{] method[lowPart, return_type[type[String]], modifier[private static], parameter[text]] begin[{] local_variable[type[String], sector] local_variable[type[String], sectors] if[binary_operation[member[sectors.length], >, literal[1]]] begin[{] assign[member[.sector], member[.sectors]] else begin[{] assign[member[.sector], literal[""]] end[}] return[member[.sector]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[lowPart] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[SEP] { Keyword[final] identifier[String] identifier[sector] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[sectors] operator[=] identifier[MediaType] operator[SEP] identifier[sectors] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sectors] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { identifier[sector] operator[=] identifier[sectors] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[sector] operator[=] literal[String] operator[SEP] } Keyword[return] identifier[sector] operator[SEP] }
public Observable<Evaluate> evaluateMethodAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter) { return evaluateMethodWithServiceResponseAsync(evaluateMethodOptionalParameter).map(new Func1<ServiceResponse<Evaluate>, Evaluate>() { @Override public Evaluate call(ServiceResponse<Evaluate> response) { return response.body(); } }); }
class class_name[name] begin[{] method[evaluateMethodAsync, return_type[type[Observable]], modifier[public], parameter[evaluateMethodOptionalParameter]] begin[{] return[call[.evaluateMethodWithServiceResponseAsync, parameter[member[.evaluateMethodOptionalParameter]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Evaluate] operator[>] identifier[evaluateMethodAsync] operator[SEP] identifier[EvaluateMethodOptionalParameter] identifier[evaluateMethodOptionalParameter] operator[SEP] { Keyword[return] identifier[evaluateMethodWithServiceResponseAsync] operator[SEP] identifier[evaluateMethodOptionalParameter] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Evaluate] operator[>] , identifier[Evaluate] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Evaluate] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Evaluate] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body(); }
class class_name[name] begin[{] method[validateMove, return_type[void], modifier[public], parameter[resourceGroupName, moveResourceEnvelope]] begin[{] call[.validateMoveWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.moveResourceEnvelope]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[validateMove] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[CsmMoveResourceEnvelope] identifier[moveResourceEnvelope] operator[SEP] { identifier[validateMoveWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[moveResourceEnvelope] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
private ClientRequest<?> completeClientRequest() { ClientRequest<?> local = atomicNullOutClientRequest(); if(local == null) { return null; } if(isExpired) { local.timeOut(); } else { local.complete(); } if(logger.isTraceEnabled()) logger.trace("Marked client associated with " + socketChannel.socket() + " as complete"); return local; }
class class_name[name] begin[{] method[completeClientRequest, return_type[type[ClientRequest]], modifier[private], parameter[]] begin[{] local_variable[type[ClientRequest], local] if[binary_operation[member[.local], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[member[.isExpired]] begin[{] call[local.timeOut, parameter[]] else begin[{] call[local.complete, parameter[]] end[}] if[call[logger.isTraceEnabled, parameter[]]] begin[{] call[logger.trace, parameter[binary_operation[binary_operation[literal["Marked client associated with "], +, call[socketChannel.socket, parameter[]]], +, literal[" as complete"]]]] else begin[{] None end[}] return[member[.local]] end[}] END[}]
Keyword[private] identifier[ClientRequest] operator[<] operator[?] operator[>] identifier[completeClientRequest] operator[SEP] operator[SEP] { identifier[ClientRequest] operator[<] operator[?] operator[>] identifier[local] operator[=] identifier[atomicNullOutClientRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[local] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[isExpired] operator[SEP] { identifier[local] operator[SEP] identifier[timeOut] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[local] operator[SEP] identifier[complete] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[socketChannel] operator[SEP] identifier[socket] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[local] operator[SEP] }
private <E extends Event> EventHandler<E> wrapbuildHandler(final EventAdapter eventAdapter, final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass) throws CoreException { try { return handlerClass.getDeclaredConstructor(adapterClass).newInstance(eventAdapter); } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { throw new CoreException("Impossible to build event handler " + handlerClass.getName() + " for the class " + this.getClass().getName(), e); } }
class class_name[name] begin[{] method[wrapbuildHandler, return_type[type[EventHandler]], modifier[private], parameter[eventAdapter, adapterClass, handlerClass]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=adapterClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDeclaredConstructor, postfix_operators=[], prefix_operators=[], qualifier=handlerClass, selectors=[MethodInvocation(arguments=[MemberReference(member=eventAdapter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Impossible to build event handler "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=handlerClass, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for the class "), operator=+), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CoreException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException', 'IllegalAccessException', 'IllegalArgumentException', 'InvocationTargetException', 'NoSuchMethodException', 'SecurityException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] operator[<] identifier[E] Keyword[extends] identifier[Event] operator[>] identifier[EventHandler] operator[<] identifier[E] operator[>] identifier[wrapbuildHandler] operator[SEP] Keyword[final] identifier[EventAdapter] identifier[eventAdapter] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[EventAdapter] operator[>] identifier[adapterClass] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[EventHandler] operator[<] identifier[E] operator[>] operator[>] identifier[handlerClass] operator[SEP] Keyword[throws] identifier[CoreException] { Keyword[try] { Keyword[return] identifier[handlerClass] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] identifier[adapterClass] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[eventAdapter] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] operator[|] identifier[IllegalAccessException] operator[|] identifier[IllegalArgumentException] operator[|] identifier[InvocationTargetException] operator[|] identifier[NoSuchMethodException] operator[|] identifier[SecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CoreException] operator[SEP] literal[String] operator[+] identifier[handlerClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public ExpressRouteLinkInner get(String resourceGroupName, String expressRoutePortName, String linkName) { return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).toBlocking().single().body(); }
class class_name[name] begin[{] method[get, return_type[type[ExpressRouteLinkInner]], modifier[public], parameter[resourceGroupName, expressRoutePortName, linkName]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.expressRoutePortName], member[.linkName]]]] end[}] END[}]
Keyword[public] identifier[ExpressRouteLinkInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[expressRoutePortName] , identifier[String] identifier[linkName] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[expressRoutePortName] , identifier[linkName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public void setTargetHeight (int targetHeight) { if (targetHeight <= 0) { throw new IllegalArgumentException( "Invalid target height '" + targetHeight + "'"); } _constraints.width = 0; _constraints.height = targetHeight; invalidate("setTargetHeight"); }
class class_name[name] begin[{] method[setTargetHeight, return_type[void], modifier[public], parameter[targetHeight]] begin[{] if[binary_operation[member[.targetHeight], <=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid target height '"), operandr=MemberReference(member=targetHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[_constraints.width], literal[0]] assign[member[_constraints.height], member[.targetHeight]] call[.invalidate, parameter[literal["setTargetHeight"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTargetHeight] operator[SEP] Keyword[int] identifier[targetHeight] operator[SEP] { Keyword[if] operator[SEP] identifier[targetHeight] operator[<=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetHeight] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[_constraints] operator[SEP] identifier[width] operator[=] Other[0] operator[SEP] identifier[_constraints] operator[SEP] identifier[height] operator[=] identifier[targetHeight] operator[SEP] identifier[invalidate] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static long[] flipI(long[] v, int off) { final int wordindex = off >>> LONG_LOG2_SIZE; v[wordindex] ^= (1L << off); return v; }
class class_name[name] begin[{] method[flipI, return_type[type[long]], modifier[public static], parameter[v, off]] begin[{] local_variable[type[int], wordindex] assign[member[.v], binary_operation[literal[1L], <<, member[.off]]] return[member[.v]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] operator[SEP] operator[SEP] identifier[flipI] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[v] , Keyword[int] identifier[off] operator[SEP] { Keyword[final] Keyword[int] identifier[wordindex] operator[=] identifier[off] operator[>] operator[>] operator[>] identifier[LONG_LOG2_SIZE] operator[SEP] identifier[v] operator[SEP] identifier[wordindex] operator[SEP] operator[^=] operator[SEP] Other[1L] operator[<<] identifier[off] operator[SEP] operator[SEP] Keyword[return] identifier[v] operator[SEP] }
public IntervalConverter removeIntervalConverter(IntervalConverter converter) throws SecurityException { checkAlterIntervalConverters(); if (converter == null) { return null; } IntervalConverter[] removed = new IntervalConverter[1]; iIntervalConverters = iIntervalConverters.remove(converter, removed); return removed[0]; }
class class_name[name] begin[{] method[removeIntervalConverter, return_type[type[IntervalConverter]], modifier[public], parameter[converter]] begin[{] call[.checkAlterIntervalConverters, parameter[]] if[binary_operation[member[.converter], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[IntervalConverter], removed] assign[member[.iIntervalConverters], call[iIntervalConverters.remove, parameter[member[.converter], member[.removed]]]] return[member[.removed]] end[}] END[}]
Keyword[public] identifier[IntervalConverter] identifier[removeIntervalConverter] operator[SEP] identifier[IntervalConverter] identifier[converter] operator[SEP] Keyword[throws] identifier[SecurityException] { identifier[checkAlterIntervalConverters] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[converter] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[IntervalConverter] operator[SEP] operator[SEP] identifier[removed] operator[=] Keyword[new] identifier[IntervalConverter] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[iIntervalConverters] operator[=] identifier[iIntervalConverters] operator[SEP] identifier[remove] operator[SEP] identifier[converter] , identifier[removed] operator[SEP] operator[SEP] Keyword[return] identifier[removed] operator[SEP] Other[0] operator[SEP] operator[SEP] }
@Override public InstrumentationFieldFetchParameters withNewState(InstrumentationState instrumentationState) { return new InstrumentationFieldFetchParameters( this.getExecutionContext(), this.getField(), this.getEnvironment(), instrumentationState, executionStrategyParameters, trivialDataFetcher); }
class class_name[name] begin[{] method[withNewState, return_type[type[InstrumentationFieldFetchParameters]], modifier[public], parameter[instrumentationState]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getExecutionContext, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getEnvironment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=instrumentationState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=executionStrategyParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=trivialDataFetcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InstrumentationFieldFetchParameters, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[InstrumentationFieldFetchParameters] identifier[withNewState] operator[SEP] identifier[InstrumentationState] identifier[instrumentationState] operator[SEP] { Keyword[return] Keyword[new] identifier[InstrumentationFieldFetchParameters] operator[SEP] Keyword[this] operator[SEP] identifier[getExecutionContext] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getField] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getEnvironment] operator[SEP] operator[SEP] , identifier[instrumentationState] , identifier[executionStrategyParameters] , identifier[trivialDataFetcher] operator[SEP] operator[SEP] }
private int linearSearch(OMMapBufferEntry[] fileEntries, long beginOffset, int beginPosition, int endPosition) { for (int i = beginPosition; i <= endPosition; i++) { final OMMapBufferEntry entry = fileEntries[i]; if (entry.beginOffset + entry.size > beginOffset && entry.beginOffset <= beginOffset) { return i; } } return -1; }
class class_name[name] begin[{] method[linearSearch, return_type[type[int]], modifier[private], parameter[fileEntries, beginOffset, beginPosition, endPosition]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=fileEntries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OMMapBufferEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=beginOffset, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), operator=+), operandr=MemberReference(member=beginOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=beginOffset, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), operandr=MemberReference(member=beginOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=endPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=beginPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[private] Keyword[int] identifier[linearSearch] operator[SEP] identifier[OMMapBufferEntry] operator[SEP] operator[SEP] identifier[fileEntries] , Keyword[long] identifier[beginOffset] , Keyword[int] identifier[beginPosition] , Keyword[int] identifier[endPosition] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[beginPosition] operator[SEP] identifier[i] operator[<=] identifier[endPosition] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[OMMapBufferEntry] identifier[entry] operator[=] identifier[fileEntries] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[beginOffset] operator[+] identifier[entry] operator[SEP] identifier[size] operator[>] identifier[beginOffset] operator[&&] identifier[entry] operator[SEP] identifier[beginOffset] operator[<=] identifier[beginOffset] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
final void addLineNumber(final int lineNumber) { if (this.lineNumber == 0) { this.lineNumber = (short) lineNumber; } else { if (otherLineNumbers == null) { otherLineNumbers = new int[LINE_NUMBERS_CAPACITY_INCREMENT]; } int otherLineNumberIndex = ++otherLineNumbers[0]; if (otherLineNumberIndex >= otherLineNumbers.length) { int[] newLineNumbers = new int[otherLineNumbers.length + LINE_NUMBERS_CAPACITY_INCREMENT]; System.arraycopy(otherLineNumbers, 0, newLineNumbers, 0, otherLineNumbers.length); otherLineNumbers = newLineNumbers; } otherLineNumbers[otherLineNumberIndex] = lineNumber; } }
class class_name[name] begin[{] method[addLineNumber, return_type[void], modifier[final], parameter[lineNumber]] begin[{] if[binary_operation[THIS[member[None.lineNumber]], ==, literal[0]]] begin[{] assign[THIS[member[None.lineNumber]], Cast(expression=MemberReference(member=lineNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=short))] else begin[{] if[binary_operation[member[.otherLineNumbers], ==, literal[null]]] begin[{] assign[member[.otherLineNumbers], ArrayCreator(dimensions=[MemberReference(member=LINE_NUMBERS_CAPACITY_INCREMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] else begin[{] None end[}] local_variable[type[int], otherLineNumberIndex] if[binary_operation[member[.otherLineNumberIndex], >=, member[otherLineNumbers.length]]] begin[{] local_variable[type[int], newLineNumbers] call[System.arraycopy, parameter[member[.otherLineNumbers], literal[0], member[.newLineNumbers], literal[0], member[otherLineNumbers.length]]] assign[member[.otherLineNumbers], member[.newLineNumbers]] else begin[{] None end[}] assign[member[.otherLineNumbers], member[.lineNumber]] end[}] end[}] END[}]
Keyword[final] Keyword[void] identifier[addLineNumber] operator[SEP] Keyword[final] Keyword[int] identifier[lineNumber] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[lineNumber] operator[==] Other[0] operator[SEP] { Keyword[this] operator[SEP] identifier[lineNumber] operator[=] operator[SEP] Keyword[short] operator[SEP] identifier[lineNumber] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[otherLineNumbers] operator[==] Other[null] operator[SEP] { identifier[otherLineNumbers] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[LINE_NUMBERS_CAPACITY_INCREMENT] operator[SEP] operator[SEP] } Keyword[int] identifier[otherLineNumberIndex] operator[=] operator[++] identifier[otherLineNumbers] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[otherLineNumberIndex] operator[>=] identifier[otherLineNumbers] operator[SEP] identifier[length] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[newLineNumbers] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[otherLineNumbers] operator[SEP] identifier[length] operator[+] identifier[LINE_NUMBERS_CAPACITY_INCREMENT] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[otherLineNumbers] , Other[0] , identifier[newLineNumbers] , Other[0] , identifier[otherLineNumbers] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[otherLineNumbers] operator[=] identifier[newLineNumbers] operator[SEP] } identifier[otherLineNumbers] operator[SEP] identifier[otherLineNumberIndex] operator[SEP] operator[=] identifier[lineNumber] operator[SEP] } }
private static List<Token> createTokens(final Map<String, String> properties) { List<Token> tokens = new ArrayList<Token>(); for (Entry<String, String> entry : properties.entrySet()) { if (entry.getKey().toLowerCase(Locale.ROOT).startsWith(FIELD_PREFIX)) { tokens.add(FormatPatternParser.parse(entry.getValue())); } } return tokens; }
class class_name[name] begin[{] method[createTokens, return_type[type[List]], modifier[private static], parameter[properties]] begin[{] local_variable[type[List], tokens] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[MemberReference(member=ROOT, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=toLowerCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=FIELD_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=parse, postfix_operators=[], prefix_operators=[], qualifier=FormatPatternParser, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[member[.tokens]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Token] operator[>] identifier[createTokens] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[SEP] { identifier[List] operator[<] identifier[Token] operator[>] identifier[tokens] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Token] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[entry] operator[:] identifier[properties] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ROOT] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[FIELD_PREFIX] operator[SEP] operator[SEP] { identifier[tokens] operator[SEP] identifier[add] operator[SEP] identifier[FormatPatternParser] operator[SEP] identifier[parse] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[tokens] operator[SEP] }
public void setStoreSalesUploadCommonMetadata(com.google.api.ads.adwords.axis.v201809.rm.StoreSalesUploadCommonMetadata storeSalesUploadCommonMetadata) { this.storeSalesUploadCommonMetadata = storeSalesUploadCommonMetadata; }
class class_name[name] begin[{] method[setStoreSalesUploadCommonMetadata, return_type[void], modifier[public], parameter[storeSalesUploadCommonMetadata]] begin[{] assign[THIS[member[None.storeSalesUploadCommonMetadata]], member[.storeSalesUploadCommonMetadata]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStoreSalesUploadCommonMetadata] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[rm] operator[SEP] identifier[StoreSalesUploadCommonMetadata] identifier[storeSalesUploadCommonMetadata] operator[SEP] { Keyword[this] operator[SEP] identifier[storeSalesUploadCommonMetadata] operator[=] identifier[storeSalesUploadCommonMetadata] operator[SEP] }
public void save(File file) throws IOException { try (FileOutputStream out = new FileOutputStream(file)) { save(out); } }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[file]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=save, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=out, type=ReferenceType(arguments=None, dimensions=[], name=FileOutputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileOutputStream, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[FileOutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] { identifier[save] operator[SEP] identifier[out] operator[SEP] operator[SEP] } }
protected void createOutputSectionItems(Composite composite, OutputConfiguration outputConfiguration) { final Text defaultDirectoryField = addTextField(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_Directory, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_DIRECTORY), 0, 0); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CreateDirectory, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_CREATE_DIRECTORY), BOOLEAN_VALUES, 0); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_OverrideExistingResources, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_OVERRIDE), BOOLEAN_VALUES, 0); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CreatesDerivedResources, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_DERIVED), BOOLEAN_VALUES, 0); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CleanupDerivedResources, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_CLEANUP_DERIVED), BOOLEAN_VALUES, 0); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CleanDirectory, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_CLEAN_DIRECTORY), BOOLEAN_VALUES, 0); final Button installAsPrimaryButton = addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.BuilderConfigurationBlock_InstallDslAsPrimarySource, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.INSTALL_DSL_AS_PRIMARY_SOURCE), BOOLEAN_VALUES, 0); final Button hideLocalButton = addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.BuilderConfigurationBlock_hideSyntheticLocalVariables, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.HIDE_LOCAL_SYNTHETIC_VARIABLES), BOOLEAN_VALUES, 0); hideLocalButton.setEnabled(installAsPrimaryButton.getSelection()); installAsPrimaryButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent exception) { hideLocalButton.setEnabled(installAsPrimaryButton.getSelection()); } }); final GridData hideLocalButtonData = new GridData(); hideLocalButtonData.horizontalIndent = INDENT_AMOUNT; hideLocalButton.setLayoutData(hideLocalButtonData); addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_KeepLocalHistory, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.OUTPUT_KEEP_LOCAL_HISTORY), BOOLEAN_VALUES, 0); if (getProject() != null && !outputConfiguration.getSourceFolders().isEmpty()) { final Button outputPerSourceButton = addCheckBox(composite, org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_UseOutputPerSourceFolder, BuilderPreferenceAccess.getKey(outputConfiguration, EclipseOutputConfigurationProvider.USE_OUTPUT_PER_SOURCE_FOLDER), BOOLEAN_VALUES, 0); final Table table = createOutputFolderTable(composite, outputConfiguration, defaultDirectoryField); table.setVisible(outputPerSourceButton.getSelection()); outputPerSourceButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent exception) { table.setVisible(outputPerSourceButton.getSelection()); } }); } }
class class_name[name] begin[{] method[createOutputSectionItems, return_type[void], modifier[protected], parameter[composite, outputConfiguration]] begin[{] local_variable[type[Text], defaultDirectoryField] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CreateDirectory], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_CREATE_DIRECTORY]]], member[.BOOLEAN_VALUES], literal[0]]] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_OverrideExistingResources], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_OVERRIDE]]], member[.BOOLEAN_VALUES], literal[0]]] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CreatesDerivedResources], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_DERIVED]]], member[.BOOLEAN_VALUES], literal[0]]] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CleanupDerivedResources], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_CLEANUP_DERIVED]]], member[.BOOLEAN_VALUES], literal[0]]] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_CleanDirectory], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_CLEAN_DIRECTORY]]], member[.BOOLEAN_VALUES], literal[0]]] local_variable[type[Button], installAsPrimaryButton] local_variable[type[Button], hideLocalButton] call[hideLocalButton.setEnabled, parameter[call[installAsPrimaryButton.getSelection, parameter[]]]] call[installAsPrimaryButton.addSelectionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSelection, postfix_operators=[], prefix_operators=[], qualifier=installAsPrimaryButton, selectors=[], type_arguments=None)], member=setEnabled, postfix_operators=[], prefix_operators=[], qualifier=hideLocalButton, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=widgetSelected, parameters=[FormalParameter(annotations=[], modifiers=set(), name=exception, type=ReferenceType(arguments=None, dimensions=[], name=SelectionEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SelectionAdapter, sub_type=None))]] local_variable[type[GridData], hideLocalButtonData] assign[member[hideLocalButtonData.horizontalIndent], member[.INDENT_AMOUNT]] call[hideLocalButton.setLayoutData, parameter[member[.hideLocalButtonData]]] call[.addCheckBox, parameter[member[.composite], member[org.eclipse.xtext.builder.preferences.Messages.OutputConfigurationPage_KeepLocalHistory], call[BuilderPreferenceAccess.getKey, parameter[member[.outputConfiguration], member[EclipseOutputConfigurationProvider.OUTPUT_KEEP_LOCAL_HISTORY]]], member[.BOOLEAN_VALUES], literal[0]]] if[binary_operation[binary_operation[call[.getProject, parameter[]], !=, literal[null]], &&, call[outputConfiguration.getSourceFolders, parameter[]]]] begin[{] local_variable[type[Button], outputPerSourceButton] local_variable[type[Table], table] call[table.setVisible, parameter[call[outputPerSourceButton.getSelection, parameter[]]]] call[outputPerSourceButton.addSelectionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSelection, postfix_operators=[], prefix_operators=[], qualifier=outputPerSourceButton, selectors=[], type_arguments=None)], member=setVisible, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=widgetSelected, parameters=[FormalParameter(annotations=[], modifiers=set(), name=exception, type=ReferenceType(arguments=None, dimensions=[], name=SelectionEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SelectionAdapter, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[createOutputSectionItems] operator[SEP] identifier[Composite] identifier[composite] , identifier[OutputConfiguration] identifier[outputConfiguration] operator[SEP] { Keyword[final] identifier[Text] identifier[defaultDirectoryField] operator[=] identifier[addTextField] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_Directory] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_DIRECTORY] operator[SEP] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_CreateDirectory] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_CREATE_DIRECTORY] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_OverrideExistingResources] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_OVERRIDE] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_CreatesDerivedResources] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_DERIVED] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_CleanupDerivedResources] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_CLEANUP_DERIVED] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_CleanDirectory] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_CLEAN_DIRECTORY] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Button] identifier[installAsPrimaryButton] operator[=] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[BuilderConfigurationBlock_InstallDslAsPrimarySource] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[INSTALL_DSL_AS_PRIMARY_SOURCE] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Button] identifier[hideLocalButton] operator[=] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[BuilderConfigurationBlock_hideSyntheticLocalVariables] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[HIDE_LOCAL_SYNTHETIC_VARIABLES] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] identifier[hideLocalButton] operator[SEP] identifier[setEnabled] operator[SEP] identifier[installAsPrimaryButton] operator[SEP] identifier[getSelection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[installAsPrimaryButton] operator[SEP] identifier[addSelectionListener] operator[SEP] Keyword[new] identifier[SelectionAdapter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[widgetSelected] operator[SEP] identifier[SelectionEvent] identifier[exception] operator[SEP] { identifier[hideLocalButton] operator[SEP] identifier[setEnabled] operator[SEP] identifier[installAsPrimaryButton] operator[SEP] identifier[getSelection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[final] identifier[GridData] identifier[hideLocalButtonData] operator[=] Keyword[new] identifier[GridData] operator[SEP] operator[SEP] operator[SEP] identifier[hideLocalButtonData] operator[SEP] identifier[horizontalIndent] operator[=] identifier[INDENT_AMOUNT] operator[SEP] identifier[hideLocalButton] operator[SEP] identifier[setLayoutData] operator[SEP] identifier[hideLocalButtonData] operator[SEP] operator[SEP] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_KeepLocalHistory] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[OUTPUT_KEEP_LOCAL_HISTORY] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[outputConfiguration] operator[SEP] identifier[getSourceFolders] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Button] identifier[outputPerSourceButton] operator[=] identifier[addCheckBox] operator[SEP] identifier[composite] , identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[builder] operator[SEP] identifier[preferences] operator[SEP] identifier[Messages] operator[SEP] identifier[OutputConfigurationPage_UseOutputPerSourceFolder] , identifier[BuilderPreferenceAccess] operator[SEP] identifier[getKey] operator[SEP] identifier[outputConfiguration] , identifier[EclipseOutputConfigurationProvider] operator[SEP] identifier[USE_OUTPUT_PER_SOURCE_FOLDER] operator[SEP] , identifier[BOOLEAN_VALUES] , Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Table] identifier[table] operator[=] identifier[createOutputFolderTable] operator[SEP] identifier[composite] , identifier[outputConfiguration] , identifier[defaultDirectoryField] operator[SEP] operator[SEP] identifier[table] operator[SEP] identifier[setVisible] operator[SEP] identifier[outputPerSourceButton] operator[SEP] identifier[getSelection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputPerSourceButton] operator[SEP] identifier[addSelectionListener] operator[SEP] Keyword[new] identifier[SelectionAdapter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[widgetSelected] operator[SEP] identifier[SelectionEvent] identifier[exception] operator[SEP] { identifier[table] operator[SEP] identifier[setVisible] operator[SEP] identifier[outputPerSourceButton] operator[SEP] identifier[getSelection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } }
public GlobeCoordinatesValue copy(GlobeCoordinatesValue object) { return dataObjectFactory.getGlobeCoordinatesValue( object.getLatitude(), object.getLongitude(), object.getPrecision(), object.getGlobe()); }
class class_name[name] begin[{] method[copy, return_type[type[GlobeCoordinatesValue]], modifier[public], parameter[object]] begin[{] return[call[dataObjectFactory.getGlobeCoordinatesValue, parameter[call[object.getLatitude, parameter[]], call[object.getLongitude, parameter[]], call[object.getPrecision, parameter[]], call[object.getGlobe, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[GlobeCoordinatesValue] identifier[copy] operator[SEP] identifier[GlobeCoordinatesValue] identifier[object] operator[SEP] { Keyword[return] identifier[dataObjectFactory] operator[SEP] identifier[getGlobeCoordinatesValue] operator[SEP] identifier[object] operator[SEP] identifier[getLatitude] operator[SEP] operator[SEP] , identifier[object] operator[SEP] identifier[getLongitude] operator[SEP] operator[SEP] , identifier[object] operator[SEP] identifier[getPrecision] operator[SEP] operator[SEP] , identifier[object] operator[SEP] identifier[getGlobe] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public synchronized void updateKey(final byte[] key) { if (key == null || key.length == 0) { throw new IllegalArgumentException(SR.INVALID_KEY); } this.key = key; this.hmacSha256 = null; }
class class_name[name] begin[{] method[updateKey, return_type[void], modifier[synchronized public], parameter[key]] begin[{] if[binary_operation[binary_operation[member[.key], ==, literal[null]], ||, binary_operation[member[key.length], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_KEY, postfix_operators=[], prefix_operators=[], qualifier=SR, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.key]], member[.key]] assign[THIS[member[None.hmacSha256]], literal[null]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[updateKey] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[||] identifier[key] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[SR] operator[SEP] identifier[INVALID_KEY] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[key] operator[=] identifier[key] operator[SEP] Keyword[this] operator[SEP] identifier[hmacSha256] operator[=] Other[null] operator[SEP] }
public static synchronized short getNearestColor( final Color awtColor) { if (triplets == null) { triplets = HSSFColor.getTripletHash(); } if (triplets == null || triplets.isEmpty()) { System.out.println("Unable to get triplet hashtable"); return HSSFColor.BLACK.index; } short color = HSSFColor.BLACK.index; double minDiff = Double.MAX_VALUE; // get the color without the alpha chanel final float[] hsb = Color.RGBtoHSB(awtColor.getRed(), awtColor .getGreen(), awtColor.getBlue(), null); float[] excelHsb = null; final Iterator elements = triplets.values().iterator(); while (elements.hasNext()) { final HSSFColor crtColor = (HSSFColor) elements.next(); final short[] rgb = crtColor.getTriplet(); excelHsb = Color.RGBtoHSB(rgb[0], rgb[1], rgb[2], excelHsb); final double weight = 3.0d * Math.abs(excelHsb[0] - hsb[0]) + Math.abs(excelHsb[1] - hsb[1]) + Math.abs(excelHsb[2] - hsb[2]); if (weight < minDiff) { minDiff = weight; if (minDiff == 0) { // we found the color ... return crtColor.getIndex(); } color = crtColor.getIndex(); } } return color; }
class class_name[name] begin[{] method[getNearestColor, return_type[type[short]], modifier[synchronized public static], parameter[awtColor]] begin[{] if[binary_operation[member[.triplets], ==, literal[null]]] begin[{] assign[member[.triplets], call[HSSFColor.getTripletHash, parameter[]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.triplets], ==, literal[null]], ||, call[triplets.isEmpty, parameter[]]]] begin[{] call[System.out.println, parameter[literal["Unable to get triplet hashtable"]]] return[member[HSSFColor.BLACK.index]] else begin[{] None end[}] local_variable[type[short], color] local_variable[type[double], minDiff] local_variable[type[float], hsb] local_variable[type[float], excelHsb] local_variable[type[Iterator], elements] while[call[elements.hasNext, parameter[]]] begin[{] local_variable[type[HSSFColor], crtColor] local_variable[type[short], rgb] assign[member[.excelHsb], call[Color.RGBtoHSB, parameter[member[.rgb], member[.rgb], member[.rgb], member[.excelHsb]]]] local_variable[type[double], weight] if[binary_operation[member[.weight], <, member[.minDiff]]] begin[{] assign[member[.minDiff], member[.weight]] if[binary_operation[member[.minDiff], ==, literal[0]]] begin[{] return[call[crtColor.getIndex, parameter[]]] else begin[{] None end[}] assign[member[.color], call[crtColor.getIndex, parameter[]]] else begin[{] None end[}] end[}] return[member[.color]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] Keyword[short] identifier[getNearestColor] operator[SEP] Keyword[final] identifier[Color] identifier[awtColor] operator[SEP] { Keyword[if] operator[SEP] identifier[triplets] operator[==] Other[null] operator[SEP] { identifier[triplets] operator[=] identifier[HSSFColor] operator[SEP] identifier[getTripletHash] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[triplets] operator[==] Other[null] operator[||] identifier[triplets] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[HSSFColor] operator[SEP] identifier[BLACK] operator[SEP] identifier[index] operator[SEP] } Keyword[short] identifier[color] operator[=] identifier[HSSFColor] operator[SEP] identifier[BLACK] operator[SEP] identifier[index] operator[SEP] Keyword[double] identifier[minDiff] operator[=] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[final] Keyword[float] operator[SEP] operator[SEP] identifier[hsb] operator[=] identifier[Color] operator[SEP] identifier[RGBtoHSB] operator[SEP] identifier[awtColor] operator[SEP] identifier[getRed] operator[SEP] operator[SEP] , identifier[awtColor] operator[SEP] identifier[getGreen] operator[SEP] operator[SEP] , identifier[awtColor] operator[SEP] identifier[getBlue] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[excelHsb] operator[=] Other[null] operator[SEP] Keyword[final] identifier[Iterator] identifier[elements] operator[=] identifier[triplets] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[elements] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[HSSFColor] identifier[crtColor] operator[=] operator[SEP] identifier[HSSFColor] operator[SEP] identifier[elements] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[short] operator[SEP] operator[SEP] identifier[rgb] operator[=] identifier[crtColor] operator[SEP] identifier[getTriplet] operator[SEP] operator[SEP] operator[SEP] identifier[excelHsb] operator[=] identifier[Color] operator[SEP] identifier[RGBtoHSB] operator[SEP] identifier[rgb] operator[SEP] Other[0] operator[SEP] , identifier[rgb] operator[SEP] Other[1] operator[SEP] , identifier[rgb] operator[SEP] Other[2] operator[SEP] , identifier[excelHsb] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[weight] operator[=] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[excelHsb] operator[SEP] Other[0] operator[SEP] operator[-] identifier[hsb] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[+] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[excelHsb] operator[SEP] Other[1] operator[SEP] operator[-] identifier[hsb] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[+] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[excelHsb] operator[SEP] Other[2] operator[SEP] operator[-] identifier[hsb] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[weight] operator[<] identifier[minDiff] operator[SEP] { identifier[minDiff] operator[=] identifier[weight] operator[SEP] Keyword[if] operator[SEP] identifier[minDiff] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[crtColor] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] } identifier[color] operator[=] identifier[crtColor] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[color] operator[SEP] }
void fail(Throwable cause, boolean complete) { if (cause != null) { Throwable e = this.failureCause.get(); if (e != null && e != cause) { cause.addSuppressed(e); } this.failureCause.set(cause); } endAttempt(); WriteLedger ledger = this.writeLedger.get(); if (ledger != null && ledger.isRolledOver()) { // Rollovers aren't really failures (they're caused by us). In that case, do not count this failure as an attempt. this.attemptCount.updateAndGet(v -> Math.max(0, v - 1)); } if (complete) { this.result.completeExceptionally(this.failureCause.get()); } }
class class_name[name] begin[{] method[fail, return_type[void], modifier[default], parameter[cause, complete]] begin[{] if[binary_operation[member[.cause], !=, literal[null]]] begin[{] local_variable[type[Throwable], e] if[binary_operation[binary_operation[member[.e], !=, literal[null]], &&, binary_operation[member[.e], !=, member[.cause]]]] begin[{] call[cause.addSuppressed, parameter[member[.e]]] else begin[{] None end[}] THIS[member[None.failureCause]call[None.set, parameter[member[.cause]]]] else begin[{] None end[}] call[.endAttempt, parameter[]] local_variable[type[WriteLedger], ledger] if[binary_operation[binary_operation[member[.ledger], !=, literal[null]], &&, call[ledger.isRolledOver, parameter[]]]] begin[{] THIS[member[None.attemptCount]call[None.updateAndGet, parameter[LambdaExpression(body=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), parameters=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] else begin[{] None end[}] if[member[.complete]] begin[{] THIS[member[None.result]call[None.completeExceptionally, parameter[THIS[member[None.failureCause]call[None.get, parameter[]]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[fail] operator[SEP] identifier[Throwable] identifier[cause] , Keyword[boolean] identifier[complete] operator[SEP] { Keyword[if] operator[SEP] identifier[cause] operator[!=] Other[null] operator[SEP] { identifier[Throwable] identifier[e] operator[=] Keyword[this] operator[SEP] identifier[failureCause] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[!=] Other[null] operator[&&] identifier[e] operator[!=] identifier[cause] operator[SEP] { identifier[cause] operator[SEP] identifier[addSuppressed] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[failureCause] operator[SEP] identifier[set] operator[SEP] identifier[cause] operator[SEP] operator[SEP] } identifier[endAttempt] operator[SEP] operator[SEP] operator[SEP] identifier[WriteLedger] identifier[ledger] operator[=] Keyword[this] operator[SEP] identifier[writeLedger] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ledger] operator[!=] Other[null] operator[&&] identifier[ledger] operator[SEP] identifier[isRolledOver] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[attemptCount] operator[SEP] identifier[updateAndGet] operator[SEP] identifier[v] operator[->] identifier[Math] operator[SEP] identifier[max] operator[SEP] Other[0] , identifier[v] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[complete] operator[SEP] { Keyword[this] operator[SEP] identifier[result] operator[SEP] identifier[completeExceptionally] operator[SEP] Keyword[this] operator[SEP] identifier[failureCause] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public int getTransitionSelectivity() { int count = 0; for (Transition<DFAState<T>> t : transitions.values()) { CharRange range = t.getCondition(); count += range.getTo()-range.getFrom(); } return count/transitions.size(); }
class class_name[name] begin[{] method[getTransitionSelectivity, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], count] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCondition, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), name=range)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CharRange, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTo, postfix_operators=[], prefix_operators=[], qualifier=range, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getFrom, postfix_operators=[], prefix_operators=[], qualifier=range, selectors=[], type_arguments=None), operator=-)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=transitions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=t)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=DFAState, sub_type=None))], dimensions=[], name=Transition, sub_type=None))), label=None) return[binary_operation[member[.count], /, call[transitions.size, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getTransitionSelectivity] operator[SEP] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Transition] operator[<] identifier[DFAState] operator[<] identifier[T] operator[>] operator[>] identifier[t] operator[:] identifier[transitions] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[CharRange] identifier[range] operator[=] identifier[t] operator[SEP] identifier[getCondition] operator[SEP] operator[SEP] operator[SEP] identifier[count] operator[+=] identifier[range] operator[SEP] identifier[getTo] operator[SEP] operator[SEP] operator[-] identifier[range] operator[SEP] identifier[getFrom] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[count] operator[/] identifier[transitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] }
protected String join(Object[] values) { StringBuilder sb = new StringBuilder(100); if(values.length == 0) return sb.toString(); sb.append(values[0]); if(values.length == 1) return sb.toString(); for (int i = 1; i < values.length; i++) { sb.append(",").append(values[i]); } return sb.toString(); }
class class_name[name] begin[{] method[join, return_type[type[String]], modifier[protected], parameter[values]] begin[{] local_variable[type[StringBuilder], sb] if[binary_operation[member[values.length], ==, literal[0]]] begin[{] return[call[sb.toString, parameter[]]] else begin[{] None end[}] call[sb.append, parameter[member[.values]]] if[binary_operation[member[values.length], ==, literal[1]]] begin[{] return[call[sb.toString, parameter[]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[join] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[100] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[values] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[values] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private void getDescriptor(final StringBuilder buf) { if (this.buf == null) { // descriptor is in byte 3 of 'off' for primitive types (buf == // null) buf.append((char) ((off & 0xFF000000) >>> 24)); } else if (sort == OBJECT) { buf.append('L'); buf.append(this.buf, off, len); buf.append(';'); } else { // sort == ARRAY || sort == METHOD buf.append(this.buf, off, len); } }
class class_name[name] begin[{] method[getDescriptor, return_type[void], modifier[private], parameter[buf]] begin[{] if[binary_operation[THIS[member[None.buf]], ==, literal[null]]] begin[{] call[buf.append, parameter[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF000000), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>>), type=BasicType(dimensions=[], name=char))]] else begin[{] if[binary_operation[member[.sort], ==, member[.OBJECT]]] begin[{] call[buf.append, parameter[literal['L']]] call[buf.append, parameter[THIS[member[None.buf]], member[.off], member[.len]]] call[buf.append, parameter[literal[';']]] else begin[{] call[buf.append, parameter[THIS[member[None.buf]], member[.off], member[.len]]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[getDescriptor] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[buf] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buf] operator[==] Other[null] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] operator[SEP] identifier[off] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[24] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sort] operator[==] identifier[OBJECT] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[buf] , identifier[off] , identifier[len] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[buf] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[buf] , identifier[off] , identifier[len] operator[SEP] operator[SEP] } }
public static String getReferencePropertyOriginalName(final String refPropertyName) { final int i = refPropertyName.lastIndexOf(REFERENCE_PROPERTY_SUFFIX); return i < 0 ? refPropertyName : refPropertyName.substring(0, i); }
class class_name[name] begin[{] method[getReferencePropertyOriginalName, return_type[type[String]], modifier[public static], parameter[refPropertyName]] begin[{] local_variable[type[int], i] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=refPropertyName, selectors=[], type_arguments=None), if_true=MemberReference(member=refPropertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getReferencePropertyOriginalName] operator[SEP] Keyword[final] identifier[String] identifier[refPropertyName] operator[SEP] { Keyword[final] Keyword[int] identifier[i] operator[=] identifier[refPropertyName] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[REFERENCE_PROPERTY_SUFFIX] operator[SEP] operator[SEP] Keyword[return] identifier[i] operator[<] Other[0] operator[?] identifier[refPropertyName] operator[:] identifier[refPropertyName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[SEP] }
public static CodeStatisticsResult countingCode(File src, String suffix, boolean countSubFolder, CodeAnalysisConf conf) { if (!Files.isDirectory(src)) { throw new RuntimeException("src is not a File, can't analysis it."); } if (null == conf) { conf = CODE_INFO_JAVA; } CodeStatisticsResult statisticsResult = new CodeStatisticsResult(src); boolean useParticularType = !Strings.isBlank(suffix); folderAnalysis(src, useParticularType, suffix, countSubFolder, conf, statisticsResult); return statisticsResult; }
class class_name[name] begin[{] method[countingCode, return_type[type[CodeStatisticsResult]], modifier[public static], parameter[src, suffix, countSubFolder, conf]] begin[{] if[call[Files.isDirectory, parameter[member[.src]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="src is not a File, can't analysis it.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[literal[null], ==, member[.conf]]] begin[{] assign[member[.conf], member[.CODE_INFO_JAVA]] else begin[{] None end[}] local_variable[type[CodeStatisticsResult], statisticsResult] local_variable[type[boolean], useParticularType] call[.folderAnalysis, parameter[member[.src], member[.useParticularType], member[.suffix], member[.countSubFolder], member[.conf], member[.statisticsResult]]] return[member[.statisticsResult]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CodeStatisticsResult] identifier[countingCode] operator[SEP] identifier[File] identifier[src] , identifier[String] identifier[suffix] , Keyword[boolean] identifier[countSubFolder] , identifier[CodeAnalysisConf] identifier[conf] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Files] operator[SEP] identifier[isDirectory] operator[SEP] identifier[src] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[==] identifier[conf] operator[SEP] { identifier[conf] operator[=] identifier[CODE_INFO_JAVA] operator[SEP] } identifier[CodeStatisticsResult] identifier[statisticsResult] operator[=] Keyword[new] identifier[CodeStatisticsResult] operator[SEP] identifier[src] operator[SEP] operator[SEP] Keyword[boolean] identifier[useParticularType] operator[=] operator[!] identifier[Strings] operator[SEP] identifier[isBlank] operator[SEP] identifier[suffix] operator[SEP] operator[SEP] identifier[folderAnalysis] operator[SEP] identifier[src] , identifier[useParticularType] , identifier[suffix] , identifier[countSubFolder] , identifier[conf] , identifier[statisticsResult] operator[SEP] operator[SEP] Keyword[return] identifier[statisticsResult] operator[SEP] }
public void setSOLid(Integer newSOLid) { Integer oldSOLid = soLid; soLid = newSOLid; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.LND__SO_LID, oldSOLid, soLid)); }
class class_name[name] begin[{] method[setSOLid, return_type[void], modifier[public], parameter[newSOLid]] begin[{] local_variable[type[Integer], oldSOLid] assign[member[.soLid], member[.newSOLid]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=LND__SO_LID, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldSOLid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=soLid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSOLid] operator[SEP] identifier[Integer] identifier[newSOLid] operator[SEP] { identifier[Integer] identifier[oldSOLid] operator[=] identifier[soLid] operator[SEP] identifier[soLid] operator[=] identifier[newSOLid] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[LND__SO_LID] , identifier[oldSOLid] , identifier[soLid] operator[SEP] operator[SEP] operator[SEP] }
public UrlStringBuilder addParameter(String name, String... values) { this.addParameter(name, values != null ? Arrays.asList(values) : null); return this; }
class class_name[name] begin[{] method[addParameter, return_type[type[UrlStringBuilder]], modifier[public], parameter[name, values]] begin[{] THIS[call[None.addParameter, parameter[member[.name], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None))]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[UrlStringBuilder] identifier[addParameter] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[values] operator[SEP] { Keyword[this] operator[SEP] identifier[addParameter] operator[SEP] identifier[name] , identifier[values] operator[!=] Other[null] operator[?] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[values] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void setCustomVerificationEmailTemplates(java.util.Collection<CustomVerificationEmailTemplate> customVerificationEmailTemplates) { if (customVerificationEmailTemplates == null) { this.customVerificationEmailTemplates = null; return; } this.customVerificationEmailTemplates = new com.amazonaws.internal.SdkInternalList<CustomVerificationEmailTemplate>(customVerificationEmailTemplates); }
class class_name[name] begin[{] method[setCustomVerificationEmailTemplates, return_type[void], modifier[public], parameter[customVerificationEmailTemplates]] begin[{] if[binary_operation[member[.customVerificationEmailTemplates], ==, literal[null]]] begin[{] assign[THIS[member[None.customVerificationEmailTemplates]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.customVerificationEmailTemplates]], ClassCreator(arguments=[MemberReference(member=customVerificationEmailTemplates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CustomVerificationEmailTemplate, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCustomVerificationEmailTemplates] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[CustomVerificationEmailTemplate] operator[>] identifier[customVerificationEmailTemplates] operator[SEP] { Keyword[if] operator[SEP] identifier[customVerificationEmailTemplates] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[customVerificationEmailTemplates] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[customVerificationEmailTemplates] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[CustomVerificationEmailTemplate] operator[>] operator[SEP] identifier[customVerificationEmailTemplates] operator[SEP] operator[SEP] }
private void ssHeapSort(int Td, int PA, int sa, int size) { int i, m, t; m = size; if ((size % 2) == 0) { m--; if (T[start + Td + SA[PA + SA[sa + (m / 2)]]] < T[start + Td + SA[PA + SA[sa + m]]]) { swapInSA(sa + m, sa + (m / 2)); } } for (i = m / 2 - 1; 0 <= i; --i) { ssFixDown(Td, PA, sa, i, m); } if ((size % 2) == 0) { swapInSA(sa, sa + m); ssFixDown(Td, PA, sa, 0, m); } for (i = m - 1; 0 < i; --i) { t = SA[sa]; SA[sa] = SA[sa + i]; ssFixDown(Td, PA, sa, 0, i); SA[sa + i] = t; } }
class class_name[name] begin[{] method[ssHeapSort, return_type[void], modifier[private], parameter[Td, PA, sa, size]] begin[{] local_variable[type[int], i] assign[member[.m], member[.size]] if[binary_operation[binary_operation[member[.size], %, literal[2]], ==, literal[0]]] begin[{] member[.m] if[binary_operation[member[.T], <, member[.T]]] begin[{] call[.swapInSA, parameter[binary_operation[member[.sa], +, member[.m]], binary_operation[member[.sa], +, binary_operation[member[.m], /, literal[2]]]]] else begin[{] None end[}] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=Td, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ssFixDown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[])]), label=None) if[binary_operation[binary_operation[member[.size], %, literal[2]], ==, literal[0]]] begin[{] call[.swapInSA, parameter[member[.sa], binary_operation[member[.sa], +, member[.m]]]] call[.ssFixDown, parameter[member[.Td], member[.PA], member[.sa], literal[0], member[.m]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=SA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=SA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=SA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=Td, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ssFixDown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=SA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[ssHeapSort] operator[SEP] Keyword[int] identifier[Td] , Keyword[int] identifier[PA] , Keyword[int] identifier[sa] , Keyword[int] identifier[size] operator[SEP] { Keyword[int] identifier[i] , identifier[m] , identifier[t] operator[SEP] identifier[m] operator[=] identifier[size] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[size] operator[%] Other[2] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[m] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[T] operator[SEP] identifier[start] operator[+] identifier[Td] operator[+] identifier[SA] operator[SEP] identifier[PA] operator[+] identifier[SA] operator[SEP] identifier[sa] operator[+] operator[SEP] identifier[m] operator[/] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[<] identifier[T] operator[SEP] identifier[start] operator[+] identifier[Td] operator[+] identifier[SA] operator[SEP] identifier[PA] operator[+] identifier[SA] operator[SEP] identifier[sa] operator[+] identifier[m] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[swapInSA] operator[SEP] identifier[sa] operator[+] identifier[m] , identifier[sa] operator[+] operator[SEP] identifier[m] operator[/] Other[2] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[i] operator[=] identifier[m] operator[/] Other[2] operator[-] Other[1] operator[SEP] Other[0] operator[<=] identifier[i] operator[SEP] operator[--] identifier[i] operator[SEP] { identifier[ssFixDown] operator[SEP] identifier[Td] , identifier[PA] , identifier[sa] , identifier[i] , identifier[m] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[size] operator[%] Other[2] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[swapInSA] operator[SEP] identifier[sa] , identifier[sa] operator[+] identifier[m] operator[SEP] operator[SEP] identifier[ssFixDown] operator[SEP] identifier[Td] , identifier[PA] , identifier[sa] , Other[0] , identifier[m] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[i] operator[=] identifier[m] operator[-] Other[1] operator[SEP] Other[0] operator[<] identifier[i] operator[SEP] operator[--] identifier[i] operator[SEP] { identifier[t] operator[=] identifier[SA] operator[SEP] identifier[sa] operator[SEP] operator[SEP] identifier[SA] operator[SEP] identifier[sa] operator[SEP] operator[=] identifier[SA] operator[SEP] identifier[sa] operator[+] identifier[i] operator[SEP] operator[SEP] identifier[ssFixDown] operator[SEP] identifier[Td] , identifier[PA] , identifier[sa] , Other[0] , identifier[i] operator[SEP] operator[SEP] identifier[SA] operator[SEP] identifier[sa] operator[+] identifier[i] operator[SEP] operator[=] identifier[t] operator[SEP] } }
public boolean addMetatypeAd(MetatypeAd metatypeAd) { if (this.metatypeAds == null) this.metatypeAds = new LinkedList<MetatypeAd>(); for (MetatypeAd ad : metatypeAds) if (ad.getID().equals(metatypeAd.getID())) return false; this.metatypeAds.add(metatypeAd); return true; }
class class_name[name] begin[{] method[addMetatypeAd, return_type[type[boolean]], modifier[public], parameter[metatypeAd]] begin[{] if[binary_operation[THIS[member[None.metatypeAds]], ==, literal[null]]] begin[{] assign[THIS[member[None.metatypeAds]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MetatypeAd, sub_type=None))], dimensions=None, name=LinkedList, sub_type=None))] else begin[{] None end[}] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=ad, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=metatypeAd, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), control=EnhancedForControl(iterable=MemberReference(member=metatypeAds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ad)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MetatypeAd, sub_type=None))), label=None) THIS[member[None.metatypeAds]call[None.add, parameter[member[.metatypeAd]]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addMetatypeAd] operator[SEP] identifier[MetatypeAd] identifier[metatypeAd] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[metatypeAds] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[metatypeAds] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[MetatypeAd] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MetatypeAd] identifier[ad] operator[:] identifier[metatypeAds] operator[SEP] Keyword[if] operator[SEP] identifier[ad] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[metatypeAd] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[metatypeAds] operator[SEP] identifier[add] operator[SEP] identifier[metatypeAd] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
@Override public ListApplicationSnapshotsResult listApplicationSnapshots(ListApplicationSnapshotsRequest request) { request = beforeClientExecution(request); return executeListApplicationSnapshots(request); }
class class_name[name] begin[{] method[listApplicationSnapshots, return_type[type[ListApplicationSnapshotsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListApplicationSnapshots, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListApplicationSnapshotsResult] identifier[listApplicationSnapshots] operator[SEP] identifier[ListApplicationSnapshotsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListApplicationSnapshots] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
protected void onEval() { Node control = getSrcControl(); if (hasErrors.get()) { control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true); if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if (controlTooltip != null && !controlTooltip.getStyleClass().contains("error-tooltip")) { tooltip = ((Control) control).getTooltip(); } errorTooltip.setText(getMessage()); ((Control) control).setTooltip(errorTooltip); } } else { if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if ((controlTooltip != null && controlTooltip.getStyleClass().contains("error-tooltip")) || (controlTooltip == null && tooltip != null)) { ((Control) control).setTooltip(tooltip); } tooltip = null; } control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false); } }
class class_name[name] begin[{] method[onEval, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[Node], control] if[call[hasErrors.get, parameter[]]] begin[{] call[control.pseudoClassStateChanged, parameter[member[.PSEUDO_CLASS_ERROR], literal[true]]] if[binary_operation[member[.control], instanceof, type[Control]]] begin[{] local_variable[type[Tooltip], controlTooltip] if[binary_operation[binary_operation[member[.controlTooltip], !=, literal[null]], &&, call[controlTooltip.getStyleClass, parameter[]]]] begin[{] assign[member[.tooltip], Cast(expression=MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None))] else begin[{] None end[}] call[errorTooltip.setText, parameter[call[.getMessage, parameter[]]]] Cast(expression=MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None)) else begin[{] None end[}] else begin[{] if[binary_operation[member[.control], instanceof, type[Control]]] begin[{] local_variable[type[Tooltip], controlTooltip] if[binary_operation[binary_operation[binary_operation[member[.controlTooltip], !=, literal[null]], &&, call[controlTooltip.getStyleClass, parameter[]]], ||, binary_operation[binary_operation[member[.controlTooltip], ==, literal[null]], &&, binary_operation[member[.tooltip], !=, literal[null]]]]] begin[{] Cast(expression=MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None)) else begin[{] None end[}] assign[member[.tooltip], literal[null]] else begin[{] None end[}] call[control.pseudoClassStateChanged, parameter[member[.PSEUDO_CLASS_ERROR], literal[false]]] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[onEval] operator[SEP] operator[SEP] { identifier[Node] identifier[control] operator[=] identifier[getSrcControl] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasErrors] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { identifier[control] operator[SEP] identifier[pseudoClassStateChanged] operator[SEP] identifier[PSEUDO_CLASS_ERROR] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[control] Keyword[instanceof] identifier[Control] operator[SEP] { identifier[Tooltip] identifier[controlTooltip] operator[=] operator[SEP] operator[SEP] identifier[Control] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[getTooltip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[controlTooltip] operator[!=] Other[null] operator[&&] operator[!] identifier[controlTooltip] operator[SEP] identifier[getStyleClass] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[tooltip] operator[=] operator[SEP] operator[SEP] identifier[Control] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[getTooltip] operator[SEP] operator[SEP] operator[SEP] } identifier[errorTooltip] operator[SEP] identifier[setText] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Control] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[setTooltip] operator[SEP] identifier[errorTooltip] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[control] Keyword[instanceof] identifier[Control] operator[SEP] { identifier[Tooltip] identifier[controlTooltip] operator[=] operator[SEP] operator[SEP] identifier[Control] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[getTooltip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[controlTooltip] operator[!=] Other[null] operator[&&] identifier[controlTooltip] operator[SEP] identifier[getStyleClass] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[controlTooltip] operator[==] Other[null] operator[&&] identifier[tooltip] operator[!=] Other[null] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[Control] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[setTooltip] operator[SEP] identifier[tooltip] operator[SEP] operator[SEP] } identifier[tooltip] operator[=] Other[null] operator[SEP] } identifier[control] operator[SEP] identifier[pseudoClassStateChanged] operator[SEP] identifier[PSEUDO_CLASS_ERROR] , literal[boolean] operator[SEP] operator[SEP] } }
public E find(E e) { Node<E> node = elmap.get(e); if(node == null) return e; return _find_root(node).element; }
class class_name[name] begin[{] method[find, return_type[type[E]], modifier[public], parameter[e]] begin[{] local_variable[type[Node], node] if[binary_operation[member[.node], ==, literal[null]]] begin[{] return[member[.e]] else begin[{] None end[}] return[call[._find_root, parameter[member[.node]]]] end[}] END[}]
Keyword[public] identifier[E] identifier[find] operator[SEP] identifier[E] identifier[e] operator[SEP] { identifier[Node] operator[<] identifier[E] operator[>] identifier[node] operator[=] identifier[elmap] operator[SEP] identifier[get] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] Keyword[return] identifier[e] operator[SEP] Keyword[return] identifier[_find_root] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[element] operator[SEP] }
private void flushBuffer(final ByteBuffer buffer, final DataOutput stream) throws IOException { buffer.flip(); stream.write(buffer.array(), buffer.arrayOffset(), buffer.remaining()); buffer.clear(); }
class class_name[name] begin[{] method[flushBuffer, return_type[void], modifier[private], parameter[buffer, stream]] begin[{] call[buffer.flip, parameter[]] call[stream.write, parameter[call[buffer.array, parameter[]], call[buffer.arrayOffset, parameter[]], call[buffer.remaining, parameter[]]]] call[buffer.clear, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[flushBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] , Keyword[final] identifier[DataOutput] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[buffer] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] identifier[write] operator[SEP] identifier[buffer] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[buffer] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] , identifier[buffer] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public SDVariable biasAdd(String name, SDVariable input, SDVariable bias) { validateFloatingPoint("biasAdd", "input", input); validateFloatingPoint("biasAdd", "bias", bias); SDVariable ret = f().biasAdd(input, bias); return updateVariableNameAndReference(ret, name); }
class class_name[name] begin[{] method[biasAdd, return_type[type[SDVariable]], modifier[public], parameter[name, input, bias]] begin[{] call[.validateFloatingPoint, parameter[literal["biasAdd"], literal["input"], member[.input]]] call[.validateFloatingPoint, parameter[literal["biasAdd"], literal["bias"], member[.bias]]] local_variable[type[SDVariable], ret] return[call[.updateVariableNameAndReference, parameter[member[.ret], member[.name]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[biasAdd] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[input] , identifier[SDVariable] identifier[bias] operator[SEP] { identifier[validateFloatingPoint] operator[SEP] literal[String] , literal[String] , identifier[input] operator[SEP] operator[SEP] identifier[validateFloatingPoint] operator[SEP] literal[String] , literal[String] , identifier[bias] operator[SEP] operator[SEP] identifier[SDVariable] identifier[ret] operator[=] identifier[f] operator[SEP] operator[SEP] operator[SEP] identifier[biasAdd] operator[SEP] identifier[input] , identifier[bias] operator[SEP] operator[SEP] Keyword[return] identifier[updateVariableNameAndReference] operator[SEP] identifier[ret] , identifier[name] operator[SEP] operator[SEP] }
public Attribute getInversedBy() { // FIXME besides checking mappedBy attr name also check // attr.getRefEntity().getFullyQualifiedName if (hasRefEntity()) { return Streams.stream(getRefEntity().getAtomicAttributes()) .filter(Attribute::isMappedBy) .filter(attr -> getName().equals(attr.getMappedBy().getName())) .findFirst() .orElse(null); } else { return null; } }
class class_name[name] begin[{] method[getInversedBy, return_type[type[Attribute]], modifier[public], parameter[]] begin[{] if[call[.hasRefEntity, parameter[]]] begin[{] return[call[Streams.stream, parameter[call[.getRefEntity, parameter[]]]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] identifier[Attribute] identifier[getInversedBy] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[hasRefEntity] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Streams] operator[SEP] identifier[stream] operator[SEP] identifier[getRefEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getAtomicAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Attribute] operator[::] identifier[isMappedBy] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[attr] operator[->] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[attr] operator[SEP] identifier[getMappedBy] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public void validateMethodArgs(String uriPattern) { Set<String> namedParameters = new LinkedHashSet<>(); for (ArgumentExtractor extractor : extractors) { if (extractor instanceof NamedExtractor) { NamedExtractor namedExtractor = (NamedExtractor) extractor; namedParameters.add(namedExtractor.getName()); } } // validate the url specification and method signature agree on required parameters List<String> requiredParameters = getParameterNames(uriPattern); if (!namedParameters.containsAll(requiredParameters)) { throw new FatalException("Controller method '{}' declares parameters {} but the URL specification requires {}", Util.toString(method), namedParameters, requiredParameters); } }
class class_name[name] begin[{] method[validateMethodArgs, return_type[void], modifier[public], parameter[uriPattern]] begin[{] local_variable[type[Set], namedParameters] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=extractor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=NamedExtractor, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=extractor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=NamedExtractor, sub_type=None)), name=namedExtractor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NamedExtractor, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=namedExtractor, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=namedParameters, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=extractors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=extractor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArgumentExtractor, sub_type=None))), label=None) local_variable[type[List], requiredParameters] if[call[namedParameters.containsAll, parameter[member[.requiredParameters]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Controller method '{}' declares parameters {} but the URL specification requires {}"), MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Util, selectors=[], type_arguments=None), MemberReference(member=namedParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requiredParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FatalException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[validateMethodArgs] operator[SEP] identifier[String] identifier[uriPattern] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[namedParameters] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ArgumentExtractor] identifier[extractor] operator[:] identifier[extractors] operator[SEP] { Keyword[if] operator[SEP] identifier[extractor] Keyword[instanceof] identifier[NamedExtractor] operator[SEP] { identifier[NamedExtractor] identifier[namedExtractor] operator[=] operator[SEP] identifier[NamedExtractor] operator[SEP] identifier[extractor] operator[SEP] identifier[namedParameters] operator[SEP] identifier[add] operator[SEP] identifier[namedExtractor] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[List] operator[<] identifier[String] operator[>] identifier[requiredParameters] operator[=] identifier[getParameterNames] operator[SEP] identifier[uriPattern] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[namedParameters] operator[SEP] identifier[containsAll] operator[SEP] identifier[requiredParameters] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[FatalException] operator[SEP] literal[String] , identifier[Util] operator[SEP] identifier[toString] operator[SEP] identifier[method] operator[SEP] , identifier[namedParameters] , identifier[requiredParameters] operator[SEP] operator[SEP] } }
public static ParametricCcgParser parseFromLexicon(Iterable<String> unfilteredLexiconLines, Iterable<String> unknownWordLexiconLines, Iterable<String> unfilteredRuleLines, CcgFeatureFactory featureFactory, Set<String> posTagSet, boolean allowComposition, Iterable<CcgRuleSchema> allowedCombinationRules, boolean normalFormOnly) { Preconditions.checkNotNull(featureFactory); // System.out.println("Reading lexicon and rules..."); List<CcgBinaryRule> binaryRules = Lists.newArrayList(); List<CcgUnaryRule> unaryRules = Lists.newArrayList(); CcgBinaryRule.parseBinaryAndUnaryRules(unfilteredRuleLines, binaryRules, unaryRules); List<LexiconEntry> lexiconEntries = LexiconEntry.parseLexiconEntries(unfilteredLexiconLines); List<LexiconEntry> unknownLexiconEntries = LexiconEntry.parseLexiconEntries(unknownWordLexiconLines); return ParametricCcgParser.parseFromLexicon(lexiconEntries, unknownLexiconEntries, binaryRules, unaryRules, featureFactory, posTagSet, allowComposition, allowedCombinationRules, normalFormOnly); }
class class_name[name] begin[{] method[parseFromLexicon, return_type[type[ParametricCcgParser]], modifier[public static], parameter[unfilteredLexiconLines, unknownWordLexiconLines, unfilteredRuleLines, featureFactory, posTagSet, allowComposition, allowedCombinationRules, normalFormOnly]] begin[{] call[Preconditions.checkNotNull, parameter[member[.featureFactory]]] local_variable[type[List], binaryRules] local_variable[type[List], unaryRules] call[CcgBinaryRule.parseBinaryAndUnaryRules, parameter[member[.unfilteredRuleLines], member[.binaryRules], member[.unaryRules]]] local_variable[type[List], lexiconEntries] local_variable[type[List], unknownLexiconEntries] return[call[ParametricCcgParser.parseFromLexicon, parameter[member[.lexiconEntries], member[.unknownLexiconEntries], member[.binaryRules], member[.unaryRules], member[.featureFactory], member[.posTagSet], member[.allowComposition], member[.allowedCombinationRules], member[.normalFormOnly]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ParametricCcgParser] identifier[parseFromLexicon] operator[SEP] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[unfilteredLexiconLines] , identifier[Iterable] operator[<] identifier[String] operator[>] identifier[unknownWordLexiconLines] , identifier[Iterable] operator[<] identifier[String] operator[>] identifier[unfilteredRuleLines] , identifier[CcgFeatureFactory] identifier[featureFactory] , identifier[Set] operator[<] identifier[String] operator[>] identifier[posTagSet] , Keyword[boolean] identifier[allowComposition] , identifier[Iterable] operator[<] identifier[CcgRuleSchema] operator[>] identifier[allowedCombinationRules] , Keyword[boolean] identifier[normalFormOnly] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[featureFactory] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CcgBinaryRule] operator[>] identifier[binaryRules] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CcgUnaryRule] operator[>] identifier[unaryRules] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[CcgBinaryRule] operator[SEP] identifier[parseBinaryAndUnaryRules] operator[SEP] identifier[unfilteredRuleLines] , identifier[binaryRules] , identifier[unaryRules] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[LexiconEntry] operator[>] identifier[lexiconEntries] operator[=] identifier[LexiconEntry] operator[SEP] identifier[parseLexiconEntries] operator[SEP] identifier[unfilteredLexiconLines] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[LexiconEntry] operator[>] identifier[unknownLexiconEntries] operator[=] identifier[LexiconEntry] operator[SEP] identifier[parseLexiconEntries] operator[SEP] identifier[unknownWordLexiconLines] operator[SEP] operator[SEP] Keyword[return] identifier[ParametricCcgParser] operator[SEP] identifier[parseFromLexicon] operator[SEP] identifier[lexiconEntries] , identifier[unknownLexiconEntries] , identifier[binaryRules] , identifier[unaryRules] , identifier[featureFactory] , identifier[posTagSet] , identifier[allowComposition] , identifier[allowedCombinationRules] , identifier[normalFormOnly] operator[SEP] operator[SEP] }
public boolean isHttpRedirect() { if (isRevisitDigest() && (getDuplicatePayload() != null)) { return getDuplicatePayload().isHttpRedirect(); } String httpCode = getHttpCode(); return (httpCode.startsWith("3")); }
class class_name[name] begin[{] method[isHttpRedirect, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[call[.isRevisitDigest, parameter[]], &&, binary_operation[call[.getDuplicatePayload, parameter[]], !=, literal[null]]]] begin[{] return[call[.getDuplicatePayload, parameter[]]] else begin[{] None end[}] local_variable[type[String], httpCode] return[call[httpCode.startsWith, parameter[literal["3"]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isHttpRedirect] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isRevisitDigest] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[getDuplicatePayload] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[return] identifier[getDuplicatePayload] operator[SEP] operator[SEP] operator[SEP] identifier[isHttpRedirect] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[httpCode] operator[=] identifier[getHttpCode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[httpCode] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
public <E extends T> void filter (Collection<E> coll) { for (Iterator<E> itr = coll.iterator(); itr.hasNext(); ) { if (!isMatch(itr.next())) { itr.remove(); } } }
class class_name[name] begin[{] method[filter, return_type[void], modifier[public], parameter[coll]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None)], member=isMatch, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=coll, selectors=[], type_arguments=None), name=itr)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[T] operator[>] Keyword[void] identifier[filter] operator[SEP] identifier[Collection] operator[<] identifier[E] operator[>] identifier[coll] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[itr] operator[=] identifier[coll] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isMatch] operator[SEP] identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[itr] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } }
public CMAArray<CMARole> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
class class_name[name] begin[{] method[fetchAll, return_type[type[CMAArray]], modifier[public], parameter[query]] begin[{] call[.throwIfEnvironmentIdIsSet, parameter[]] return[call[.fetchAll, parameter[member[.spaceId], member[.query]]]] end[}] END[}]
Keyword[public] identifier[CMAArray] operator[<] identifier[CMARole] operator[>] identifier[fetchAll] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[query] operator[SEP] { identifier[throwIfEnvironmentIdIsSet] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[fetchAll] operator[SEP] identifier[spaceId] , identifier[query] operator[SEP] operator[SEP] }
public static int getResources_getInteger(Context context, int id) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { return context.getResources().getInteger(id); } DisplayMetrics metrics = context.getResources().getDisplayMetrics(); float widthDp = metrics.widthPixels / metrics.density; if (id == R.integer.abs__max_action_buttons) { if (widthDp >= 600) { return 5; //values-w600dp } if (widthDp >= 500) { return 4; //values-w500dp } if (widthDp >= 360) { return 3; //values-w360dp } return 2; //values } throw new IllegalArgumentException("Unknown integer resource ID " + id); }
class class_name[name] begin[{] method[getResources_getInteger, return_type[type[int]], modifier[public static], parameter[context, id]] begin[{] if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_CODES.HONEYCOMB_MR2]]] begin[{] return[call[context.getResources, parameter[]]] else begin[{] None end[}] local_variable[type[DisplayMetrics], metrics] local_variable[type[float], widthDp] if[binary_operation[member[.id], ==, member[R.integer.abs__max_action_buttons]]] begin[{] if[binary_operation[member[.widthDp], >=, literal[600]]] begin[{] return[literal[5]] else begin[{] None end[}] if[binary_operation[member[.widthDp], >=, literal[500]]] begin[{] return[literal[4]] else begin[{] None end[}] if[binary_operation[member[.widthDp], >=, literal[360]]] begin[{] return[literal[3]] else begin[{] None end[}] return[literal[2]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown integer resource ID "), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getResources_getInteger] operator[SEP] identifier[Context] identifier[context] , Keyword[int] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[>=] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[HONEYCOMB_MR2] operator[SEP] { Keyword[return] identifier[context] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getInteger] operator[SEP] identifier[id] operator[SEP] operator[SEP] } identifier[DisplayMetrics] identifier[metrics] operator[=] identifier[context] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getDisplayMetrics] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[widthDp] operator[=] identifier[metrics] operator[SEP] identifier[widthPixels] operator[/] identifier[metrics] operator[SEP] identifier[density] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[==] identifier[R] operator[SEP] identifier[integer] operator[SEP] identifier[abs__max_action_buttons] operator[SEP] { Keyword[if] operator[SEP] identifier[widthDp] operator[>=] Other[600] operator[SEP] { Keyword[return] Other[5] operator[SEP] } Keyword[if] operator[SEP] identifier[widthDp] operator[>=] Other[500] operator[SEP] { Keyword[return] Other[4] operator[SEP] } Keyword[if] operator[SEP] identifier[widthDp] operator[>=] Other[360] operator[SEP] { Keyword[return] Other[3] operator[SEP] } Keyword[return] Other[2] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[id] operator[SEP] operator[SEP] }
public DataSiftConfig proxy(String host, int port, String username, String password) { http.proxy(host, port, username, password); return this; }
class class_name[name] begin[{] method[proxy, return_type[type[DataSiftConfig]], modifier[public], parameter[host, port, username, password]] begin[{] call[http.proxy, parameter[member[.host], member[.port], member[.username], member[.password]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DataSiftConfig] identifier[proxy] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] , identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] { identifier[http] operator[SEP] identifier[proxy] operator[SEP] identifier[host] , identifier[port] , identifier[username] , identifier[password] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public RowBuilder int16(String name) { ColumnInt16 column = new ColumnInt16(_columns.size(), name, _offset); _offset += column.length(); _columns.add(column); return this; }
class class_name[name] begin[{] method[int16, return_type[type[RowBuilder]], modifier[public], parameter[name]] begin[{] local_variable[type[ColumnInt16], column] assign[member[._offset], call[column.length, parameter[]]] call[_columns.add, parameter[member[.column]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[RowBuilder] identifier[int16] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[ColumnInt16] identifier[column] operator[=] Keyword[new] identifier[ColumnInt16] operator[SEP] identifier[_columns] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[name] , identifier[_offset] operator[SEP] operator[SEP] identifier[_offset] operator[+=] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[_columns] operator[SEP] identifier[add] operator[SEP] identifier[column] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void configure(String conjunction, String disjunction, String implication, String aggregation, String defuzzifier, String activation) { TNormFactory tnormFactory = FactoryManager.instance().tnorm(); SNormFactory snormFactory = FactoryManager.instance().snorm(); TNorm conjunctionObject = tnormFactory.constructObject(conjunction); SNorm disjunctionObject = snormFactory.constructObject(disjunction); TNorm implicationObject = tnormFactory.constructObject(implication); SNorm aggregationObject = snormFactory.constructObject(aggregation); Defuzzifier defuzzifierObject = FactoryManager.instance().defuzzifier().constructObject(defuzzifier); Activation activationObject = FactoryManager.instance().activation().constructObject(activation); configure(conjunctionObject, disjunctionObject, implicationObject, aggregationObject, defuzzifierObject, activationObject); }
class class_name[name] begin[{] method[configure, return_type[void], modifier[public], parameter[conjunction, disjunction, implication, aggregation, defuzzifier, activation]] begin[{] local_variable[type[TNormFactory], tnormFactory] local_variable[type[SNormFactory], snormFactory] local_variable[type[TNorm], conjunctionObject] local_variable[type[SNorm], disjunctionObject] local_variable[type[TNorm], implicationObject] local_variable[type[SNorm], aggregationObject] local_variable[type[Defuzzifier], defuzzifierObject] local_variable[type[Activation], activationObject] call[.configure, parameter[member[.conjunctionObject], member[.disjunctionObject], member[.implicationObject], member[.aggregationObject], member[.defuzzifierObject], member[.activationObject]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[configure] operator[SEP] identifier[String] identifier[conjunction] , identifier[String] identifier[disjunction] , identifier[String] identifier[implication] , identifier[String] identifier[aggregation] , identifier[String] identifier[defuzzifier] , identifier[String] identifier[activation] operator[SEP] { identifier[TNormFactory] identifier[tnormFactory] operator[=] identifier[FactoryManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[tnorm] operator[SEP] operator[SEP] operator[SEP] identifier[SNormFactory] identifier[snormFactory] operator[=] identifier[FactoryManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[snorm] operator[SEP] operator[SEP] operator[SEP] identifier[TNorm] identifier[conjunctionObject] operator[=] identifier[tnormFactory] operator[SEP] identifier[constructObject] operator[SEP] identifier[conjunction] operator[SEP] operator[SEP] identifier[SNorm] identifier[disjunctionObject] operator[=] identifier[snormFactory] operator[SEP] identifier[constructObject] operator[SEP] identifier[disjunction] operator[SEP] operator[SEP] identifier[TNorm] identifier[implicationObject] operator[=] identifier[tnormFactory] operator[SEP] identifier[constructObject] operator[SEP] identifier[implication] operator[SEP] operator[SEP] identifier[SNorm] identifier[aggregationObject] operator[=] identifier[snormFactory] operator[SEP] identifier[constructObject] operator[SEP] identifier[aggregation] operator[SEP] operator[SEP] identifier[Defuzzifier] identifier[defuzzifierObject] operator[=] identifier[FactoryManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[defuzzifier] operator[SEP] operator[SEP] operator[SEP] identifier[constructObject] operator[SEP] identifier[defuzzifier] operator[SEP] operator[SEP] identifier[Activation] identifier[activationObject] operator[=] identifier[FactoryManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[activation] operator[SEP] operator[SEP] operator[SEP] identifier[constructObject] operator[SEP] identifier[activation] operator[SEP] operator[SEP] identifier[configure] operator[SEP] identifier[conjunctionObject] , identifier[disjunctionObject] , identifier[implicationObject] , identifier[aggregationObject] , identifier[defuzzifierObject] , identifier[activationObject] operator[SEP] operator[SEP] }