code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static Attribute newInstance( Attribute attrMeta, AttributeCopyMode attrCopyMode, AttributeFactory attrFactory) { Attribute attrMetaCopy = attrFactory.create(); // create new attribute with unique identifier attrMetaCopy.setName(attrMeta.getName()); attrMetaCopy.setEntity(attrMeta.getEntity()); attrMetaCopy.setSequenceNumber(attrMeta.getSequenceNumber()); attrMetaCopy.setDataType(attrMeta.getDataType()); attrMetaCopy.setIdAttribute(attrMeta.isIdAttribute()); attrMetaCopy.setLabelAttribute(attrMeta.isLabelAttribute()); attrMetaCopy.setLookupAttributeIndex(attrMeta.getLookupAttributeIndex()); if (attrMeta.hasRefEntity()) { attrMetaCopy.setRefEntity(attrMeta.getRefEntity()); } attrMetaCopy.setMappedBy(attrMeta.getMappedBy()); // do not deep-copy attrMetaCopy.setOrderBy(attrMeta.getOrderBy()); attrMetaCopy.setExpression(attrMeta.getExpression()); attrMetaCopy.setNillable(attrMeta.isNillable()); attrMetaCopy.setAuto(attrMeta.isAuto()); attrMetaCopy.setVisible(attrMeta.isVisible()); attrMetaCopy.setLabel(attrMeta.getLabel()); attrMetaCopy.setDescription(attrMeta.getDescription()); attrMetaCopy.setAggregatable(attrMeta.isAggregatable()); attrMetaCopy.setEnumOptions(attrMeta.getEnumOptions()); attrMetaCopy.setRangeMin(attrMeta.getRangeMin()); attrMetaCopy.setRangeMax(attrMeta.getRangeMax()); attrMetaCopy.setReadOnly(attrMeta.isReadOnly()); attrMetaCopy.setUnique(attrMeta.isUnique()); Attribute parentAttr = attrMeta.getParent(); if (attrCopyMode == DEEP_COPY_ATTRS) { attrMetaCopy.setParent( parentAttr != null ? Attribute.newInstance(parentAttr, attrCopyMode, attrFactory) : null); } else { attrMetaCopy.setParent(parentAttr); } attrMetaCopy.setTags(Lists.newArrayList(attrMeta.getTags())); // do not deep-copy attrMetaCopy.setNullableExpression(attrMeta.getNullableExpression()); attrMetaCopy.setValidationExpression(attrMeta.getValidationExpression()); attrMetaCopy.setVisibleExpression(attrMeta.getVisibleExpression()); attrMetaCopy.setDefaultValue(attrMeta.getDefaultValue()); return attrMetaCopy; }
class class_name[name] begin[{] method[newInstance, return_type[type[Attribute]], modifier[public static], parameter[attrMeta, attrCopyMode, attrFactory]] begin[{] local_variable[type[Attribute], attrMetaCopy] call[attrMetaCopy.setName, parameter[call[attrMeta.getName, parameter[]]]] call[attrMetaCopy.setEntity, parameter[call[attrMeta.getEntity, parameter[]]]] call[attrMetaCopy.setSequenceNumber, parameter[call[attrMeta.getSequenceNumber, parameter[]]]] call[attrMetaCopy.setDataType, parameter[call[attrMeta.getDataType, parameter[]]]] call[attrMetaCopy.setIdAttribute, parameter[call[attrMeta.isIdAttribute, parameter[]]]] call[attrMetaCopy.setLabelAttribute, parameter[call[attrMeta.isLabelAttribute, parameter[]]]] call[attrMetaCopy.setLookupAttributeIndex, parameter[call[attrMeta.getLookupAttributeIndex, parameter[]]]] if[call[attrMeta.hasRefEntity, parameter[]]] begin[{] call[attrMetaCopy.setRefEntity, parameter[call[attrMeta.getRefEntity, parameter[]]]] else begin[{] None end[}] call[attrMetaCopy.setMappedBy, parameter[call[attrMeta.getMappedBy, parameter[]]]] call[attrMetaCopy.setOrderBy, parameter[call[attrMeta.getOrderBy, parameter[]]]] call[attrMetaCopy.setExpression, parameter[call[attrMeta.getExpression, parameter[]]]] call[attrMetaCopy.setNillable, parameter[call[attrMeta.isNillable, parameter[]]]] call[attrMetaCopy.setAuto, parameter[call[attrMeta.isAuto, parameter[]]]] call[attrMetaCopy.setVisible, parameter[call[attrMeta.isVisible, parameter[]]]] call[attrMetaCopy.setLabel, parameter[call[attrMeta.getLabel, parameter[]]]] call[attrMetaCopy.setDescription, parameter[call[attrMeta.getDescription, parameter[]]]] call[attrMetaCopy.setAggregatable, parameter[call[attrMeta.isAggregatable, parameter[]]]] call[attrMetaCopy.setEnumOptions, parameter[call[attrMeta.getEnumOptions, parameter[]]]] call[attrMetaCopy.setRangeMin, parameter[call[attrMeta.getRangeMin, parameter[]]]] call[attrMetaCopy.setRangeMax, parameter[call[attrMeta.getRangeMax, parameter[]]]] call[attrMetaCopy.setReadOnly, parameter[call[attrMeta.isReadOnly, parameter[]]]] call[attrMetaCopy.setUnique, parameter[call[attrMeta.isUnique, parameter[]]]] local_variable[type[Attribute], parentAttr] if[binary_operation[member[.attrCopyMode], ==, member[.DEEP_COPY_ATTRS]]] begin[{] call[attrMetaCopy.setParent, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=parentAttr, 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=parentAttr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attrCopyMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attrFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=Attribute, selectors=[], type_arguments=None))]] else begin[{] call[attrMetaCopy.setParent, parameter[member[.parentAttr]]] end[}] call[attrMetaCopy.setTags, parameter[call[Lists.newArrayList, parameter[call[attrMeta.getTags, parameter[]]]]]] call[attrMetaCopy.setNullableExpression, parameter[call[attrMeta.getNullableExpression, parameter[]]]] call[attrMetaCopy.setValidationExpression, parameter[call[attrMeta.getValidationExpression, parameter[]]]] call[attrMetaCopy.setVisibleExpression, parameter[call[attrMeta.getVisibleExpression, parameter[]]]] call[attrMetaCopy.setDefaultValue, parameter[call[attrMeta.getDefaultValue, parameter[]]]] return[member[.attrMetaCopy]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Attribute] identifier[newInstance] operator[SEP] identifier[Attribute] identifier[attrMeta] , identifier[AttributeCopyMode] identifier[attrCopyMode] , identifier[AttributeFactory] identifier[attrFactory] operator[SEP] { identifier[Attribute] identifier[attrMetaCopy] operator[=] identifier[attrFactory] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setName] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setEntity] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setSequenceNumber] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getSequenceNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setDataType] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getDataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setIdAttribute] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isIdAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setLabelAttribute] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isLabelAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setLookupAttributeIndex] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getLookupAttributeIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attrMeta] operator[SEP] identifier[hasRefEntity] operator[SEP] operator[SEP] operator[SEP] { identifier[attrMetaCopy] operator[SEP] identifier[setRefEntity] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getRefEntity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[attrMetaCopy] operator[SEP] identifier[setMappedBy] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getMappedBy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setOrderBy] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getOrderBy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setExpression] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setNillable] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isNillable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setAuto] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isAuto] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setVisible] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isVisible] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setLabel] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setDescription] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setAggregatable] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isAggregatable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setEnumOptions] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getEnumOptions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setRangeMin] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getRangeMin] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setRangeMax] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getRangeMax] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setReadOnly] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isReadOnly] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setUnique] operator[SEP] identifier[attrMeta] operator[SEP] identifier[isUnique] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Attribute] identifier[parentAttr] operator[=] identifier[attrMeta] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attrCopyMode] operator[==] identifier[DEEP_COPY_ATTRS] operator[SEP] { identifier[attrMetaCopy] operator[SEP] identifier[setParent] operator[SEP] identifier[parentAttr] operator[!=] Other[null] operator[?] identifier[Attribute] operator[SEP] identifier[newInstance] operator[SEP] identifier[parentAttr] , identifier[attrCopyMode] , identifier[attrFactory] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[attrMetaCopy] operator[SEP] identifier[setParent] operator[SEP] identifier[parentAttr] operator[SEP] operator[SEP] } identifier[attrMetaCopy] operator[SEP] identifier[setTags] operator[SEP] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setNullableExpression] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getNullableExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setValidationExpression] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getValidationExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setVisibleExpression] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getVisibleExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attrMetaCopy] operator[SEP] identifier[setDefaultValue] operator[SEP] identifier[attrMeta] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[attrMetaCopy] operator[SEP] }
private String findCompressionLiteral(String src) { if (src == null) { LOGGER.warn(NULL_COMPRESSION_LITERAL); return null; } for (String supported : LITERALS_TO_DECOMPRESSOR.keySet()) { if (src.contains(supported)) { return supported; } } LOGGER.debug(NO_SUPPORTED_COMPRESSION_LITERAL); return null; }
class class_name[name] begin[{] method[findCompressionLiteral, return_type[type[String]], modifier[private], parameter[src]] begin[{] if[binary_operation[member[.src], ==, literal[null]]] begin[{] call[LOGGER.warn, parameter[member[.NULL_COMPRESSION_LITERAL]]] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=supported, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=supported, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=LITERALS_TO_DECOMPRESSOR, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=supported)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[LOGGER.debug, parameter[member[.NO_SUPPORTED_COMPRESSION_LITERAL]]] return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[findCompressionLiteral] operator[SEP] identifier[String] identifier[src] operator[SEP] { Keyword[if] operator[SEP] identifier[src] operator[==] Other[null] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[NULL_COMPRESSION_LITERAL] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[supported] operator[:] identifier[LITERALS_TO_DECOMPRESSOR] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[src] operator[SEP] identifier[contains] operator[SEP] identifier[supported] operator[SEP] operator[SEP] { Keyword[return] identifier[supported] operator[SEP] } } identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[NO_SUPPORTED_COMPRESSION_LITERAL] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public CreateReplicationGroupRequest withSnapshotArns(String... snapshotArns) { if (this.snapshotArns == null) { setSnapshotArns(new com.amazonaws.internal.SdkInternalList<String>(snapshotArns.length)); } for (String ele : snapshotArns) { this.snapshotArns.add(ele); } return this; }
class class_name[name] begin[{] method[withSnapshotArns, return_type[type[CreateReplicationGroupRequest]], modifier[public], parameter[snapshotArns]] begin[{] if[binary_operation[THIS[member[None.snapshotArns]], ==, literal[null]]] begin[{] call[.setSnapshotArns, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=snapshotArns, 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=snapshotArns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=snapshotArns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[CreateReplicationGroupRequest] identifier[withSnapshotArns] operator[SEP] identifier[String] operator[...] identifier[snapshotArns] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[snapshotArns] operator[==] Other[null] operator[SEP] { identifier[setSnapshotArns] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[snapshotArns] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[snapshotArns] operator[SEP] { Keyword[this] operator[SEP] identifier[snapshotArns] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static lbroute6[] get(nitro_service service, String network[]) throws Exception{ if (network !=null && network.length>0) { lbroute6 response[] = new lbroute6[network.length]; lbroute6 obj[] = new lbroute6[network.length]; for (int i=0;i<network.length;i++) { obj[i] = new lbroute6(); obj[i].set_network(network[i]); response[i] = (lbroute6) obj[i].get_resource(service); } return response; } return null; }
class class_name[name] begin[{] method[get, return_type[type[lbroute6]], modifier[public static], parameter[service, network]] begin[{] if[binary_operation[binary_operation[member[.network], !=, literal[null]], &&, binary_operation[member[network.length], >, literal[0]]]] begin[{] local_variable[type[lbroute6], response] local_variable[type[lbroute6], obj] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=lbroute6, sub_type=None))), label=None), StatementExpression(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=network, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=set_network, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get_resource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=lbroute6, sub_type=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=network, 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[.response]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[lbroute6] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[network] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[network] operator[!=] Other[null] operator[&&] identifier[network] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[lbroute6] identifier[response] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[lbroute6] operator[SEP] identifier[network] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[lbroute6] identifier[obj] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[lbroute6] operator[SEP] identifier[network] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[network] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[obj] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[lbroute6] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[set_network] operator[SEP] identifier[network] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[lbroute6] operator[SEP] identifier[obj] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[get_resource] operator[SEP] identifier[service] operator[SEP] operator[SEP] } Keyword[return] identifier[response] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@Singleton HttpServerHandler<HttpRequest<?>, HttpResponse<?>> httpServerHandler(HttpTracing httpTracing) { return HttpServerHandler.create(httpTracing, new HttpServerAdapter<HttpRequest<?>, HttpResponse<?>>() { @Override public String method(HttpRequest<?> request) { return request.getMethod().name(); } @Override public String url(HttpRequest<?> request) { return request.getUri().toString(); } @Override public String requestHeader(HttpRequest<?> request, String name) { return request.getHeaders().get(name); } @Override public Integer statusCode(HttpResponse<?> response) { return response.getStatus().getCode(); } @Override public String route(HttpResponse<?> response) { Optional<String> value = response.getAttribute(HttpAttributes.URI_TEMPLATE, String.class); return value.orElseGet(() -> super.route(response)); } @Override public String methodFromResponse(HttpResponse<?> httpResponse) { return httpResponse.getAttribute(HttpAttributes.METHOD_NAME, String.class).orElse(null); } @Override public boolean parseClientAddress(HttpRequest<?> httpRequest, Endpoint.Builder builder) { InetSocketAddress remoteAddress = httpRequest.getRemoteAddress(); return builder.parseIp(remoteAddress.getAddress()); } }); }
class class_name[name] begin[{] method[httpServerHandler, return_type[type[HttpServerHandler]], modifier[default], parameter[httpTracing]] begin[{] return[call[HttpServerHandler.create, parameter[member[.httpTracing], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=method, parameters=[FormalParameter(annotations=[], modifiers=set(), name=request, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpRequest, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getUri, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=url, parameters=[FormalParameter(annotations=[], modifiers=set(), name=request, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpRequest, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getHeaders, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=requestHeader, parameters=[FormalParameter(annotations=[], modifiers=set(), name=request, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpRequest, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=statusCode, parameters=[FormalParameter(annotations=[], modifiers=set(), name=response, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpResponse, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=URI_TEMPLATE, postfix_operators=[], prefix_operators=[], qualifier=HttpAttributes, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Optional, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[LambdaExpression(body=SuperMethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=route, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), parameters=[])], member=orElseGet, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=route, parameters=[FormalParameter(annotations=[], modifiers=set(), name=response, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpResponse, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=METHOD_NAME, postfix_operators=[], prefix_operators=[], qualifier=HttpAttributes, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=httpResponse, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=orElse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=methodFromResponse, parameters=[FormalParameter(annotations=[], modifiers=set(), name=httpResponse, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpResponse, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRemoteAddress, postfix_operators=[], prefix_operators=[], qualifier=httpRequest, selectors=[], type_arguments=None), name=remoteAddress)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetSocketAddress, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=remoteAddress, selectors=[], type_arguments=None)], member=parseIp, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=parseClientAddress, parameters=[FormalParameter(annotations=[], modifiers=set(), name=httpRequest, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpRequest, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=builder, type=ReferenceType(arguments=None, dimensions=[], name=Endpoint, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), 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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpRequest, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=HttpResponse, sub_type=None))], dimensions=None, name=HttpServerAdapter, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Singleton] identifier[HttpServerHandler] operator[<] identifier[HttpRequest] operator[<] operator[?] operator[>] , identifier[HttpResponse] operator[<] operator[?] operator[>] operator[>] identifier[httpServerHandler] operator[SEP] identifier[HttpTracing] identifier[httpTracing] operator[SEP] { Keyword[return] identifier[HttpServerHandler] operator[SEP] identifier[create] operator[SEP] identifier[httpTracing] , Keyword[new] identifier[HttpServerAdapter] operator[<] identifier[HttpRequest] operator[<] operator[?] operator[>] , identifier[HttpResponse] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[method] operator[SEP] identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[request] operator[SEP] { Keyword[return] identifier[request] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[url] operator[SEP] identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[request] operator[SEP] { Keyword[return] identifier[request] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[requestHeader] operator[SEP] identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[request] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[request] operator[SEP] identifier[getHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[statusCode] operator[SEP] identifier[HttpResponse] operator[<] operator[?] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[route] operator[SEP] identifier[HttpResponse] operator[<] operator[?] operator[>] identifier[response] operator[SEP] { identifier[Optional] operator[<] identifier[String] operator[>] identifier[value] operator[=] identifier[response] operator[SEP] identifier[getAttribute] operator[SEP] identifier[HttpAttributes] operator[SEP] identifier[URI_TEMPLATE] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] identifier[orElseGet] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[super] operator[SEP] identifier[route] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[methodFromResponse] operator[SEP] identifier[HttpResponse] operator[<] operator[?] operator[>] identifier[httpResponse] operator[SEP] { Keyword[return] identifier[httpResponse] operator[SEP] identifier[getAttribute] operator[SEP] identifier[HttpAttributes] operator[SEP] identifier[METHOD_NAME] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[parseClientAddress] operator[SEP] identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[httpRequest] , identifier[Endpoint] operator[SEP] identifier[Builder] identifier[builder] operator[SEP] { identifier[InetSocketAddress] identifier[remoteAddress] operator[=] identifier[httpRequest] operator[SEP] identifier[getRemoteAddress] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[parseIp] operator[SEP] identifier[remoteAddress] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private void stopRoundTripMeasurement() { if (keepAliveTask != null) { boolean cancelled = keepAliveTask.cancel(true); keepAliveTask = null; if (cancelled && log.isDebugEnabled()) { log.debug("Keep alive was cancelled for {}", sessionId); } } }
class class_name[name] begin[{] method[stopRoundTripMeasurement, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.keepAliveTask], !=, literal[null]]] begin[{] local_variable[type[boolean], cancelled] assign[member[.keepAliveTask], literal[null]] if[binary_operation[member[.cancelled], &&, call[log.isDebugEnabled, parameter[]]]] begin[{] call[log.debug, parameter[literal["Keep alive was cancelled for {}"], member[.sessionId]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[stopRoundTripMeasurement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[keepAliveTask] operator[!=] Other[null] operator[SEP] { Keyword[boolean] identifier[cancelled] operator[=] identifier[keepAliveTask] operator[SEP] identifier[cancel] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[keepAliveTask] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[cancelled] operator[&&] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[sessionId] operator[SEP] operator[SEP] } } }
@Override public void removeByCW_CP(long commerceWishListId, long CProductId) { for (CommerceWishListItem commerceWishListItem : findByCW_CP( commerceWishListId, CProductId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishListItem); } }
class class_name[name] begin[{] method[removeByCW_CP, return_type[void], modifier[public], parameter[commerceWishListId, CProductId]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceWishListItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=commerceWishListId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CProductId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByCW_CP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commerceWishListItem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommerceWishListItem, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByCW_CP] operator[SEP] Keyword[long] identifier[commerceWishListId] , Keyword[long] identifier[CProductId] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceWishListItem] identifier[commerceWishListItem] operator[:] identifier[findByCW_CP] operator[SEP] identifier[commerceWishListId] , identifier[CProductId] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[commerceWishListItem] operator[SEP] operator[SEP] } }
public boolean extract_DevBoolean(Any in) throws DevFailed { boolean data = false; try { data = in.extract_boolean(); } catch (BAD_OPERATION ex) { throw_bad_type("DevBoolean"); } return data; }
class class_name[name] begin[{] method[extract_DevBoolean, return_type[type[boolean]], modifier[public], parameter[in]] begin[{] local_variable[type[boolean], data] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=extract_boolean, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DevBoolean")], member=throw_bad_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None) return[member[.data]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[extract_DevBoolean] operator[SEP] identifier[Any] identifier[in] operator[SEP] Keyword[throws] identifier[DevFailed] { Keyword[boolean] identifier[data] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[data] operator[=] identifier[in] operator[SEP] identifier[extract_boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[throw_bad_type] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] }
public UpdateLayerRequest withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
class class_name[name] begin[{] method[withAttributes, return_type[type[UpdateLayerRequest]], modifier[public], parameter[attributes]] begin[{] call[.setAttributes, parameter[member[.attributes]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[UpdateLayerRequest] identifier[withAttributes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[attributes] operator[SEP] { identifier[setAttributes] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public SortField sortField(String field, boolean reverse) { return new SortField(field, Type.LONG, reverse); }
class class_name[name] begin[{] method[sortField, return_type[type[SortField]], modifier[public], parameter[field, reverse]] begin[{] return[ClassCreator(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=LONG, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), MemberReference(member=reverse, 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=SortField, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SortField] identifier[sortField] operator[SEP] identifier[String] identifier[field] , Keyword[boolean] identifier[reverse] operator[SEP] { Keyword[return] Keyword[new] identifier[SortField] operator[SEP] identifier[field] , identifier[Type] operator[SEP] identifier[LONG] , identifier[reverse] operator[SEP] operator[SEP] }
public static TraceLevel fromInt(int level) throws IllegalArgumentException { switch (level) { case LEVEL_OFF: return OFF; case LEVEL_SEVERE: return SEVERE; case LEVEL_WARNING: return WARNING; case LEVEL_INFO: return INFO; case LEVEL_CONFIG: return CONFIG; case LEVEL_FINE: return FINE; case LEVEL_FINER: return FINER; case LEVEL_FINEST: return FINEST; default: throw new IllegalArgumentException("Invalid level: " + level); } }
class class_name[name] begin[{] method[fromInt, return_type[type[TraceLevel]], modifier[public static], parameter[level]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['LEVEL_OFF'], statements=[ReturnStatement(expression=MemberReference(member=OFF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_SEVERE'], statements=[ReturnStatement(expression=MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_WARNING'], statements=[ReturnStatement(expression=MemberReference(member=WARNING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_INFO'], statements=[ReturnStatement(expression=MemberReference(member=INFO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_CONFIG'], statements=[ReturnStatement(expression=MemberReference(member=CONFIG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_FINE'], statements=[ReturnStatement(expression=MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_FINER'], statements=[ReturnStatement(expression=MemberReference(member=FINER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['LEVEL_FINEST'], statements=[ReturnStatement(expression=MemberReference(member=FINEST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid level: "), operandr=MemberReference(member=level, 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=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[TraceLevel] identifier[fromInt] operator[SEP] Keyword[int] identifier[level] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { Keyword[switch] operator[SEP] identifier[level] operator[SEP] { Keyword[case] identifier[LEVEL_OFF] operator[:] Keyword[return] identifier[OFF] operator[SEP] Keyword[case] identifier[LEVEL_SEVERE] operator[:] Keyword[return] identifier[SEVERE] operator[SEP] Keyword[case] identifier[LEVEL_WARNING] operator[:] Keyword[return] identifier[WARNING] operator[SEP] Keyword[case] identifier[LEVEL_INFO] operator[:] Keyword[return] identifier[INFO] operator[SEP] Keyword[case] identifier[LEVEL_CONFIG] operator[:] Keyword[return] identifier[CONFIG] operator[SEP] Keyword[case] identifier[LEVEL_FINE] operator[:] Keyword[return] identifier[FINE] operator[SEP] Keyword[case] identifier[LEVEL_FINER] operator[:] Keyword[return] identifier[FINER] operator[SEP] Keyword[case] identifier[LEVEL_FINEST] operator[:] Keyword[return] identifier[FINEST] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[level] operator[SEP] operator[SEP] } }
public void removeTieable(String name){ T t = tieables.remove(name); if (t==null) return; detachFromListener(t); try{ //in case its yet untied. yetUntied.remove(t); }catch(Exception e){/* ignored */} }
class class_name[name] begin[{] method[removeTieable, return_type[void], modifier[public], parameter[name]] begin[{] local_variable[type[T], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[.detachFromListener, parameter[member[.t]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=yetUntied, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[removeTieable] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[T] identifier[t] operator[=] identifier[tieables] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[detachFromListener] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[try] { identifier[yetUntied] operator[SEP] identifier[remove] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } }
public <T extends Element> void createKeyIndex(String key, Class<T> elementType) { graphStore.createKeyIndex(key, elementType); }
class class_name[name] begin[{] method[createKeyIndex, return_type[void], modifier[public], parameter[key, elementType]] begin[{] call[graphStore.createKeyIndex, parameter[member[.key], member[.elementType]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Element] operator[>] Keyword[void] identifier[createKeyIndex] operator[SEP] identifier[String] identifier[key] , identifier[Class] operator[<] identifier[T] operator[>] identifier[elementType] operator[SEP] { identifier[graphStore] operator[SEP] identifier[createKeyIndex] operator[SEP] identifier[key] , identifier[elementType] operator[SEP] operator[SEP] }
public static auditsyslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_authenticationvserver_binding obj = new auditsyslogpolicy_authenticationvserver_binding(); obj.set_name(name); auditsyslogpolicy_authenticationvserver_binding response[] = (auditsyslogpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[auditsyslogpolicy_authenticationvserver_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[auditsyslogpolicy_authenticationvserver_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[auditsyslogpolicy_authenticationvserver_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[auditsyslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[auditsyslogpolicy_authenticationvserver_binding] identifier[obj] operator[=] Keyword[new] identifier[auditsyslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[auditsyslogpolicy_authenticationvserver_binding] identifier[response] operator[SEP] operator[SEP] operator[=] operator[SEP] identifier[auditsyslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public void removeTickLabelSection(final Section SECTION) { if (null == SECTION) return; tickLabelSections.remove(SECTION); Collections.sort(tickLabelSections, new SectionComparator()); fireUpdateEvent(REDRAW_EVENT); }
class class_name[name] begin[{] method[removeTickLabelSection, return_type[void], modifier[public], parameter[SECTION]] begin[{] if[binary_operation[literal[null], ==, member[.SECTION]]] begin[{] return[None] else begin[{] None end[}] call[tickLabelSections.remove, parameter[member[.SECTION]]] call[Collections.sort, parameter[member[.tickLabelSections], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SectionComparator, sub_type=None))]] call[.fireUpdateEvent, parameter[member[.REDRAW_EVENT]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeTickLabelSection] operator[SEP] Keyword[final] identifier[Section] identifier[SECTION] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[SECTION] operator[SEP] Keyword[return] operator[SEP] identifier[tickLabelSections] operator[SEP] identifier[remove] operator[SEP] identifier[SECTION] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[tickLabelSections] , Keyword[new] identifier[SectionComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fireUpdateEvent] operator[SEP] identifier[REDRAW_EVENT] operator[SEP] operator[SEP] }
@Override public void encodeEnd(final FacesContext context, final UIComponent component) throws IOException { final ResponseWriter responseWriter = context.getResponseWriter(); final Sheet sheet = (Sheet) component; // update column mappings on render sheet.updateColumnMappings(); // sort data sheet.sortAndFilter(); // encode markup encodeMarkup(context, sheet, responseWriter); // encode javascript encodeScript(context, sheet, responseWriter); }
class class_name[name] begin[{] method[encodeEnd, return_type[void], modifier[public], parameter[context, component]] begin[{] local_variable[type[ResponseWriter], responseWriter] local_variable[type[Sheet], sheet] call[sheet.updateColumnMappings, parameter[]] call[sheet.sortAndFilter, parameter[]] call[.encodeMarkup, parameter[member[.context], member[.sheet], member[.responseWriter]]] call[.encodeScript, parameter[member[.context], member[.sheet], member[.responseWriter]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[encodeEnd] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[UIComponent] identifier[component] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[ResponseWriter] identifier[responseWriter] operator[=] identifier[context] operator[SEP] identifier[getResponseWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] operator[=] operator[SEP] identifier[Sheet] operator[SEP] identifier[component] operator[SEP] identifier[sheet] operator[SEP] identifier[updateColumnMappings] operator[SEP] operator[SEP] operator[SEP] identifier[sheet] operator[SEP] identifier[sortAndFilter] operator[SEP] operator[SEP] operator[SEP] identifier[encodeMarkup] operator[SEP] identifier[context] , identifier[sheet] , identifier[responseWriter] operator[SEP] operator[SEP] identifier[encodeScript] operator[SEP] identifier[context] , identifier[sheet] , identifier[responseWriter] operator[SEP] operator[SEP] }
protected boolean isApplicable(AbstractElement<?, ?> result) { ResultFilter filter = context.configuration.getResultFilter(); return filter == null || filter.isApplicable(result); }
class class_name[name] begin[{] method[isApplicable, return_type[type[boolean]], modifier[protected], parameter[result]] begin[{] local_variable[type[ResultFilter], filter] return[binary_operation[binary_operation[member[.filter], ==, literal[null]], ||, call[filter.isApplicable, parameter[member[.result]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isApplicable] operator[SEP] identifier[AbstractElement] operator[<] operator[?] , operator[?] operator[>] identifier[result] operator[SEP] { identifier[ResultFilter] identifier[filter] operator[=] identifier[context] operator[SEP] identifier[configuration] operator[SEP] identifier[getResultFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[filter] operator[==] Other[null] operator[||] identifier[filter] operator[SEP] identifier[isApplicable] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
public static <E> Set<E> createHashSet(int expectedMapSize) { final int initialCapacity = (int) (expectedMapSize / HASHSET_DEFAULT_LOAD_FACTOR) + 1; return new HashSet<E>(initialCapacity, HASHSET_DEFAULT_LOAD_FACTOR); }
class class_name[name] begin[{] method[createHashSet, return_type[type[Set]], modifier[public static], parameter[expectedMapSize]] begin[{] local_variable[type[int], initialCapacity] return[ClassCreator(arguments=[MemberReference(member=initialCapacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=HASHSET_DEFAULT_LOAD_FACTOR, 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=E, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[createHashSet] operator[SEP] Keyword[int] identifier[expectedMapSize] operator[SEP] { Keyword[final] Keyword[int] identifier[initialCapacity] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[expectedMapSize] operator[/] identifier[HASHSET_DEFAULT_LOAD_FACTOR] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[return] Keyword[new] identifier[HashSet] operator[<] identifier[E] operator[>] operator[SEP] identifier[initialCapacity] , identifier[HASHSET_DEFAULT_LOAD_FACTOR] operator[SEP] operator[SEP] }
private Map parseObject(JsonLexer lexer) { Map content = new HashMap(); JsonToken previousToken = null; JsonToken currentToken = null; for(;;) { currentToken = lexer.nextToken(); if (currentToken == null) { throw new JsonException( "Expected a String key on line: " + lexer.getReader().getLine() + ", " + "column: " + lexer.getReader().getColumn() + ".\n" + "But got an unterminated object." ); } // expect a string key, or already a closing curly brace if (currentToken.getType() == CLOSE_CURLY) { return content; } else if (currentToken.getType() != STRING) { throw new JsonException( "Expected " + STRING.getLabel() + " key " + "on line: " + currentToken.getStartLine() + ", " + "column: " + currentToken.getStartColumn() + ".\n" + "But got '" + currentToken.getText() + "' instead." ); } String mapKey = (String) currentToken.getValue(); currentToken = lexer.nextToken(); if (currentToken == null) { throw new JsonException( "Expected a " + COLON.getLabel() + " " + "on line: " + lexer.getReader().getLine() + ", " + "column: " + lexer.getReader().getColumn() + ".\n" + "But got an unterminated object." ); } // expect a colon between the key and value pair if (currentToken.getType() != COLON) { throw new JsonException( "Expected " + COLON.getLabel() + " " + "on line: " + currentToken.getStartLine() + ", " + "column: " + currentToken.getStartColumn() + ".\n" + "But got '" + currentToken.getText() + "' instead." ); } currentToken = lexer.nextToken(); if (currentToken == null) { throw new JsonException( "Expected a value " + "on line: " + lexer.getReader().getLine() + ", " + "column: " + lexer.getReader().getColumn() + ".\n" + "But got an unterminated object." ); } // value can be an object, an array, a number, string, boolean or null values if (currentToken.getType() == OPEN_CURLY) { content.put(mapKey, parseObject(lexer)); } else if (currentToken.getType() == OPEN_BRACKET) { content.put(mapKey, parseArray(lexer)); } else if (currentToken.getType().ordinal() >= NULL.ordinal()) { content.put(mapKey, currentToken.getValue()); } else { throw new JsonException( "Expected a value, an array, or an object " + "on line: " + currentToken.getStartLine() + ", " + "column: " + currentToken.getStartColumn() + ".\n" + "But got '" + currentToken.getText() + "' instead." ); } previousToken = currentToken; currentToken = lexer.nextToken(); // premature end of the object if (currentToken == null) { throw new JsonException( "Expected " + CLOSE_CURLY.getLabel() + " or " + COMMA.getLabel() + " " + "on line: " + previousToken.getEndLine() + ", " + "column: " + previousToken.getEndColumn() + ".\n" + "But got an unterminated object." ); } // Expect a comma for an upcoming key/value pair // or a closing curly brace for the end of the object if (currentToken.getType() == CLOSE_CURLY) { break; } else if (currentToken.getType() != COMMA) { throw new JsonException( "Expected a value or " + CLOSE_CURLY.getLabel() + " " + "on line: " + currentToken.getStartLine() + ", " + "column: " + currentToken.getStartColumn() + ".\n" + "But got '" + currentToken.getText() + "' instead." ); } } return content; }
class class_name[name] begin[{] method[parseObject, return_type[type[Map]], modifier[private], parameter[lexer]] begin[{] local_variable[type[Map], content] local_variable[type[JsonToken], previousToken] local_variable[type[JsonToken], currentToken] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentToken, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a String key on line: "), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getColumn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got an unterminated object."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=CLOSE_CURLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected "), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=STRING, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" key "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartLine, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartColumn, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got '"), operator=+), operandr=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' instead."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=mapKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentToken, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a "), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=COLON, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getColumn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got an unterminated object."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=COLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected "), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=COLON, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartLine, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartColumn, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got '"), operator=+), operandr=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' instead."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentToken, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a value "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[MethodInvocation(arguments=[], member=getColumn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got an unterminated object."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=OPEN_CURLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=OPEN_BRACKET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[MethodInvocation(arguments=[], member=ordinal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=ordinal, postfix_operators=[], prefix_operators=[], qualifier=NULL, selectors=[], type_arguments=None), operator=>=), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a value, an array, or an object "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartLine, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartColumn, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got '"), operator=+), operandr=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' instead."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mapKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mapKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=lexer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mapKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=lexer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=previousToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=currentToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=lexer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentToken, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected "), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=CLOSE_CURLY, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" or "), operator=+), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=COMMA, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getEndLine, postfix_operators=[], prefix_operators=[], qualifier=previousToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getEndColumn, postfix_operators=[], prefix_operators=[], qualifier=previousToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got an unterminated object."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=CLOSE_CURLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operandr=MemberReference(member=COMMA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a value or "), operandr=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=CLOSE_CURLY, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="on line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartLine, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStartColumn, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="But got '"), operator=+), operandr=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=currentToken, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' instead."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=None, init=None, update=None), label=None) return[member[.content]] end[}] END[}]
Keyword[private] identifier[Map] identifier[parseObject] operator[SEP] identifier[JsonLexer] identifier[lexer] operator[SEP] { identifier[Map] identifier[content] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] identifier[JsonToken] identifier[previousToken] operator[=] Other[null] operator[SEP] identifier[JsonToken] identifier[currentToken] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[currentToken] operator[=] identifier[lexer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentToken] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[CLOSE_CURLY] operator[SEP] { Keyword[return] identifier[content] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[STRING] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[STRING] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[mapKey] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[currentToken] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[currentToken] operator[=] identifier[lexer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentToken] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[COLON] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[COLON] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[COLON] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[currentToken] operator[=] identifier[lexer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentToken] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[lexer] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[OPEN_CURLY] operator[SEP] { identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[mapKey] , identifier[parseObject] operator[SEP] identifier[lexer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[OPEN_BRACKET] operator[SEP] { identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[mapKey] , identifier[parseArray] operator[SEP] identifier[lexer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[>=] identifier[NULL] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] { identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[mapKey] , identifier[currentToken] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[previousToken] operator[=] identifier[currentToken] operator[SEP] identifier[currentToken] operator[=] identifier[lexer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentToken] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[CLOSE_CURLY] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[COMMA] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[previousToken] operator[SEP] identifier[getEndLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[previousToken] operator[SEP] identifier[getEndColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[CLOSE_CURLY] operator[SEP] { Keyword[break] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[currentToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[COMMA] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] literal[String] operator[+] identifier[CLOSE_CURLY] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getStartColumn] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[currentToken] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[content] operator[SEP] }
public void clear() { this.setRemoteAddress(null).setLocalAddress(null).setFuture(null).setProviderSide(null) .setProviderInfo(null); this.attachments = new ConcurrentHashMap<String, Object>(); this.stopWatch.reset(); }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] THIS[call[None.setRemoteAddress, parameter[literal[null]]]call[None.setLocalAddress, parameter[literal[null]]]call[None.setFuture, parameter[literal[null]]]call[None.setProviderSide, parameter[literal[null]]]call[None.setProviderInfo, parameter[literal[null]]]] assign[THIS[member[None.attachments]], 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=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))] THIS[member[None.stopWatch]call[None.reset, parameter[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[setRemoteAddress] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[setLocalAddress] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[setFuture] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[setProviderSide] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[setProviderInfo] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[attachments] operator[=] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[stopWatch] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] }
@SneakyThrows(IOException.class) private CompactionArgs parseEntries(InputStream input, long startOffset, int maxLength) { val entries = new HashMap<UUID, CandidateSet>(); int count = 0; long nextOffset = startOffset; final long maxOffset = startOffset + maxLength; try { while (nextOffset < maxOffset) { // TODO: Handle error when compaction offset is not on Entry boundary (https://github.com/pravega/pravega/issues/3560). val e = AsyncTableEntryReader.readEntryComponents(input, nextOffset, this.connector.getSerializer()); // We only care about updates, and not removals. if (!e.getHeader().isDeletion()) { // Group by KeyHash, and deduplicate (based on key). val hash = this.connector.getKeyHasher().hash(e.getKey()); CandidateSet candidates = entries.computeIfAbsent(hash, h -> new CandidateSet()); candidates.add(new Candidate(nextOffset, TableEntry.versioned(new ByteArraySegment(e.getKey()), new ByteArraySegment(e.getValue()), e.getVersion()))); } // Every entry, even if deleted or duplicated, must be counted, as we will need to adjust the Segment's // TOTAL_ENTRY_COUNT attribute at the end. count++; // Update the offset to the beginning of the next entry. nextOffset += e.getHeader().getTotalLength(); } } catch (EOFException ex) { // We chose an arbitrary compact length, so it is quite possible we stopped reading in the middle of an entry. // As such, EOFException is the only way to know when to stop. When this happens, we will have collected the // total compact length in segmentOffset. input.close(); } return new CompactionArgs(startOffset, nextOffset, count, entries); }
class class_name[name] begin[{] method[parseEntries, return_type[type[CompactionArgs]], modifier[private], parameter[input, startOffset, maxLength]] begin[{] local_variable[type[val], entries] local_variable[type[int], count] local_variable[type[long], nextOffset] local_variable[type[long], maxOffset] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=connector, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getSerializer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=readEntryComponents, postfix_operators=[], prefix_operators=[], qualifier=AsyncTableEntryReader, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=val, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getHeader, postfix_operators=[], prefix_operators=['!'], qualifier=e, selectors=[MethodInvocation(arguments=[], member=isDeletion, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=connector, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getKeyHasher, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=hash, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=hash)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=val, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=hash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), LambdaExpression(body=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CandidateSet, sub_type=None)), parameters=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=computeIfAbsent, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), name=candidates)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CandidateSet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=nextOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArraySegment, sub_type=None)), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArraySegment, sub_type=None)), MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=versioned, postfix_operators=[], prefix_operators=[], qualifier=TableEntry, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Candidate, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=candidates, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nextOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getHeader, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getTotalLength, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=nextOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['EOFException']))], finally_block=None, label=None, resources=None) return[ClassCreator(arguments=[MemberReference(member=startOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entries, 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=CompactionArgs, sub_type=None))] end[}] END[}]
annotation[@] identifier[SneakyThrows] operator[SEP] identifier[IOException] operator[SEP] Keyword[class] operator[SEP] Keyword[private] identifier[CompactionArgs] identifier[parseEntries] operator[SEP] identifier[InputStream] identifier[input] , Keyword[long] identifier[startOffset] , Keyword[int] identifier[maxLength] operator[SEP] { identifier[val] identifier[entries] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[UUID] , identifier[CandidateSet] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[long] identifier[nextOffset] operator[=] identifier[startOffset] operator[SEP] Keyword[final] Keyword[long] identifier[maxOffset] operator[=] identifier[startOffset] operator[+] identifier[maxLength] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] identifier[nextOffset] operator[<] identifier[maxOffset] operator[SEP] { identifier[val] identifier[e] operator[=] identifier[AsyncTableEntryReader] operator[SEP] identifier[readEntryComponents] operator[SEP] identifier[input] , identifier[nextOffset] , Keyword[this] operator[SEP] identifier[connector] operator[SEP] identifier[getSerializer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[e] operator[SEP] identifier[getHeader] operator[SEP] operator[SEP] operator[SEP] identifier[isDeletion] operator[SEP] operator[SEP] operator[SEP] { identifier[val] identifier[hash] operator[=] Keyword[this] operator[SEP] identifier[connector] operator[SEP] identifier[getKeyHasher] operator[SEP] operator[SEP] operator[SEP] identifier[hash] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CandidateSet] identifier[candidates] operator[=] identifier[entries] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[hash] , identifier[h] operator[->] Keyword[new] identifier[CandidateSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[candidates] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Candidate] operator[SEP] identifier[nextOffset] , identifier[TableEntry] operator[SEP] identifier[versioned] operator[SEP] Keyword[new] identifier[ByteArraySegment] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] , Keyword[new] identifier[ByteArraySegment] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[count] operator[++] operator[SEP] identifier[nextOffset] operator[+=] identifier[e] operator[SEP] identifier[getHeader] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalLength] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[EOFException] identifier[ex] operator[SEP] { identifier[input] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[CompactionArgs] operator[SEP] identifier[startOffset] , identifier[nextOffset] , identifier[count] , identifier[entries] operator[SEP] operator[SEP] }
public static BoxMetadataCascadePolicy.Info create(final BoxAPIConnection api, String folderID, String scope, String templateKey) { URL url = GET_ALL_METADATA_CASCADE_POLICIES_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST"); JsonObject requestJSON = new JsonObject() .add("folder_id", folderID) .add("scope", scope) .add("templateKey", templateKey); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxMetadataCascadePolicy createdMetadataCascadePolicy = new BoxMetadataCascadePolicy(api, responseJSON.get("id").asString()); return createdMetadataCascadePolicy.new Info(responseJSON); }
class class_name[name] begin[{] method[create, return_type[type[BoxMetadataCascadePolicy]], modifier[public static], parameter[api, folderID, scope, templateKey]] begin[{] local_variable[type[URL], url] local_variable[type[BoxJSONRequest], request] local_variable[type[JsonObject], requestJSON] call[request.setBody, parameter[call[requestJSON.toString, parameter[]]]] local_variable[type[BoxJSONResponse], response] local_variable[type[JsonObject], responseJSON] local_variable[type[BoxMetadataCascadePolicy], createdMetadataCascadePolicy] return[InnerClassCreator(arguments=[MemberReference(member=responseJSON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=createdMetadataCascadePolicy, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Info, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BoxMetadataCascadePolicy] operator[SEP] identifier[Info] identifier[create] operator[SEP] Keyword[final] identifier[BoxAPIConnection] identifier[api] , identifier[String] identifier[folderID] , identifier[String] identifier[scope] , identifier[String] identifier[templateKey] operator[SEP] { identifier[URL] identifier[url] operator[=] identifier[GET_ALL_METADATA_CASCADE_POLICIES_URL_TEMPLATE] operator[SEP] identifier[build] operator[SEP] identifier[api] operator[SEP] identifier[getBaseURL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BoxJSONRequest] identifier[request] operator[=] Keyword[new] identifier[BoxJSONRequest] operator[SEP] identifier[api] , identifier[url] , literal[String] operator[SEP] operator[SEP] identifier[JsonObject] identifier[requestJSON] operator[=] Keyword[new] identifier[JsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[folderID] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[scope] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[templateKey] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setBody] operator[SEP] identifier[requestJSON] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BoxJSONResponse] identifier[response] operator[=] operator[SEP] identifier[BoxJSONResponse] operator[SEP] identifier[request] operator[SEP] identifier[send] operator[SEP] operator[SEP] operator[SEP] identifier[JsonObject] identifier[responseJSON] operator[=] identifier[JsonObject] operator[SEP] identifier[readFrom] operator[SEP] identifier[response] operator[SEP] identifier[getJSON] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BoxMetadataCascadePolicy] identifier[createdMetadataCascadePolicy] operator[=] Keyword[new] identifier[BoxMetadataCascadePolicy] operator[SEP] identifier[api] , identifier[responseJSON] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[createdMetadataCascadePolicy] operator[SEP] Keyword[new] identifier[Info] operator[SEP] identifier[responseJSON] operator[SEP] operator[SEP] }
@Override public final Integer generate(final Integer max) { final Integer result; if (max < LOWER_LIMIT) { LOGGER.warn( "Received {} as maximum value, but this is lower than {}", max, LOWER_LIMIT); result = 0; } else { result = random.nextInt(Math.abs(LOWER_LIMIT - max) + 1) + LOWER_LIMIT; } return result; }
class class_name[name] begin[{] method[generate, return_type[type[Integer]], modifier[final public], parameter[max]] begin[{] local_variable[type[Integer], result] if[binary_operation[member[.max], <, member[.LOWER_LIMIT]]] begin[{] call[LOGGER.warn, parameter[literal["Received {} as maximum value, but this is lower than {}"], member[.max], member[.LOWER_LIMIT]]] assign[member[.result], literal[0]] else begin[{] assign[member[.result], binary_operation[call[random.nextInt, parameter[binary_operation[call[Math.abs, parameter[binary_operation[member[.LOWER_LIMIT], -, member[.max]]]], +, literal[1]]]], +, member[.LOWER_LIMIT]]] end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Integer] identifier[generate] operator[SEP] Keyword[final] identifier[Integer] identifier[max] operator[SEP] { Keyword[final] identifier[Integer] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[max] operator[<] identifier[LOWER_LIMIT] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[max] , identifier[LOWER_LIMIT] operator[SEP] operator[SEP] identifier[result] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[result] operator[=] identifier[random] operator[SEP] identifier[nextInt] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[LOWER_LIMIT] operator[-] identifier[max] operator[SEP] operator[+] Other[1] operator[SEP] operator[+] identifier[LOWER_LIMIT] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private Task<Exec.Result> getBuildTask(final String hash, final InputStream body) { Task<Exec.Result> existing = _inFlightBuildTasks.get(hash); if (existing != null) { LOG.info("using in flight shareable: " + hash); return existing.shareable(); } else { Task<Exec.Result> newBuildTask = createNewBuildTask(hash, body); existing = _inFlightBuildTasks.putIfAbsent(hash, newBuildTask); if (existing != null) { LOG.info("using in flight shareable: " + hash); return existing.shareable(); } else { return newBuildTask; } } }
class class_name[name] begin[{] method[getBuildTask, return_type[type[Task]], modifier[private], parameter[hash, body]] begin[{] local_variable[type[Task], existing] if[binary_operation[member[.existing], !=, literal[null]]] begin[{] call[LOG.info, parameter[binary_operation[literal["using in flight shareable: "], +, member[.hash]]]] return[call[existing.shareable, parameter[]]] else begin[{] local_variable[type[Task], newBuildTask] assign[member[.existing], call[_inFlightBuildTasks.putIfAbsent, parameter[member[.hash], member[.newBuildTask]]]] if[binary_operation[member[.existing], !=, literal[null]]] begin[{] call[LOG.info, parameter[binary_operation[literal["using in flight shareable: "], +, member[.hash]]]] return[call[existing.shareable, parameter[]]] else begin[{] return[member[.newBuildTask]] end[}] end[}] end[}] END[}]
Keyword[private] identifier[Task] operator[<] identifier[Exec] operator[SEP] identifier[Result] operator[>] identifier[getBuildTask] operator[SEP] Keyword[final] identifier[String] identifier[hash] , Keyword[final] identifier[InputStream] identifier[body] operator[SEP] { identifier[Task] operator[<] identifier[Exec] operator[SEP] identifier[Result] operator[>] identifier[existing] operator[=] identifier[_inFlightBuildTasks] operator[SEP] identifier[get] operator[SEP] identifier[hash] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existing] operator[!=] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[hash] operator[SEP] operator[SEP] Keyword[return] identifier[existing] operator[SEP] identifier[shareable] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Task] operator[<] identifier[Exec] operator[SEP] identifier[Result] operator[>] identifier[newBuildTask] operator[=] identifier[createNewBuildTask] operator[SEP] identifier[hash] , identifier[body] operator[SEP] operator[SEP] identifier[existing] operator[=] identifier[_inFlightBuildTasks] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[hash] , identifier[newBuildTask] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existing] operator[!=] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[hash] operator[SEP] operator[SEP] Keyword[return] identifier[existing] operator[SEP] identifier[shareable] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[newBuildTask] operator[SEP] } } }
public <T0, T1> SingleOutputStreamOperator<Tuple2<T0, T1>> projectTuple2() { TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType()); TupleTypeInfo<Tuple2<T0, T1>> tType = new TupleTypeInfo<Tuple2<T0, T1>>(fTypes); return dataStream.transform("Projection", tType, new StreamProject<IN, Tuple2<T0, T1>>(fieldIndexes, tType.createSerializer(dataStream.getExecutionConfig()))); }
class class_name[name] begin[{] method[projectTuple2, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[]] begin[{] local_variable[type[TypeInformation], fTypes] local_variable[type[TupleTypeInfo], tType] return[call[dataStream.transform, parameter[literal["Projection"], member[.tType], ClassCreator(arguments=[MemberReference(member=fieldIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExecutionConfig, postfix_operators=[], prefix_operators=[], qualifier=dataStream, selectors=[], type_arguments=None)], member=createSerializer, postfix_operators=[], prefix_operators=[], qualifier=tType, 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=IN, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T0, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T1, sub_type=None))], dimensions=[], name=Tuple2, sub_type=None))], dimensions=None, name=StreamProject, sub_type=None))]]] end[}] END[}]
Keyword[public] operator[<] identifier[T0] , identifier[T1] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[Tuple2] operator[<] identifier[T0] , identifier[T1] operator[>] operator[>] identifier[projectTuple2] operator[SEP] operator[SEP] { identifier[TypeInformation] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[fTypes] operator[=] identifier[extractFieldTypes] operator[SEP] identifier[fieldIndexes] , identifier[dataStream] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] identifier[Tuple2] operator[<] identifier[T0] , identifier[T1] operator[>] operator[>] identifier[tType] operator[=] Keyword[new] identifier[TupleTypeInfo] operator[<] identifier[Tuple2] operator[<] identifier[T0] , identifier[T1] operator[>] operator[>] operator[SEP] identifier[fTypes] operator[SEP] operator[SEP] Keyword[return] identifier[dataStream] operator[SEP] identifier[transform] operator[SEP] literal[String] , identifier[tType] , Keyword[new] identifier[StreamProject] operator[<] identifier[IN] , identifier[Tuple2] operator[<] identifier[T0] , identifier[T1] operator[>] operator[>] operator[SEP] identifier[fieldIndexes] , identifier[tType] operator[SEP] identifier[createSerializer] operator[SEP] identifier[dataStream] operator[SEP] identifier[getExecutionConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public float getBeginnings(int i) { if (DocumentLine_Type.featOkTst && ((DocumentLine_Type)jcasType).casFeat_beginnings == null) jcasType.jcas.throwFeatMissing("beginnings", "ch.epfl.bbp.uima.types.DocumentLine"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_beginnings), i); return jcasType.ll_cas.ll_getFloatArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_beginnings), i);}
class class_name[name] begin[{] method[getBeginnings, return_type[type[float]], modifier[public], parameter[i]] begin[{] if[binary_operation[member[DocumentLine_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DocumentLine_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["beginnings"], literal["ch.epfl.bbp.uima.types.DocumentLine"]]] else begin[{] None end[}] call[jcasType.jcas.checkArrayBounds, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DocumentLine_Type, sub_type=None))]], member[.i]]] return[call[jcasType.ll_cas.ll_getFloatArrayValue, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DocumentLine_Type, sub_type=None))]], member[.i]]]] end[}] END[}]
Keyword[public] Keyword[float] identifier[getBeginnings] operator[SEP] Keyword[int] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[DocumentLine_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[DocumentLine_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_beginnings] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[checkArrayBounds] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[DocumentLine_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_beginnings] operator[SEP] , identifier[i] operator[SEP] operator[SEP] Keyword[return] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFloatArrayValue] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[DocumentLine_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_beginnings] operator[SEP] , identifier[i] operator[SEP] operator[SEP] }
protected void initHostCollectors() { for (int i = 0; i < configuration.getNumberOfGcThreads(); i++) { ReferenceQueue<BaseDataBuffer> queue = new ReferenceQueue<>(); UnifiedGarbageCollectorThread uThread = new UnifiedGarbageCollectorThread(i, queue); // all GC threads should be attached to default device Nd4j.getAffinityManager().attachThreadToDevice(uThread, getDeviceId()); queueMap.put(i, queue); uThread.start(); collectorsUnified.put(i, uThread); /* ZeroGarbageCollectorThread zThread = new ZeroGarbageCollectorThread((long) i, shouldStop); zThread.start(); collectorsZero.put((long) i, zThread); */ } }
class class_name[name] begin[{] method[initHostCollectors, return_type[void], modifier[protected], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ReferenceQueue, sub_type=None)), name=queue)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BaseDataBuffer, sub_type=None))], dimensions=[], name=ReferenceQueue, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queue, 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=UnifiedGarbageCollectorThread, sub_type=None)), name=uThread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UnifiedGarbageCollectorThread, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getAffinityManager, postfix_operators=[], prefix_operators=[], qualifier=Nd4j, selectors=[MethodInvocation(arguments=[MemberReference(member=uThread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDeviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=attachThreadToDevice, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=queueMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=uThread, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uThread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=collectorsUnified, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumberOfGcThreads, postfix_operators=[], prefix_operators=[], qualifier=configuration, 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) end[}] END[}]
Keyword[protected] Keyword[void] identifier[initHostCollectors] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[configuration] operator[SEP] identifier[getNumberOfGcThreads] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ReferenceQueue] operator[<] identifier[BaseDataBuffer] operator[>] identifier[queue] operator[=] Keyword[new] identifier[ReferenceQueue] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[UnifiedGarbageCollectorThread] identifier[uThread] operator[=] Keyword[new] identifier[UnifiedGarbageCollectorThread] operator[SEP] identifier[i] , identifier[queue] operator[SEP] operator[SEP] identifier[Nd4j] operator[SEP] identifier[getAffinityManager] operator[SEP] operator[SEP] operator[SEP] identifier[attachThreadToDevice] operator[SEP] identifier[uThread] , identifier[getDeviceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[queueMap] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[queue] operator[SEP] operator[SEP] identifier[uThread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[collectorsUnified] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[uThread] operator[SEP] operator[SEP] } }
public static void registerConstructor(String module, String classname, IObjectConstructor constructor) { objectConstructors.put(module + "." + classname, constructor); }
class class_name[name] begin[{] method[registerConstructor, return_type[void], modifier[public static], parameter[module, classname, constructor]] begin[{] call[objectConstructors.put, parameter[binary_operation[binary_operation[member[.module], +, literal["."]], +, member[.classname]], member[.constructor]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[registerConstructor] operator[SEP] identifier[String] identifier[module] , identifier[String] identifier[classname] , identifier[IObjectConstructor] identifier[constructor] operator[SEP] { identifier[objectConstructors] operator[SEP] identifier[put] operator[SEP] identifier[module] operator[+] literal[String] operator[+] identifier[classname] , identifier[constructor] operator[SEP] operator[SEP] }
public Observable<ServiceEndpointPolicyInner> createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName, parameters).map(new Func1<ServiceResponse<ServiceEndpointPolicyInner>, ServiceEndpointPolicyInner>() { @Override public ServiceEndpointPolicyInner call(ServiceResponse<ServiceEndpointPolicyInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serviceEndpointPolicyName, parameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serviceEndpointPolicyName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceEndpointPolicyInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serviceEndpointPolicyName] , identifier[ServiceEndpointPolicyInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serviceEndpointPolicyName] , identifier[parameters] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ServiceEndpointPolicyInner] operator[>] , identifier[ServiceEndpointPolicyInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ServiceEndpointPolicyInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ServiceEndpointPolicyInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@SuppressWarnings("null") protected final Resource getRootResource(SlingHttpServletRequest request) { String path = RequestParam.get(request, RP_PATH); if (StringUtils.isEmpty(path) && request.getResource() != null) { path = request.getResource().getPath(); } if (StringUtils.isNotEmpty(path)) { path = StringUtils.removeEnd(path, "/" + JcrConstants.JCR_CONTENT); return request.getResourceResolver().getResource(path); } return null; }
class class_name[name] begin[{] method[getRootResource, return_type[type[Resource]], modifier[final protected], parameter[request]] begin[{] local_variable[type[String], path] if[binary_operation[call[StringUtils.isEmpty, parameter[member[.path]]], &&, binary_operation[call[request.getResource, parameter[]], !=, literal[null]]]] begin[{] assign[member[.path], call[request.getResource, parameter[]]] else begin[{] None end[}] if[call[StringUtils.isNotEmpty, parameter[member[.path]]]] begin[{] assign[member[.path], call[StringUtils.removeEnd, parameter[member[.path], binary_operation[literal["/"], +, member[JcrConstants.JCR_CONTENT]]]]] return[call[request.getResourceResolver, parameter[]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[final] identifier[Resource] identifier[getRootResource] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[RequestParam] operator[SEP] identifier[get] operator[SEP] identifier[request] , identifier[RP_PATH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[path] operator[SEP] operator[&&] identifier[request] operator[SEP] identifier[getResource] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[path] operator[=] identifier[request] operator[SEP] identifier[getResource] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[path] operator[=] identifier[StringUtils] operator[SEP] identifier[removeEnd] operator[SEP] identifier[path] , literal[String] operator[+] identifier[JcrConstants] operator[SEP] identifier[JCR_CONTENT] operator[SEP] operator[SEP] Keyword[return] identifier[request] operator[SEP] identifier[getResourceResolver] operator[SEP] operator[SEP] operator[SEP] identifier[getResource] operator[SEP] identifier[path] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static com.liferay.commerce.model.CommerceAvailabilityEstimate fetchCommerceAvailabilityEstimateByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchCommerceAvailabilityEstimateByUuidAndGroupId(uuid, groupId); }
class class_name[name] begin[{] method[fetchCommerceAvailabilityEstimateByUuidAndGroupId, return_type[type[com]], modifier[public static], parameter[uuid, groupId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CommerceAvailabilityEstimate] identifier[fetchCommerceAvailabilityEstimateByUuidAndGroupId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[fetchCommerceAvailabilityEstimateByUuidAndGroupId] operator[SEP] identifier[uuid] , identifier[groupId] operator[SEP] operator[SEP] }
InputSource createInputSource(byte[] data, String systemId) { InputSource result = new InputSource(new ByteArrayInputStream(data)); result.setSystemId(systemId); return result; }
class class_name[name] begin[{] method[createInputSource, return_type[type[InputSource]], modifier[default], parameter[data, systemId]] begin[{] local_variable[type[InputSource], result] call[result.setSystemId, parameter[member[.systemId]]] return[member[.result]] end[}] END[}]
identifier[InputSource] identifier[createInputSource] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[String] identifier[systemId] operator[SEP] { identifier[InputSource] identifier[result] operator[=] Keyword[new] identifier[InputSource] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setSystemId] operator[SEP] identifier[systemId] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override public void enqueue(final String queue, final Job job) { validateArguments(queue, job); try { doEnqueue(queue, ObjectMapperFactory.get().writeValueAsString(job)); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[enqueue, return_type[void], modifier[public], parameter[queue, job]] begin[{] call[.validateArguments, parameter[member[.queue], member[.job]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=queue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=ObjectMapperFactory, selectors=[MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeValueAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=doEnqueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RuntimeException'])), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[enqueue] operator[SEP] Keyword[final] identifier[String] identifier[queue] , Keyword[final] identifier[Job] identifier[job] operator[SEP] { identifier[validateArguments] operator[SEP] identifier[queue] , identifier[job] operator[SEP] operator[SEP] Keyword[try] { identifier[doEnqueue] operator[SEP] identifier[queue] , identifier[ObjectMapperFactory] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[writeValueAsString] operator[SEP] identifier[job] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[re] operator[SEP] { Keyword[throw] identifier[re] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
@Override public Object visit(Within filter, Object userData) { String finalName = parsePropertyName(geomName, userData); return SpatialRestrictions.within(finalName, asGeometry(getLiteralValue(filter.getExpression2()))); }
class class_name[name] begin[{] method[visit, return_type[type[Object]], modifier[public], parameter[filter, userData]] begin[{] local_variable[type[String], finalName] return[call[SpatialRestrictions.within, parameter[member[.finalName], call[.asGeometry, parameter[call[.getLiteralValue, parameter[call[filter.getExpression2, parameter[]]]]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[visit] operator[SEP] identifier[Within] identifier[filter] , identifier[Object] identifier[userData] operator[SEP] { identifier[String] identifier[finalName] operator[=] identifier[parsePropertyName] operator[SEP] identifier[geomName] , identifier[userData] operator[SEP] operator[SEP] Keyword[return] identifier[SpatialRestrictions] operator[SEP] identifier[within] operator[SEP] identifier[finalName] , identifier[asGeometry] operator[SEP] identifier[getLiteralValue] operator[SEP] identifier[filter] operator[SEP] identifier[getExpression2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(RestoreDomainAccessRequest restoreDomainAccessRequest, ProtocolMarshaller protocolMarshaller) { if (restoreDomainAccessRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(restoreDomainAccessRequest.getFleetArn(), FLEETARN_BINDING); protocolMarshaller.marshall(restoreDomainAccessRequest.getDomainName(), DOMAINNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[restoreDomainAccessRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.restoreDomainAccessRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFleetArn, postfix_operators=[], prefix_operators=[], qualifier=restoreDomainAccessRequest, selectors=[], type_arguments=None), MemberReference(member=FLEETARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDomainName, postfix_operators=[], prefix_operators=[], qualifier=restoreDomainAccessRequest, selectors=[], type_arguments=None), MemberReference(member=DOMAINNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], 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=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[RestoreDomainAccessRequest] identifier[restoreDomainAccessRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[restoreDomainAccessRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[restoreDomainAccessRequest] operator[SEP] identifier[getFleetArn] operator[SEP] operator[SEP] , identifier[FLEETARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[restoreDomainAccessRequest] operator[SEP] identifier[getDomainName] operator[SEP] operator[SEP] , identifier[DOMAINNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void replaceOrAdd(String name, String value) { boolean found = false; for (Param param : params) { if (param.getKey().equals(name)) { param.setValue(value); found = true; break; } } if (!found) { addParam(name, value); } }
class class_name[name] begin[{] method[replaceOrAdd, return_type[void], modifier[public], parameter[name, value]] begin[{] local_variable[type[boolean], found] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Param, sub_type=None))), label=None) if[member[.found]] begin[{] call[.addParam, parameter[member[.name], member[.value]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[replaceOrAdd] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Param] identifier[param] operator[:] identifier[params] operator[SEP] { Keyword[if] operator[SEP] identifier[param] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[param] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[found] operator[SEP] { identifier[addParam] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] } }
public static String toHTML(Node node) throws ExpressionException { if (Node.DOCUMENT_NODE == node.getNodeType()) return toHTML(XMLUtil.getRootElement(node, true)); StringBuilder sb = new StringBuilder(); toHTML(node, sb); return sb.toString(); }
class class_name[name] begin[{] method[toHTML, return_type[type[String]], modifier[public static], parameter[node]] begin[{] if[binary_operation[member[Node.DOCUMENT_NODE], ==, call[node.getNodeType, parameter[]]]] begin[{] return[call[.toHTML, parameter[call[XMLUtil.getRootElement, parameter[member[.node], literal[true]]]]]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] call[.toHTML, parameter[member[.node], member[.sb]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toHTML] operator[SEP] identifier[Node] identifier[node] operator[SEP] Keyword[throws] identifier[ExpressionException] { Keyword[if] operator[SEP] identifier[Node] operator[SEP] identifier[DOCUMENT_NODE] operator[==] identifier[node] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[toHTML] operator[SEP] identifier[XMLUtil] operator[SEP] identifier[getRootElement] operator[SEP] identifier[node] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[toHTML] operator[SEP] identifier[node] , identifier[sb] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static String canonicalPath(String path) { if (path == null || path.isEmpty()) return path; boolean slash = true; int end = path.length(); int i = 0; loop: while (i < end) { char c = path.charAt(i); switch (c) { case '/': slash = true; break; case '.': if (slash) break loop; slash = false; break; default: slash = false; } i++; } if (i == end) return path; StringBuilder canonical = new StringBuilder(path.length()); canonical.append(path, 0, i); int dots = 1; i++; while (i <= end) { char c = i < end ? path.charAt(i) : '\0'; switch (c) { case '\0': case '/': switch (dots) { case 0: if (c != '\0') canonical.append(c); break; case 1: break; case 2: if (canonical.length() < 2) return null; canonical.setLength(canonical.length() - 1); canonical.setLength(canonical.lastIndexOf("/") + 1); break; default: while (dots-- > 0) canonical.append('.'); if (c != '\0') canonical.append(c); } slash = true; dots = 0; break; case '.': if (dots > 0) dots++; else if (slash) dots = 1; else canonical.append('.'); slash = false; break; default: while (dots-- > 0) canonical.append('.'); canonical.append(c); dots = 0; slash = false; } i++; } return canonical.toString(); }
class class_name[name] begin[{] method[canonicalPath, return_type[type[String]], modifier[public static], parameter[path]] begin[{] if[binary_operation[binary_operation[member[.path], ==, literal[null]], ||, call[path.isEmpty, parameter[]]]] begin[{] return[member[.path]] else begin[{] None end[}] local_variable[type[boolean], slash] local_variable[type[int], end] local_variable[type[int], i] while[binary_operation[member[.i], <, member[.end]]] begin[{] local_variable[type[char], c] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], statements=[IfStatement(condition=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BreakStatement(goto=loop, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])], expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) member[.i] end[}] if[binary_operation[member[.i], ==, member[.end]]] begin[{] return[member[.path]] else begin[{] None end[}] local_variable[type[StringBuilder], canonical] call[canonical.append, parameter[member[.path], literal[0], member[.i]]] local_variable[type[int], dots] member[.i] while[binary_operation[member[.i], <=, member[.end]]] begin[{] local_variable[type[char], c] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\0'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None)), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=setLength, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=setLength, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[WhileStatement(body=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), condition=BinaryOperation(operandl=MemberReference(member=dots, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None))])], expression=MemberReference(member=dots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=IfStatement(condition=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=dots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)), label=None, then_statement=StatementExpression(expression=MemberReference(member=dots, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[WhileStatement(body=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), condition=BinaryOperation(operandl=MemberReference(member=dots, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=canonical, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=slash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])], expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) member[.i] end[}] return[call[canonical.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[canonicalPath] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[||] identifier[path] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[path] operator[SEP] Keyword[boolean] identifier[slash] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[loop] operator[:] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[end] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[path] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[c] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[slash] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[slash] operator[SEP] Keyword[break] identifier[loop] operator[SEP] identifier[slash] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[slash] operator[=] literal[boolean] operator[SEP] } identifier[i] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[==] identifier[end] operator[SEP] Keyword[return] identifier[path] operator[SEP] identifier[StringBuilder] identifier[canonical] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] identifier[path] , Other[0] , identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[dots] operator[=] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<=] identifier[end] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[i] operator[<] identifier[end] operator[?] identifier[path] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[:] literal[String] operator[SEP] Keyword[switch] operator[SEP] identifier[c] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[switch] operator[SEP] identifier[dots] operator[SEP] { Keyword[case] Other[0] operator[:] Keyword[if] operator[SEP] identifier[c] operator[!=] literal[String] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[1] operator[:] Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] Keyword[if] operator[SEP] identifier[canonical] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[canonical] operator[SEP] identifier[setLength] operator[SEP] identifier[canonical] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[canonical] operator[SEP] identifier[setLength] operator[SEP] identifier[canonical] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[while] operator[SEP] identifier[dots] operator[--] operator[>] Other[0] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] literal[String] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } identifier[slash] operator[=] literal[boolean] operator[SEP] identifier[dots] operator[=] Other[0] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[dots] operator[>] Other[0] operator[SEP] identifier[dots] operator[++] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[slash] operator[SEP] identifier[dots] operator[=] Other[1] operator[SEP] Keyword[else] identifier[canonical] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[slash] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[while] operator[SEP] identifier[dots] operator[--] operator[>] Other[0] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[canonical] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[dots] operator[=] Other[0] operator[SEP] identifier[slash] operator[=] literal[boolean] operator[SEP] } identifier[i] operator[++] operator[SEP] } Keyword[return] identifier[canonical] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void setVertex(Vector3D v, float nx, float ny) { gl.glTexCoord2f(nx, ny); gl.glVertex3d(v.getX(), v.getY(), v.getZ()); }
class class_name[name] begin[{] method[setVertex, return_type[void], modifier[public], parameter[v, nx, ny]] begin[{] call[gl.glTexCoord2f, parameter[member[.nx], member[.ny]]] call[gl.glVertex3d, parameter[call[v.getX, parameter[]], call[v.getY, parameter[]], call[v.getZ, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setVertex] operator[SEP] identifier[Vector3D] identifier[v] , Keyword[float] identifier[nx] , Keyword[float] identifier[ny] operator[SEP] { identifier[gl] operator[SEP] identifier[glTexCoord2f] operator[SEP] identifier[nx] , identifier[ny] operator[SEP] operator[SEP] identifier[gl] operator[SEP] identifier[glVertex3d] operator[SEP] identifier[v] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[v] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , identifier[v] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String getVersion(InputStream is) { try { String text = readAsString(is); return getVersionFromText(text); } catch (IOException e) { LOG.error(e.getMessage(), e); return null; } }
class class_name[name] begin[{] method[getVersion, return_type[type[String]], modifier[public static], parameter[is]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=text)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getVersionFromText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, 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=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getVersion] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] { Keyword[try] { identifier[String] identifier[text] operator[=] identifier[readAsString] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[return] identifier[getVersionFromText] operator[SEP] identifier[text] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public static synchronized SystemConfiguration createSystemConfiguration( final Map<String, String> map) { if (self == null) { self = new SystemConfiguration(map); } return self; }
class class_name[name] begin[{] method[createSystemConfiguration, return_type[type[SystemConfiguration]], modifier[synchronized public static], parameter[map]] begin[{] if[binary_operation[member[.self], ==, literal[null]]] begin[{] assign[member[.self], ClassCreator(arguments=[MemberReference(member=map, 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=SystemConfiguration, sub_type=None))] else begin[{] None end[}] return[member[.self]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] identifier[SystemConfiguration] identifier[createSystemConfiguration] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[SEP] { Keyword[if] operator[SEP] identifier[self] operator[==] Other[null] operator[SEP] { identifier[self] operator[=] Keyword[new] identifier[SystemConfiguration] operator[SEP] identifier[map] operator[SEP] operator[SEP] } Keyword[return] identifier[self] operator[SEP] }
public static Sql getPreperSQL(String query, Map<String, Object> parameters) { SqlBuilder builder = new SqlBuilder(); return builder.getPreperSQLWithParameters(query, parameters); }
class class_name[name] begin[{] method[getPreperSQL, return_type[type[Sql]], modifier[public static], parameter[query, parameters]] begin[{] local_variable[type[SqlBuilder], builder] return[call[builder.getPreperSQLWithParameters, parameter[member[.query], member[.parameters]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Sql] identifier[getPreperSQL] operator[SEP] identifier[String] identifier[query] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[SEP] { identifier[SqlBuilder] identifier[builder] operator[=] Keyword[new] identifier[SqlBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[getPreperSQLWithParameters] operator[SEP] identifier[query] , identifier[parameters] operator[SEP] operator[SEP] }
public static ComponentFactory create(InputStream configuration) { ComponentFactory factory = null; factory = new ComponentFactory(LanguageConfigurationUtil.get(configuration)); return factory; }
class class_name[name] begin[{] method[create, return_type[type[ComponentFactory]], modifier[public static], parameter[configuration]] begin[{] local_variable[type[ComponentFactory], factory] assign[member[.factory], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=LanguageConfigurationUtil, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ComponentFactory, sub_type=None))] return[member[.factory]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ComponentFactory] identifier[create] operator[SEP] identifier[InputStream] identifier[configuration] operator[SEP] { identifier[ComponentFactory] identifier[factory] operator[=] Other[null] operator[SEP] identifier[factory] operator[=] Keyword[new] identifier[ComponentFactory] operator[SEP] identifier[LanguageConfigurationUtil] operator[SEP] identifier[get] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[factory] operator[SEP] }
private static Map<String, Spelling> findImports( Elements elementUtils, Types typeUtils, String codePackageName, Set<TypeMirror> referenced, Set<TypeMirror> defined) { Map<String, Spelling> imports = new HashMap<>(); Set<TypeMirror> typesInScope = new TypeMirrorSet(); typesInScope.addAll(referenced); typesInScope.addAll(defined); Set<String> ambiguous = ambiguousNames(typeUtils, typesInScope); for (TypeMirror type : referenced) { TypeElement typeElement = (TypeElement) typeUtils.asElement(type); String fullName = typeElement.getQualifiedName().toString(); String simpleName = typeElement.getSimpleName().toString(); String pkg = packageNameOf(typeElement); boolean importIt; String spelling; if (ambiguous.contains(simpleName)) { importIt = false; spelling = fullName; } else if (pkg.equals("java.lang")) { importIt = false; spelling = javaLangSpelling(elementUtils, codePackageName, typeElement); } else if (pkg.equals(codePackageName)) { importIt = false; spelling = fullName.substring(pkg.isEmpty() ? 0 : pkg.length() + 1); } else { importIt = true; spelling = simpleName; } imports.put(fullName, new Spelling(spelling, importIt)); } return imports; }
class class_name[name] begin[{] method[findImports, return_type[type[Map]], modifier[private static], parameter[elementUtils, typeUtils, codePackageName, referenced, defined]] begin[{] local_variable[type[Map], imports] local_variable[type[Set], typesInScope] call[typesInScope.addAll, parameter[member[.referenced]]] call[typesInScope.addAll, parameter[member[.defined]]] local_variable[type[Set], ambiguous] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asElement, postfix_operators=[], prefix_operators=[], qualifier=typeUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TypeElement, sub_type=None)), name=typeElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeElement, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=typeElement, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=fullName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=typeElement, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=simpleName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=typeElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=packageNameOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=pkg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=importIt)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=spelling)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=simpleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=ambiguous, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="java.lang")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=codePackageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=importIt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=spelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=simpleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=importIt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=spelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], member=substring, postfix_operators=[], prefix_operators=[], qualifier=fullName, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=importIt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=spelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=elementUtils, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=codePackageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=javaLangSpelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=importIt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=spelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=fullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=spelling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=importIt, 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=Spelling, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=imports, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=referenced, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeMirror, sub_type=None))), label=None) return[member[.imports]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Spelling] operator[>] identifier[findImports] operator[SEP] identifier[Elements] identifier[elementUtils] , identifier[Types] identifier[typeUtils] , identifier[String] identifier[codePackageName] , identifier[Set] operator[<] identifier[TypeMirror] operator[>] identifier[referenced] , identifier[Set] operator[<] identifier[TypeMirror] operator[>] identifier[defined] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Spelling] operator[>] identifier[imports] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[TypeMirror] operator[>] identifier[typesInScope] operator[=] Keyword[new] identifier[TypeMirrorSet] operator[SEP] operator[SEP] operator[SEP] identifier[typesInScope] operator[SEP] identifier[addAll] operator[SEP] identifier[referenced] operator[SEP] operator[SEP] identifier[typesInScope] operator[SEP] identifier[addAll] operator[SEP] identifier[defined] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[ambiguous] operator[=] identifier[ambiguousNames] operator[SEP] identifier[typeUtils] , identifier[typesInScope] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TypeMirror] identifier[type] operator[:] identifier[referenced] operator[SEP] { identifier[TypeElement] identifier[typeElement] operator[=] operator[SEP] identifier[TypeElement] operator[SEP] identifier[typeUtils] operator[SEP] identifier[asElement] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[String] identifier[fullName] operator[=] identifier[typeElement] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[simpleName] operator[=] identifier[typeElement] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[pkg] operator[=] identifier[packageNameOf] operator[SEP] identifier[typeElement] operator[SEP] operator[SEP] Keyword[boolean] identifier[importIt] operator[SEP] identifier[String] identifier[spelling] operator[SEP] Keyword[if] operator[SEP] identifier[ambiguous] operator[SEP] identifier[contains] operator[SEP] identifier[simpleName] operator[SEP] operator[SEP] { identifier[importIt] operator[=] literal[boolean] operator[SEP] identifier[spelling] operator[=] identifier[fullName] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pkg] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[importIt] operator[=] literal[boolean] operator[SEP] identifier[spelling] operator[=] identifier[javaLangSpelling] operator[SEP] identifier[elementUtils] , identifier[codePackageName] , identifier[typeElement] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pkg] operator[SEP] identifier[equals] operator[SEP] identifier[codePackageName] operator[SEP] operator[SEP] { identifier[importIt] operator[=] literal[boolean] operator[SEP] identifier[spelling] operator[=] identifier[fullName] operator[SEP] identifier[substring] operator[SEP] identifier[pkg] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[0] operator[:] identifier[pkg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[importIt] operator[=] literal[boolean] operator[SEP] identifier[spelling] operator[=] identifier[simpleName] operator[SEP] } identifier[imports] operator[SEP] identifier[put] operator[SEP] identifier[fullName] , Keyword[new] identifier[Spelling] operator[SEP] identifier[spelling] , identifier[importIt] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[imports] operator[SEP] }
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsCrawlingInfoParamCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsCrawlingInfoParamCA> aggsLambda) { CrawlingInfoParamCQ cq = new CrawlingInfoParamCQ(); if (queryLambda != null) { queryLambda.callback(cq); } FilterAggregationBuilder builder = regFilterA(name, cq.getQuery()); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { CrawlingInfoParamCA ca = new CrawlingInfoParamCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
class class_name[name] begin[{] method[filter, return_type[void], modifier[public], parameter[name, queryLambda, opLambda, aggsLambda]] begin[{] local_variable[type[CrawlingInfoParamCQ], cq] if[binary_operation[member[.queryLambda], !=, literal[null]]] begin[{] call[queryLambda.callback, parameter[member[.cq]]] else begin[{] None end[}] local_variable[type[FilterAggregationBuilder], builder] if[binary_operation[member[.opLambda], !=, literal[null]]] begin[{] call[opLambda.callback, parameter[member[.builder]]] else begin[{] None end[}] if[binary_operation[member[.aggsLambda], !=, literal[null]]] begin[{] local_variable[type[CrawlingInfoParamCA], ca] call[aggsLambda.callback, parameter[member[.ca]]] call[ca.getAggregationBuilderList, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[filter] operator[SEP] identifier[String] identifier[name] , identifier[EsAbstractConditionQuery] operator[SEP] identifier[OperatorCall] operator[<] identifier[BsCrawlingInfoParamCQ] operator[>] identifier[queryLambda] , identifier[ConditionOptionCall] operator[<] identifier[FilterAggregationBuilder] operator[>] identifier[opLambda] , identifier[OperatorCall] operator[<] identifier[BsCrawlingInfoParamCA] operator[>] identifier[aggsLambda] operator[SEP] { identifier[CrawlingInfoParamCQ] identifier[cq] operator[=] Keyword[new] identifier[CrawlingInfoParamCQ] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[queryLambda] operator[!=] Other[null] operator[SEP] { identifier[queryLambda] operator[SEP] identifier[callback] operator[SEP] identifier[cq] operator[SEP] operator[SEP] } identifier[FilterAggregationBuilder] identifier[builder] operator[=] identifier[regFilterA] operator[SEP] identifier[name] , identifier[cq] operator[SEP] identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[opLambda] operator[!=] Other[null] operator[SEP] { identifier[opLambda] operator[SEP] identifier[callback] operator[SEP] identifier[builder] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[aggsLambda] operator[!=] Other[null] operator[SEP] { identifier[CrawlingInfoParamCA] identifier[ca] operator[=] Keyword[new] identifier[CrawlingInfoParamCA] operator[SEP] operator[SEP] operator[SEP] identifier[aggsLambda] operator[SEP] identifier[callback] operator[SEP] identifier[ca] operator[SEP] operator[SEP] identifier[ca] operator[SEP] identifier[getAggregationBuilderList] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[builder] operator[::] identifier[subAggregation] operator[SEP] operator[SEP] } }
public WaitHttpConditionBuilder http() { HttpCondition condition = new HttpCondition(); container.setCondition(condition); return new WaitHttpConditionBuilder(condition, this); }
class class_name[name] begin[{] method[http, return_type[type[WaitHttpConditionBuilder]], modifier[public], parameter[]] begin[{] local_variable[type[HttpCondition], condition] call[container.setCondition, parameter[member[.condition]]] return[ClassCreator(arguments=[MemberReference(member=condition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WaitHttpConditionBuilder, sub_type=None))] end[}] END[}]
Keyword[public] identifier[WaitHttpConditionBuilder] identifier[http] operator[SEP] operator[SEP] { identifier[HttpCondition] identifier[condition] operator[=] Keyword[new] identifier[HttpCondition] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[setCondition] operator[SEP] identifier[condition] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[WaitHttpConditionBuilder] operator[SEP] identifier[condition] , Keyword[this] operator[SEP] operator[SEP] }
protected List<ENTITY> findColumns(List<Match> matches, String[] columns) { Query query = queryGenerator.getMiniSelectQuery(Arrays.asList(columns), matches); return findBySQL(query.getSql(), query.getParams()); }
class class_name[name] begin[{] method[findColumns, return_type[type[List]], modifier[protected], parameter[matches, columns]] begin[{] local_variable[type[Query], query] return[call[.findBySQL, parameter[call[query.getSql, parameter[]], call[query.getParams, parameter[]]]]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[ENTITY] operator[>] identifier[findColumns] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[matches] , identifier[String] operator[SEP] operator[SEP] identifier[columns] operator[SEP] { identifier[Query] identifier[query] operator[=] identifier[queryGenerator] operator[SEP] identifier[getMiniSelectQuery] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[columns] operator[SEP] , identifier[matches] operator[SEP] operator[SEP] Keyword[return] identifier[findBySQL] operator[SEP] identifier[query] operator[SEP] identifier[getSql] operator[SEP] operator[SEP] , identifier[query] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private Boolean booleanProperty(PropertyKey propertyKey) { Boolean value = null; String property = properties.getProperty(propertyKey.getKey()); if (property != null) { value = Boolean.valueOf(property); } return value; }
class class_name[name] begin[{] method[booleanProperty, return_type[type[Boolean]], modifier[private], parameter[propertyKey]] begin[{] local_variable[type[Boolean], value] local_variable[type[String], property] if[binary_operation[member[.property], !=, literal[null]]] begin[{] assign[member[.value], call[Boolean.valueOf, parameter[member[.property]]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[private] identifier[Boolean] identifier[booleanProperty] operator[SEP] identifier[PropertyKey] identifier[propertyKey] operator[SEP] { identifier[Boolean] identifier[value] operator[=] Other[null] operator[SEP] identifier[String] identifier[property] operator[=] identifier[properties] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyKey] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[property] operator[!=] Other[null] operator[SEP] { identifier[value] operator[=] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public static void readLines(File file, Charset charset, LineHandler lineHandler) throws IORuntimeException { FileReader.create(file, charset).readLines(lineHandler); }
class class_name[name] begin[{] method[readLines, return_type[void], modifier[public static], parameter[file, charset, lineHandler]] begin[{] call[FileReader.create, parameter[member[.file], member[.charset]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[readLines] operator[SEP] identifier[File] identifier[file] , identifier[Charset] identifier[charset] , identifier[LineHandler] identifier[lineHandler] operator[SEP] Keyword[throws] identifier[IORuntimeException] { identifier[FileReader] operator[SEP] identifier[create] operator[SEP] identifier[file] , identifier[charset] operator[SEP] operator[SEP] identifier[readLines] operator[SEP] identifier[lineHandler] operator[SEP] operator[SEP] }
private void initGraphics() { // Set initial size if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 || Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), 0.0) <= 0) { if (gauge.getPrefWidth() > 0 && gauge.getPrefHeight() > 0) { gauge.setPrefSize(gauge.getPrefWidth(), gauge.getPrefHeight()); } else { gauge.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT); } } barBackground = new Region(); barBackground.setBackground(new Background(new BackgroundFill(gauge.getBarBackgroundColor(), new CornerRadii(0.0, 0.0, 0.025, 0.025, true), Insets.EMPTY))); barClip = new Rectangle(); bar = new Rectangle(); bar.setFill(gauge.getBarColor()); bar.setStroke(null); bar.setClip(barClip); titleText = new Text(); titleText.setFill(gauge.getTitleColor()); Helper.enableNode(titleText, !gauge.getTitle().isEmpty()); valueText = new Text(); valueText.setFill(gauge.getValueColor()); Helper.enableNode(valueText, gauge.isValueVisible()); unitText = new Text(gauge.getUnit()); unitText.setFill(gauge.getUnitColor()); Helper.enableNode(unitText, !gauge.getUnit().isEmpty()); percentageText = new Text(); percentageText.setFill(gauge.getBarColor()); percentageUnitText = new Text("%"); percentageUnitText.setFill(gauge.getBarColor()); maxValueRect = new Rectangle(); maxValueRect.setFill(gauge.getThresholdColor()); maxValueText = new Text(String.format(locale, "%." + gauge.getTickLabelDecimals() + "f", gauge.getMaxValue())); maxValueText.setFill(gauge.getBackgroundPaint()); maxValueUnitText = new Text(gauge.getUnit()); maxValueUnitText.setFill(gauge.getBackgroundPaint()); pane = new Pane(barBackground, bar, titleText, valueText, unitText, percentageText, percentageUnitText, maxValueRect, maxValueText, maxValueUnitText); pane.setBorder(new Border(new BorderStroke(gauge.getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(PREFERRED_WIDTH * 0.025), new BorderWidths(gauge.getBorderWidth())))); pane.setBackground(new Background(new BackgroundFill(gauge.getBackgroundPaint(), new CornerRadii(PREFERRED_WIDTH * 0.025), Insets.EMPTY))); getChildren().setAll(pane); }
class class_name[name] begin[{] method[initGraphics, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[call[Double.compare, parameter[call[gauge.getPrefWidth, parameter[]], literal[0.0]]], <=, literal[0]], ||, binary_operation[call[Double.compare, parameter[call[gauge.getPrefHeight, parameter[]], literal[0.0]]], <=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[call[gauge.getWidth, parameter[]], literal[0.0]]], <=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[call[gauge.getHeight, parameter[]], literal[0.0]]], <=, literal[0]]]] begin[{] if[binary_operation[binary_operation[call[gauge.getPrefWidth, parameter[]], >, literal[0]], &&, binary_operation[call[gauge.getPrefHeight, parameter[]], >, literal[0]]]] begin[{] call[gauge.setPrefSize, parameter[call[gauge.getPrefWidth, parameter[]], call[gauge.getPrefHeight, parameter[]]]] else begin[{] call[gauge.setPrefSize, parameter[member[.PREFERRED_WIDTH], member[.PREFERRED_HEIGHT]]] end[}] else begin[{] None end[}] assign[member[.barBackground], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Region, sub_type=None))] call[barBackground.setBackground, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBarBackgroundColor, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.025), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.025), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CornerRadii, sub_type=None)), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=Insets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BackgroundFill, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Background, sub_type=None))]] assign[member[.barClip], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle, sub_type=None))] assign[member[.bar], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle, sub_type=None))] call[bar.setFill, parameter[call[gauge.getBarColor, parameter[]]]] call[bar.setStroke, parameter[literal[null]]] call[bar.setClip, parameter[member[.barClip]]] assign[member[.titleText], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[titleText.setFill, parameter[call[gauge.getTitleColor, parameter[]]]] call[Helper.enableNode, parameter[member[.titleText], call[gauge.getTitle, parameter[]]]] assign[member[.valueText], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[valueText.setFill, parameter[call[gauge.getValueColor, parameter[]]]] call[Helper.enableNode, parameter[member[.valueText], call[gauge.isValueVisible, parameter[]]]] assign[member[.unitText], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUnit, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[unitText.setFill, parameter[call[gauge.getUnitColor, parameter[]]]] call[Helper.enableNode, parameter[member[.unitText], call[gauge.getUnit, parameter[]]]] assign[member[.percentageText], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[percentageText.setFill, parameter[call[gauge.getBarColor, parameter[]]]] assign[member[.percentageUnitText], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[percentageUnitText.setFill, parameter[call[gauge.getBarColor, parameter[]]]] assign[member[.maxValueRect], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle, sub_type=None))] call[maxValueRect.setFill, parameter[call[gauge.getThresholdColor, parameter[]]]] assign[member[.maxValueText], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%."), operandr=MethodInvocation(arguments=[], member=getTickLabelDecimals, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f"), operator=+), MethodInvocation(arguments=[], member=getMaxValue, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[maxValueText.setFill, parameter[call[gauge.getBackgroundPaint, parameter[]]]] assign[member[.maxValueUnitText], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUnit, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[maxValueUnitText.setFill, parameter[call[gauge.getBackgroundPaint, parameter[]]]] assign[member[.pane], ClassCreator(arguments=[MemberReference(member=barBackground, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=titleText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=valueText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=unitText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=percentageText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=percentageUnitText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxValueRect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxValueText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxValueUnitText, 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=Pane, sub_type=None))] call[pane.setBorder, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBorderPaint, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None), MemberReference(member=SOLID, postfix_operators=[], prefix_operators=[], qualifier=BorderStrokeStyle, selectors=[]), ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.025), operator=*)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CornerRadii, sub_type=None)), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBorderWidth, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderWidths, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderStroke, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Border, sub_type=None))]] call[pane.setBackground, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBackgroundPaint, postfix_operators=[], prefix_operators=[], qualifier=gauge, selectors=[], type_arguments=None), ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.025), operator=*)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CornerRadii, sub_type=None)), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=Insets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BackgroundFill, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Background, sub_type=None))]] call[.getChildren, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initGraphics] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[gauge] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[gauge] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[gauge] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[gauge] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[gauge] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[gauge] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[gauge] operator[SEP] identifier[setPrefSize] operator[SEP] identifier[gauge] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] , identifier[gauge] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[gauge] operator[SEP] identifier[setPrefSize] operator[SEP] identifier[PREFERRED_WIDTH] , identifier[PREFERRED_HEIGHT] operator[SEP] operator[SEP] } } identifier[barBackground] operator[=] Keyword[new] identifier[Region] operator[SEP] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setBackground] operator[SEP] Keyword[new] identifier[Background] operator[SEP] Keyword[new] identifier[BackgroundFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBarBackgroundColor] operator[SEP] operator[SEP] , Keyword[new] identifier[CornerRadii] operator[SEP] literal[Float] , literal[Float] , literal[Float] , literal[Float] , literal[boolean] operator[SEP] , identifier[Insets] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[barClip] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] operator[SEP] operator[SEP] identifier[bar] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBarColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setStroke] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setClip] operator[SEP] identifier[barClip] operator[SEP] operator[SEP] identifier[titleText] operator[=] Keyword[new] identifier[Text] operator[SEP] operator[SEP] operator[SEP] identifier[titleText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getTitleColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Helper] operator[SEP] identifier[enableNode] operator[SEP] identifier[titleText] , operator[!] identifier[gauge] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[valueText] operator[=] Keyword[new] identifier[Text] operator[SEP] operator[SEP] operator[SEP] identifier[valueText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getValueColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Helper] operator[SEP] identifier[enableNode] operator[SEP] identifier[valueText] , identifier[gauge] operator[SEP] identifier[isValueVisible] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[unitText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[gauge] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[unitText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getUnitColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Helper] operator[SEP] identifier[enableNode] operator[SEP] identifier[unitText] , operator[!] identifier[gauge] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageText] operator[=] Keyword[new] identifier[Text] operator[SEP] operator[SEP] operator[SEP] identifier[percentageText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBarColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[=] Keyword[new] identifier[Text] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBarColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueRect] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueRect] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getThresholdColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[locale] , literal[String] operator[+] identifier[gauge] operator[SEP] identifier[getTickLabelDecimals] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[gauge] operator[SEP] identifier[getMaxValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBackgroundPaint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueUnitText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[gauge] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxValueUnitText] operator[SEP] identifier[setFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBackgroundPaint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[=] Keyword[new] identifier[Pane] operator[SEP] identifier[barBackground] , identifier[bar] , identifier[titleText] , identifier[valueText] , identifier[unitText] , identifier[percentageText] , identifier[percentageUnitText] , identifier[maxValueRect] , identifier[maxValueText] , identifier[maxValueUnitText] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[setBorder] operator[SEP] Keyword[new] identifier[Border] operator[SEP] Keyword[new] identifier[BorderStroke] operator[SEP] identifier[gauge] operator[SEP] identifier[getBorderPaint] operator[SEP] operator[SEP] , identifier[BorderStrokeStyle] operator[SEP] identifier[SOLID] , Keyword[new] identifier[CornerRadii] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] , Keyword[new] identifier[BorderWidths] operator[SEP] identifier[gauge] operator[SEP] identifier[getBorderWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[setBackground] operator[SEP] Keyword[new] identifier[Background] operator[SEP] Keyword[new] identifier[BackgroundFill] operator[SEP] identifier[gauge] operator[SEP] identifier[getBackgroundPaint] operator[SEP] operator[SEP] , Keyword[new] identifier[CornerRadii] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] , identifier[Insets] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[setAll] operator[SEP] identifier[pane] operator[SEP] operator[SEP] }
protected HttpServletRequest getCurrentHttpRequest() { HttpServletRequest request = RequestContextListener.getRequest(); if (request == null) { throw new PetiteException("No HTTP request bound to the current thread. Is RequestContextListener registered?"); } return request; }
class class_name[name] begin[{] method[getCurrentHttpRequest, return_type[type[HttpServletRequest]], modifier[protected], parameter[]] begin[{] local_variable[type[HttpServletRequest], request] if[binary_operation[member[.request], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No HTTP request bound to the current thread. Is RequestContextListener registered?")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PetiteException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.request]] end[}] END[}]
Keyword[protected] identifier[HttpServletRequest] identifier[getCurrentHttpRequest] operator[SEP] operator[SEP] { identifier[HttpServletRequest] identifier[request] operator[=] identifier[RequestContextListener] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[request] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[PetiteException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[request] operator[SEP] }
@Override public String parse(JsonPullParser parser, OnJsonObjectAddListener listener) throws IOException, JsonFormatException { if (parser == null) { throw new IllegalArgumentException(); } State state = parser.getEventType(); switch (state) { case VALUE_NULL: return null; case VALUE_STRING: return parser.getValueString(); default: throw new IllegalStateException(); } }
class class_name[name] begin[{] method[parse, return_type[type[String]], modifier[public], parameter[parser, listener]] begin[{] if[binary_operation[member[.parser], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], 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[State], state] SwitchStatement(cases=[SwitchStatementCase(case=['VALUE_NULL'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), SwitchStatementCase(case=['VALUE_STRING'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getValueString, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])], expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[parse] operator[SEP] identifier[JsonPullParser] identifier[parser] , identifier[OnJsonObjectAddListener] identifier[listener] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonFormatException] { Keyword[if] operator[SEP] identifier[parser] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } identifier[State] identifier[state] operator[=] identifier[parser] operator[SEP] identifier[getEventType] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[VALUE_NULL] operator[:] Keyword[return] Other[null] operator[SEP] Keyword[case] identifier[VALUE_STRING] operator[:] Keyword[return] identifier[parser] operator[SEP] identifier[getValueString] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] operator[SEP] operator[SEP] } }
@Override public ImmutableSet<Variable> getVariables(QueryNode node) { if (node instanceof ExplicitVariableProjectionNode) { return ((ExplicitVariableProjectionNode) node).getVariables(); } else { return getProjectedVariableStream(node) .collect(ImmutableCollectors.toSet()); } }
class class_name[name] begin[{] method[getVariables, return_type[type[ImmutableSet]], modifier[public], parameter[node]] begin[{] if[binary_operation[member[.node], instanceof, type[ExplicitVariableProjectionNode]]] begin[{] return[Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ExplicitVariableProjectionNode, sub_type=None))] else begin[{] return[call[.getProjectedVariableStream, parameter[member[.node]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ImmutableSet] operator[<] identifier[Variable] operator[>] identifier[getVariables] operator[SEP] identifier[QueryNode] identifier[node] operator[SEP] { Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[ExplicitVariableProjectionNode] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[ExplicitVariableProjectionNode] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[getProjectedVariableStream] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[ImmutableCollectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private void hqr2BackTransformation(int nn, int low, int high) { for(int j = nn - 1; j >= low; j--) { final int last = j < high ? j : high; for(int i = low; i <= high; i++) { final double[] Vi = V[i]; double sum = 0.; for(int k = low; k <= last; k++) { sum += Vi[k] * H[k][j]; } Vi[j] = sum; } } }
class class_name[name] begin[{] method[hqr2BackTransformation, return_type[void], modifier[private], parameter[nn, low, high]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), if_false=MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=last)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=V, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=Vi)], modifiers={'final'}, type=BasicType(dimensions=[None], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.), name=sum)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=Vi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=H, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=low, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Vi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=sum, 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=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=low, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=low, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=nn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[hqr2BackTransformation] operator[SEP] Keyword[int] identifier[nn] , Keyword[int] identifier[low] , Keyword[int] identifier[high] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[nn] operator[-] Other[1] operator[SEP] identifier[j] operator[>=] identifier[low] operator[SEP] identifier[j] operator[--] operator[SEP] { Keyword[final] Keyword[int] identifier[last] operator[=] identifier[j] operator[<] identifier[high] operator[?] identifier[j] operator[:] identifier[high] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[low] operator[SEP] identifier[i] operator[<=] identifier[high] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[Vi] operator[=] identifier[V] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] identifier[low] operator[SEP] identifier[k] operator[<=] identifier[last] operator[SEP] identifier[k] operator[++] operator[SEP] { identifier[sum] operator[+=] identifier[Vi] operator[SEP] identifier[k] operator[SEP] operator[*] identifier[H] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[SEP] } identifier[Vi] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[sum] operator[SEP] } } }
public CircuitGroupUnblockingMessage createCGU(int cic) { CircuitGroupUnblockingMessage msg = createCGU(); CircuitIdentificationCode code = this.parameterFactory.createCircuitIdentificationCode(); code.setCIC(cic); msg.setCircuitIdentificationCode(code); return msg; }
class class_name[name] begin[{] method[createCGU, return_type[type[CircuitGroupUnblockingMessage]], modifier[public], parameter[cic]] begin[{] local_variable[type[CircuitGroupUnblockingMessage], msg] local_variable[type[CircuitIdentificationCode], code] call[code.setCIC, parameter[member[.cic]]] call[msg.setCircuitIdentificationCode, parameter[member[.code]]] return[member[.msg]] end[}] END[}]
Keyword[public] identifier[CircuitGroupUnblockingMessage] identifier[createCGU] operator[SEP] Keyword[int] identifier[cic] operator[SEP] { identifier[CircuitGroupUnblockingMessage] identifier[msg] operator[=] identifier[createCGU] operator[SEP] operator[SEP] operator[SEP] identifier[CircuitIdentificationCode] identifier[code] operator[=] Keyword[this] operator[SEP] identifier[parameterFactory] operator[SEP] identifier[createCircuitIdentificationCode] operator[SEP] operator[SEP] operator[SEP] identifier[code] operator[SEP] identifier[setCIC] operator[SEP] identifier[cic] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[setCircuitIdentificationCode] operator[SEP] identifier[code] operator[SEP] operator[SEP] Keyword[return] identifier[msg] operator[SEP] }
public static MutableRoaringBitmap priorityqueue_xor(ImmutableRoaringBitmap... bitmaps) { // code could be faster, see priorityqueue_or if (bitmaps.length < 2) { throw new IllegalArgumentException("Expecting at least 2 bitmaps"); } final PriorityQueue<ImmutableRoaringBitmap> pq = new PriorityQueue<>(bitmaps.length, new Comparator<ImmutableRoaringBitmap>() { @Override public int compare(ImmutableRoaringBitmap a, ImmutableRoaringBitmap b) { return (int)(a.getLongSizeInBytes() - b.getLongSizeInBytes()); } }); Collections.addAll(pq, bitmaps); while (pq.size() > 1) { final ImmutableRoaringBitmap x1 = pq.poll(); final ImmutableRoaringBitmap x2 = pq.poll(); pq.add(ImmutableRoaringBitmap.xor(x1, x2)); } return (MutableRoaringBitmap) pq.poll(); }
class class_name[name] begin[{] method[priorityqueue_xor, return_type[type[MutableRoaringBitmap]], modifier[public static], parameter[bitmaps]] begin[{] if[binary_operation[member[bitmaps.length], <, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expecting at least 2 bitmaps")], 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[PriorityQueue], pq] call[Collections.addAll, parameter[member[.pq], member[.bitmaps]]] while[binary_operation[call[pq.size, parameter[]], >, literal[1]]] begin[{] local_variable[type[ImmutableRoaringBitmap], x1] local_variable[type[ImmutableRoaringBitmap], x2] call[pq.add, parameter[call[ImmutableRoaringBitmap.xor, parameter[member[.x1], member[.x2]]]]] end[}] return[Cast(expression=MethodInvocation(arguments=[], member=poll, postfix_operators=[], prefix_operators=[], qualifier=pq, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MutableRoaringBitmap, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MutableRoaringBitmap] identifier[priorityqueue_xor] operator[SEP] identifier[ImmutableRoaringBitmap] operator[...] identifier[bitmaps] operator[SEP] { Keyword[if] operator[SEP] identifier[bitmaps] operator[SEP] identifier[length] operator[<] Other[2] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[PriorityQueue] operator[<] identifier[ImmutableRoaringBitmap] operator[>] identifier[pq] operator[=] Keyword[new] identifier[PriorityQueue] operator[<] operator[>] operator[SEP] identifier[bitmaps] operator[SEP] identifier[length] , Keyword[new] identifier[Comparator] operator[<] identifier[ImmutableRoaringBitmap] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[ImmutableRoaringBitmap] identifier[a] , identifier[ImmutableRoaringBitmap] identifier[b] operator[SEP] { Keyword[return] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[getLongSizeInBytes] operator[SEP] operator[SEP] operator[-] identifier[b] operator[SEP] identifier[getLongSizeInBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[addAll] operator[SEP] identifier[pq] , identifier[bitmaps] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[pq] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x1] operator[=] identifier[pq] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x2] operator[=] identifier[pq] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] identifier[pq] operator[SEP] identifier[add] operator[SEP] identifier[ImmutableRoaringBitmap] operator[SEP] identifier[xor] operator[SEP] identifier[x1] , identifier[x2] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[MutableRoaringBitmap] operator[SEP] identifier[pq] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public <T> T toProxyBean(Class<T> interfaceClass) { return (T) Proxy.newProxyInstance(ClassLoaderUtil.getClassLoader(), new Class<?>[]{interfaceClass}, this); }
class class_name[name] begin[{] method[toProxyBean, return_type[type[T]], modifier[public], parameter[interfaceClass]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=[], prefix_operators=[], qualifier=ClassLoaderUtil, selectors=[], type_arguments=None), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=interfaceClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=None, name=Class, sub_type=None)), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=newProxyInstance, postfix_operators=[], prefix_operators=[], qualifier=Proxy, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[toProxyBean] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[interfaceClass] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[Proxy] operator[SEP] identifier[newProxyInstance] operator[SEP] identifier[ClassLoaderUtil] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] , Keyword[new] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] { identifier[interfaceClass] } , Keyword[this] operator[SEP] operator[SEP] }
private void obtainWindowBackground(@StyleRes final int themeResourceId) { TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogWindowBackground}); int resourceId = typedArray.getResourceId(0, 0); if (resourceId != 0) { setWindowBackground(resourceId); } else { setWindowBackground(R.drawable.material_dialog_background); } }
class class_name[name] begin[{] method[obtainWindowBackground, return_type[void], modifier[private], parameter[themeResourceId]] begin[{] local_variable[type[TypedArray], typedArray] local_variable[type[int], resourceId] if[binary_operation[member[.resourceId], !=, literal[0]]] begin[{] call[.setWindowBackground, parameter[member[.resourceId]]] else begin[{] call[.setWindowBackground, parameter[member[R.drawable.material_dialog_background]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[obtainWindowBackground] operator[SEP] annotation[@] identifier[StyleRes] Keyword[final] Keyword[int] identifier[themeResourceId] operator[SEP] { identifier[TypedArray] identifier[typedArray] operator[=] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getTheme] operator[SEP] operator[SEP] operator[SEP] identifier[obtainStyledAttributes] operator[SEP] identifier[themeResourceId] , Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[R] operator[SEP] identifier[attr] operator[SEP] identifier[materialDialogWindowBackground] } operator[SEP] operator[SEP] Keyword[int] identifier[resourceId] operator[=] identifier[typedArray] operator[SEP] identifier[getResourceId] operator[SEP] Other[0] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceId] operator[!=] Other[0] operator[SEP] { identifier[setWindowBackground] operator[SEP] identifier[resourceId] operator[SEP] operator[SEP] } Keyword[else] { identifier[setWindowBackground] operator[SEP] identifier[R] operator[SEP] identifier[drawable] operator[SEP] identifier[material_dialog_background] operator[SEP] operator[SEP] } }
private String chooseFirstOccurence(String[] among_owners, String[] within_listgroup, String prior_tableName) { int index = CStringUtils.indexOf(within_listgroup, prior_tableName); for(int i = index-1; i >= 0; i-- ){ String closest = within_listgroup[i]; if(CStringUtils.indexOf(among_owners, closest) >= 0){ return closest; } } return null; }
class class_name[name] begin[{] method[chooseFirstOccurence, return_type[type[String]], modifier[private], parameter[among_owners, within_listgroup, prior_tableName]] begin[{] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=within_listgroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=closest)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=among_owners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=closest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=CStringUtils, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=closest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, 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=MemberReference(member=index, 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) return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[chooseFirstOccurence] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[among_owners] , identifier[String] operator[SEP] operator[SEP] identifier[within_listgroup] , identifier[String] identifier[prior_tableName] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[CStringUtils] operator[SEP] identifier[indexOf] operator[SEP] identifier[within_listgroup] , identifier[prior_tableName] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[index] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[String] identifier[closest] operator[=] identifier[within_listgroup] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CStringUtils] operator[SEP] identifier[indexOf] operator[SEP] identifier[among_owners] , identifier[closest] operator[SEP] operator[>=] Other[0] operator[SEP] { Keyword[return] identifier[closest] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public EClass getIfcDirection() { if (ifcDirectionEClass == null) { ifcDirectionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(154); } return ifcDirectionEClass; }
class class_name[name] begin[{] method[getIfcDirection, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcDirectionEClass], ==, literal[null]]] begin[{] assign[member[.ifcDirectionEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=154)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcDirectionEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcDirection] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcDirectionEClass] operator[==] Other[null] operator[SEP] { identifier[ifcDirectionEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[154] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcDirectionEClass] operator[SEP] }
@Override public EClass getIfcQuantityLength() { if (ifcQuantityLengthEClass == null) { ifcQuantityLengthEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(489); } return ifcQuantityLengthEClass; }
class class_name[name] begin[{] method[getIfcQuantityLength, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcQuantityLengthEClass], ==, literal[null]]] begin[{] assign[member[.ifcQuantityLengthEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=489)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcQuantityLengthEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcQuantityLength] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcQuantityLengthEClass] operator[==] Other[null] operator[SEP] { identifier[ifcQuantityLengthEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[489] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcQuantityLengthEClass] operator[SEP] }
public ChannelBuffer formatSuggestV1(final List<String> suggestions) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatSuggestV1"); }
class class_name[name] begin[{] method[formatSuggestV1, return_type[type[ChannelBuffer]], modifier[public], parameter[suggestions]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_IMPLEMENTED, postfix_operators=[], prefix_operators=[], qualifier=HttpResponseStatus, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The requested API endpoint has not been implemented"), BinaryOperation(operandl=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=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" has not implemented formatSuggestV1"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BadRequestException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[ChannelBuffer] identifier[formatSuggestV1] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[suggestions] operator[SEP] { Keyword[throw] Keyword[new] identifier[BadRequestException] operator[SEP] identifier[HttpResponseStatus] operator[SEP] identifier[NOT_IMPLEMENTED] , literal[String] , Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
public static PluginResolver nullResolver(Mode mode, ErrorReporter reporter) { return new PluginResolver( mode, ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of(), reporter); }
class class_name[name] begin[{] method[nullResolver, return_type[type[PluginResolver]], modifier[public static], parameter[mode, reporter]] begin[{] return[ClassCreator(arguments=[MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=of, postfix_operators=[], prefix_operators=[], qualifier=ImmutableMap, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=of, postfix_operators=[], prefix_operators=[], qualifier=ImmutableMap, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=of, postfix_operators=[], prefix_operators=[], qualifier=ImmutableMap, selectors=[], type_arguments=None), MemberReference(member=reporter, 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=PluginResolver, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[PluginResolver] identifier[nullResolver] operator[SEP] identifier[Mode] identifier[mode] , identifier[ErrorReporter] identifier[reporter] operator[SEP] { Keyword[return] Keyword[new] identifier[PluginResolver] operator[SEP] identifier[mode] , identifier[ImmutableMap] operator[SEP] identifier[of] operator[SEP] operator[SEP] , identifier[ImmutableMap] operator[SEP] identifier[of] operator[SEP] operator[SEP] , identifier[ImmutableMap] operator[SEP] identifier[of] operator[SEP] operator[SEP] , identifier[reporter] operator[SEP] operator[SEP] }
private <P> void introspectFields(Class<P> pojoClass, PojoDescriptorImpl<P> descriptor, List<AccessibleObject> nonPublicAccessibleObjects) { if (getFieldIntrospector() != null) { Iterator<Field> fieldIterator = getFieldIntrospector().findFields(pojoClass); while (fieldIterator.hasNext()) { Field field = fieldIterator.next(); boolean fieldUsed = false; for (PojoPropertyAccessorBuilder<?> builder : getAccessorBuilders()) { PojoPropertyAccessor accessor = builder.create(field, descriptor, getDependencies()); if (accessor != null) { boolean registered = registerAccessor(descriptor, accessor); if (registered) { fieldUsed = true; } } } if (fieldUsed && !isPublicAccessible(field)) { // reflective access that violates visibility nonPublicAccessibleObjects.add(field); } PojoPropertyDescriptorImpl propertyDescriptor = descriptor.getPropertyDescriptor(field.getName()); if (propertyDescriptor != null) { // should actually never be null here... propertyDescriptor.setField(field); } } } }
class class_name[name] begin[{] method[introspectFields, return_type[void], modifier[private], parameter[pojoClass, descriptor, nonPublicAccessibleObjects]] begin[{] if[binary_operation[call[.getFieldIntrospector, parameter[]], !=, literal[null]]] begin[{] local_variable[type[Iterator], fieldIterator] while[call[fieldIterator.hasNext, parameter[]]] begin[{] local_variable[type[Field], field] local_variable[type[boolean], fieldUsed] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), name=accessor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PojoPropertyAccessor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accessor, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accessor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerAccessor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=registered)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=registered, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldUsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAccessorBuilders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=builder)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=PojoPropertyAccessorBuilder, sub_type=None))), label=None) if[binary_operation[member[.fieldUsed], &&, call[.isPublicAccessible, parameter[member[.field]]]]] begin[{] call[nonPublicAccessibleObjects.add, parameter[member[.field]]] else begin[{] None end[}] local_variable[type[PojoPropertyDescriptorImpl], propertyDescriptor] if[binary_operation[member[.propertyDescriptor], !=, literal[null]]] begin[{] call[propertyDescriptor.setField, parameter[member[.field]]] else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] operator[<] identifier[P] operator[>] Keyword[void] identifier[introspectFields] operator[SEP] identifier[Class] operator[<] identifier[P] operator[>] identifier[pojoClass] , identifier[PojoDescriptorImpl] operator[<] identifier[P] operator[>] identifier[descriptor] , identifier[List] operator[<] identifier[AccessibleObject] operator[>] identifier[nonPublicAccessibleObjects] operator[SEP] { Keyword[if] operator[SEP] identifier[getFieldIntrospector] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Iterator] operator[<] identifier[Field] operator[>] identifier[fieldIterator] operator[=] identifier[getFieldIntrospector] operator[SEP] operator[SEP] operator[SEP] identifier[findFields] operator[SEP] identifier[pojoClass] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[fieldIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Field] identifier[field] operator[=] identifier[fieldIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[fieldUsed] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[PojoPropertyAccessorBuilder] operator[<] operator[?] operator[>] identifier[builder] operator[:] identifier[getAccessorBuilders] operator[SEP] operator[SEP] operator[SEP] { identifier[PojoPropertyAccessor] identifier[accessor] operator[=] identifier[builder] operator[SEP] identifier[create] operator[SEP] identifier[field] , identifier[descriptor] , identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessor] operator[!=] Other[null] operator[SEP] { Keyword[boolean] identifier[registered] operator[=] identifier[registerAccessor] operator[SEP] identifier[descriptor] , identifier[accessor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[registered] operator[SEP] { identifier[fieldUsed] operator[=] literal[boolean] operator[SEP] } } } Keyword[if] operator[SEP] identifier[fieldUsed] operator[&&] operator[!] identifier[isPublicAccessible] operator[SEP] identifier[field] operator[SEP] operator[SEP] { identifier[nonPublicAccessibleObjects] operator[SEP] identifier[add] operator[SEP] identifier[field] operator[SEP] operator[SEP] } identifier[PojoPropertyDescriptorImpl] identifier[propertyDescriptor] operator[=] identifier[descriptor] operator[SEP] identifier[getPropertyDescriptor] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertyDescriptor] operator[!=] Other[null] operator[SEP] { identifier[propertyDescriptor] operator[SEP] identifier[setField] operator[SEP] identifier[field] operator[SEP] operator[SEP] } } } }
@Override public void execute(IntuitMessage intuitMessage) throws FMSException { entitiesManager.add(populateEntity(intuitMessage.getRequestElements())); }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[intuitMessage]] begin[{] call[entitiesManager.add, parameter[call[.populateEntity, parameter[call[intuitMessage.getRequestElements, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[IntuitMessage] identifier[intuitMessage] operator[SEP] Keyword[throws] identifier[FMSException] { identifier[entitiesManager] operator[SEP] identifier[add] operator[SEP] identifier[populateEntity] operator[SEP] identifier[intuitMessage] operator[SEP] identifier[getRequestElements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public boolean markMigrated(VectorClock vectorClock) { stateWriteLock.lock(); try { if (stateVectorClock.equals(vectorClock)) { migrated = true; } return migrated; } finally { stateWriteLock.unlock(); } }
class class_name[name] begin[{] method[markMigrated, return_type[type[boolean]], modifier[public], parameter[vectorClock]] begin[{] call[stateWriteLock.lock, parameter[]] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=vectorClock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=stateVectorClock, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=migrated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), ReturnStatement(expression=MemberReference(member=migrated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=stateWriteLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[markMigrated] operator[SEP] identifier[VectorClock] identifier[vectorClock] operator[SEP] { identifier[stateWriteLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[stateVectorClock] operator[SEP] identifier[equals] operator[SEP] identifier[vectorClock] operator[SEP] operator[SEP] { identifier[migrated] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[migrated] operator[SEP] } Keyword[finally] { identifier[stateWriteLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
@PreDestroy public final void dispose() { getConnectionPool().ifPresent(PoolResources::dispose); getThreadPool().dispose(); try { ObjectName name = getByteBufAllocatorObjectName(); if (ManagementFactory.getPlatformMBeanServer().isRegistered(name)) { ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); } } catch (JMException e) { this.logger.error("Unable to register ByteBufAllocator MBean", e); } }
class class_name[name] begin[{] method[dispose, return_type[void], modifier[final public], parameter[]] begin[{] call[.getConnectionPool, parameter[]] call[.getThreadPool, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getByteBufAllocatorObjectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectName, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getPlatformMBeanServer, postfix_operators=[], prefix_operators=[], qualifier=ManagementFactory, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isRegistered, 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=[], member=getPlatformMBeanServer, postfix_operators=[], prefix_operators=[], qualifier=ManagementFactory, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unregisterMBean, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to register ByteBufAllocator MBean"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JMException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[PreDestroy] Keyword[public] Keyword[final] Keyword[void] identifier[dispose] operator[SEP] operator[SEP] { identifier[getConnectionPool] operator[SEP] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[PoolResources] operator[::] identifier[dispose] operator[SEP] operator[SEP] identifier[getThreadPool] operator[SEP] operator[SEP] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ObjectName] identifier[name] operator[=] identifier[getByteBufAllocatorObjectName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ManagementFactory] operator[SEP] identifier[getPlatformMBeanServer] operator[SEP] operator[SEP] operator[SEP] identifier[isRegistered] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[ManagementFactory] operator[SEP] identifier[getPlatformMBeanServer] operator[SEP] operator[SEP] operator[SEP] identifier[unregisterMBean] operator[SEP] identifier[name] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[JMException] identifier[e] operator[SEP] { Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
static void verifyXcodeFolder(final File xcodeFolder, final String projectName) throws XCodeVerificationException { if (!xcodeFolder.exists()) { throw new XCodeRootFolderDoesNotExistException("The folder \"" + xcodeFolder + "\" that is the root folder of the xcode project \"" + projectName + "\" does not exist."); } final String xcodeProjectFolderName = projectName + XCodeConstants.XCODE_PROJECT_EXTENTION; final Collection<File> xcodeProjectFolders = Arrays.asList(xcodeFolder.listFiles(new FileFilter() { @Override public boolean accept(File f) { return f.isDirectory() && f.getName().equals(xcodeProjectFolderName); } })); if (xcodeProjectFolders.size() == 0) { throw new XCodeProjectNotFoundException( "The folder \"" + xcodeFolder + "\" must contain folder named \"" + xcodeProjectFolderName + "\". This folder is expected to hold the xcode project configuration. The xcode project must have the same name as the maven artifactId"); } for (final File xcodeProjectFolder : xcodeProjectFolders) if (xcodeProjectFolder.listFiles(new FileFilter() { @Override public boolean accept(File f) { return f.getName().equals(XCodeConstants.XCODE_CONFIGURATION_FILE_NAME); } }).length != 1) throw new XCodeProjectFileDoesNotExistException("Folder \"" + xcodeProjectFolders + "\" is expected to contain the file \"" + XCodeConstants.XCODE_CONFIGURATION_FILE_NAME + "\" but that file does not exist."); }
class class_name[name] begin[{] method[verifyXcodeFolder, return_type[void], modifier[static], parameter[xcodeFolder, projectName]] begin[{] if[call[xcodeFolder.exists, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The folder \""), operandr=MemberReference(member=xcodeFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" that is the root folder of the xcode project \""), operator=+), operandr=MemberReference(member=projectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" does not exist."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XCodeRootFolderDoesNotExistException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], xcodeProjectFolderName] local_variable[type[Collection], xcodeProjectFolders] if[binary_operation[call[xcodeProjectFolders.size, parameter[]], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The folder \""), operandr=MemberReference(member=xcodeFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" must contain folder named \""), operator=+), operandr=MemberReference(member=xcodeProjectFolderName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\". This folder is expected to hold the xcode project configuration. The xcode project must have the same name as the maven artifactId"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XCodeProjectNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[MethodInvocation(arguments=[MemberReference(member=XCODE_CONFIGURATION_FILE_NAME, postfix_operators=[], prefix_operators=[], qualifier=XCodeConstants, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=f, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileFilter, sub_type=None))], member=listFiles, postfix_operators=[], prefix_operators=[], qualifier=xcodeProjectFolder, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Folder \""), operandr=MemberReference(member=xcodeProjectFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" is expected to contain the file \""), operator=+), operandr=MemberReference(member=XCODE_CONFIGURATION_FILE_NAME, postfix_operators=[], prefix_operators=[], qualifier=XCodeConstants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" but that file does not exist."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XCodeProjectFileDoesNotExistException, sub_type=None)), label=None)), control=EnhancedForControl(iterable=MemberReference(member=xcodeProjectFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=xcodeProjectFolder)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) end[}] END[}]
Keyword[static] Keyword[void] identifier[verifyXcodeFolder] operator[SEP] Keyword[final] identifier[File] identifier[xcodeFolder] , Keyword[final] identifier[String] identifier[projectName] operator[SEP] Keyword[throws] identifier[XCodeVerificationException] { Keyword[if] operator[SEP] operator[!] identifier[xcodeFolder] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[XCodeRootFolderDoesNotExistException] operator[SEP] literal[String] operator[+] identifier[xcodeFolder] operator[+] literal[String] operator[+] identifier[projectName] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[xcodeProjectFolderName] operator[=] identifier[projectName] operator[+] identifier[XCodeConstants] operator[SEP] identifier[XCODE_PROJECT_EXTENTION] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[File] operator[>] identifier[xcodeProjectFolders] operator[=] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[xcodeFolder] operator[SEP] identifier[listFiles] operator[SEP] Keyword[new] identifier[FileFilter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[return] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[&&] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[xcodeProjectFolderName] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[xcodeProjectFolders] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[XCodeProjectNotFoundException] operator[SEP] literal[String] operator[+] identifier[xcodeFolder] operator[+] literal[String] operator[+] identifier[xcodeProjectFolderName] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[File] identifier[xcodeProjectFolder] operator[:] identifier[xcodeProjectFolders] operator[SEP] Keyword[if] operator[SEP] identifier[xcodeProjectFolder] operator[SEP] identifier[listFiles] operator[SEP] Keyword[new] identifier[FileFilter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[return] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[XCodeConstants] operator[SEP] identifier[XCODE_CONFIGURATION_FILE_NAME] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[length] operator[!=] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[XCodeProjectFileDoesNotExistException] operator[SEP] literal[String] operator[+] identifier[xcodeProjectFolders] operator[+] literal[String] operator[+] identifier[XCodeConstants] operator[SEP] identifier[XCODE_CONFIGURATION_FILE_NAME] operator[+] literal[String] operator[SEP] operator[SEP] }
@Override public boolean add(E o) { if (map.containsKey(o)) { return false; } else { internalAdd(o); return true; } }
class class_name[name] begin[{] method[add, return_type[type[boolean]], modifier[public], parameter[o]] begin[{] if[call[map.containsKey, parameter[member[.o]]]] begin[{] return[literal[false]] else begin[{] call[.internalAdd, parameter[member[.o]]] return[literal[true]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[E] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[map] operator[SEP] identifier[containsKey] operator[SEP] identifier[o] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[internalAdd] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
public boolean isConnectionStale() { if (lastUsedTime == 0) return false; long currentTime = System.currentTimeMillis(); long timeSinceLastUse = currentTime - lastUsedTime; return (timeSinceLastUse > MAX_KEEPALIVE); }
class class_name[name] begin[{] method[isConnectionStale, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.lastUsedTime], ==, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[long], currentTime] local_variable[type[long], timeSinceLastUse] return[binary_operation[member[.timeSinceLastUse], >, member[.MAX_KEEPALIVE]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isConnectionStale] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lastUsedTime] operator[==] Other[0] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[long] identifier[currentTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[timeSinceLastUse] operator[=] identifier[currentTime] operator[-] identifier[lastUsedTime] operator[SEP] Keyword[return] operator[SEP] identifier[timeSinceLastUse] operator[>] identifier[MAX_KEEPALIVE] operator[SEP] operator[SEP] }
public static void putBooleanList(Writer writer, List<Boolean> values) throws IOException { if (values == null) { writer.write("null"); } else { startArray(writer); for (int i = 0; i < values.size(); i++) { put(writer, values.get(i)); if (i != values.size() - 1) { addSeparator(writer); } } endArray(writer); } }
class class_name[name] begin[{] method[putBooleanList, return_type[void], modifier[public static], parameter[writer, values]] begin[{] if[binary_operation[member[.values], ==, literal[null]]] begin[{] call[writer.write, parameter[literal["null"]]] else begin[{] call[.startArray, parameter[member[.writer]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSeparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, 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) call[.endArray, parameter[member[.writer]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[putBooleanList] operator[SEP] identifier[Writer] identifier[writer] , identifier[List] operator[<] identifier[Boolean] operator[>] identifier[values] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] { identifier[writer] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[startArray] operator[SEP] identifier[writer] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[put] operator[SEP] identifier[writer] , identifier[values] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[!=] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[addSeparator] operator[SEP] identifier[writer] operator[SEP] operator[SEP] } } identifier[endArray] operator[SEP] identifier[writer] operator[SEP] operator[SEP] } }
public static Object unmarshal (Class<?> type, String source) throws Exception { if (type.isEnum()) { // we need to use a dummy enum type here as there's no way to ask Enum.valueOf to // execute on an existentially typed enum; it all works out under the hood @SuppressWarnings("unchecked") Class<Dummy> etype = (Class<Dummy>)type; return Enum.valueOf(etype, source); // may throw an exception } // look up an argument parser for the field type Parser parser = _parsers.get(type); if (parser == null) { throw new Exception( "Don't know how to convert strings into values of type '" + type + "'."); } return parser.parse(source); }
class class_name[name] begin[{] method[unmarshal, return_type[type[Object]], modifier[public static], parameter[type, source]] begin[{] if[call[type.isEnum, parameter[]]] begin[{] local_variable[type[Class], etype] return[call[Enum.valueOf, parameter[member[.etype], member[.source]]]] else begin[{] None end[}] local_variable[type[Parser], parser] if[binary_operation[member[.parser], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Don't know how to convert strings into values of type '"), operandr=MemberReference(member=type, 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=Exception, sub_type=None)), label=None) else begin[{] None end[}] return[call[parser.parse, parameter[member[.source]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[unmarshal] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[isEnum] operator[SEP] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Class] operator[<] identifier[Dummy] operator[>] identifier[etype] operator[=] operator[SEP] identifier[Class] operator[<] identifier[Dummy] operator[>] operator[SEP] identifier[type] operator[SEP] Keyword[return] identifier[Enum] operator[SEP] identifier[valueOf] operator[SEP] identifier[etype] , identifier[source] operator[SEP] operator[SEP] } identifier[Parser] identifier[parser] operator[=] identifier[_parsers] operator[SEP] identifier[get] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parser] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[parser] operator[SEP] identifier[parse] operator[SEP] identifier[source] operator[SEP] operator[SEP] }
public Topic getTopic(String topicName) throws ServiceLocatorException { Topic topic = null; try { if (cache.containsKey(topicName)) { topic = (Topic) cache.get(topicName); } else { topic = (Topic) ic.lookup(topicName); cache.put(topicName, topic); } } catch (NamingException ne) { throw new ServiceLocatorException(ne); } catch (Exception e) { throw new ServiceLocatorException(e); } return topic; }
class class_name[name] begin[{] method[getTopic, return_type[type[Topic]], modifier[public], parameter[topicName]] begin[{] local_variable[type[Topic], topic] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=topicName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=topic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=topicName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lookup, postfix_operators=[], prefix_operators=[], qualifier=ic, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Topic, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=topicName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=topic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=topic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=topicName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Topic, sub_type=None))), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ne, 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=ServiceLocatorException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ne, types=['NamingException'])), 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=ServiceLocatorException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.topic]] end[}] END[}]
Keyword[public] identifier[Topic] identifier[getTopic] operator[SEP] identifier[String] identifier[topicName] operator[SEP] Keyword[throws] identifier[ServiceLocatorException] { identifier[Topic] identifier[topic] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[cache] operator[SEP] identifier[containsKey] operator[SEP] identifier[topicName] operator[SEP] operator[SEP] { identifier[topic] operator[=] operator[SEP] identifier[Topic] operator[SEP] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[topicName] operator[SEP] operator[SEP] } Keyword[else] { identifier[topic] operator[=] operator[SEP] identifier[Topic] operator[SEP] identifier[ic] operator[SEP] identifier[lookup] operator[SEP] identifier[topicName] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[put] operator[SEP] identifier[topicName] , identifier[topic] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NamingException] identifier[ne] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceLocatorException] operator[SEP] identifier[ne] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceLocatorException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[topic] operator[SEP] }
protected void mergeGlobalOptions(final ContentSpecWrapper contentSpecEntity, final ContentSpec contentSpec, final TagProvider tagProvider) { // make sure the condition matches contentSpecEntity.setCondition(contentSpec.getBaseLevel().getConditionStatement()); // Merge the global tags final List<String> tags = contentSpec.getTags(); final CollectionWrapper<TagWrapper> tagsCollection = contentSpecEntity.getBookTags() == null ? tagProvider.newTagCollection() : contentSpecEntity.getBookTags(); // Check to make sure we have something to process if (!(tags.isEmpty() && tagsCollection.isEmpty())) { final List<TagWrapper> existingTags = new ArrayList<TagWrapper>(tagsCollection.getItems()); // Add any new book tags for (final String tagName : tags) { final TagWrapper existingTag = findExistingBookTag(tagName, existingTags); if (existingTag == null) { LOG.debug("Adding global book tag {}", tagName); final TagWrapper tag = tagProvider.getTagByName(tagName); tagsCollection.addNewItem(tag); } else { existingTags.remove(existingTag); } } // Remove any existing book tags that are no longer valid if (!existingTags.isEmpty()) { for (final TagWrapper existingTag : existingTags) { LOG.debug("Removing global book tag {}", existingTag.getName()); tagsCollection.remove(existingTag); tagsCollection.addRemoveItem(existingTag); } } contentSpecEntity.setBookTags(tagsCollection); } }
class class_name[name] begin[{] method[mergeGlobalOptions, return_type[void], modifier[protected], parameter[contentSpecEntity, contentSpec, tagProvider]] begin[{] call[contentSpecEntity.setCondition, parameter[call[contentSpec.getBaseLevel, parameter[]]]] local_variable[type[List], tags] local_variable[type[CollectionWrapper], tagsCollection] if[binary_operation[call[tags.isEmpty, parameter[]], &&, call[tagsCollection.isEmpty, parameter[]]]] begin[{] local_variable[type[List], existingTags] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tagName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=existingTags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findExistingBookTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=existingTag)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TagWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existingTag, 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=MethodInvocation(arguments=[MemberReference(member=existingTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=existingTags, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding global book tag {}"), MemberReference(member=tagName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tagName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTagByName, postfix_operators=[], prefix_operators=[], qualifier=tagProvider, selectors=[], type_arguments=None), name=tag)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TagWrapper, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addNewItem, postfix_operators=[], prefix_operators=[], qualifier=tagsCollection, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=tags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tagName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[call[existingTags.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Removing global book tag {}"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=existingTag, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=existingTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=tagsCollection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=existingTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addRemoveItem, postfix_operators=[], prefix_operators=[], qualifier=tagsCollection, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=existingTags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=existingTag)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TagWrapper, sub_type=None))), label=None) else begin[{] None end[}] call[contentSpecEntity.setBookTags, parameter[member[.tagsCollection]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[mergeGlobalOptions] operator[SEP] Keyword[final] identifier[ContentSpecWrapper] identifier[contentSpecEntity] , Keyword[final] identifier[ContentSpec] identifier[contentSpec] , Keyword[final] identifier[TagProvider] identifier[tagProvider] operator[SEP] { identifier[contentSpecEntity] operator[SEP] identifier[setCondition] operator[SEP] identifier[contentSpec] operator[SEP] identifier[getBaseLevel] operator[SEP] operator[SEP] operator[SEP] identifier[getConditionStatement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[tags] operator[=] identifier[contentSpec] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[CollectionWrapper] operator[<] identifier[TagWrapper] operator[>] identifier[tagsCollection] operator[=] identifier[contentSpecEntity] operator[SEP] identifier[getBookTags] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] identifier[tagProvider] operator[SEP] identifier[newTagCollection] operator[SEP] operator[SEP] operator[:] identifier[contentSpecEntity] operator[SEP] identifier[getBookTags] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[tags] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[tagsCollection] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[TagWrapper] operator[>] identifier[existingTags] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TagWrapper] operator[>] operator[SEP] identifier[tagsCollection] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[tagName] operator[:] identifier[tags] operator[SEP] { Keyword[final] identifier[TagWrapper] identifier[existingTag] operator[=] identifier[findExistingBookTag] operator[SEP] identifier[tagName] , identifier[existingTags] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existingTag] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[tagName] operator[SEP] operator[SEP] Keyword[final] identifier[TagWrapper] identifier[tag] operator[=] identifier[tagProvider] operator[SEP] identifier[getTagByName] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] identifier[tagsCollection] operator[SEP] identifier[addNewItem] operator[SEP] identifier[tag] operator[SEP] operator[SEP] } Keyword[else] { identifier[existingTags] operator[SEP] identifier[remove] operator[SEP] identifier[existingTag] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[existingTags] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[TagWrapper] identifier[existingTag] operator[:] identifier[existingTags] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[existingTag] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tagsCollection] operator[SEP] identifier[remove] operator[SEP] identifier[existingTag] operator[SEP] operator[SEP] identifier[tagsCollection] operator[SEP] identifier[addRemoveItem] operator[SEP] identifier[existingTag] operator[SEP] operator[SEP] } } identifier[contentSpecEntity] operator[SEP] identifier[setBookTags] operator[SEP] identifier[tagsCollection] operator[SEP] operator[SEP] } }
private String readToDelimiter() { String line = null; while(line == null || line.isEmpty()) { int delimiterIndex = mBuffer.indexOf(DELIMITER); if(delimiterIndex != -1) { line = mBuffer.substring(0, delimiterIndex); mBuffer.delete(0, delimiterIndex + 1); } else { line = null; break; } } return line; }
class class_name[name] begin[{] method[readToDelimiter, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], line] while[binary_operation[binary_operation[member[.line], ==, literal[null]], ||, call[line.isEmpty, parameter[]]]] begin[{] local_variable[type[int], delimiterIndex] if[binary_operation[member[.delimiterIndex], !=, literal[1]]] begin[{] assign[member[.line], call[mBuffer.substring, parameter[literal[0], member[.delimiterIndex]]]] call[mBuffer.delete, parameter[literal[0], binary_operation[member[.delimiterIndex], +, literal[1]]]] else begin[{] assign[member[.line], literal[null]] BreakStatement(goto=None, label=None) end[}] end[}] return[member[.line]] end[}] END[}]
Keyword[private] identifier[String] identifier[readToDelimiter] operator[SEP] operator[SEP] { identifier[String] identifier[line] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[line] operator[==] Other[null] operator[||] identifier[line] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[delimiterIndex] operator[=] identifier[mBuffer] operator[SEP] identifier[indexOf] operator[SEP] identifier[DELIMITER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[delimiterIndex] operator[!=] operator[-] Other[1] operator[SEP] { identifier[line] operator[=] identifier[mBuffer] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[delimiterIndex] operator[SEP] operator[SEP] identifier[mBuffer] operator[SEP] identifier[delete] operator[SEP] Other[0] , identifier[delimiterIndex] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[line] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[line] operator[SEP] }
private void register(RegisterAttempt attempt) { state.getLogger().debug("Registering session: attempt {}", attempt.attempt); RegisterRequest request = RegisterRequest.builder() .withClient(state.getClientId()) .withTimeout(sessionTimeout.toMillis()) .build(); state.getLogger().trace("Sending {}", request); connection.reset().<RegisterRequest, RegisterResponse>sendAndReceive(request).whenComplete((response, error) -> { if (error == null) { state.getLogger().trace("Received {}", response); if (response.status() == Response.Status.OK) { interval = Duration.ofMillis(response.timeout()).dividedBy(2); connection.reset(response.leader(), response.members()); state.setSessionId(response.session()) .setState(Session.State.OPEN); state.getLogger().info("Registered session {}", response.session()); attempt.complete(); keepAlive(); } else { strategy.attemptFailed(attempt); } } else { strategy.attemptFailed(attempt); } }); }
class class_name[name] begin[{] method[register, return_type[void], modifier[private], parameter[attempt]] begin[{] call[state.getLogger, parameter[]] local_variable[type[RegisterRequest], request] call[state.getLogger, parameter[]] call[connection.reset, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[register] operator[SEP] identifier[RegisterAttempt] identifier[attempt] operator[SEP] { identifier[state] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[attempt] operator[SEP] identifier[attempt] operator[SEP] operator[SEP] identifier[RegisterRequest] identifier[request] operator[=] identifier[RegisterRequest] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[withClient] operator[SEP] identifier[state] operator[SEP] identifier[getClientId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withTimeout] operator[SEP] identifier[sessionTimeout] operator[SEP] identifier[toMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[request] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] operator[<] identifier[RegisterRequest] , identifier[RegisterResponse] operator[>] identifier[sendAndReceive] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[whenComplete] operator[SEP] operator[SEP] identifier[response] , identifier[error] operator[SEP] operator[->] { Keyword[if] operator[SEP] identifier[error] operator[==] Other[null] operator[SEP] { identifier[state] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[status] operator[SEP] operator[SEP] operator[==] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[OK] operator[SEP] { identifier[interval] operator[=] identifier[Duration] operator[SEP] identifier[ofMillis] operator[SEP] identifier[response] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dividedBy] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[reset] operator[SEP] identifier[response] operator[SEP] identifier[leader] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[members] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[setSessionId] operator[SEP] identifier[response] operator[SEP] identifier[session] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[Session] operator[SEP] identifier[State] operator[SEP] identifier[OPEN] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[session] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attempt] operator[SEP] identifier[complete] operator[SEP] operator[SEP] operator[SEP] identifier[keepAlive] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[strategy] operator[SEP] identifier[attemptFailed] operator[SEP] identifier[attempt] operator[SEP] operator[SEP] } } Keyword[else] { identifier[strategy] operator[SEP] identifier[attemptFailed] operator[SEP] identifier[attempt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static FloatMatrix[] symmetricGeneralizedEigenvectors(FloatMatrix A, FloatMatrix B) { A.assertSquare(); B.assertSquare(); FloatMatrix[] result = new FloatMatrix[2]; FloatMatrix dA = A.dup(); FloatMatrix dB = B.dup(); FloatMatrix W = new FloatMatrix(dA.rows); SimpleBlas.sygvd(1, 'V', 'U', dA, dB, W); result[0] = dA; result[1] = W; return result; }
class class_name[name] begin[{] method[symmetricGeneralizedEigenvectors, return_type[type[FloatMatrix]], modifier[public static], parameter[A, B]] begin[{] call[A.assertSquare, parameter[]] call[B.assertSquare, parameter[]] local_variable[type[FloatMatrix], result] local_variable[type[FloatMatrix], dA] local_variable[type[FloatMatrix], dB] local_variable[type[FloatMatrix], W] call[SimpleBlas.sygvd, parameter[literal[1], literal['V'], literal['U'], member[.dA], member[.dB], member[.W]]] assign[member[.result], member[.dA]] assign[member[.result], member[.W]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[FloatMatrix] operator[SEP] operator[SEP] identifier[symmetricGeneralizedEigenvectors] operator[SEP] identifier[FloatMatrix] identifier[A] , identifier[FloatMatrix] identifier[B] operator[SEP] { identifier[A] operator[SEP] identifier[assertSquare] operator[SEP] operator[SEP] operator[SEP] identifier[B] operator[SEP] identifier[assertSquare] operator[SEP] operator[SEP] operator[SEP] identifier[FloatMatrix] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[FloatMatrix] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[FloatMatrix] identifier[dA] operator[=] identifier[A] operator[SEP] identifier[dup] operator[SEP] operator[SEP] operator[SEP] identifier[FloatMatrix] identifier[dB] operator[=] identifier[B] operator[SEP] identifier[dup] operator[SEP] operator[SEP] operator[SEP] identifier[FloatMatrix] identifier[W] operator[=] Keyword[new] identifier[FloatMatrix] operator[SEP] identifier[dA] operator[SEP] identifier[rows] operator[SEP] operator[SEP] identifier[SimpleBlas] operator[SEP] identifier[sygvd] operator[SEP] Other[1] , literal[String] , literal[String] , identifier[dA] , identifier[dB] , identifier[W] operator[SEP] operator[SEP] identifier[result] operator[SEP] Other[0] operator[SEP] operator[=] identifier[dA] operator[SEP] identifier[result] operator[SEP] Other[1] operator[SEP] operator[=] identifier[W] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static Object[] getCollectionArray(Object collectionOrArray) { Object[] result; if (collectionOrArray instanceof Collection) { result = ((Collection) collectionOrArray).toArray(); } else if (collectionOrArray instanceof ManageableCollection) { Collection newCol = new ArrayList(); CollectionUtils.addAll(newCol, ((ManageableCollection) collectionOrArray).ojbIterator()); result = newCol.toArray(); } else if (collectionOrArray.getClass().isArray()) { result = (Object[]) collectionOrArray; } else { throw new OJBRuntimeException( "Given object collection of type '" + (collectionOrArray != null ? collectionOrArray.getClass().toString() : "null") + "' can not be managed by OJB. Use Array, Collection or ManageableCollection instead!"); } return result; }
class class_name[name] begin[{] method[getCollectionArray, return_type[type[Object]], modifier[public static], parameter[collectionOrArray]] begin[{] local_variable[type[Object], result] if[binary_operation[member[.collectionOrArray], instanceof, type[Collection]]] begin[{] assign[member[.result], Cast(expression=MemberReference(member=collectionOrArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None))] else begin[{] if[binary_operation[member[.collectionOrArray], instanceof, type[ManageableCollection]]] begin[{] local_variable[type[Collection], newCol] call[CollectionUtils.addAll, parameter[member[.newCol], Cast(expression=MemberReference(member=collectionOrArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ManageableCollection, sub_type=None))]] assign[member[.result], call[newCol.toArray, parameter[]]] else begin[{] if[call[collectionOrArray.getClass, parameter[]]] begin[{] assign[member[.result], Cast(expression=MemberReference(member=collectionOrArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Given object collection of type '"), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=collectionOrArray, 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=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=collectionOrArray, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' can not be managed by OJB. Use Array, Collection or ManageableCollection instead!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OJBRuntimeException, sub_type=None)), label=None) end[}] end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[getCollectionArray] operator[SEP] identifier[Object] identifier[collectionOrArray] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[collectionOrArray] Keyword[instanceof] identifier[Collection] operator[SEP] { identifier[result] operator[=] operator[SEP] operator[SEP] identifier[Collection] operator[SEP] identifier[collectionOrArray] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[collectionOrArray] Keyword[instanceof] identifier[ManageableCollection] operator[SEP] { identifier[Collection] identifier[newCol] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[addAll] operator[SEP] identifier[newCol] , operator[SEP] operator[SEP] identifier[ManageableCollection] operator[SEP] identifier[collectionOrArray] operator[SEP] operator[SEP] identifier[ojbIterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[newCol] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[collectionOrArray] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[collectionOrArray] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[OJBRuntimeException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[collectionOrArray] operator[!=] Other[null] operator[?] identifier[collectionOrArray] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public String getCodeSources() { List<String> css = new ArrayList<String>(); for (PolicyHolderEntry phe : this.currentPolicy.get().policyHolderEntries) { css.add(phe.getCodeSource().getLocation() == null ? "default" : phe.getCodeSource().getLocation().toString()); } return Arrays.toString(css.toArray()); }
class class_name[name] begin[{] method[getCodeSources, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[List], css] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCodeSource, postfix_operators=[], prefix_operators=[], qualifier=phe, selectors=[MethodInvocation(arguments=[], member=getLocation, 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===), if_false=MethodInvocation(arguments=[], member=getCodeSource, postfix_operators=[], prefix_operators=[], qualifier=phe, selectors=[MethodInvocation(arguments=[], member=getLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="default"))], member=add, postfix_operators=[], prefix_operators=[], qualifier=css, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentPolicy, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=policyHolderEntries, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=phe)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PolicyHolderEntry, sub_type=None))), label=None) return[call[Arrays.toString, parameter[call[css.toArray, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getCodeSources] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[css] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PolicyHolderEntry] identifier[phe] operator[:] Keyword[this] operator[SEP] identifier[currentPolicy] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[policyHolderEntries] operator[SEP] { identifier[css] operator[SEP] identifier[add] operator[SEP] identifier[phe] operator[SEP] identifier[getCodeSource] operator[SEP] operator[SEP] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[phe] operator[SEP] identifier[getCodeSource] operator[SEP] operator[SEP] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[css] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public UpdateStageResult updateStage(UpdateStageRequest request) { request = beforeClientExecution(request); return executeUpdateStage(request); }
class class_name[name] begin[{] method[updateStage, return_type[type[UpdateStageResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdateStage, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UpdateStageResult] identifier[updateStage] operator[SEP] identifier[UpdateStageRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeUpdateStage] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void start(BundleContext context) throws Exception { String library = System.mapLibraryName(LIBRARY_NAME); if (library.toLowerCase().endsWith(".dylib")) { // some MacOS JDK7+ vendors map to dylib instead of jnilib library = library.replace(".dylib", ".jnilib"); } System.loadLibrary(library); SnappyLoader.setSnappyApi(new SnappyNative()); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[context]] begin[{] local_variable[type[String], library] if[call[library.toLowerCase, parameter[]]] begin[{] assign[member[.library], call[library.replace, parameter[literal[".dylib"], literal[".jnilib"]]]] else begin[{] None end[}] call[System.loadLibrary, parameter[member[.library]]] call[SnappyLoader.setSnappyApi, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SnappyNative, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[BundleContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[library] operator[=] identifier[System] operator[SEP] identifier[mapLibraryName] operator[SEP] identifier[LIBRARY_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[library] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[library] operator[=] identifier[library] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[loadLibrary] operator[SEP] identifier[library] operator[SEP] operator[SEP] identifier[SnappyLoader] operator[SEP] identifier[setSnappyApi] operator[SEP] Keyword[new] identifier[SnappyNative] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private int commonPrefixLength() { // shorterText和longerText已经在父类JaroDistanceTextSimilarity中准备好了 // 这里直接用就可以 int result = 0; int len = shorterText.length(); for (int i = 0; i < len; i++) { if (shorterText.charAt(i) != longerText.charAt(i)) { break; } result++; if(result >= MAXIMUM_CHARACTERS){ // 最多4个字符即可 return MAXIMUM_CHARACTERS; } } return result; }
class class_name[name] begin[{] method[commonPrefixLength, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[int], result] local_variable[type[int], len] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=shorterText, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=longerText, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=MemberReference(member=result, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAXIMUM_CHARACTERS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=MAXIMUM_CHARACTERS, 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=len, 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[private] Keyword[int] identifier[commonPrefixLength] operator[SEP] operator[SEP] { Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[shorterText] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[shorterText] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[longerText] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[result] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[>=] identifier[MAXIMUM_CHARACTERS] operator[SEP] { Keyword[return] identifier[MAXIMUM_CHARACTERS] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
private boolean readExternalId(boolean requireSystemName, boolean assignFields) throws IOException, KriptonRuntimeException { skip(); int c = peekCharacter(); if (c == 'S') { read(SYSTEM); } else if (c == 'P') { read(PUBLIC); skip(); if (assignFields) { publicId = readQuotedId(true); } else { readQuotedId(false); } } else { return false; } skip(); if (!requireSystemName) { int delimiter = peekCharacter(); if (delimiter != '"' && delimiter != '\'') { return true; // no system name! } } if (assignFields) { systemId = readQuotedId(true); } else { readQuotedId(false); } return true; }
class class_name[name] begin[{] method[readExternalId, return_type[type[boolean]], modifier[private], parameter[requireSystemName, assignFields]] begin[{] call[.skip, parameter[]] local_variable[type[int], c] if[binary_operation[member[.c], ==, literal['S']]] begin[{] call[.read, parameter[member[.SYSTEM]]] else begin[{] if[binary_operation[member[.c], ==, literal['P']]] begin[{] call[.read, parameter[member[.PUBLIC]]] call[.skip, parameter[]] if[member[.assignFields]] begin[{] assign[member[.publicId], call[.readQuotedId, parameter[literal[true]]]] else begin[{] call[.readQuotedId, parameter[literal[false]]] end[}] else begin[{] return[literal[false]] end[}] end[}] call[.skip, parameter[]] if[member[.requireSystemName]] begin[{] local_variable[type[int], delimiter] if[binary_operation[binary_operation[member[.delimiter], !=, literal['"']], &&, binary_operation[member[.delimiter], !=, literal['\'']]]] begin[{] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] if[member[.assignFields]] begin[{] assign[member[.systemId], call[.readQuotedId, parameter[literal[true]]]] else begin[{] call[.readQuotedId, parameter[literal[false]]] end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[readExternalId] operator[SEP] Keyword[boolean] identifier[requireSystemName] , Keyword[boolean] identifier[assignFields] operator[SEP] Keyword[throws] identifier[IOException] , identifier[KriptonRuntimeException] { identifier[skip] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[peekCharacter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[read] operator[SEP] identifier[SYSTEM] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[read] operator[SEP] identifier[PUBLIC] operator[SEP] operator[SEP] identifier[skip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[assignFields] operator[SEP] { identifier[publicId] operator[=] identifier[readQuotedId] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[readQuotedId] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } identifier[skip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[requireSystemName] operator[SEP] { Keyword[int] identifier[delimiter] operator[=] identifier[peekCharacter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[delimiter] operator[!=] literal[String] operator[&&] identifier[delimiter] operator[!=] literal[String] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[assignFields] operator[SEP] { identifier[systemId] operator[=] identifier[readQuotedId] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[readQuotedId] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public double getValue(double lat, double lon) { if (module == null) { throw new NoModuleException(); } double[] vec = Utils.latLonToXYZ(lat, lon); return module.getValue(vec[0], vec[1], vec[2]); }
class class_name[name] begin[{] method[getValue, return_type[type[double]], modifier[public], parameter[lat, lon]] begin[{] if[binary_operation[member[.module], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoModuleException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[double], vec] return[call[module.getValue, parameter[member[.vec], member[.vec], member[.vec]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getValue] operator[SEP] Keyword[double] identifier[lat] , Keyword[double] identifier[lon] operator[SEP] { Keyword[if] operator[SEP] identifier[module] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoModuleException] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[vec] operator[=] identifier[Utils] operator[SEP] identifier[latLonToXYZ] operator[SEP] identifier[lat] , identifier[lon] operator[SEP] operator[SEP] Keyword[return] identifier[module] operator[SEP] identifier[getValue] operator[SEP] identifier[vec] operator[SEP] Other[0] operator[SEP] , identifier[vec] operator[SEP] Other[1] operator[SEP] , identifier[vec] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] }
public void updateLaneView(@NonNull BannerComponents lane, @NonNull String maneuverModifier) { if (hasInvalidData(lane)) { return; } TurnLaneViewData drawData = buildTurnLaneViewData(lane, maneuverModifier); Integer resId = findDrawableResId(drawData); if (resId == null) { return; } drawFor(lane, drawData, resId); }
class class_name[name] begin[{] method[updateLaneView, return_type[void], modifier[public], parameter[lane, maneuverModifier]] begin[{] if[call[.hasInvalidData, parameter[member[.lane]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[TurnLaneViewData], drawData] local_variable[type[Integer], resId] if[binary_operation[member[.resId], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[.drawFor, parameter[member[.lane], member[.drawData], member[.resId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateLaneView] operator[SEP] annotation[@] identifier[NonNull] identifier[BannerComponents] identifier[lane] , annotation[@] identifier[NonNull] identifier[String] identifier[maneuverModifier] operator[SEP] { Keyword[if] operator[SEP] identifier[hasInvalidData] operator[SEP] identifier[lane] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[TurnLaneViewData] identifier[drawData] operator[=] identifier[buildTurnLaneViewData] operator[SEP] identifier[lane] , identifier[maneuverModifier] operator[SEP] operator[SEP] identifier[Integer] identifier[resId] operator[=] identifier[findDrawableResId] operator[SEP] identifier[drawData] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resId] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[drawFor] operator[SEP] identifier[lane] , identifier[drawData] , identifier[resId] operator[SEP] operator[SEP] }
public static JobDescFactoryBase getFrameworkSpecificJobDescFactory(Configuration jobConf) { Framework framework = getFramework(jobConf); switch (framework) { case PIG: return PIG_JOB_DESC_FACTORY; case SCALDING: return SCALDING_JOB_DESC_FACTORY; default: return MR_JOB_DESC_FACTORY; } }
class class_name[name] begin[{] method[getFrameworkSpecificJobDescFactory, return_type[type[JobDescFactoryBase]], modifier[public static], parameter[jobConf]] begin[{] local_variable[type[Framework], framework] SwitchStatement(cases=[SwitchStatementCase(case=['PIG'], statements=[ReturnStatement(expression=MemberReference(member=PIG_JOB_DESC_FACTORY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['SCALDING'], statements=[ReturnStatement(expression=MemberReference(member=SCALDING_JOB_DESC_FACTORY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=MemberReference(member=MR_JOB_DESC_FACTORY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=framework, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[JobDescFactoryBase] identifier[getFrameworkSpecificJobDescFactory] operator[SEP] identifier[Configuration] identifier[jobConf] operator[SEP] { identifier[Framework] identifier[framework] operator[=] identifier[getFramework] operator[SEP] identifier[jobConf] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[framework] operator[SEP] { Keyword[case] identifier[PIG] operator[:] Keyword[return] identifier[PIG_JOB_DESC_FACTORY] operator[SEP] Keyword[case] identifier[SCALDING] operator[:] Keyword[return] identifier[SCALDING_JOB_DESC_FACTORY] operator[SEP] Keyword[default] operator[:] Keyword[return] identifier[MR_JOB_DESC_FACTORY] operator[SEP] } }
public static void wait(Object lock, long timeout) { try { synchronized (lock) { lock.wait(timeout); } } catch (InterruptedException e) {} }
class class_name[name] begin[{] method[wait, return_type[void], modifier[public static], parameter[lock, timeout]] begin[{] TryStatement(block=[SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wait, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, lock=MemberReference(member=lock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[wait] operator[SEP] identifier[Object] identifier[lock] , Keyword[long] identifier[timeout] operator[SEP] { Keyword[try] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { identifier[lock] operator[SEP] identifier[wait] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { } }
URL parseLocalRefUrl( final HttpServletRequest request, final String refUrl) { URL rslt = null; // default if (StringUtils.isNotBlank(refUrl)) { try { final URL context = new URL(request.getRequestURL().toString()); final URL location = new URL(context, refUrl); if (location.getProtocol().equals(context.getProtocol()) && location.getHost().equals(context.getHost()) && location.getPort() == context.getPort()) { rslt = location; } else { log.warn("The specified refUrl is not local: " + refUrl); } } catch (Exception e) { log.warn("Unable to analyze specified refUrl: " + refUrl); log.debug(e); } } return rslt; }
class class_name[name] begin[{] method[parseLocalRefUrl, return_type[type[URL]], modifier[default], parameter[request, refUrl]] begin[{] local_variable[type[URL], rslt] if[call[StringUtils.isNotBlank, parameter[member[.refUrl]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRequestURL, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[], member=toString, 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=URL, sub_type=None)), name=context)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=refUrl, 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=URL, sub_type=None)), name=location)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getProtocol, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProtocol, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getHost, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHost, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), operator===), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The specified refUrl is not local: "), operandr=MemberReference(member=refUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rslt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to analyze specified refUrl: "), operandr=MemberReference(member=refUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.rslt]] end[}] END[}]
identifier[URL] identifier[parseLocalRefUrl] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[String] identifier[refUrl] operator[SEP] { identifier[URL] identifier[rslt] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[refUrl] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] identifier[URL] identifier[context] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[request] operator[SEP] identifier[getRequestURL] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[URL] identifier[location] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[context] , identifier[refUrl] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[location] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[context] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[location] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[context] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[location] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[==] identifier[context] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] { identifier[rslt] operator[=] identifier[location] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[refUrl] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[refUrl] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[rslt] operator[SEP] }
protected static CharSequence encodeUriQuery(CharSequence in) { /* * Note that I can't simply use URI.java to encode because it will escape pre-existing escaped things. TODO: * replace/compare to with Rewrite Encoding */ StringBuilder outBuf = null; Formatter formatter = null; for (int i = 0; i < in.length(); i++) { char c = in.charAt(i); boolean escape = true; if (c < 128) { if (asciiQueryChars.get(c)) { escape = false; } } else if (!Character.isISOControl(c) && !Character.isSpaceChar(c)) { /* * not-ascii */ escape = false; } if (!escape) { if (outBuf != null) outBuf.append(c); } else { /* * escape */ if (outBuf == null) { outBuf = new StringBuilder(in.length() + 5 * 3); outBuf.append(in, 0, i); formatter = new Formatter(outBuf); } /* * leading %, 0 padded, width 2, capital hex */ formatter.format("%%%02X", (int) c);// TODO } } return outBuf != null ? outBuf : in; }
class class_name[name] begin[{] method[encodeUriQuery, return_type[type[CharSequence]], modifier[static protected], parameter[in]] begin[{] local_variable[type[StringBuilder], outBuf] local_variable[type[Formatter], formatter] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=escape)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isISOControl, postfix_operators=[], prefix_operators=['!'], qualifier=Character, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSpaceChar, postfix_operators=[], prefix_operators=['!'], qualifier=Character, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=escape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=asciiQueryChars, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=escape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))])), IfStatement(condition=MemberReference(member=escape, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=outBuf, 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=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=*), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, 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=append, postfix_operators=[], prefix_operators=[], qualifier=outBuf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=formatter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=outBuf, 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=Formatter, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%%%02X"), Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))], member=format, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=outBuf, 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=outBuf, selectors=[], type_arguments=None), label=None))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=in, 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) return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=outBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=outBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[protected] Keyword[static] identifier[CharSequence] identifier[encodeUriQuery] operator[SEP] identifier[CharSequence] identifier[in] operator[SEP] { identifier[StringBuilder] identifier[outBuf] operator[=] Other[null] operator[SEP] identifier[Formatter] identifier[formatter] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[in] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[in] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[boolean] identifier[escape] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[<] Other[128] operator[SEP] { Keyword[if] operator[SEP] identifier[asciiQueryChars] operator[SEP] identifier[get] operator[SEP] identifier[c] operator[SEP] operator[SEP] { identifier[escape] operator[=] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[Character] operator[SEP] identifier[isISOControl] operator[SEP] identifier[c] operator[SEP] operator[&&] operator[!] identifier[Character] operator[SEP] identifier[isSpaceChar] operator[SEP] identifier[c] operator[SEP] operator[SEP] { identifier[escape] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[escape] operator[SEP] { Keyword[if] operator[SEP] identifier[outBuf] operator[!=] Other[null] operator[SEP] identifier[outBuf] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[outBuf] operator[==] Other[null] operator[SEP] { identifier[outBuf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[in] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[5] operator[*] Other[3] operator[SEP] operator[SEP] identifier[outBuf] operator[SEP] identifier[append] operator[SEP] identifier[in] , Other[0] , identifier[i] operator[SEP] operator[SEP] identifier[formatter] operator[=] Keyword[new] identifier[Formatter] operator[SEP] identifier[outBuf] operator[SEP] operator[SEP] } identifier[formatter] operator[SEP] identifier[format] operator[SEP] literal[String] , operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[outBuf] operator[!=] Other[null] operator[?] identifier[outBuf] operator[:] identifier[in] operator[SEP] }
protected GlobalTransform getTransform(File inputMatrixFile, MatrixIO.Format format) { return new PointWiseMutualInformationGlobalTransform( inputMatrixFile, format); }
class class_name[name] begin[{] method[getTransform, return_type[type[GlobalTransform]], modifier[protected], parameter[inputMatrixFile, format]] begin[{] return[ClassCreator(arguments=[MemberReference(member=inputMatrixFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=format, 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=PointWiseMutualInformationGlobalTransform, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[GlobalTransform] identifier[getTransform] operator[SEP] identifier[File] identifier[inputMatrixFile] , identifier[MatrixIO] operator[SEP] identifier[Format] identifier[format] operator[SEP] { Keyword[return] Keyword[new] identifier[PointWiseMutualInformationGlobalTransform] operator[SEP] identifier[inputMatrixFile] , identifier[format] operator[SEP] operator[SEP] }
@Override public boolean keyExists(String table, String key) { return get(table, key) != null; }
class class_name[name] begin[{] method[keyExists, return_type[type[boolean]], modifier[public], parameter[table, key]] begin[{] return[binary_operation[call[.get, parameter[member[.table], member[.key]]], !=, literal[null]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[keyExists] operator[SEP] identifier[String] identifier[table] , identifier[String] identifier[key] operator[SEP] { Keyword[return] identifier[get] operator[SEP] identifier[table] , identifier[key] operator[SEP] operator[!=] Other[null] operator[SEP] }
public static String getMimeType(final String ext) { String mimeType = lookupMimeType(ext); if (mimeType == null) { mimeType = MIME_APPLICATION_OCTET_STREAM; } return mimeType; }
class class_name[name] begin[{] method[getMimeType, return_type[type[String]], modifier[public static], parameter[ext]] begin[{] local_variable[type[String], mimeType] if[binary_operation[member[.mimeType], ==, literal[null]]] begin[{] assign[member[.mimeType], member[.MIME_APPLICATION_OCTET_STREAM]] else begin[{] None end[}] return[member[.mimeType]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getMimeType] operator[SEP] Keyword[final] identifier[String] identifier[ext] operator[SEP] { identifier[String] identifier[mimeType] operator[=] identifier[lookupMimeType] operator[SEP] identifier[ext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mimeType] operator[==] Other[null] operator[SEP] { identifier[mimeType] operator[=] identifier[MIME_APPLICATION_OCTET_STREAM] operator[SEP] } Keyword[return] identifier[mimeType] operator[SEP] }
@Override public Retina retinaByName(String name) throws ApiException { List<Retina> retinas = api.getRetinas(name); if (retinas == null || retinas.size() == 0) { return null; } return retinas.get(0); }
class class_name[name] begin[{] method[retinaByName, return_type[type[Retina]], modifier[public], parameter[name]] begin[{] local_variable[type[List], retinas] if[binary_operation[binary_operation[member[.retinas], ==, literal[null]], ||, binary_operation[call[retinas.size, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[retinas.get, parameter[literal[0]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Retina] identifier[retinaByName] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[List] operator[<] identifier[Retina] operator[>] identifier[retinas] operator[=] identifier[api] operator[SEP] identifier[getRetinas] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retinas] operator[==] Other[null] operator[||] identifier[retinas] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[retinas] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] }
private void doAPKWithAPKBuilder( File outputFile, File dexFile, File zipArchive, Collection<File> sourceFolders, List<File> jarFiles, Collection<File> nativeFolders, boolean signWithDebugKeyStore ) throws MojoExecutionException { getLog().debug( "Building APK with internal APKBuilder" ); //A when jack is running the classes directory will not get filled (usually) // so let's skip it if it wasn't created by something else if ( projectOutputDirectory.exists() || !getJack().isEnabled() ) { sourceFolders.add( projectOutputDirectory ); } for ( Artifact artifact : filterArtifacts( getRelevantCompileArtifacts(), skipDependencies, artifactTypeSet.getIncludes(), artifactTypeSet.getExcludes(), artifactSet.getIncludes(), artifactSet.getExcludes() ) ) { getLog().debug( "Found artifact for APK :" + artifact ); if ( extractDuplicates ) { try { computeDuplicateFiles( artifact.getFile() ); } catch ( Exception e ) { getLog().warn( "Cannot compute duplicates files from " + artifact.getFile().getAbsolutePath(), e ); } } jarFiles.add( artifact.getFile() ); } for ( File src : sourceFolders ) { computeDuplicateFilesInSource( src ); } // Check duplicates. if ( extractDuplicates ) { try { extractDuplicateFiles( jarFiles, sourceFolders ); } catch ( IOException e ) { getLog().error( "Could not extract duplicates to duplicate-resources.jar", e ); } } try { final String debugKeyStore = signWithDebugKeyStore ? ApkBuilder.getDebugKeystore() : null; final ApkBuilder apkBuilder = new ApkBuilder( outputFile, zipArchive, dexFile, debugKeyStore, null ); if ( apkDebug ) { apkBuilder.setDebugMode( true ); } for ( File sourceFolder : sourceFolders ) { getLog().debug( "Adding source folder : " + sourceFolder ); // Use ApkBuilder#addFile() to explicitly add resource files so that we can add META-INF/services. addResourcesFromFolder( apkBuilder, sourceFolder ); } for ( File jarFile : jarFiles ) { boolean excluded = false; if ( excludeJarResourcesPatterns != null ) { final String name = jarFile.getName(); getLog().debug( "Checking " + name + " against patterns" ); for ( Pattern pattern : excludeJarResourcesPatterns ) { final Matcher matcher = pattern.matcher( name ); if ( matcher.matches() ) { getLog().debug( "Jar " + name + " excluded by pattern " + pattern ); excluded = true; break; } else { getLog().debug( "Jar " + name + " not excluded by pattern " + pattern ); } } } if ( excluded ) { continue; } if ( jarFile.isDirectory() ) { getLog().debug( "Adding resources from jar folder : " + jarFile ); final String[] filenames = jarFile.list( new FilenameFilter() { public boolean accept( File dir, String name ) { return PATTERN_JAR_EXT.matcher( name ).matches(); } } ); for ( String filename : filenames ) { final File innerJar = new File( jarFile, filename ); getLog().debug( "Adding resources from innerJar : " + innerJar ); apkBuilder.addResourcesFromJar( innerJar ); } } else { getLog().debug( "Adding resources from : " + jarFile ); apkBuilder.addResourcesFromJar( jarFile ); } } addSecondaryDexes( dexFile, apkBuilder ); for ( File nativeFolder : nativeFolders ) { getLog().debug( "Adding native library : " + nativeFolder ); apkBuilder.addNativeLibraries( nativeFolder ); } apkBuilder.sealApk(); } catch ( ApkCreationException | SealedApkException | IOException e ) { throw new MojoExecutionException( e.getMessage(), e ); } catch ( DuplicateFileException e ) { final String msg = String.format( "Duplicated file: %s, found in archive %s and %s", e.getArchivePath(), e.getFile1(), e.getFile2() ); throw new MojoExecutionException( msg, e ); } }
class class_name[name] begin[{] method[doAPKWithAPKBuilder, return_type[void], modifier[private], parameter[outputFile, dexFile, zipArchive, sourceFolders, jarFiles, nativeFolders, signWithDebugKeyStore]] begin[{] call[.getLog, parameter[]] if[binary_operation[call[projectOutputDirectory.exists, parameter[]], ||, call[.getJack, parameter[]]]] begin[{] call[sourceFolders.add, parameter[member[.projectOutputDirectory]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found artifact for APK :"), operandr=MemberReference(member=artifact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=extractDuplicates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=artifact, selectors=[], type_arguments=None)], member=computeDuplicateFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot compute duplicates files from "), operandr=MethodInvocation(arguments=[], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=artifact, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=artifact, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=jarFiles, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRelevantCompileArtifacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=skipDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getIncludes, postfix_operators=[], prefix_operators=[], qualifier=artifactTypeSet, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getExcludes, postfix_operators=[], prefix_operators=[], qualifier=artifactTypeSet, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIncludes, postfix_operators=[], prefix_operators=[], qualifier=artifactSet, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getExcludes, postfix_operators=[], prefix_operators=[], qualifier=artifactSet, selectors=[], type_arguments=None)], member=filterArtifacts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=artifact)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Artifact, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=computeDuplicateFilesInSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sourceFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=src)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) if[member[.extractDuplicates]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jarFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractDuplicateFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not extract duplicates to duplicate-resources.jar"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=signWithDebugKeyStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[], member=getDebugKeystore, postfix_operators=[], prefix_operators=[], qualifier=ApkBuilder, selectors=[], type_arguments=None)), name=debugKeyStore)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=outputFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=zipArchive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dexFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=debugKeyStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApkBuilder, sub_type=None)), name=apkBuilder)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ApkBuilder, sub_type=None)), IfStatement(condition=MemberReference(member=apkDebug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setDebugMode, postfix_operators=[], prefix_operators=[], qualifier=apkBuilder, selectors=[], type_arguments=None), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding source folder : "), operandr=MemberReference(member=sourceFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=apkBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addResourcesFromFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sourceFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sourceFolder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=excluded)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=excludeJarResourcesPatterns, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=jarFile, selectors=[], type_arguments=None), name=name)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Checking "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" against patterns"), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=matcher)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=matches, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Jar "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not excluded by pattern "), operator=+), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Jar "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" excluded by pattern "), operator=+), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=excluded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=excludeJarResourcesPatterns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None))), label=None)])), IfStatement(condition=MemberReference(member=excluded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=jarFile, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding resources from : "), operandr=MemberReference(member=jarFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jarFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addResourcesFromJar, postfix_operators=[], prefix_operators=[], qualifier=apkBuilder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding resources from jar folder : "), operandr=MemberReference(member=jarFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=PATTERN_JAR_EXT, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dir, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FilenameFilter, sub_type=None))], member=list, postfix_operators=[], prefix_operators=[], qualifier=jarFile, selectors=[], type_arguments=None), name=filenames)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=jarFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filename, 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=File, sub_type=None)), name=innerJar)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding resources from innerJar : "), operandr=MemberReference(member=innerJar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=innerJar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addResourcesFromJar, postfix_operators=[], prefix_operators=[], qualifier=apkBuilder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=filenames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=filename)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=jarFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=jarFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dexFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apkBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSecondaryDexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding native library : "), operandr=MemberReference(member=nativeFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nativeFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addNativeLibraries, postfix_operators=[], prefix_operators=[], qualifier=apkBuilder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nativeFolders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=nativeFolder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=sealApk, postfix_operators=[], prefix_operators=[], qualifier=apkBuilder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ApkCreationException', 'SealedApkException', 'IOException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Duplicated file: %s, found in archive %s and %s"), MethodInvocation(arguments=[], member=getArchivePath, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFile1, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFile2, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=msg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, 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=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['DuplicateFileException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[doAPKWithAPKBuilder] operator[SEP] identifier[File] identifier[outputFile] , identifier[File] identifier[dexFile] , identifier[File] identifier[zipArchive] , identifier[Collection] operator[<] identifier[File] operator[>] identifier[sourceFolders] , identifier[List] operator[<] identifier[File] operator[>] identifier[jarFiles] , identifier[Collection] operator[<] identifier[File] operator[>] identifier[nativeFolders] , Keyword[boolean] identifier[signWithDebugKeyStore] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[projectOutputDirectory] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[||] operator[!] identifier[getJack] operator[SEP] operator[SEP] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[sourceFolders] operator[SEP] identifier[add] operator[SEP] identifier[projectOutputDirectory] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Artifact] identifier[artifact] operator[:] identifier[filterArtifacts] operator[SEP] identifier[getRelevantCompileArtifacts] operator[SEP] operator[SEP] , identifier[skipDependencies] , identifier[artifactTypeSet] operator[SEP] identifier[getIncludes] operator[SEP] operator[SEP] , identifier[artifactTypeSet] operator[SEP] identifier[getExcludes] operator[SEP] operator[SEP] , identifier[artifactSet] operator[SEP] identifier[getIncludes] operator[SEP] operator[SEP] , identifier[artifactSet] operator[SEP] identifier[getExcludes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[artifact] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extractDuplicates] operator[SEP] { Keyword[try] { identifier[computeDuplicateFiles] operator[SEP] identifier[artifact] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[artifact] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } identifier[jarFiles] operator[SEP] identifier[add] operator[SEP] identifier[artifact] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[File] identifier[src] operator[:] identifier[sourceFolders] operator[SEP] { identifier[computeDuplicateFilesInSource] operator[SEP] identifier[src] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[extractDuplicates] operator[SEP] { Keyword[try] { identifier[extractDuplicateFiles] operator[SEP] identifier[jarFiles] , identifier[sourceFolders] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[try] { Keyword[final] identifier[String] identifier[debugKeyStore] operator[=] identifier[signWithDebugKeyStore] operator[?] identifier[ApkBuilder] operator[SEP] identifier[getDebugKeystore] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[ApkBuilder] identifier[apkBuilder] operator[=] Keyword[new] identifier[ApkBuilder] operator[SEP] identifier[outputFile] , identifier[zipArchive] , identifier[dexFile] , identifier[debugKeyStore] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[apkDebug] operator[SEP] { identifier[apkBuilder] operator[SEP] identifier[setDebugMode] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[File] identifier[sourceFolder] operator[:] identifier[sourceFolders] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[sourceFolder] operator[SEP] operator[SEP] identifier[addResourcesFromFolder] operator[SEP] identifier[apkBuilder] , identifier[sourceFolder] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[File] identifier[jarFile] operator[:] identifier[jarFiles] operator[SEP] { Keyword[boolean] identifier[excluded] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[excludeJarResourcesPatterns] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[name] operator[=] identifier[jarFile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Pattern] identifier[pattern] operator[:] identifier[excludeJarResourcesPatterns] operator[SEP] { Keyword[final] identifier[Matcher] identifier[matcher] operator[=] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[pattern] operator[SEP] operator[SEP] identifier[excluded] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[pattern] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[excluded] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[jarFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[jarFile] operator[SEP] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[filenames] operator[=] identifier[jarFile] operator[SEP] identifier[list] operator[SEP] Keyword[new] identifier[FilenameFilter] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[dir] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[PATTERN_JAR_EXT] operator[SEP] identifier[matcher] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[filename] operator[:] identifier[filenames] operator[SEP] { Keyword[final] identifier[File] identifier[innerJar] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[jarFile] , identifier[filename] operator[SEP] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[innerJar] operator[SEP] operator[SEP] identifier[apkBuilder] operator[SEP] identifier[addResourcesFromJar] operator[SEP] identifier[innerJar] operator[SEP] operator[SEP] } } Keyword[else] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[jarFile] operator[SEP] operator[SEP] identifier[apkBuilder] operator[SEP] identifier[addResourcesFromJar] operator[SEP] identifier[jarFile] operator[SEP] operator[SEP] } } identifier[addSecondaryDexes] operator[SEP] identifier[dexFile] , identifier[apkBuilder] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[nativeFolder] operator[:] identifier[nativeFolders] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[nativeFolder] operator[SEP] operator[SEP] identifier[apkBuilder] operator[SEP] identifier[addNativeLibraries] operator[SEP] identifier[nativeFolder] operator[SEP] operator[SEP] } identifier[apkBuilder] operator[SEP] identifier[sealApk] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ApkCreationException] operator[|] identifier[SealedApkException] operator[|] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DuplicateFileException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getArchivePath] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getFile1] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getFile2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] } }
@Beta public Object parse(Type dataType, boolean close, CustomizeJsonParser customizeParser) throws IOException { try { if (!Void.class.equals(dataType)) { startParsing(); } return parseValue(null, dataType, new ArrayList<Type>(), null, customizeParser, true); } finally { if (close) { close(); } } }
class class_name[name] begin[{] method[parse, return_type[type[Object]], modifier[public], parameter[dataType, close, customizeParser]] begin[{] TryStatement(block=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=dataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Void, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=startParsing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=dataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=Type, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=customizeParser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=MemberReference(member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Beta] Keyword[public] identifier[Object] identifier[parse] operator[SEP] identifier[Type] identifier[dataType] , Keyword[boolean] identifier[close] , identifier[CustomizeJsonParser] identifier[customizeParser] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[Void] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] { identifier[startParsing] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[parseValue] operator[SEP] Other[null] , identifier[dataType] , Keyword[new] identifier[ArrayList] operator[<] identifier[Type] operator[>] operator[SEP] operator[SEP] , Other[null] , identifier[customizeParser] , literal[boolean] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[close] operator[SEP] { identifier[close] operator[SEP] operator[SEP] operator[SEP] } } }
protected Variable createVariable(final String name, final Object value, final Modifiers mods) throws UtilEvalError { return this.createVariable(name, null/* type */, value, mods); }
class class_name[name] begin[{] method[createVariable, return_type[type[Variable]], modifier[protected], parameter[name, value, mods]] begin[{] return[THIS[call[None.createVariable, parameter[member[.name], literal[null], member[.value], member[.mods]]]]] end[}] END[}]
Keyword[protected] identifier[Variable] identifier[createVariable] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Object] identifier[value] , Keyword[final] identifier[Modifiers] identifier[mods] operator[SEP] Keyword[throws] identifier[UtilEvalError] { Keyword[return] Keyword[this] operator[SEP] identifier[createVariable] operator[SEP] identifier[name] , Other[null] , identifier[value] , identifier[mods] operator[SEP] operator[SEP] }
public ApiResponse<GetAuditResponse> getAuditWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = getAuditValidateBeforeCall(null, null); Type localVarReturnType = new TypeToken<GetAuditResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[getAuditWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[GetAuditResponse] operator[>] identifier[getAuditWithHttpInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getAuditValidateBeforeCall] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[GetAuditResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
public PdfAppearance getAppearanceRadioCircle(boolean on) { PdfAppearance app = PdfAppearance.createAppearance(writer, box.getWidth(), box.getHeight()); switch (rotation) { case 90: app.setMatrix(0, 1, -1, 0, box.getHeight(), 0); break; case 180: app.setMatrix(-1, 0, 0, -1, box.getWidth(), box.getHeight()); break; case 270: app.setMatrix(0, -1, 1, 0, 0, box.getWidth()); break; } Rectangle box = new Rectangle(app.getBoundingBox()); float cx = box.getWidth() / 2; float cy = box.getHeight() / 2; float r = (Math.min(box.getWidth(), box.getHeight()) - borderWidth) / 2; if (r <= 0) return app; if (backgroundColor != null) { app.setColorFill(backgroundColor); app.circle(cx, cy, r + borderWidth / 2); app.fill(); } if (borderWidth > 0 && borderColor != null) { app.setLineWidth(borderWidth); app.setColorStroke(borderColor); app.circle(cx, cy, r); app.stroke(); } if (on) { if (textColor == null) app.resetGrayFill(); else app.setColorFill(textColor); app.circle(cx, cy, r / 2); app.fill(); } return app; }
class class_name[name] begin[{] method[getAppearanceRadioCircle, return_type[type[PdfAppearance]], modifier[public], parameter[on]] begin[{] local_variable[type[PdfAppearance], app] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=box, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setMatrix, postfix_operators=[], prefix_operators=[], qualifier=app, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=180)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=box, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=box, selectors=[], type_arguments=None)], member=setMatrix, postfix_operators=[], prefix_operators=[], qualifier=app, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=270)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=box, selectors=[], type_arguments=None)], member=setMatrix, postfix_operators=[], prefix_operators=[], qualifier=app, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=rotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[Rectangle], box] local_variable[type[float], cx] local_variable[type[float], cy] local_variable[type[float], r] if[binary_operation[member[.r], <=, literal[0]]] begin[{] return[member[.app]] else begin[{] None end[}] if[binary_operation[member[.backgroundColor], !=, literal[null]]] begin[{] call[app.setColorFill, parameter[member[.backgroundColor]]] call[app.circle, parameter[member[.cx], member[.cy], binary_operation[member[.r], +, binary_operation[member[.borderWidth], /, literal[2]]]]] call[app.fill, parameter[]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.borderWidth], >, literal[0]], &&, binary_operation[member[.borderColor], !=, literal[null]]]] begin[{] call[app.setLineWidth, parameter[member[.borderWidth]]] call[app.setColorStroke, parameter[member[.borderColor]]] call[app.circle, parameter[member[.cx], member[.cy], member[.r]]] call[app.stroke, parameter[]] else begin[{] None end[}] if[member[.on]] begin[{] if[binary_operation[member[.textColor], ==, literal[null]]] begin[{] call[app.resetGrayFill, parameter[]] else begin[{] call[app.setColorFill, parameter[member[.textColor]]] end[}] call[app.circle, parameter[member[.cx], member[.cy], binary_operation[member[.r], /, literal[2]]]] call[app.fill, parameter[]] else begin[{] None end[}] return[member[.app]] end[}] END[}]
Keyword[public] identifier[PdfAppearance] identifier[getAppearanceRadioCircle] operator[SEP] Keyword[boolean] identifier[on] operator[SEP] { identifier[PdfAppearance] identifier[app] operator[=] identifier[PdfAppearance] operator[SEP] identifier[createAppearance] operator[SEP] identifier[writer] , identifier[box] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[box] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[rotation] operator[SEP] { Keyword[case] Other[90] operator[:] identifier[app] operator[SEP] identifier[setMatrix] operator[SEP] Other[0] , Other[1] , operator[-] Other[1] , Other[0] , identifier[box] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[180] operator[:] identifier[app] operator[SEP] identifier[setMatrix] operator[SEP] operator[-] Other[1] , Other[0] , Other[0] , operator[-] Other[1] , identifier[box] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[box] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[270] operator[:] identifier[app] operator[SEP] identifier[setMatrix] operator[SEP] Other[0] , operator[-] Other[1] , Other[1] , Other[0] , Other[0] , identifier[box] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[Rectangle] identifier[box] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] identifier[app] operator[SEP] identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[cx] operator[=] identifier[box] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[float] identifier[cy] operator[=] identifier[box] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[float] identifier[r] operator[=] operator[SEP] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[box] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[box] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[-] identifier[borderWidth] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[r] operator[<=] Other[0] operator[SEP] Keyword[return] identifier[app] operator[SEP] Keyword[if] operator[SEP] identifier[backgroundColor] operator[!=] Other[null] operator[SEP] { identifier[app] operator[SEP] identifier[setColorFill] operator[SEP] identifier[backgroundColor] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[circle] operator[SEP] identifier[cx] , identifier[cy] , identifier[r] operator[+] identifier[borderWidth] operator[/] Other[2] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[fill] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[borderWidth] operator[>] Other[0] operator[&&] identifier[borderColor] operator[!=] Other[null] operator[SEP] { identifier[app] operator[SEP] identifier[setLineWidth] operator[SEP] identifier[borderWidth] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[setColorStroke] operator[SEP] identifier[borderColor] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[circle] operator[SEP] identifier[cx] , identifier[cy] , identifier[r] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[stroke] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[on] operator[SEP] { Keyword[if] operator[SEP] identifier[textColor] operator[==] Other[null] operator[SEP] identifier[app] operator[SEP] identifier[resetGrayFill] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[app] operator[SEP] identifier[setColorFill] operator[SEP] identifier[textColor] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[circle] operator[SEP] identifier[cx] , identifier[cy] , identifier[r] operator[/] Other[2] operator[SEP] operator[SEP] identifier[app] operator[SEP] identifier[fill] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[app] operator[SEP] }
private int pruneToRemove() { final Iterator<IndexedIndividual> iter = toRemove_.iterator(); int size = 0; while (iter.hasNext()) { final IndexedIndividual cls = iter.next(); /* @formatter:off * * Should be pruned when * it is not in taxonomy. * * @formatter:on */ final InstanceNode<ElkClass, ElkNamedIndividual> node = taxonomy_ .getInstanceNode(cls.getElkEntity()); if (node == null) { iter.remove(); continue; } // else size++; } return size; }
class class_name[name] begin[{] method[pruneToRemove, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[Iterator], iter] local_variable[type[int], size] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[IndexedIndividual], cls] local_variable[type[InstanceNode], node] if[binary_operation[member[.node], ==, literal[null]]] begin[{] call[iter.remove, parameter[]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] member[.size] end[}] return[member[.size]] end[}] END[}]
Keyword[private] Keyword[int] identifier[pruneToRemove] operator[SEP] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[IndexedIndividual] operator[>] identifier[iter] operator[=] identifier[toRemove_] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[IndexedIndividual] identifier[cls] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[InstanceNode] operator[<] identifier[ElkClass] , identifier[ElkNamedIndividual] operator[>] identifier[node] operator[=] identifier[taxonomy_] operator[SEP] identifier[getInstanceNode] operator[SEP] identifier[cls] operator[SEP] identifier[getElkEntity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] { identifier[iter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[size] operator[++] operator[SEP] } Keyword[return] identifier[size] operator[SEP] }
private Map<String, Object> changesDictForRevision(RevisionInternal rev) { Map<String, Object> changesDict = new HashMap<String, Object>(); changesDict.put("rev", rev.getRevID()); List<Map<String, Object>> changes = new ArrayList<Map<String, Object>>(); changes.add(changesDict); Map<String, Object> result = new HashMap<String, Object>(); result.put("seq", rev.getSequence()); result.put("id", rev.getDocID()); result.put("changes", changes); if (rev.isDeleted()) { result.put("deleted", true); } if (changesIncludesDocs) { result.put("doc", rev.getProperties()); } return result; }
class class_name[name] begin[{] method[changesDictForRevision, return_type[type[Map]], modifier[private], parameter[rev]] begin[{] local_variable[type[Map], changesDict] call[changesDict.put, parameter[literal["rev"], call[rev.getRevID, parameter[]]]] local_variable[type[List], changes] call[changes.add, parameter[member[.changesDict]]] local_variable[type[Map], result] call[result.put, parameter[literal["seq"], call[rev.getSequence, parameter[]]]] call[result.put, parameter[literal["id"], call[rev.getDocID, parameter[]]]] call[result.put, parameter[literal["changes"], member[.changes]]] if[call[rev.isDeleted, parameter[]]] begin[{] call[result.put, parameter[literal["deleted"], literal[true]]] else begin[{] None end[}] if[member[.changesIncludesDocs]] begin[{] call[result.put, parameter[literal["doc"], call[rev.getProperties, parameter[]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[changesDictForRevision] operator[SEP] identifier[RevisionInternal] identifier[rev] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[changesDict] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[changesDict] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rev] operator[SEP] identifier[getRevID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[changes] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[changes] operator[SEP] identifier[add] operator[SEP] identifier[changesDict] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rev] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rev] operator[SEP] identifier[getDocID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[changes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rev] operator[SEP] identifier[isDeleted] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[changesIncludesDocs] operator[SEP] { identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rev] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }