code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
protected void addFacetOptions(StringBuffer query, final boolean useLimit) { // mincount if (m_config.getMinCount() != null) { appendFacetOption(query, "mincount", m_config.getMinCount().toString()); } // limit if (useLimit && (m_config.getLimit() != null)) { appendFacetOption(query, "limit", m_config.getLimit().toString()); } // sort if (m_config.getSortOrder() != null) { appendFacetOption(query, "sort", m_config.getSortOrder().toString()); } // prefix if (!m_config.getPrefix().isEmpty()) { appendFacetOption(query, "prefix", m_config.getPrefix()); } }
class class_name[name] begin[{] method[addFacetOptions, return_type[void], modifier[protected], parameter[query, useLimit]] begin[{] if[binary_operation[call[m_config.getMinCount, parameter[]], !=, literal[null]]] begin[{] call[.appendFacetOption, parameter[member[.query], literal["mincount"], call[m_config.getMinCount, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.useLimit], &&, binary_operation[call[m_config.getLimit, parameter[]], !=, literal[null]]]] begin[{] call[.appendFacetOption, parameter[member[.query], literal["limit"], call[m_config.getLimit, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[m_config.getSortOrder, parameter[]], !=, literal[null]]] begin[{] call[.appendFacetOption, parameter[member[.query], literal["sort"], call[m_config.getSortOrder, parameter[]]]] else begin[{] None end[}] if[call[m_config.getPrefix, parameter[]]] begin[{] call[.appendFacetOption, parameter[member[.query], literal["prefix"], call[m_config.getPrefix, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addFacetOptions] operator[SEP] identifier[StringBuffer] identifier[query] , Keyword[final] Keyword[boolean] identifier[useLimit] operator[SEP] { Keyword[if] operator[SEP] identifier[m_config] operator[SEP] identifier[getMinCount] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[appendFacetOption] operator[SEP] identifier[query] , literal[String] , identifier[m_config] operator[SEP] identifier[getMinCount] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[useLimit] operator[&&] operator[SEP] identifier[m_config] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[appendFacetOption] operator[SEP] identifier[query] , literal[String] , identifier[m_config] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m_config] operator[SEP] identifier[getSortOrder] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[appendFacetOption] operator[SEP] identifier[query] , literal[String] , identifier[m_config] operator[SEP] identifier[getSortOrder] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[m_config] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[appendFacetOption] operator[SEP] identifier[query] , literal[String] , identifier[m_config] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static ContextLoaderListener createSpringContextLoader(final WebApplicationContext webApplicationContext) { return new ContextLoaderListener() { @SuppressWarnings("unchecked") @Override protected WebApplicationContext createWebApplicationContext(ServletContext sc) { return webApplicationContext; } }; }
class class_name[name] begin[{] method[createSpringContextLoader, return_type[type[ContextLoaderListener]], modifier[public static], parameter[webApplicationContext]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings), Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=webApplicationContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'protected'}, name=createWebApplicationContext, parameters=[FormalParameter(annotations=[], modifiers=set(), name=sc, type=ReferenceType(arguments=None, dimensions=[], name=ServletContext, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=WebApplicationContext, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ContextLoaderListener, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ContextLoaderListener] identifier[createSpringContextLoader] operator[SEP] Keyword[final] identifier[WebApplicationContext] identifier[webApplicationContext] operator[SEP] { Keyword[return] Keyword[new] identifier[ContextLoaderListener] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[protected] identifier[WebApplicationContext] identifier[createWebApplicationContext] operator[SEP] identifier[ServletContext] identifier[sc] operator[SEP] { Keyword[return] identifier[webApplicationContext] operator[SEP] } } operator[SEP] }
@Override public Result append(Append append) throws IOException { LOG.trace("append(Append)"); Span span = TRACER.spanBuilder("BigtableTable.append").startSpan(); try (Scope scope = TRACER.withSpan(span)) { com.google.cloud.bigtable.data.v2.models.Row response = clientWrapper.readModifyWriteRow(hbaseAdapter.adapt(append)); // The bigtable API will always return the mutated results. In order to maintain // compatibility, simply return null when results were not requested. if (append.isReturnResults()) { return Adapters.ROW_ADAPTER.adaptResponse(response); } else { return null; } } catch (Throwable t) { span.setStatus(Status.UNKNOWN); throw logAndCreateIOException("append", append.getRow(), t); } finally { span.end(); } }
class class_name[name] begin[{] method[append, return_type[type[Result]], modifier[public], parameter[append]] begin[{] call[LOG.trace, parameter[literal["append(Append)"]]] local_variable[type[Span], span] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=append, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=adapt, postfix_operators=[], prefix_operators=[], qualifier=hbaseAdapter, selectors=[], type_arguments=None)], member=readModifyWriteRow, postfix_operators=[], prefix_operators=[], qualifier=clientWrapper, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=cloud, sub_type=ReferenceType(arguments=None, dimensions=None, name=bigtable, sub_type=ReferenceType(arguments=None, dimensions=None, name=data, sub_type=ReferenceType(arguments=None, dimensions=None, name=v2, sub_type=ReferenceType(arguments=None, dimensions=None, name=models, sub_type=ReferenceType(arguments=None, dimensions=None, name=Row, sub_type=None))))))))), IfStatement(condition=MethodInvocation(arguments=[], member=isReturnResults, postfix_operators=[], prefix_operators=[], qualifier=append, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=adaptResponse, postfix_operators=[], prefix_operators=[], qualifier=Adapters.ROW_ADAPTER, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], member=setStatus, postfix_operators=[], prefix_operators=[], qualifier=span, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="append"), MethodInvocation(arguments=[], member=getRow, postfix_operators=[], prefix_operators=[], qualifier=append, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logAndCreateIOException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=end, postfix_operators=[], prefix_operators=[], qualifier=span, selectors=[], type_arguments=None), label=None)], label=None, resources=[TryResource(annotations=[], modifiers=set(), name=scope, type=ReferenceType(arguments=None, dimensions=[], name=Scope, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=span, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withSpan, postfix_operators=[], prefix_operators=[], qualifier=TRACER, selectors=[], type_arguments=None))]) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Result] identifier[append] operator[SEP] identifier[Append] identifier[append] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Span] identifier[span] operator[=] identifier[TRACER] operator[SEP] identifier[spanBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[startSpan] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Scope] identifier[scope] operator[=] identifier[TRACER] operator[SEP] identifier[withSpan] operator[SEP] identifier[span] operator[SEP] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[cloud] operator[SEP] identifier[bigtable] operator[SEP] identifier[data] operator[SEP] identifier[v2] operator[SEP] identifier[models] operator[SEP] identifier[Row] identifier[response] operator[=] identifier[clientWrapper] operator[SEP] identifier[readModifyWriteRow] operator[SEP] identifier[hbaseAdapter] operator[SEP] identifier[adapt] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[append] operator[SEP] identifier[isReturnResults] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Adapters] operator[SEP] identifier[ROW_ADAPTER] operator[SEP] identifier[adaptResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[span] operator[SEP] identifier[setStatus] operator[SEP] identifier[Status] operator[SEP] identifier[UNKNOWN] operator[SEP] operator[SEP] Keyword[throw] identifier[logAndCreateIOException] operator[SEP] literal[String] , identifier[append] operator[SEP] identifier[getRow] operator[SEP] operator[SEP] , identifier[t] operator[SEP] operator[SEP] } Keyword[finally] { identifier[span] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void write(int c) throws IOException { for(OutputStream os : oss) { os.write(c); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[c]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=os, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=oss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=os)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OutputStream, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[int] identifier[c] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[for] operator[SEP] identifier[OutputStream] identifier[os] operator[:] identifier[oss] operator[SEP] { identifier[os] operator[SEP] identifier[write] operator[SEP] identifier[c] operator[SEP] operator[SEP] } }
@Override protected void serializeTo(RawDataBuffer out) { super.serializeTo(out); out.writeInt(sessionId.asInt()); out.writeBoolean(transacted); out.writeInt(acknowledgeMode); }
class class_name[name] begin[{] method[serializeTo, return_type[void], modifier[protected], parameter[out]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serializeTo, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[out.writeInt, parameter[call[sessionId.asInt, parameter[]]]] call[out.writeBoolean, parameter[member[.transacted]]] call[out.writeInt, parameter[member[.acknowledgeMode]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[serializeTo] operator[SEP] identifier[RawDataBuffer] identifier[out] operator[SEP] { Keyword[super] operator[SEP] identifier[serializeTo] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[sessionId] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeBoolean] operator[SEP] identifier[transacted] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[acknowledgeMode] operator[SEP] operator[SEP] }
protected void resetAllValues() { logic = new FilterFieldStringData(CommonFilterConstants.LOGIC_FILTER_VAR, CommonFilterConstants.LOGIC_FILTER_VAR_DESC); filterVars.clear(); filterVars.add(logic); }
class class_name[name] begin[{] method[resetAllValues, return_type[void], modifier[protected], parameter[]] begin[{] assign[member[.logic], ClassCreator(arguments=[MemberReference(member=LOGIC_FILTER_VAR, postfix_operators=[], prefix_operators=[], qualifier=CommonFilterConstants, selectors=[]), MemberReference(member=LOGIC_FILTER_VAR_DESC, postfix_operators=[], prefix_operators=[], qualifier=CommonFilterConstants, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FilterFieldStringData, sub_type=None))] call[filterVars.clear, parameter[]] call[filterVars.add, parameter[member[.logic]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[resetAllValues] operator[SEP] operator[SEP] { identifier[logic] operator[=] Keyword[new] identifier[FilterFieldStringData] operator[SEP] identifier[CommonFilterConstants] operator[SEP] identifier[LOGIC_FILTER_VAR] , identifier[CommonFilterConstants] operator[SEP] identifier[LOGIC_FILTER_VAR_DESC] operator[SEP] operator[SEP] identifier[filterVars] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[filterVars] operator[SEP] identifier[add] operator[SEP] identifier[logic] operator[SEP] operator[SEP] }
private static double[][] quantile(double[] x, double[] y) { Arrays.sort(x); Arrays.sort(y); int n = Math.min(x.length, y.length); double[][] q = new double[n][2]; for (int i = 0; i < n; i++) { double p = (i + 1) / (n + 1.0); q[i][0] = x[(int) Math.round(p * x.length)]; q[i][1] = y[(int) Math.round(p * y.length)]; } return q; }
class class_name[name] begin[{] method[quantile, return_type[type[double]], modifier[private static], parameter[x, y]] begin[{] call[Arrays.sort, parameter[member[.x]]] call[Arrays.sort, parameter[member[.y]]] local_variable[type[int], n] local_variable[type[double], q] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operator=+), operator=/), name=p)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[]), operator=*)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=y, selectors=[]), operator=*)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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[.q]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[quantile] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x] , Keyword[double] operator[SEP] operator[SEP] identifier[y] operator[SEP] { identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[y] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[x] operator[SEP] identifier[length] , identifier[y] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[q] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[p] operator[=] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[/] operator[SEP] identifier[n] operator[+] literal[Float] operator[SEP] operator[SEP] identifier[q] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[=] identifier[x] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[p] operator[*] identifier[x] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[q] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[=] identifier[y] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[p] operator[*] identifier[y] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[q] operator[SEP] }
public Observable<ServiceResponse<RouteFilterRuleInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (routeFilterName == null) { throw new IllegalArgumentException("Parameter routeFilterName is required and cannot be null."); } if (ruleName == null) { throw new IllegalArgumentException("Parameter ruleName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (routeFilterRuleParameters == null) { throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); final String apiVersion = "2018-04-01"; Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<RouteFilterRuleInner>() { }.getType()); }
class class_name[name] begin[{] method[createOrUpdateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters]] begin[{] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.routeFilterName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter routeFilterName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.ruleName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter ruleName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.routeFilterRuleParameters], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter routeFilterRuleParameters is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[Validator.validate, parameter[member[.routeFilterRuleParameters]]] local_variable[type[String], apiVersion] local_variable[type[Observable], observable] return[call[client.getAzureClient, parameter[]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[RouteFilterRuleInner] operator[>] operator[>] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[routeFilterName] , identifier[String] identifier[ruleName] , identifier[RouteFilterRuleInner] identifier[routeFilterRuleParameters] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[routeFilterName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ruleName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[routeFilterRuleParameters] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Validator] operator[SEP] identifier[validate] operator[SEP] identifier[routeFilterRuleParameters] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[apiVersion] operator[=] literal[String] operator[SEP] identifier[Observable] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] operator[>] identifier[observable] operator[=] identifier[service] operator[SEP] identifier[createOrUpdate] operator[SEP] identifier[resourceGroupName] , identifier[routeFilterName] , identifier[ruleName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[routeFilterRuleParameters] , identifier[apiVersion] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[client] operator[SEP] identifier[getAzureClient] operator[SEP] operator[SEP] operator[SEP] identifier[getPutOrPatchResultAsync] operator[SEP] identifier[observable] , Keyword[new] identifier[TypeToken] operator[<] identifier[RouteFilterRuleInner] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public V setValue(V value) { if (value == null) throw new NullPointerException(); V v = val; val = value; map.put(key, value); return v; }
class class_name[name] begin[{] method[setValue, return_type[type[V]], modifier[public], parameter[value]] begin[{] if[binary_operation[member[.value], ==, 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=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[V], v] assign[member[.val], member[.value]] call[map.put, parameter[member[.key], member[.value]]] return[member[.v]] end[}] END[}]
Keyword[public] identifier[V] identifier[setValue] operator[SEP] identifier[V] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] identifier[V] identifier[v] operator[=] identifier[val] operator[SEP] identifier[val] operator[=] identifier[value] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[v] operator[SEP] }
@Deprecated public void addRequestHandler(RequestHandler requestHandler) { checkMutability(); requestHandler2s.add(RequestHandler2.adapt(requestHandler)); }
class class_name[name] begin[{] method[addRequestHandler, return_type[void], modifier[public], parameter[requestHandler]] begin[{] call[.checkMutability, parameter[]] call[requestHandler2s.add, parameter[call[RequestHandler2.adapt, parameter[member[.requestHandler]]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[addRequestHandler] operator[SEP] identifier[RequestHandler] identifier[requestHandler] operator[SEP] { identifier[checkMutability] operator[SEP] operator[SEP] operator[SEP] identifier[requestHandler2s] operator[SEP] identifier[add] operator[SEP] identifier[RequestHandler2] operator[SEP] identifier[adapt] operator[SEP] identifier[requestHandler] operator[SEP] operator[SEP] operator[SEP] }
private void initWithKey(byte[] key) throws SymmetricKeyException { if (key == null) throw new SymmetricKeyException("Key cannot be null"); if (key.length != KEY_SIZE) throw new SymmetricKeyException("Key size is not " + KEY_SIZE + "bytes"); keyData = key; }
class class_name[name] begin[{] method[initWithKey, return_type[void], modifier[private], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Key cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SymmetricKeyException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[key.length], !=, member[.KEY_SIZE]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Key size is not "), operandr=MemberReference(member=KEY_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="bytes"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SymmetricKeyException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.keyData], member[.key]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initWithKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] Keyword[throws] identifier[SymmetricKeyException] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[SymmetricKeyException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[!=] identifier[KEY_SIZE] operator[SEP] Keyword[throw] Keyword[new] identifier[SymmetricKeyException] operator[SEP] literal[String] operator[+] identifier[KEY_SIZE] operator[+] literal[String] operator[SEP] operator[SEP] identifier[keyData] operator[=] identifier[key] operator[SEP] }
private String getMethodName(Method method) { StatName statNameAnnotation = method.getAnnotation(StatName.class); return statNameAnnotation != null ? statNameAnnotation.value() : method.getName(); }
class class_name[name] begin[{] method[getMethodName, return_type[type[String]], modifier[private], parameter[method]] begin[{] local_variable[type[StatName], statNameAnnotation] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=statNameAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=value, postfix_operators=[], prefix_operators=[], qualifier=statNameAnnotation, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[private] identifier[String] identifier[getMethodName] operator[SEP] identifier[Method] identifier[method] operator[SEP] { identifier[StatName] identifier[statNameAnnotation] operator[=] identifier[method] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[StatName] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[statNameAnnotation] operator[!=] Other[null] operator[?] identifier[statNameAnnotation] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[:] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] }
public void process() { if (!receiveQueue.isPresent()) { initQueue(); } receiveQueue.ifPresent(receiveQueue -> { T item; do { try { item = receiveQueue.poll(); } catch (Exception ex) { logger.debug("Unable to receive message", ex); initQueue(); item = null; } if (item != null) { sendToEventManager(item); } } while (item != null); }); }
class class_name[name] begin[{] method[process, return_type[void], modifier[public], parameter[]] begin[{] if[call[receiveQueue.isPresent, parameter[]]] begin[{] call[.initQueue, parameter[]] else begin[{] None end[}] call[receiveQueue.ifPresent, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), DoStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=poll, postfix_operators=[], prefix_operators=[], qualifier=receiveQueue, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to receive message"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=initQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=item, 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=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendToEventManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), condition=BinaryOperation(operandl=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], parameters=[MemberReference(member=receiveQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] end[}] END[}]
Keyword[public] Keyword[void] identifier[process] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[receiveQueue] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[initQueue] operator[SEP] operator[SEP] operator[SEP] } identifier[receiveQueue] operator[SEP] identifier[ifPresent] operator[SEP] identifier[receiveQueue] operator[->] { identifier[T] identifier[item] operator[SEP] Keyword[do] { Keyword[try] { identifier[item] operator[=] identifier[receiveQueue] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] identifier[initQueue] operator[SEP] operator[SEP] operator[SEP] identifier[item] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[item] operator[!=] Other[null] operator[SEP] { identifier[sendToEventManager] operator[SEP] identifier[item] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[item] operator[!=] Other[null] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
public static Iterator findParentGroups(IGroupMember gm) throws GroupsException { LOGGER.trace("Invoking findParentGroups for IGroupMember [{}]", gm); return instance().ifindParentGroups(gm); }
class class_name[name] begin[{] method[findParentGroups, return_type[type[Iterator]], modifier[public static], parameter[gm]] begin[{] call[LOGGER.trace, parameter[literal["Invoking findParentGroups for IGroupMember [{}]"], member[.gm]]] return[call[.instance, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Iterator] identifier[findParentGroups] operator[SEP] identifier[IGroupMember] identifier[gm] operator[SEP] Keyword[throws] identifier[GroupsException] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[gm] operator[SEP] operator[SEP] Keyword[return] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[ifindParentGroups] operator[SEP] identifier[gm] operator[SEP] operator[SEP] }
public PagedList<AvailableServiceSkuInner> listSkus(final String groupName, final String serviceName) { ServiceResponse<Page<AvailableServiceSkuInner>> response = listSkusSinglePageAsync(groupName, serviceName).toBlocking().single(); return new PagedList<AvailableServiceSkuInner>(response.body()) { @Override public Page<AvailableServiceSkuInner> nextPage(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
class class_name[name] begin[{] method[listSkus, return_type[type[PagedList]], modifier[public], parameter[groupName, serviceName]] begin[{] local_variable[type[ServiceResponse], response] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=body, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=nextPageLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listSkusNextSinglePageAsync, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=toBlocking, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=single, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=body, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=nextPage, parameters=[FormalParameter(annotations=[], modifiers=set(), name=nextPageLink, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AvailableServiceSkuInner, sub_type=None))], dimensions=[], name=Page, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AvailableServiceSkuInner, sub_type=None))], dimensions=None, name=PagedList, sub_type=None))] end[}] END[}]
Keyword[public] identifier[PagedList] operator[<] identifier[AvailableServiceSkuInner] operator[>] identifier[listSkus] operator[SEP] Keyword[final] identifier[String] identifier[groupName] , Keyword[final] identifier[String] identifier[serviceName] operator[SEP] { identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[AvailableServiceSkuInner] operator[>] operator[>] identifier[response] operator[=] identifier[listSkusSinglePageAsync] operator[SEP] identifier[groupName] , identifier[serviceName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[PagedList] operator[<] identifier[AvailableServiceSkuInner] operator[>] operator[SEP] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[AvailableServiceSkuInner] operator[>] identifier[nextPage] operator[SEP] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listSkusNextSinglePageAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
private void invokeScalarAlongDimension(ScalarOp op) { val dimension = op.dimensions().toIntVector(); //dimension = Shape.normalizeAxis(op.x().rank(), dimension); // do tad magic /** * Returns the {@link Shape#createShapeInformation(int[], int[], int, int, char)} * and the associated offsets for each {@link INDArray#tensorAlongDimension(int, int...)} * The first item is the shape information. The second one is the offsets. */ Pair<DataBuffer, DataBuffer> tadBuffers = tadManager.getTADOnlyShapeInfo(op.x(), dimension); Pointer hostTadShapeInfo = tadBuffers.getFirst().addressPointer(); Pointer hostTadOffsets = tadBuffers.getSecond().addressPointer(); Pointer devTadShapeInfoZ = null; Pointer devTadOffsetsZ = null; /** * Returns the {@link Shape#createShapeInformation(int[], int[], int, int, char)} * and the associated offsets for each {@link INDArray#tensorAlongDimension(int, int...)} * The first item is the shape information. The second one is the offsets. * * Note that this is the *result* TAD information. An op is always input (x) and output (z) * for result. * This is for assigning the result to of the operation along * the proper dimension. */ Pair<DataBuffer, DataBuffer> tadBuffersZ = tadManager.getTADOnlyShapeInfo(op.z(), dimension); devTadShapeInfoZ = tadBuffersZ.getFirst().addressPointer(); devTadOffsetsZ = tadBuffersZ.getSecond().addressPointer(); if (extraz.get() == null) extraz.set(new PointerPointer(32)); //PointerPointer dummy = extraz.get().put(hostTadShapeInfo, hostTadOffsets, devTadShapeInfoZ, devTadOffsetsZ); switch (op.getOpType()) { case SCALAR: loop.execScalar(null, op.opNum(), op.x().data().addressPointer(), (LongPointer) op.x().shapeInfoDataBuffer().addressPointer(), null, null, op.z().data().addressPointer(), (LongPointer) op.z().shapeInfoDataBuffer().addressPointer(), null, null, op.y().data().addressPointer(), (LongPointer) op.y().shapeInfoDataBuffer().addressPointer(), null, null, getPointerForExtraArgs(op, op.z().dataType()), op.dimensions().data().addressPointer(), (LongPointer) op.dimensions().shapeInfoDataBuffer().addressPointer(), null, null, (LongPointer) hostTadShapeInfo, (LongPointer) hostTadOffsets, (LongPointer) devTadShapeInfoZ, (LongPointer) devTadOffsetsZ); break; case SCALAR_BOOL: loop.execScalarBool(null, op.opNum(), op.x().data().addressPointer(), (LongPointer) op.x().shapeInfoDataBuffer().addressPointer(), null, null, op.z().data().addressPointer(), (LongPointer) op.z().shapeInfoDataBuffer().addressPointer(), null, null, op.y().data().addressPointer(), (LongPointer) op.y().shapeInfoDataBuffer().addressPointer(), null, null, getPointerForExtraArgs(op, op.z().dataType()), op.dimensions().data().addressPointer(), (LongPointer) op.dimensions().shapeInfoDataBuffer().addressPointer(), null, null, (LongPointer) hostTadShapeInfo, (LongPointer) hostTadOffsets, (LongPointer) devTadShapeInfoZ, (LongPointer) devTadOffsetsZ); break; default: throw new UnsupportedOperationException(); } }
class class_name[name] begin[{] method[invokeScalarAlongDimension, return_type[void], modifier[private], parameter[op]] begin[{] local_variable[type[val], dimension] local_variable[type[Pair], tadBuffers] local_variable[type[Pointer], hostTadShapeInfo] local_variable[type[Pointer], hostTadOffsets] local_variable[type[Pointer], devTadShapeInfoZ] local_variable[type[Pointer], devTadOffsetsZ] local_variable[type[Pair], tadBuffersZ] assign[member[.devTadShapeInfoZ], call[tadBuffersZ.getFirst, parameter[]]] assign[member[.devTadOffsetsZ], call[tadBuffersZ.getSecond, parameter[]]] if[binary_operation[call[extraz.get, parameter[]], ==, literal[null]]] begin[{] call[extraz.set, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PointerPointer, sub_type=None))]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['SCALAR'], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=opNum, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=y, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=y, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=dataType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getPointerForExtraArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=dimensions, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=dimensions, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Cast(expression=MemberReference(member=hostTadShapeInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=hostTadOffsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=devTadShapeInfoZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=devTadOffsetsZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None))], member=execScalar, postfix_operators=[], prefix_operators=[], qualifier=loop, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SCALAR_BOOL'], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=opNum, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=y, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=y, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=dataType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getPointerForExtraArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=dimensions, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=dimensions, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Cast(expression=MemberReference(member=hostTadShapeInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=hostTadOffsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=devTadShapeInfoZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), Cast(expression=MemberReference(member=devTadOffsetsZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None))], member=execScalarBool, postfix_operators=[], prefix_operators=[], qualifier=loop, selectors=[], type_arguments=None), label=None), BreakStatement(goto=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=UnsupportedOperationException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getOpType, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[invokeScalarAlongDimension] operator[SEP] identifier[ScalarOp] identifier[op] operator[SEP] { identifier[val] identifier[dimension] operator[=] identifier[op] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] identifier[toIntVector] operator[SEP] operator[SEP] operator[SEP] identifier[Pair] operator[<] identifier[DataBuffer] , identifier[DataBuffer] operator[>] identifier[tadBuffers] operator[=] identifier[tadManager] operator[SEP] identifier[getTADOnlyShapeInfo] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[dimension] operator[SEP] operator[SEP] identifier[Pointer] identifier[hostTadShapeInfo] operator[=] identifier[tadBuffers] operator[SEP] identifier[getFirst] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] identifier[Pointer] identifier[hostTadOffsets] operator[=] identifier[tadBuffers] operator[SEP] identifier[getSecond] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] identifier[Pointer] identifier[devTadShapeInfoZ] operator[=] Other[null] operator[SEP] identifier[Pointer] identifier[devTadOffsetsZ] operator[=] Other[null] operator[SEP] identifier[Pair] operator[<] identifier[DataBuffer] , identifier[DataBuffer] operator[>] identifier[tadBuffersZ] operator[=] identifier[tadManager] operator[SEP] identifier[getTADOnlyShapeInfo] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] , identifier[dimension] operator[SEP] operator[SEP] identifier[devTadShapeInfoZ] operator[=] identifier[tadBuffersZ] operator[SEP] identifier[getFirst] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] identifier[devTadOffsetsZ] operator[=] identifier[tadBuffersZ] operator[SEP] identifier[getSecond] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extraz] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] identifier[extraz] operator[SEP] identifier[set] operator[SEP] Keyword[new] identifier[PointerPointer] operator[SEP] Other[32] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[op] operator[SEP] identifier[getOpType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[SCALAR] operator[:] identifier[loop] operator[SEP] identifier[execScalar] operator[SEP] Other[null] , identifier[op] operator[SEP] identifier[opNum] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[getPointerForExtraArgs] operator[SEP] identifier[op] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[hostTadShapeInfo] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[hostTadOffsets] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[devTadShapeInfoZ] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[devTadOffsetsZ] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SCALAR_BOOL] operator[:] identifier[loop] operator[SEP] identifier[execScalarBool] operator[SEP] Other[null] , identifier[op] operator[SEP] identifier[opNum] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[getPointerForExtraArgs] operator[SEP] identifier[op] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[hostTadShapeInfo] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[hostTadOffsets] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[devTadShapeInfoZ] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[devTadOffsetsZ] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] operator[SEP] operator[SEP] } }
public Observable<ServiceResponse<Page<RedisPatchScheduleInner>>> listByRedisResourceNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByRedisResourceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<RedisPatchScheduleInner>>>>() { @Override public Observable<ServiceResponse<Page<RedisPatchScheduleInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<RedisPatchScheduleInner>> result = listByRedisResourceNextDelegate(response); return Observable.just(new ServiceResponse<Page<RedisPatchScheduleInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listByRedisResourceNextSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] if[binary_operation[member[.nextPageLink], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter nextPageLink is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], nextUrl] return[call[service.listByRedisResourceNext, parameter[member[.nextUrl], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisPatchScheduleInner] operator[>] operator[>] operator[>] identifier[listByRedisResourceNextSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[if] operator[SEP] identifier[nextPageLink] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[nextUrl] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[nextPageLink] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[listByRedisResourceNext] operator[SEP] identifier[nextUrl] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisPatchScheduleInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisPatchScheduleInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[RedisPatchScheduleInner] operator[>] operator[>] identifier[result] operator[=] identifier[listByRedisResourceNextDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisPatchScheduleInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public Stream<T> tailStream(T key, boolean inclusive, boolean parallel) { return StreamSupport.stream(tailSpliterator(key, inclusive), parallel); }
class class_name[name] begin[{] method[tailStream, return_type[type[Stream]], modifier[public], parameter[key, inclusive, parallel]] begin[{] return[call[StreamSupport.stream, parameter[call[.tailSpliterator, parameter[member[.key], member[.inclusive]]], member[.parallel]]]] end[}] END[}]
Keyword[public] identifier[Stream] operator[<] identifier[T] operator[>] identifier[tailStream] operator[SEP] identifier[T] identifier[key] , Keyword[boolean] identifier[inclusive] , Keyword[boolean] identifier[parallel] operator[SEP] { Keyword[return] identifier[StreamSupport] operator[SEP] identifier[stream] operator[SEP] identifier[tailSpliterator] operator[SEP] identifier[key] , identifier[inclusive] operator[SEP] , identifier[parallel] operator[SEP] operator[SEP] }
public boolean canTalkDAV() throws DAVException { IResponse response = null; try { // Send an options request. response = davClient.options(locator, newContext()); examineResponse(response); // Check for at least DAV level 1. String davHeader = response.getContext().getDAV(); return !((davHeader == null) || (davHeader.indexOf("1") == -1)); //$NON-NLS-1$ } catch (IOException exception) { throw new SystemException(exception); } finally { closeResponse(response); } }
class class_name[name] begin[{] method[canTalkDAV, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[IResponse], response] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=locator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=newContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=options, postfix_operators=[], prefix_operators=[], qualifier=davClient, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=examineResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getDAV, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=davHeader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=davHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=davHeader, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operator=||), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=exception, 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=SystemException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[canTalkDAV] operator[SEP] operator[SEP] Keyword[throws] identifier[DAVException] { identifier[IResponse] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[response] operator[=] identifier[davClient] operator[SEP] identifier[options] operator[SEP] identifier[locator] , identifier[newContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[examineResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[String] identifier[davHeader] operator[=] identifier[response] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getDAV] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[!] operator[SEP] operator[SEP] identifier[davHeader] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[davHeader] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[exception] operator[SEP] { Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] identifier[exception] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] } }
public static String stripDoubleSeps(String url) { while( url.indexOf("//") > 0 ) url = url.replace("//","/"); return url; }
class class_name[name] begin[{] method[stripDoubleSeps, return_type[type[String]], modifier[public static], parameter[url]] begin[{] while[binary_operation[call[url.indexOf, parameter[literal["//"]]], >, literal[0]]] begin[{] assign[member[.url], call[url.replace, parameter[literal["//"], literal["/"]]]] end[}] return[member[.url]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[stripDoubleSeps] operator[SEP] identifier[String] identifier[url] operator[SEP] { Keyword[while] operator[SEP] identifier[url] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>] Other[0] operator[SEP] identifier[url] operator[=] identifier[url] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[url] operator[SEP] }
public void marshall(CloudWatchAlarmDefinition cloudWatchAlarmDefinition, ProtocolMarshaller protocolMarshaller) { if (cloudWatchAlarmDefinition == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(cloudWatchAlarmDefinition.getComparisonOperator(), COMPARISONOPERATOR_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getEvaluationPeriods(), EVALUATIONPERIODS_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getNamespace(), NAMESPACE_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getPeriod(), PERIOD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getStatistic(), STATISTIC_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getThreshold(), THRESHOLD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getUnit(), UNIT_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getDimensions(), DIMENSIONS_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[cloudWatchAlarmDefinition, protocolMarshaller]] begin[{] if[binary_operation[member[.cloudWatchAlarmDefinition], ==, 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=getComparisonOperator, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=COMPARISONOPERATOR_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=getEvaluationPeriods, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=EVALUATIONPERIODS_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=getMetricName, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=METRICNAME_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=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=NAMESPACE_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=getPeriod, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=PERIOD_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=getStatistic, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=STATISTIC_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=getThreshold, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=THRESHOLD_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=getUnit, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=UNIT_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=getDimensions, postfix_operators=[], prefix_operators=[], qualifier=cloudWatchAlarmDefinition, selectors=[], type_arguments=None), MemberReference(member=DIMENSIONS_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[CloudWatchAlarmDefinition] identifier[cloudWatchAlarmDefinition] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[cloudWatchAlarmDefinition] 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[cloudWatchAlarmDefinition] operator[SEP] identifier[getComparisonOperator] operator[SEP] operator[SEP] , identifier[COMPARISONOPERATOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getEvaluationPeriods] operator[SEP] operator[SEP] , identifier[EVALUATIONPERIODS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getMetricName] operator[SEP] operator[SEP] , identifier[METRICNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] , identifier[NAMESPACE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getPeriod] operator[SEP] operator[SEP] , identifier[PERIOD_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getStatistic] operator[SEP] operator[SEP] , identifier[STATISTIC_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getThreshold] operator[SEP] operator[SEP] , identifier[THRESHOLD_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] , identifier[UNIT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[cloudWatchAlarmDefinition] operator[SEP] identifier[getDimensions] operator[SEP] operator[SEP] , identifier[DIMENSIONS_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 ListOrganizationsResult withOrganizationSummaries(OrganizationSummary... organizationSummaries) { if (this.organizationSummaries == null) { setOrganizationSummaries(new java.util.ArrayList<OrganizationSummary>(organizationSummaries.length)); } for (OrganizationSummary ele : organizationSummaries) { this.organizationSummaries.add(ele); } return this; }
class class_name[name] begin[{] method[withOrganizationSummaries, return_type[type[ListOrganizationsResult]], modifier[public], parameter[organizationSummaries]] begin[{] if[binary_operation[THIS[member[None.organizationSummaries]], ==, literal[null]]] begin[{] call[.setOrganizationSummaries, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=organizationSummaries, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=OrganizationSummary, sub_type=None))], dimensions=None, name=ArrayList, 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=organizationSummaries, 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=organizationSummaries, 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=OrganizationSummary, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListOrganizationsResult] identifier[withOrganizationSummaries] operator[SEP] identifier[OrganizationSummary] operator[...] identifier[organizationSummaries] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[organizationSummaries] operator[==] Other[null] operator[SEP] { identifier[setOrganizationSummaries] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[OrganizationSummary] operator[>] operator[SEP] identifier[organizationSummaries] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[OrganizationSummary] identifier[ele] operator[:] identifier[organizationSummaries] operator[SEP] { Keyword[this] operator[SEP] identifier[organizationSummaries] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public <T extends RegisteredService> T getDynamicService(Package pkg, Class<T> serviceInterface, String className) { if (dynamicServices.containsKey(serviceInterface.getName()) && dynamicServices.get(serviceInterface.getName()).contains(className)) { try { ClassLoader parentClassLoader = pkg == null ? getClass().getClassLoader() : pkg.getClassLoader(); Class<?> clazz = CompiledJavaCache.getClassFromAssetName(parentClassLoader, className); if (clazz == null) return null; RegisteredService rs = (RegisteredService) (clazz).newInstance(); T drs = serviceInterface.cast(rs); return drs; } catch (Exception ex) { logger.severeException("Failed to get the dynamic registered service : " + className +" \n " + ex.getMessage(), ex); } } return null; }
class class_name[name] begin[{] method[getDynamicService, return_type[type[T]], modifier[public], parameter[pkg, serviceInterface, className]] begin[{] if[binary_operation[call[dynamicServices.containsKey, parameter[call[serviceInterface.getName, parameter[]]]], &&, call[dynamicServices.get, parameter[call[serviceInterface.getName, parameter[]]]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=pkg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), name=parentClassLoader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassLoader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=parentClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassFromAssetName, postfix_operators=[], prefix_operators=[], qualifier=CompiledJavaCache, selectors=[], type_arguments=None), name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=clazz, 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=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=RegisteredService, sub_type=None)), name=rs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RegisteredService, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=rs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cast, postfix_operators=[], prefix_operators=[], qualifier=serviceInterface, selectors=[], type_arguments=None), name=drs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), ReturnStatement(expression=MemberReference(member=drs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to get the dynamic registered service : "), operandr=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" \n "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=severeException, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[RegisteredService] operator[>] identifier[T] identifier[getDynamicService] operator[SEP] identifier[Package] identifier[pkg] , identifier[Class] operator[<] identifier[T] operator[>] identifier[serviceInterface] , identifier[String] identifier[className] operator[SEP] { Keyword[if] operator[SEP] identifier[dynamicServices] operator[SEP] identifier[containsKey] operator[SEP] identifier[serviceInterface] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[dynamicServices] operator[SEP] identifier[get] operator[SEP] identifier[serviceInterface] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[className] operator[SEP] operator[SEP] { Keyword[try] { identifier[ClassLoader] identifier[parentClassLoader] operator[=] identifier[pkg] operator[==] Other[null] operator[?] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[:] identifier[pkg] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[CompiledJavaCache] operator[SEP] identifier[getClassFromAssetName] operator[SEP] identifier[parentClassLoader] , identifier[className] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[RegisteredService] identifier[rs] operator[=] operator[SEP] identifier[RegisteredService] operator[SEP] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[drs] operator[=] identifier[serviceInterface] operator[SEP] identifier[cast] operator[SEP] identifier[rs] operator[SEP] operator[SEP] Keyword[return] identifier[drs] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[severeException] operator[SEP] literal[String] operator[+] identifier[className] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static int[] getOutputSize(INDArray inputData, int[] kernel, int[] strides, int[] padding, ConvolutionMode convolutionMode, int[] dilation) { // FIXME: int cast int inH = (int) inputData.size(2); int inW = (int) inputData.size(3); //Determine the effective kernel size, accounting for dilation //http://deeplearning.net/software/theano/tutorial/conv_arithmetic.html#dilated-convolutions int[] eKernel = effectiveKernelSize(kernel, dilation); boolean atrous = (eKernel == kernel); int[] inShape = new int[]{inH, inW}; validateShapes(inputData, eKernel, strides, padding, convolutionMode, dilation, inShape, atrous); if (convolutionMode == ConvolutionMode.Same) { int outH = (int) Math.ceil(inH / ((double) strides[0])); int outW = (int) Math.ceil(inW / ((double) strides[1])); return new int[]{outH, outW}; } int hOut = (inH - eKernel[0] + 2 * padding[0]) / strides[0] + 1; int wOut = (inW - eKernel[1] + 2 * padding[1]) / strides[1] + 1; return new int[]{hOut, wOut}; }
class class_name[name] begin[{] method[getOutputSize, return_type[type[int]], modifier[public static], parameter[inputData, kernel, strides, padding, convolutionMode, dilation]] begin[{] local_variable[type[int], inH] local_variable[type[int], inW] local_variable[type[int], eKernel] local_variable[type[boolean], atrous] local_variable[type[int], inShape] call[.validateShapes, parameter[member[.inputData], member[.eKernel], member[.strides], member[.padding], member[.convolutionMode], member[.dilation], member[.inShape], member[.atrous]]] if[binary_operation[member[.convolutionMode], ==, member[ConvolutionMode.Same]]] begin[{] local_variable[type[int], outH] local_variable[type[int], outW] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=outH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outW, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] else begin[{] None end[}] local_variable[type[int], hOut] local_variable[type[int], wOut] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=hOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=wOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getOutputSize] operator[SEP] identifier[INDArray] identifier[inputData] , Keyword[int] operator[SEP] operator[SEP] identifier[kernel] , Keyword[int] operator[SEP] operator[SEP] identifier[strides] , Keyword[int] operator[SEP] operator[SEP] identifier[padding] , identifier[ConvolutionMode] identifier[convolutionMode] , Keyword[int] operator[SEP] operator[SEP] identifier[dilation] operator[SEP] { Keyword[int] identifier[inH] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[inputData] operator[SEP] identifier[size] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[inW] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[inputData] operator[SEP] identifier[size] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[eKernel] operator[=] identifier[effectiveKernelSize] operator[SEP] identifier[kernel] , identifier[dilation] operator[SEP] operator[SEP] Keyword[boolean] identifier[atrous] operator[=] operator[SEP] identifier[eKernel] operator[==] identifier[kernel] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[inShape] operator[=] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[inH] , identifier[inW] } operator[SEP] identifier[validateShapes] operator[SEP] identifier[inputData] , identifier[eKernel] , identifier[strides] , identifier[padding] , identifier[convolutionMode] , identifier[dilation] , identifier[inShape] , identifier[atrous] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[convolutionMode] operator[==] identifier[ConvolutionMode] operator[SEP] identifier[Same] operator[SEP] { Keyword[int] identifier[outH] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[inH] operator[/] operator[SEP] operator[SEP] Keyword[double] operator[SEP] identifier[strides] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outW] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[inW] operator[/] operator[SEP] operator[SEP] Keyword[double] operator[SEP] identifier[strides] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[outH] , identifier[outW] } operator[SEP] } Keyword[int] identifier[hOut] operator[=] operator[SEP] identifier[inH] operator[-] identifier[eKernel] operator[SEP] Other[0] operator[SEP] operator[+] Other[2] operator[*] identifier[padding] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[/] identifier[strides] operator[SEP] Other[0] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[int] identifier[wOut] operator[=] operator[SEP] identifier[inW] operator[-] identifier[eKernel] operator[SEP] Other[1] operator[SEP] operator[+] Other[2] operator[*] identifier[padding] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[/] identifier[strides] operator[SEP] Other[1] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[return] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[hOut] , identifier[wOut] } operator[SEP] }
public java.util.List<RemediationExecutionStep> getStepDetails() { if (stepDetails == null) { stepDetails = new com.amazonaws.internal.SdkInternalList<RemediationExecutionStep>(); } return stepDetails; }
class class_name[name] begin[{] method[getStepDetails, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.stepDetails], ==, literal[null]]] begin[{] assign[member[.stepDetails], ClassCreator(arguments=[], 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=RemediationExecutionStep, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.stepDetails]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[RemediationExecutionStep] operator[>] identifier[getStepDetails] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[stepDetails] operator[==] Other[null] operator[SEP] { identifier[stepDetails] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[RemediationExecutionStep] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[stepDetails] operator[SEP] }
public ICommandBehavior getCommand(final String commandName) { return dynamicCommands.get(commandName.toLowerCase(Locale.ENGLISH)).getBehavior(); }
class class_name[name] begin[{] method[getCommand, return_type[type[ICommandBehavior]], modifier[public], parameter[commandName]] begin[{] return[call[dynamicCommands.get, parameter[call[commandName.toLowerCase, parameter[member[Locale.ENGLISH]]]]]] end[}] END[}]
Keyword[public] identifier[ICommandBehavior] identifier[getCommand] operator[SEP] Keyword[final] identifier[String] identifier[commandName] operator[SEP] { Keyword[return] identifier[dynamicCommands] operator[SEP] identifier[get] operator[SEP] identifier[commandName] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] operator[SEP] identifier[getBehavior] operator[SEP] operator[SEP] operator[SEP] }
public synchronized void reconnect() { LOGGER.info("start to reconnect...."); int retries = 0; while (true) { try { if (!zk.getState().equals(States.CLOSED)) { break; } LOGGER.warn("zookeeper lost connection, reconnect"); close(); connect(internalHost); } catch (Exception e) { LOGGER.error(retries + "\t" + e.toString()); // sleep then retry try { int sec = ResilientActiveKeyValueStore.RETRY_PERIOD_SECONDS; LOGGER.warn("sleep " + sec); TimeUnit.SECONDS.sleep(sec); } catch (InterruptedException e1) { } } } }
class class_name[name] begin[{] method[reconnect, return_type[void], modifier[synchronized public], parameter[]] begin[{] call[LOGGER.info, parameter[literal["start to reconnect...."]]] local_variable[type[int], retries] while[literal[true]] begin[{] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=['!'], qualifier=zk, selectors=[MethodInvocation(arguments=[MemberReference(member=CLOSED, postfix_operators=[], prefix_operators=[], qualifier=States, 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=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="zookeeper lost connection, reconnect")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=internalHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=connect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=retries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\t"), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=RETRY_PERIOD_SECONDS, postfix_operators=[], prefix_operators=[], qualifier=ResilientActiveKeyValueStore, selectors=[]), name=sec)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sleep "), operandr=MemberReference(member=sec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit.SECONDS, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e1, types=['InterruptedException']))], finally_block=None, label=None, resources=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[reconnect] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[retries] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[zk] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[States] operator[SEP] identifier[CLOSED] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[connect] operator[SEP] identifier[internalHost] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[retries] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[int] identifier[sec] operator[=] identifier[ResilientActiveKeyValueStore] operator[SEP] identifier[RETRY_PERIOD_SECONDS] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[sec] operator[SEP] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] identifier[sleep] operator[SEP] identifier[sec] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e1] operator[SEP] { } } } }
public static List<String> pathParams(String param, ContainerRequestContext ctx) { return ctx.getUriInfo().getPathParameters().get(param); }
class class_name[name] begin[{] method[pathParams, return_type[type[List]], modifier[public static], parameter[param, ctx]] begin[{] return[call[ctx.getUriInfo, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[pathParams] operator[SEP] identifier[String] identifier[param] , identifier[ContainerRequestContext] identifier[ctx] operator[SEP] { Keyword[return] identifier[ctx] operator[SEP] identifier[getUriInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getPathParameters] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[param] operator[SEP] operator[SEP] }
private void notifyHandlers(ApiZone apiZone, User sfsUser) { ApiUser apiUser = fetchUserAgent(sfsUser); for (ZoneHandlerClass handler : handlers) { Object userAgent = checkUserAgent(handler, apiUser); if (!checkHandler(handler, apiZone)) continue; notifyHandler(handler, apiZone, userAgent); } }
class class_name[name] begin[{] method[notifyHandlers, return_type[void], modifier[private], parameter[apiZone, sfsUser]] begin[{] local_variable[type[ApiUser], apiUser] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkUserAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=userAgent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiZone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkHandler, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiZone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notifyHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=handlers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ZoneHandlerClass, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[notifyHandlers] operator[SEP] identifier[ApiZone] identifier[apiZone] , identifier[User] identifier[sfsUser] operator[SEP] { identifier[ApiUser] identifier[apiUser] operator[=] identifier[fetchUserAgent] operator[SEP] identifier[sfsUser] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ZoneHandlerClass] identifier[handler] operator[:] identifier[handlers] operator[SEP] { identifier[Object] identifier[userAgent] operator[=] identifier[checkUserAgent] operator[SEP] identifier[handler] , identifier[apiUser] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[checkHandler] operator[SEP] identifier[handler] , identifier[apiZone] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] identifier[notifyHandler] operator[SEP] identifier[handler] , identifier[apiZone] , identifier[userAgent] operator[SEP] operator[SEP] } }
@Override public GetNamedQueryResult getNamedQuery(GetNamedQueryRequest request) { request = beforeClientExecution(request); return executeGetNamedQuery(request); }
class class_name[name] begin[{] method[getNamedQuery, return_type[type[GetNamedQueryResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetNamedQuery, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetNamedQueryResult] identifier[getNamedQuery] operator[SEP] identifier[GetNamedQueryRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetNamedQuery] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public EClass getIfcReparametrisedCompositeCurveSegment() { if (ifcReparametrisedCompositeCurveSegmentEClass == null) { ifcReparametrisedCompositeCurveSegmentEClass = (EClass) EPackage.Registry.INSTANCE .getEPackage(Ifc4Package.eNS_URI).getEClassifiers().get(565); } return ifcReparametrisedCompositeCurveSegmentEClass; }
class class_name[name] begin[{] method[getIfcReparametrisedCompositeCurveSegment, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcReparametrisedCompositeCurveSegmentEClass], ==, literal[null]]] begin[{] assign[member[.ifcReparametrisedCompositeCurveSegmentEClass], 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=565)], 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[.ifcReparametrisedCompositeCurveSegmentEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcReparametrisedCompositeCurveSegment] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcReparametrisedCompositeCurveSegmentEClass] operator[==] Other[null] operator[SEP] { identifier[ifcReparametrisedCompositeCurveSegmentEClass] 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[565] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcReparametrisedCompositeCurveSegmentEClass] operator[SEP] }
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final <U> Flowable<U> flatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper, int bufferSize) { ObjectHelper.requireNonNull(mapper, "mapper is null"); ObjectHelper.verifyPositive(bufferSize, "bufferSize"); return RxJavaPlugins.onAssembly(new FlowableFlattenIterable<T, U>(this, mapper, bufferSize)); }
class class_name[name] begin[{] method[flatMapIterable, return_type[type[Flowable]], modifier[final public], parameter[mapper, bufferSize]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.mapper], literal["mapper is null"]]] call[ObjectHelper.verifyPositive, parameter[member[.bufferSize], literal["bufferSize"]]] return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bufferSize, 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=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=U, sub_type=None))], dimensions=None, name=FlowableFlattenIterable, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[U] operator[>] identifier[Flowable] operator[<] identifier[U] operator[>] identifier[flatMapIterable] operator[SEP] Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[U] operator[>] operator[>] identifier[mapper] , Keyword[int] identifier[bufferSize] operator[SEP] { identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[mapper] , literal[String] operator[SEP] operator[SEP] identifier[ObjectHelper] operator[SEP] identifier[verifyPositive] operator[SEP] identifier[bufferSize] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[FlowableFlattenIterable] operator[<] identifier[T] , identifier[U] operator[>] operator[SEP] Keyword[this] , identifier[mapper] , identifier[bufferSize] operator[SEP] operator[SEP] operator[SEP] }
public void buildSerializedForm(XMLNode node, Content serializedTree) throws DocletException { serializedTree = writer.getHeader(configuration.getText( "doclet.Serialized_Form")); buildChildren(node, serializedTree); writer.addFooter(serializedTree); writer.printDocument(serializedTree); }
class class_name[name] begin[{] method[buildSerializedForm, return_type[void], modifier[public], parameter[node, serializedTree]] begin[{] assign[member[.serializedTree], call[writer.getHeader, parameter[call[configuration.getText, parameter[literal["doclet.Serialized_Form"]]]]]] call[.buildChildren, parameter[member[.node], member[.serializedTree]]] call[writer.addFooter, parameter[member[.serializedTree]]] call[writer.printDocument, parameter[member[.serializedTree]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[buildSerializedForm] operator[SEP] identifier[XMLNode] identifier[node] , identifier[Content] identifier[serializedTree] operator[SEP] Keyword[throws] identifier[DocletException] { identifier[serializedTree] operator[=] identifier[writer] operator[SEP] identifier[getHeader] operator[SEP] identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[buildChildren] operator[SEP] identifier[node] , identifier[serializedTree] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[addFooter] operator[SEP] identifier[serializedTree] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[printDocument] operator[SEP] identifier[serializedTree] operator[SEP] operator[SEP] }
@Override public void visitCode(Code obj) { try { stack.resetForMethodEntry(this); reportedType = ImmutabilityType.UNKNOWN; super.visitCode(obj); } catch (StopOpcodeParsingException e) { // report type is immutable } }
class class_name[name] begin[{] method[visitCode, return_type[void], modifier[public], parameter[obj]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=resetForMethodEntry, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=reportedType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=ImmutabilityType, selectors=[])), label=None), StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visitCode, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StopOpcodeParsingException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitCode] operator[SEP] identifier[Code] identifier[obj] operator[SEP] { Keyword[try] { identifier[stack] operator[SEP] identifier[resetForMethodEntry] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[reportedType] operator[=] identifier[ImmutabilityType] operator[SEP] identifier[UNKNOWN] operator[SEP] Keyword[super] operator[SEP] identifier[visitCode] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[StopOpcodeParsingException] identifier[e] operator[SEP] { } }
public void resumeConsumer(int suspendFlag) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "resumeConsumer", this); ArrayList<AORequestedTick> satisfiedTicks = null; synchronized(parent) // AOStream { try { // Take the lock this.lock(); try { if (_consumerSuspended) { // clear the bit provided in the _suspendFlags _suspendFlags &= ~suspendFlag; if (_suspendFlags == 0) // No flags set so resume the consumer { _consumerSuspended = false; // If the consumer is still active (started) we need // to kickstart the consumer back into life to check for more // messages if(!closed) satisfiedTicks = processQueuedMsgs(null); } } } finally { this.unlock(); } } catch(SINotPossibleInCurrentConfigurationException e) { // No FFDC code needed notifyException(e); } if (satisfiedTicks!=null) { // inform parent about satisfied ticks - outside lock int length = satisfiedTicks.size(); for (int i = 0; i < length; i++) { AORequestedTick aotick = (AORequestedTick) satisfiedTicks.get(i); parent.satisfiedRequest(aotick.tick, aotick.getMessage()); } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "resumeConsumer"); }
class class_name[name] begin[{] method[resumeConsumer, return_type[void], modifier[public], parameter[suspendFlag]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["resumeConsumer"], THIS[]]] else begin[{] None end[}] local_variable[type[ArrayList], satisfiedTicks] SYNCHRONIZED[member[.parent]] BEGIN[{] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=lock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), TryStatement(block=[IfStatement(condition=MemberReference(member=_consumerSuspended, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_suspendFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=&=, value=MemberReference(member=suspendFlag, postfix_operators=[], prefix_operators=['~'], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_suspendFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_consumerSuspended, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=MemberReference(member=closed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=satisfiedTicks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=processQueuedMsgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None))]))]))], catches=None, finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notifyException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SINotPossibleInCurrentConfigurationException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.satisfiedTicks], !=, literal[null]]] begin[{] local_variable[type[int], length] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=satisfiedTicks, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AORequestedTick, sub_type=None)), name=aotick)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AORequestedTick, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tick, postfix_operators=[], prefix_operators=[], qualifier=aotick, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=aotick, selectors=[], type_arguments=None)], member=satisfiedRequest, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] END[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["resumeConsumer"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[resumeConsumer] operator[SEP] Keyword[int] identifier[suspendFlag] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[AORequestedTick] operator[>] identifier[satisfiedTicks] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[parent] operator[SEP] { Keyword[try] { Keyword[this] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[_consumerSuspended] operator[SEP] { identifier[_suspendFlags] operator[&=] operator[~] identifier[suspendFlag] operator[SEP] Keyword[if] operator[SEP] identifier[_suspendFlags] operator[==] Other[0] operator[SEP] { identifier[_consumerSuspended] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] identifier[satisfiedTicks] operator[=] identifier[processQueuedMsgs] operator[SEP] Other[null] operator[SEP] operator[SEP] } } } Keyword[finally] { Keyword[this] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SINotPossibleInCurrentConfigurationException] identifier[e] operator[SEP] { identifier[notifyException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[satisfiedTicks] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[satisfiedTicks] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[AORequestedTick] identifier[aotick] operator[=] operator[SEP] identifier[AORequestedTick] operator[SEP] identifier[satisfiedTicks] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[satisfiedRequest] operator[SEP] identifier[aotick] operator[SEP] identifier[tick] , identifier[aotick] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public boolean addArray(long... newValues) { if (end + newValues.length >= values.length) { values = Lng.grow(values, (values.length + newValues.length) * 2); } System.arraycopy(newValues, 0, values, end, newValues.length); end += newValues.length; return true; }
class class_name[name] begin[{] method[addArray, return_type[type[boolean]], modifier[public], parameter[newValues]] begin[{] if[binary_operation[binary_operation[member[.end], +, member[newValues.length]], >=, member[values.length]]] begin[{] assign[member[.values], call[Lng.grow, parameter[member[.values], binary_operation[binary_operation[member[values.length], +, member[newValues.length]], *, literal[2]]]]] else begin[{] None end[}] call[System.arraycopy, parameter[member[.newValues], literal[0], member[.values], member[.end], member[newValues.length]]] assign[member[.end], member[newValues.length]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addArray] operator[SEP] Keyword[long] operator[...] identifier[newValues] operator[SEP] { Keyword[if] operator[SEP] identifier[end] operator[+] identifier[newValues] operator[SEP] identifier[length] operator[>=] identifier[values] operator[SEP] identifier[length] operator[SEP] { identifier[values] operator[=] identifier[Lng] operator[SEP] identifier[grow] operator[SEP] identifier[values] , operator[SEP] identifier[values] operator[SEP] identifier[length] operator[+] identifier[newValues] operator[SEP] identifier[length] operator[SEP] operator[*] Other[2] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[newValues] , Other[0] , identifier[values] , identifier[end] , identifier[newValues] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[end] operator[+=] identifier[newValues] operator[SEP] identifier[length] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public IfcWindowTypePartitioningEnum createIfcWindowTypePartitioningEnumFromString(EDataType eDataType, String initialValue) { IfcWindowTypePartitioningEnum result = IfcWindowTypePartitioningEnum.get(initialValue); if (result == null) throw new IllegalArgumentException( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createIfcWindowTypePartitioningEnumFromString, return_type[type[IfcWindowTypePartitioningEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[IfcWindowTypePartitioningEnum], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[IfcWindowTypePartitioningEnum] identifier[createIfcWindowTypePartitioningEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[IfcWindowTypePartitioningEnum] identifier[result] operator[=] identifier[IfcWindowTypePartitioningEnum] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public Boolean validate(String token, JwtUserDetail userDetails) { if (StringUtils.isBlank(token) || userDetails == null) { return false; } String key = jwtProperties.getPrefix() + Md5Utils.digestMD5(token); JwtToken jwtToken = cacheService.get(key); // 判断是否在黑名单中 if (jwtToken != null) { //销毁状态 if (JwtToken.Operation.destroy.getValue() == jwtToken.getType()) { return false; } Long refreshTime = jwtToken.getRefreshTime(); if (refreshTime != null && jwtToken.getType() == JwtToken.Operation.refresh.getValue()) { // 刷新token二分钟内可以使用 return Instant.now().toEpochMilli() - refreshTime < 1000 * 60 * 2; } } final Instant created = jwtBuilder.getCreatedTimeFromToken(token); final String loginName = jwtBuilder.getLoginNameFromToken(token); LocalDateTime modifyPasswordTime = userDetails.getModifyPasswordTime(); if (Objects.isNull(modifyPasswordTime)) { return Objects.equals(loginName, userDetails.getUsername()) && !jwtBuilder.isExpired(token); } return Objects.equals(loginName, userDetails.getUsername()) && !jwtBuilder.isExpired(token) && validate(created, modifyPasswordTime); }
class class_name[name] begin[{] method[validate, return_type[type[Boolean]], modifier[public], parameter[token, userDetails]] begin[{] if[binary_operation[call[StringUtils.isBlank, parameter[member[.token]]], ||, binary_operation[member[.userDetails], ==, literal[null]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[String], key] local_variable[type[JwtToken], jwtToken] if[binary_operation[member[.jwtToken], !=, literal[null]]] begin[{] if[binary_operation[call[JwtToken.Operation.destroy.getValue, parameter[]], ==, call[jwtToken.getType, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Long], refreshTime] if[binary_operation[binary_operation[member[.refreshTime], !=, literal[null]], &&, binary_operation[call[jwtToken.getType, parameter[]], ==, call[JwtToken.Operation.refresh.getValue, parameter[]]]]] begin[{] return[binary_operation[binary_operation[call[Instant.now, parameter[]], -, member[.refreshTime]], <, binary_operation[binary_operation[literal[1000], *, literal[60]], *, literal[2]]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Instant], created] local_variable[type[String], loginName] local_variable[type[LocalDateTime], modifyPasswordTime] if[call[Objects.isNull, parameter[member[.modifyPasswordTime]]]] begin[{] return[binary_operation[call[Objects.equals, parameter[member[.loginName], call[userDetails.getUsername, parameter[]]]], &&, call[jwtBuilder.isExpired, parameter[member[.token]]]]] else begin[{] None end[}] return[binary_operation[binary_operation[call[Objects.equals, parameter[member[.loginName], call[userDetails.getUsername, parameter[]]]], &&, call[jwtBuilder.isExpired, parameter[member[.token]]]], &&, call[.validate, parameter[member[.created], member[.modifyPasswordTime]]]]] end[}] END[}]
Keyword[public] identifier[Boolean] identifier[validate] operator[SEP] identifier[String] identifier[token] , identifier[JwtUserDetail] identifier[userDetails] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[token] operator[SEP] operator[||] identifier[userDetails] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[key] operator[=] identifier[jwtProperties] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[+] identifier[Md5Utils] operator[SEP] identifier[digestMD5] operator[SEP] identifier[token] operator[SEP] operator[SEP] identifier[JwtToken] identifier[jwtToken] operator[=] identifier[cacheService] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jwtToken] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[JwtToken] operator[SEP] identifier[Operation] operator[SEP] identifier[destroy] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] identifier[jwtToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Long] identifier[refreshTime] operator[=] identifier[jwtToken] operator[SEP] identifier[getRefreshTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[refreshTime] operator[!=] Other[null] operator[&&] identifier[jwtToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[JwtToken] operator[SEP] identifier[Operation] operator[SEP] identifier[refresh] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Instant] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[SEP] identifier[toEpochMilli] operator[SEP] operator[SEP] operator[-] identifier[refreshTime] operator[<] Other[1000] operator[*] Other[60] operator[*] Other[2] operator[SEP] } } Keyword[final] identifier[Instant] identifier[created] operator[=] identifier[jwtBuilder] operator[SEP] identifier[getCreatedTimeFromToken] operator[SEP] identifier[token] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[loginName] operator[=] identifier[jwtBuilder] operator[SEP] identifier[getLoginNameFromToken] operator[SEP] identifier[token] operator[SEP] operator[SEP] identifier[LocalDateTime] identifier[modifyPasswordTime] operator[=] identifier[userDetails] operator[SEP] identifier[getModifyPasswordTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[isNull] operator[SEP] identifier[modifyPasswordTime] operator[SEP] operator[SEP] { Keyword[return] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[loginName] , identifier[userDetails] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[jwtBuilder] operator[SEP] identifier[isExpired] operator[SEP] identifier[token] operator[SEP] operator[SEP] } Keyword[return] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[loginName] , identifier[userDetails] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[jwtBuilder] operator[SEP] identifier[isExpired] operator[SEP] identifier[token] operator[SEP] operator[&&] identifier[validate] operator[SEP] identifier[created] , identifier[modifyPasswordTime] operator[SEP] operator[SEP] }
public synchronized int read(byte b[], int off, int len) throws IOException { getBufIfOpen(); // Check for closed stream if ((off | len | (off + len) | (b.length - (off + len))) < 0) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; } int n = 0; for (;;) { int nread = read1(b, off + n, len - n); if (nread <= 0) return (n == 0) ? nread : n; n += nread; if (n >= len) return n; // if not closed but no bytes available, return InputStream input = in; if (input != null && input.available() <= 0) return n; } }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[synchronized public], parameter[b, off, len]] begin[{] call[.getBufIfOpen, parameter[]] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.off], |, member[.len]], |, binary_operation[member[.off], +, member[.len]]], |, binary_operation[member[b.length], -, binary_operation[member[.off], +, member[.len]]]], <, literal[0]]] 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=IndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.len], ==, literal[0]]] begin[{] return[literal[0]] else begin[{] None end[}] end[}] local_variable[type[int], n] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=read1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=nread)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nread, 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=ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=nread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=nread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=available, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), operator=&&), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[int] identifier[read] operator[SEP] Keyword[byte] identifier[b] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { identifier[getBufIfOpen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[off] operator[|] identifier[len] operator[|] operator[SEP] identifier[off] operator[+] identifier[len] operator[SEP] operator[|] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[-] operator[SEP] identifier[off] operator[+] identifier[len] operator[SEP] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[len] operator[==] Other[0] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[nread] operator[=] identifier[read1] operator[SEP] identifier[b] , identifier[off] operator[+] identifier[n] , identifier[len] operator[-] identifier[n] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nread] operator[<=] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[n] operator[==] Other[0] operator[SEP] operator[?] identifier[nread] operator[:] identifier[n] operator[SEP] identifier[n] operator[+=] identifier[nread] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[>=] identifier[len] operator[SEP] Keyword[return] identifier[n] operator[SEP] identifier[InputStream] identifier[input] operator[=] identifier[in] operator[SEP] Keyword[if] operator[SEP] identifier[input] operator[!=] Other[null] operator[&&] identifier[input] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] Keyword[return] identifier[n] operator[SEP] } }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> flatMap(Function<? super T, ? extends ObservableSource<? extends R>> mapper, boolean delayErrors) { return flatMap(mapper, delayErrors, Integer.MAX_VALUE); }
class class_name[name] begin[{] method[flatMap, return_type[type[Observable]], modifier[final public], parameter[mapper, delayErrors]] begin[{] return[call[.flatMap, parameter[member[.mapper], member[.delayErrors], member[Integer.MAX_VALUE]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Observable] operator[<] identifier[R] operator[>] identifier[flatMap] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[ObservableSource] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] operator[>] identifier[mapper] , Keyword[boolean] identifier[delayErrors] operator[SEP] { Keyword[return] identifier[flatMap] operator[SEP] identifier[mapper] , identifier[delayErrors] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] }
@Override public final void visit(final TrailerDocument document) { setBaseObject(new ApiObject(document.getType(), document.getString())); addAttributes(document); }
class class_name[name] begin[{] method[visit, return_type[void], modifier[final public], parameter[document]] begin[{] call[.setBaseObject, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=document, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=document, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApiObject, sub_type=None))]] call[.addAttributes, parameter[member[.document]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[TrailerDocument] identifier[document] operator[SEP] { identifier[setBaseObject] operator[SEP] Keyword[new] identifier[ApiObject] operator[SEP] identifier[document] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[document] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAttributes] operator[SEP] identifier[document] operator[SEP] operator[SEP] }
private boolean findMatches() throws IOException { // check for something in queue of matches if (!queueMatches.isEmpty()) { return true; } else { while (true) { // try to get something in queue of spans if (queueSpans.isEmpty() && !collectSpan()) { return false; } // try to get matches with first span in queue Match firstMatch = queueSpans.get(0); queueSpans.remove(0); // create a list of matches with same startposition as firstMatch List<Match> matches = new ArrayList<>(); matches.add(firstMatch); // try to collect spans until lastStartPosition not equal to // startposition of firstMatch while (!lastSpan && (lastStartPosition == firstMatch.startPosition())) { collectSpan(); } while (!queueSpans.isEmpty() && (queueSpans.get(0) .startPosition() == firstMatch.startPosition())) { matches.add(queueSpans.get(0)); queueSpans.remove(0); } // construct all matches for this startposition for (Match match : matches) { // only unique spans if (!queueMatches.contains(match)) { queueMatches.add(match); } } // check for something in queue of matches if (!queueMatches.isEmpty()) { return true; } } } }
class class_name[name] begin[{] method[findMatches, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[call[queueMatches.isEmpty, parameter[]]] begin[{] return[literal[true]] else begin[{] while[literal[true]] begin[{] if[binary_operation[call[queueSpans.isEmpty, parameter[]], &&, call[.collectSpan, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Match], firstMatch] call[queueSpans.remove, parameter[literal[0]]] local_variable[type[List], matches] call[matches.add, parameter[member[.firstMatch]]] while[binary_operation[member[.lastSpan], &&, binary_operation[member[.lastStartPosition], ==, call[firstMatch.startPosition, parameter[]]]]] begin[{] call[.collectSpan, parameter[]] end[}] while[binary_operation[call[queueSpans.isEmpty, parameter[]], &&, binary_operation[call[queueSpans.get, parameter[literal[0]]], ==, call[firstMatch.startPosition, parameter[]]]]] begin[{] call[matches.add, parameter[call[queueSpans.get, parameter[literal[0]]]]] call[queueSpans.remove, parameter[literal[0]]] end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=queueMatches, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=queueMatches, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=matches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=match)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None))), label=None) if[call[queueMatches.isEmpty, parameter[]]] begin[{] return[literal[true]] else begin[{] None end[}] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[findMatches] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[queueMatches] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[queueSpans] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[collectSpan] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Match] identifier[firstMatch] operator[=] identifier[queueSpans] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[queueSpans] operator[SEP] identifier[remove] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[matches] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] identifier[add] operator[SEP] identifier[firstMatch] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[lastSpan] operator[&&] operator[SEP] identifier[lastStartPosition] operator[==] identifier[firstMatch] operator[SEP] identifier[startPosition] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[collectSpan] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[!] identifier[queueSpans] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[queueSpans] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[startPosition] operator[SEP] operator[SEP] operator[==] identifier[firstMatch] operator[SEP] identifier[startPosition] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[matches] operator[SEP] identifier[add] operator[SEP] identifier[queueSpans] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[queueSpans] operator[SEP] identifier[remove] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Match] identifier[match] operator[:] identifier[matches] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[queueMatches] operator[SEP] identifier[contains] operator[SEP] identifier[match] operator[SEP] operator[SEP] { identifier[queueMatches] operator[SEP] identifier[add] operator[SEP] identifier[match] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[queueMatches] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } }
public void configureWebAppHelperFactory(WebAppConfiguratorHelperFactory webAppConfiguratorHelperFactory, ResourceRefConfigFactory resourceRefConfigFactory) { webAppHelper = webAppConfiguratorHelperFactory.createWebAppConfiguratorHelper(this, resourceRefConfigFactory, getListenerInterfaces()); this.configHelpers.add(webAppHelper); }
class class_name[name] begin[{] method[configureWebAppHelperFactory, return_type[void], modifier[public], parameter[webAppConfiguratorHelperFactory, resourceRefConfigFactory]] begin[{] assign[member[.webAppHelper], call[webAppConfiguratorHelperFactory.createWebAppConfiguratorHelper, parameter[THIS[], member[.resourceRefConfigFactory], call[.getListenerInterfaces, parameter[]]]]] THIS[member[None.configHelpers]call[None.add, parameter[member[.webAppHelper]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[configureWebAppHelperFactory] operator[SEP] identifier[WebAppConfiguratorHelperFactory] identifier[webAppConfiguratorHelperFactory] , identifier[ResourceRefConfigFactory] identifier[resourceRefConfigFactory] operator[SEP] { identifier[webAppHelper] operator[=] identifier[webAppConfiguratorHelperFactory] operator[SEP] identifier[createWebAppConfiguratorHelper] operator[SEP] Keyword[this] , identifier[resourceRefConfigFactory] , identifier[getListenerInterfaces] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[configHelpers] operator[SEP] identifier[add] operator[SEP] identifier[webAppHelper] operator[SEP] operator[SEP] }
@Override public DeletePendingAggregationRequestResult deletePendingAggregationRequest(DeletePendingAggregationRequestRequest request) { request = beforeClientExecution(request); return executeDeletePendingAggregationRequest(request); }
class class_name[name] begin[{] method[deletePendingAggregationRequest, return_type[type[DeletePendingAggregationRequestResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeletePendingAggregationRequest, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeletePendingAggregationRequestResult] identifier[deletePendingAggregationRequest] operator[SEP] identifier[DeletePendingAggregationRequestRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeletePendingAggregationRequest] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void writeLanguage(String appid, String langCode, Map<String, String> lang, boolean writeToDatabase) { if (lang == null || lang.isEmpty() || StringUtils.isBlank(langCode) || !ALL_LOCALES.containsKey(langCode)) { return; } writeLanguageToFile(appid, langCode, lang); if (writeToDatabase) { // this will overwrite a saved language map! Sysprop s = new Sysprop(keyPrefix.concat(langCode)); Map<String, String> dlang = getDefaultLanguage(appid); for (Map.Entry<String, String> entry : dlang.entrySet()) { String key = entry.getKey(); if (lang.containsKey(key)) { s.addProperty(key, lang.get(key)); } else { s.addProperty(key, entry.getValue()); } } dao.create(appid, s); } }
class class_name[name] begin[{] method[writeLanguage, return_type[void], modifier[public], parameter[appid, langCode, lang, writeToDatabase]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.lang], ==, literal[null]], ||, call[lang.isEmpty, parameter[]]], ||, call[StringUtils.isBlank, parameter[member[.langCode]]]], ||, call[ALL_LOCALES.containsKey, parameter[member[.langCode]]]]] begin[{] return[None] else begin[{] None end[}] call[.writeLanguageToFile, parameter[member[.appid], member[.langCode], member[.lang]]] if[member[.writeToDatabase]] begin[{] local_variable[type[Sysprop], s] local_variable[type[Map], dlang] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=lang, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=addProperty, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=lang, selectors=[], type_arguments=None)], member=addProperty, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=dlang, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) call[dao.create, parameter[member[.appid], member[.s]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeLanguage] operator[SEP] identifier[String] identifier[appid] , identifier[String] identifier[langCode] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[lang] , Keyword[boolean] identifier[writeToDatabase] operator[SEP] { Keyword[if] operator[SEP] identifier[lang] operator[==] Other[null] operator[||] identifier[lang] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[langCode] operator[SEP] operator[||] operator[!] identifier[ALL_LOCALES] operator[SEP] identifier[containsKey] operator[SEP] identifier[langCode] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[writeLanguageToFile] operator[SEP] identifier[appid] , identifier[langCode] , identifier[lang] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[writeToDatabase] operator[SEP] { identifier[Sysprop] identifier[s] operator[=] Keyword[new] identifier[Sysprop] operator[SEP] identifier[keyPrefix] operator[SEP] identifier[concat] operator[SEP] identifier[langCode] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[dlang] operator[=] identifier[getDefaultLanguage] operator[SEP] identifier[appid] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[entry] operator[:] identifier[dlang] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lang] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[s] operator[SEP] identifier[addProperty] operator[SEP] identifier[key] , identifier[lang] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[s] operator[SEP] identifier[addProperty] operator[SEP] identifier[key] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[dao] operator[SEP] identifier[create] operator[SEP] identifier[appid] , identifier[s] operator[SEP] operator[SEP] } }
@Reference(target = "(id=unbound)") protected void setTaskStore(DatabaseStore svc, Map<String, Object> props) { persistentStore = svc; persistentStoreDisplayId = (String) props.get("config.displayId"); }
class class_name[name] begin[{] method[setTaskStore, return_type[void], modifier[protected], parameter[svc, props]] begin[{] assign[member[.persistentStore], member[.svc]] assign[member[.persistentStoreDisplayId], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="config.displayId")], member=get, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] end[}] END[}]
annotation[@] identifier[Reference] operator[SEP] identifier[target] operator[=] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[setTaskStore] operator[SEP] identifier[DatabaseStore] identifier[svc] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[props] operator[SEP] { identifier[persistentStore] operator[=] identifier[svc] operator[SEP] identifier[persistentStoreDisplayId] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[props] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] }
protected List<double[]> means(List<? extends ModifiableDBIDs> clusters, List<double[]> means, Relation<DiscreteUncertainObject> database) { List<double[]> newMeans = new ArrayList<>(k); for(int i = 0; i < k; i++) { ModifiableDBIDs list = clusters.get(i); double[] mean = null; if(list.size() > 0) { DBIDIter iter = list.iter(); // Initialize with first. mean = ArrayLikeUtil.toPrimitiveDoubleArray(database.get(iter).getCenterOfMass()); iter.advance(); // Update with remaining instances for(; iter.valid(); iter.advance()) { NumberVector vec = database.get(iter).getCenterOfMass(); for(int j = 0; j < mean.length; j++) { mean[j] += vec.doubleValue(j); } } timesEquals(mean, 1.0 / list.size()); } else { // Keep degenerated means as-is for now. mean = means.get(i); } newMeans.add(mean); } return newMeans; }
class class_name[name] begin[{] method[means, return_type[type[List]], modifier[protected], parameter[clusters, means, database]] begin[{] local_variable[type[List], newMeans] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=clusters, selectors=[], type_arguments=None), name=list)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModifiableDBIDs, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=mean)], modifiers=set(), type=BasicType(dimensions=[None], name=double)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=means, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=iter, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), name=iter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DBIDIter, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=iter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=database, selectors=[MethodInvocation(arguments=[], member=getCenterOfMass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=toPrimitiveDoubleArray, postfix_operators=[], prefix_operators=[], qualifier=ArrayLikeUtil, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=iter, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=iter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=database, selectors=[MethodInvocation(arguments=[], member=getCenterOfMass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=vec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NumberVector, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doubleValue, postfix_operators=[], prefix_operators=[], qualifier=vec, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=mean, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=valid, postfix_operators=[], prefix_operators=[], qualifier=iter, selectors=[], type_arguments=None), init=None, update=[MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=iter, selectors=[], type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operator=/)], member=timesEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=newMeans, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=k, 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[.newMeans]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] Keyword[double] operator[SEP] operator[SEP] operator[>] identifier[means] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[ModifiableDBIDs] operator[>] identifier[clusters] , identifier[List] operator[<] Keyword[double] operator[SEP] operator[SEP] operator[>] identifier[means] , identifier[Relation] operator[<] identifier[DiscreteUncertainObject] operator[>] identifier[database] operator[SEP] { identifier[List] operator[<] Keyword[double] operator[SEP] operator[SEP] operator[>] identifier[newMeans] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[k] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ModifiableDBIDs] identifier[list] operator[=] identifier[clusters] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[mean] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[DBIDIter] identifier[iter] operator[=] identifier[list] operator[SEP] identifier[iter] operator[SEP] operator[SEP] operator[SEP] identifier[mean] operator[=] identifier[ArrayLikeUtil] operator[SEP] identifier[toPrimitiveDoubleArray] operator[SEP] identifier[database] operator[SEP] identifier[get] operator[SEP] identifier[iter] operator[SEP] operator[SEP] identifier[getCenterOfMass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] { identifier[NumberVector] identifier[vec] operator[=] identifier[database] operator[SEP] identifier[get] operator[SEP] identifier[iter] operator[SEP] operator[SEP] identifier[getCenterOfMass] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[mean] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[mean] operator[SEP] identifier[j] operator[SEP] operator[+=] identifier[vec] operator[SEP] identifier[doubleValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] } } identifier[timesEquals] operator[SEP] identifier[mean] , literal[Float] operator[/] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[mean] operator[=] identifier[means] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[newMeans] operator[SEP] identifier[add] operator[SEP] identifier[mean] operator[SEP] operator[SEP] } Keyword[return] identifier[newMeans] operator[SEP] }
private static String concat(final String... parts) { final StringBuilder buf = new StringBuilder(); for (final String part : parts) { // handle nulls gracefully (ignore) if (part != null) { buf.append(part); } } return buf.toString(); }
class class_name[name] begin[{] method[concat, return_type[type[String]], modifier[private static], parameter[parts]] begin[{] local_variable[type[StringBuilder], buf] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=part, 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=MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=part)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[buf.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[concat] operator[SEP] Keyword[final] identifier[String] operator[...] identifier[parts] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[part] operator[:] identifier[parts] operator[SEP] { Keyword[if] operator[SEP] identifier[part] operator[!=] Other[null] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[part] operator[SEP] operator[SEP] } } Keyword[return] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void addRule(ValidationData vd) { this.rules.addAll(vd.getValidationRules().stream().filter(vr -> vr.isUse()).collect(Collectors.toList())); }
class class_name[name] begin[{] method[addRule, return_type[void], modifier[public], parameter[vd]] begin[{] THIS[member[None.rules]call[None.addAll, parameter[call[vd.getValidationRules, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addRule] operator[SEP] identifier[ValidationData] identifier[vd] operator[SEP] { Keyword[this] operator[SEP] identifier[rules] operator[SEP] identifier[addAll] operator[SEP] identifier[vd] operator[SEP] identifier[getValidationRules] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[vr] operator[->] identifier[vr] operator[SEP] identifier[isUse] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private WPanel buildPanel(final String title) { WPanel panel = new WPanel(WPanel.Type.CHROME); panel.setTitleText(title); WProgressBar progress = new WProgressBar(18); progress.setValue(15); panel.add(progress); panel.add(new WHorizontalRule()); WTextField input = new WTextField(); WLabel label = new WLabel("Text input", input); panel.add(label); panel.add(input); return panel; }
class class_name[name] begin[{] method[buildPanel, return_type[type[WPanel]], modifier[private], parameter[title]] begin[{] local_variable[type[WPanel], panel] call[panel.setTitleText, parameter[member[.title]]] local_variable[type[WProgressBar], progress] call[progress.setValue, parameter[literal[15]]] call[panel.add, parameter[member[.progress]]] call[panel.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WHorizontalRule, sub_type=None))]] local_variable[type[WTextField], input] local_variable[type[WLabel], label] call[panel.add, parameter[member[.label]]] call[panel.add, parameter[member[.input]]] return[member[.panel]] end[}] END[}]
Keyword[private] identifier[WPanel] identifier[buildPanel] operator[SEP] Keyword[final] identifier[String] identifier[title] operator[SEP] { identifier[WPanel] identifier[panel] operator[=] Keyword[new] identifier[WPanel] operator[SEP] identifier[WPanel] operator[SEP] identifier[Type] operator[SEP] identifier[CHROME] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[setTitleText] operator[SEP] identifier[title] operator[SEP] operator[SEP] identifier[WProgressBar] identifier[progress] operator[=] Keyword[new] identifier[WProgressBar] operator[SEP] Other[18] operator[SEP] operator[SEP] identifier[progress] operator[SEP] identifier[setValue] operator[SEP] Other[15] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[progress] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WHorizontalRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WTextField] identifier[input] operator[=] Keyword[new] identifier[WTextField] operator[SEP] operator[SEP] operator[SEP] identifier[WLabel] identifier[label] operator[=] Keyword[new] identifier[WLabel] operator[SEP] literal[String] , identifier[input] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[label] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[return] identifier[panel] operator[SEP] }
public boolean replace( Long key, TypeV oldValue, TypeV newValue ) { return replace(key.longValue(), oldValue, newValue); }
class class_name[name] begin[{] method[replace, return_type[type[boolean]], modifier[public], parameter[key, oldValue, newValue]] begin[{] return[call[.replace, parameter[call[key.longValue, parameter[]], member[.oldValue], member[.newValue]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[replace] operator[SEP] identifier[Long] identifier[key] , identifier[TypeV] identifier[oldValue] , identifier[TypeV] identifier[newValue] operator[SEP] { Keyword[return] identifier[replace] operator[SEP] identifier[key] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] , identifier[oldValue] , identifier[newValue] operator[SEP] operator[SEP] }
private String getOptimization(final CommandLineCompilerConfiguration compilerConfig) { final String[] args = compilerConfig.getPreArguments(); String opt = "0"; for (final String arg : args) { if ("/Od".equals(arg)) { opt = "0"; } if ("/O1".equals(arg)) { opt = "1"; } if ("/O2".equals(arg)) { opt = "2"; } if ("/Ox".equals(arg)) { opt = "3"; } } return opt; }
class class_name[name] begin[{] method[getOptimization, return_type[type[String]], modifier[private], parameter[compilerConfig]] begin[{] local_variable[type[String], args] local_variable[type[String], opt] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="/Od"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=opt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")), label=None)])), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="/O1"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=opt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1")), label=None)])), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="/O2"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=opt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="2")), label=None)])), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="/Ox"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=opt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="3")), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=arg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.opt]] end[}] END[}]
Keyword[private] identifier[String] identifier[getOptimization] operator[SEP] Keyword[final] identifier[CommandLineCompilerConfiguration] identifier[compilerConfig] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] identifier[compilerConfig] operator[SEP] identifier[getPreArguments] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[opt] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[arg] operator[:] identifier[args] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[opt] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[opt] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[opt] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[opt] operator[=] literal[String] operator[SEP] } } Keyword[return] identifier[opt] operator[SEP] }
public List<Rule> getAllActiveRules() { List<Rule> rules = new ArrayList<>(); List<Rule> rulesActive = new ArrayList<>(); rules.addAll(builtinRules); rules.addAll(userRules); // Some rules have an internal state so they can do checks over sentence // boundaries. These need to be reset so the checks don't suddenly // work on different texts with the same data. However, it could be useful // to keep the state information if we're checking a continuous text. for (Rule rule : rules) { if (!ignoreRule(rule)) { rulesActive.add(rule); } } return rulesActive; }
class class_name[name] begin[{] method[getAllActiveRules, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], rules] local_variable[type[List], rulesActive] call[rules.addAll, parameter[member[.builtinRules]]] call[rules.addAll, parameter[member[.userRules]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignoreRule, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rulesActive, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=rules, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=rule)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Rule, sub_type=None))), label=None) return[member[.rulesActive]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Rule] operator[>] identifier[getAllActiveRules] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Rule] operator[>] identifier[rules] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Rule] operator[>] identifier[rulesActive] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[rules] operator[SEP] identifier[addAll] operator[SEP] identifier[builtinRules] operator[SEP] operator[SEP] identifier[rules] operator[SEP] identifier[addAll] operator[SEP] identifier[userRules] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Rule] identifier[rule] operator[:] identifier[rules] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[ignoreRule] operator[SEP] identifier[rule] operator[SEP] operator[SEP] { identifier[rulesActive] operator[SEP] identifier[add] operator[SEP] identifier[rule] operator[SEP] operator[SEP] } } Keyword[return] identifier[rulesActive] operator[SEP] }
public Observable<ExpressRouteCrossConnectionInner> beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1<ServiceResponse<ExpressRouteCrossConnectionInner>, ExpressRouteCrossConnectionInner>() { @Override public ExpressRouteCrossConnectionInner call(ServiceResponse<ExpressRouteCrossConnectionInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginUpdateTagsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, crossConnectionName]] begin[{] return[call[.beginUpdateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.crossConnectionName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteCrossConnectionInner] operator[>] identifier[beginUpdateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[crossConnectionName] operator[SEP] { Keyword[return] identifier[beginUpdateTagsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[crossConnectionName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ExpressRouteCrossConnectionInner] operator[>] , identifier[ExpressRouteCrossConnectionInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ExpressRouteCrossConnectionInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ExpressRouteCrossConnectionInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void set(int i) { int offset = i - this.sizeinwords * WORDSIZE; if (offset + WORDSIZE < 0) { throw new IllegalArgumentException("unsupported write back"); } else if ((offset + WORDSIZE >= 0) && (offset < 0)) { final int before = this.buffer.get(this.buffer.size() - 1); this.buffer.set(this.buffer.size() - 1, before | (1 << (offset + WORDSIZE))); // if(before != buffer.get(buffer.size()-1)) ++ cardinality; } else { final int numberofemptywords = offset / WORDSIZE; offset -= numberofemptywords * WORDSIZE; fastadd(1 << offset, this.sizeinwords + numberofemptywords); // ++cardinality; } }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[i]] begin[{] local_variable[type[int], offset] if[binary_operation[binary_operation[member[.offset], +, member[.WORDSIZE]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unsupported write back")], 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[{] if[binary_operation[binary_operation[binary_operation[member[.offset], +, member[.WORDSIZE]], >=, literal[0]], &&, binary_operation[member[.offset], <, literal[0]]]] begin[{] local_variable[type[int], before] THIS[member[None.buffer]call[None.set, parameter[binary_operation[THIS[member[None.buffer]call[None.size, parameter[]]], -, literal[1]], binary_operation[member[.before], |, binary_operation[literal[1], <<, binary_operation[member[.offset], +, member[.WORDSIZE]]]]]]] else begin[{] local_variable[type[int], numberofemptywords] assign[member[.offset], binary_operation[member[.numberofemptywords], *, member[.WORDSIZE]]] call[.fastadd, parameter[binary_operation[literal[1], <<, member[.offset]], binary_operation[THIS[member[None.sizeinwords]], +, member[.numberofemptywords]]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[int] identifier[i] operator[SEP] { Keyword[int] identifier[offset] operator[=] identifier[i] operator[-] Keyword[this] operator[SEP] identifier[sizeinwords] operator[*] identifier[WORDSIZE] operator[SEP] Keyword[if] operator[SEP] identifier[offset] operator[+] identifier[WORDSIZE] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[offset] operator[+] identifier[WORDSIZE] operator[>=] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[offset] operator[<] Other[0] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[before] operator[=] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] identifier[set] operator[SEP] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] , identifier[before] operator[|] operator[SEP] Other[1] operator[<<] operator[SEP] identifier[offset] operator[+] identifier[WORDSIZE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] Keyword[int] identifier[numberofemptywords] operator[=] identifier[offset] operator[/] identifier[WORDSIZE] operator[SEP] identifier[offset] operator[-=] identifier[numberofemptywords] operator[*] identifier[WORDSIZE] operator[SEP] identifier[fastadd] operator[SEP] Other[1] operator[<<] identifier[offset] , Keyword[this] operator[SEP] identifier[sizeinwords] operator[+] identifier[numberofemptywords] operator[SEP] operator[SEP] } }
private Set<Long> loadFromNode(String path, OutputStream out) throws KeeperException.NoNodeException { try { // Get the cached representation of this table byte[] data = _curator.getData().forPath(path); DataInputStream in = new DataInputStream(new ByteArrayInputStream(data)); int uuidCountOrExceptionCode = in.readInt(); // A negative first integer indicates an exception condition. if (uuidCountOrExceptionCode < 0) { String exceptionJson = new String(data, 4, data.length - 4, Charsets.UTF_8); switch (uuidCountOrExceptionCode) { case UNKNOWN_TABLE: throw JsonHelper.fromJson(exceptionJson, UnknownTableException.class); case DROPPED_TABLE: throw JsonHelper.fromJson(exceptionJson, DroppedTableException.class); } } // Load the UUIDs for this table Set<Long> uuids = Sets.newHashSet(); for (int i=0; i < uuidCountOrExceptionCode; i++) { uuids.add(in.readLong()); } // Copy the remaining bytes as the content ByteStreams.copy(in, out); return uuids; } catch (Throwable t) { Throwables.propagateIfInstanceOf(t, KeeperException.NoNodeException.class); throw Throwables.propagate(t); } }
class class_name[name] begin[{] method[loadFromNode, return_type[type[Set]], modifier[private], parameter[path, out]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=_curator, selectors=[MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=data)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=data, 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=ByteArrayInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DataInputStream, sub_type=None)), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DataInputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readInt, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), name=uuidCountOrExceptionCode)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uuidCountOrExceptionCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=Charsets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=exceptionJson)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), SwitchStatement(cases=[SwitchStatementCase(case=['UNKNOWN_TABLE'], statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=exceptionJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnknownTableException, sub_type=None))], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=JsonHelper, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['DROPPED_TABLE'], statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=exceptionJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DroppedTableException, sub_type=None))], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=JsonHelper, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=uuidCountOrExceptionCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newHashSet, postfix_operators=[], prefix_operators=[], qualifier=Sets, selectors=[], type_arguments=None), name=uuids)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readLong, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=uuids, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=uuidCountOrExceptionCode, 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), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=ByteStreams, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=uuids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=KeeperException, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoNodeException, sub_type=None))], member=propagateIfInstanceOf, postfix_operators=[], prefix_operators=[], qualifier=Throwables, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=propagate, postfix_operators=[], prefix_operators=[], qualifier=Throwables, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[Long] operator[>] identifier[loadFromNode] operator[SEP] identifier[String] identifier[path] , identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[KeeperException] operator[SEP] identifier[NoNodeException] { Keyword[try] { Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[_curator] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[forPath] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[DataInputStream] identifier[in] operator[=] Keyword[new] identifier[DataInputStream] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[uuidCountOrExceptionCode] operator[=] identifier[in] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uuidCountOrExceptionCode] operator[<] Other[0] operator[SEP] { identifier[String] identifier[exceptionJson] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[data] , Other[4] , identifier[data] operator[SEP] identifier[length] operator[-] Other[4] , identifier[Charsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[uuidCountOrExceptionCode] operator[SEP] { Keyword[case] identifier[UNKNOWN_TABLE] operator[:] Keyword[throw] identifier[JsonHelper] operator[SEP] identifier[fromJson] operator[SEP] identifier[exceptionJson] , identifier[UnknownTableException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[case] identifier[DROPPED_TABLE] operator[:] Keyword[throw] identifier[JsonHelper] operator[SEP] identifier[fromJson] operator[SEP] identifier[exceptionJson] , identifier[DroppedTableException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } } identifier[Set] operator[<] identifier[Long] operator[>] identifier[uuids] operator[=] identifier[Sets] operator[SEP] identifier[newHashSet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[uuidCountOrExceptionCode] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[uuids] operator[SEP] identifier[add] operator[SEP] identifier[in] operator[SEP] identifier[readLong] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ByteStreams] operator[SEP] identifier[copy] operator[SEP] identifier[in] , identifier[out] operator[SEP] operator[SEP] Keyword[return] identifier[uuids] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[Throwables] operator[SEP] identifier[propagateIfInstanceOf] operator[SEP] identifier[t] , identifier[KeeperException] operator[SEP] identifier[NoNodeException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[throw] identifier[Throwables] operator[SEP] identifier[propagate] operator[SEP] identifier[t] operator[SEP] operator[SEP] } }
public void printUsage(Writer out, ResourceBundle rb, OptionHandlerFilter filter) { PrintWriter w = new PrintWriter(out); // determine the length of the option + metavar first int len = 0; for (OptionHandler h : arguments) { int curLen = getPrefixLen(h, rb); len = Math.max(len,curLen); } for (OptionHandler h: options) { int curLen = getPrefixLen(h, rb); len = Math.max(len,curLen); } // then print for (OptionHandler h : arguments) { printOption(w, h, len, rb, filter); } for (OptionHandler h : options) { printOption(w, h, len, rb, filter); } w.flush(); }
class class_name[name] begin[{] method[printUsage, return_type[void], modifier[public], parameter[out, rb, filter]] begin[{] local_variable[type[PrintWriter], w] local_variable[type[int], len] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPrefixLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=curLen)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=curLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionHandler, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPrefixLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=curLen)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=curLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionHandler, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionHandler, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionHandler, sub_type=None))), label=None) call[w.flush, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[printUsage] operator[SEP] identifier[Writer] identifier[out] , identifier[ResourceBundle] identifier[rb] , identifier[OptionHandlerFilter] identifier[filter] operator[SEP] { identifier[PrintWriter] identifier[w] operator[=] Keyword[new] identifier[PrintWriter] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[int] identifier[len] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[OptionHandler] identifier[h] operator[:] identifier[arguments] operator[SEP] { Keyword[int] identifier[curLen] operator[=] identifier[getPrefixLen] operator[SEP] identifier[h] , identifier[rb] operator[SEP] operator[SEP] identifier[len] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[len] , identifier[curLen] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[OptionHandler] identifier[h] operator[:] identifier[options] operator[SEP] { Keyword[int] identifier[curLen] operator[=] identifier[getPrefixLen] operator[SEP] identifier[h] , identifier[rb] operator[SEP] operator[SEP] identifier[len] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[len] , identifier[curLen] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[OptionHandler] identifier[h] operator[:] identifier[arguments] operator[SEP] { identifier[printOption] operator[SEP] identifier[w] , identifier[h] , identifier[len] , identifier[rb] , identifier[filter] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[OptionHandler] identifier[h] operator[:] identifier[options] operator[SEP] { identifier[printOption] operator[SEP] identifier[w] , identifier[h] , identifier[len] , identifier[rb] , identifier[filter] operator[SEP] operator[SEP] } identifier[w] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
public boolean isProcessed(Trace trace, Node node, Direction direction) { boolean ret = false; if (trace.getTransaction() != null) { List<ProcessorWrapper> procs = null; synchronized (processors) { procs = processors.get(trace.getTransaction()); } if (procs != null) { for (int i = 0; !ret && i < procs.size(); i++) { ret = procs.get(i).isProcessed(trace, node, direction); } } } if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager: isProcessed trace=" + trace + " node=" + node + " direction=" + direction + "? " + ret); } return ret; }
class class_name[name] begin[{] method[isProcessed, return_type[type[boolean]], modifier[public], parameter[trace, node, direction]] begin[{] local_variable[type[boolean], ret] if[binary_operation[call[trace.getTransaction, parameter[]], !=, literal[null]]] begin[{] local_variable[type[List], procs] SYNCHRONIZED[member[.processors]] BEGIN[{] assign[member[.procs], call[processors.get, parameter[call[trace.getTransaction, parameter[]]]]] END[}] if[binary_operation[member[.procs], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=procs, selectors=[MethodInvocation(arguments=[MemberReference(member=trace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=direction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isProcessed, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=ret, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=procs, selectors=[], type_arguments=None), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] else begin[{] None end[}] if[call[log.isLoggable, parameter[member[Level.FINEST]]]] begin[{] call[log.finest, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["ProcessManager: isProcessed trace="], +, member[.trace]], +, literal[" node="]], +, member[.node]], +, literal[" direction="]], +, member[.direction]], +, literal["? "]], +, member[.ret]]]] else begin[{] None end[}] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isProcessed] operator[SEP] identifier[Trace] identifier[trace] , identifier[Node] identifier[node] , identifier[Direction] identifier[direction] operator[SEP] { Keyword[boolean] identifier[ret] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[trace] operator[SEP] identifier[getTransaction] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[ProcessorWrapper] operator[>] identifier[procs] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[processors] operator[SEP] { identifier[procs] operator[=] identifier[processors] operator[SEP] identifier[get] operator[SEP] identifier[trace] operator[SEP] identifier[getTransaction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[procs] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] operator[!] identifier[ret] operator[&&] identifier[i] operator[<] identifier[procs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ret] operator[=] identifier[procs] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isProcessed] operator[SEP] identifier[trace] , identifier[node] , identifier[direction] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[trace] operator[+] literal[String] operator[+] identifier[node] operator[+] literal[String] operator[+] identifier[direction] operator[+] literal[String] operator[+] identifier[ret] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
private Set<ConstraintViolation<?>> validateJsr303(V value) { @SuppressWarnings("rawtypes") Set set; if (this.property == null) { if (value == null) { return null; } set = this.validator.validate(value, this.groups); } else { set = this.validator.validateValue(this.pojoType, this.property, value, this.groups); } @SuppressWarnings("unchecked") Set<ConstraintViolation<?>> violationSet = set; return violationSet; }
class class_name[name] begin[{] method[validateJsr303, return_type[type[Set]], modifier[private], parameter[value]] begin[{] local_variable[type[Set], set] if[binary_operation[THIS[member[None.property]], ==, literal[null]]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.set], THIS[member[None.validator]call[None.validate, parameter[member[.value], THIS[member[None.groups]]]]]] else begin[{] assign[member[.set], THIS[member[None.validator]call[None.validateValue, parameter[THIS[member[None.pojoType]], THIS[member[None.property]], member[.value], THIS[member[None.groups]]]]]] end[}] local_variable[type[Set], violationSet] return[member[.violationSet]] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[ConstraintViolation] operator[<] operator[?] operator[>] operator[>] identifier[validateJsr303] operator[SEP] identifier[V] identifier[value] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Set] identifier[set] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[property] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[set] operator[=] Keyword[this] operator[SEP] identifier[validator] operator[SEP] identifier[validate] operator[SEP] identifier[value] , Keyword[this] operator[SEP] identifier[groups] operator[SEP] operator[SEP] } Keyword[else] { identifier[set] operator[=] Keyword[this] operator[SEP] identifier[validator] operator[SEP] identifier[validateValue] operator[SEP] Keyword[this] operator[SEP] identifier[pojoType] , Keyword[this] operator[SEP] identifier[property] , identifier[value] , Keyword[this] operator[SEP] identifier[groups] operator[SEP] operator[SEP] } annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Set] operator[<] identifier[ConstraintViolation] operator[<] operator[?] operator[>] operator[>] identifier[violationSet] operator[=] identifier[set] operator[SEP] Keyword[return] identifier[violationSet] operator[SEP] }
private Map<String,Function<HttpRequestContext, String>> createSubstitutionMap(String[] permissions, AbstractMethod am) { Map<String, Function<HttpRequestContext, String>> map = Maps.newLinkedHashMap(); for (String permission : permissions) { Matcher matcher = SUBSTITUTION_MATCHER.matcher(permission); while (matcher.find()) { String match = matcher.group(); if (map.containsKey(match)) { continue; } String param = matcher.group("param"); Function<HttpRequestContext, String> substitution; if (param.startsWith("?")) { substitution = createQuerySubstitution(param.substring(1)); } else { substitution = createPathSubstitution(param, am); } map.put(match, substitution); } } return map; }
class class_name[name] begin[{] method[createSubstitutionMap, return_type[type[Map]], modifier[private], parameter[permissions, am]] begin[{] local_variable[type[Map], map] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=permission, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=SUBSTITUTION_MATCHER, selectors=[], type_arguments=None), name=matcher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), name=match)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="param")], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=substitution)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=HttpRequestContext, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Function, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="?")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=substitution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=am, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createPathSubstitution, 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=substitution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=createQuerySubstitution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=substitution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=find, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=permissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=permission)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.map]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Function] operator[<] identifier[HttpRequestContext] , identifier[String] operator[>] operator[>] identifier[createSubstitutionMap] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[permissions] , identifier[AbstractMethod] identifier[am] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Function] operator[<] identifier[HttpRequestContext] , identifier[String] operator[>] operator[>] identifier[map] operator[=] identifier[Maps] operator[SEP] identifier[newLinkedHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[permission] operator[:] identifier[permissions] operator[SEP] { identifier[Matcher] identifier[matcher] operator[=] identifier[SUBSTITUTION_MATCHER] operator[SEP] identifier[matcher] operator[SEP] identifier[permission] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[match] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[SEP] identifier[containsKey] operator[SEP] identifier[match] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[param] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Function] operator[<] identifier[HttpRequestContext] , identifier[String] operator[>] identifier[substitution] operator[SEP] Keyword[if] operator[SEP] identifier[param] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[substitution] operator[=] identifier[createQuerySubstitution] operator[SEP] identifier[param] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[substitution] operator[=] identifier[createPathSubstitution] operator[SEP] identifier[param] , identifier[am] operator[SEP] operator[SEP] } identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[match] , identifier[substitution] operator[SEP] operator[SEP] } } Keyword[return] identifier[map] operator[SEP] }
private static int getSize(Object[] data, int l, Type[] types) { int s = 0; for (int i = 0; i < l; i++) { Object o = data[i]; s += 1; // type or null if (o != null) { switch (types[i].typeCode) { case Types.SQL_ALL_TYPES : throw Error.runtimeError(ErrorCode.U_S0500, "RowOutputBinary"); case Types.SQL_CHAR : case Types.SQL_VARCHAR : case Types.VARCHAR_IGNORECASE : s += 4; s += StringConverter.getUTFSize((String) o); break; case Types.TINYINT : case Types.SQL_SMALLINT : s += 2; break; case Types.SQL_INTEGER : s += 4; break; case Types.SQL_BIGINT : case Types.SQL_REAL : case Types.SQL_FLOAT : case Types.SQL_DOUBLE : s += 8; break; case Types.SQL_NUMERIC : case Types.SQL_DECIMAL : s += 8; BigDecimal bigdecimal = (BigDecimal) o; BigInteger bigint = JavaSystem.unscaledValue(bigdecimal); s += bigint.toByteArray().length; break; case Types.SQL_BOOLEAN : s += 1; break; case Types.SQL_DATE : s += 8; break; case Types.SQL_TIME : s += 8; break; case Types.SQL_TIME_WITH_TIME_ZONE : s += 12; break; case Types.SQL_TIMESTAMP : s += 12; break; case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : s += 16; break; case Types.SQL_INTERVAL_YEAR : case Types.SQL_INTERVAL_YEAR_TO_MONTH : case Types.SQL_INTERVAL_MONTH : s += 8; break; case Types.SQL_INTERVAL_DAY : case Types.SQL_INTERVAL_DAY_TO_HOUR : case Types.SQL_INTERVAL_DAY_TO_MINUTE : case Types.SQL_INTERVAL_DAY_TO_SECOND : case Types.SQL_INTERVAL_HOUR : case Types.SQL_INTERVAL_HOUR_TO_MINUTE : case Types.SQL_INTERVAL_HOUR_TO_SECOND : case Types.SQL_INTERVAL_MINUTE : case Types.SQL_INTERVAL_MINUTE_TO_SECOND : case Types.SQL_INTERVAL_SECOND : s += 12; break; case Types.SQL_BINARY : case Types.SQL_VARBINARY : s += 4; s += ((BinaryData) o).length(null); break; case Types.SQL_BIT : case Types.SQL_BIT_VARYING : s += 4; s += ((BinaryData) o).length(null); break; case Types.SQL_CLOB : case Types.SQL_BLOB : s += 8; break; case Types.OTHER : JavaObjectData jo = (JavaObjectData) o; s += 4; s += jo.getBytesLength(); break; default : throw Error.runtimeError(ErrorCode.U_S0500, "RowOutputBinary"); } } } return s; }
class class_name[name] begin[{] method[getSize, return_type[type[int]], modifier[private static], parameter[data, l, types]] begin[{] local_variable[type[int], s] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, 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=[SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SQL_ALL_TYPES, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=U_S0500, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RowOutputBinary")], member=runtimeError, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_CHAR, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_VARCHAR, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=VARCHAR_IGNORECASE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=getUTFSize, postfix_operators=[], prefix_operators=[], qualifier=StringConverter, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=TINYINT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_SMALLINT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_INTEGER, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_BIGINT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_REAL, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_FLOAT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_DOUBLE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_NUMERIC, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_DECIMAL, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BigDecimal, sub_type=None)), name=bigdecimal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BigDecimal, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=bigdecimal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unscaledValue, postfix_operators=[], prefix_operators=[], qualifier=JavaSystem, selectors=[], type_arguments=None), name=bigint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BigInteger, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=bigint, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_BOOLEAN, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_DATE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_TIME, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_TIME_WITH_TIME_ZONE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_TIMESTAMP, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_TIMESTAMP_WITH_TIME_ZONE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_INTERVAL_YEAR, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_YEAR_TO_MONTH, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_MONTH, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_INTERVAL_DAY, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_DAY_TO_HOUR, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_DAY_TO_MINUTE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_DAY_TO_SECOND, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_HOUR, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_HOUR_TO_MINUTE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_HOUR_TO_SECOND, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_MINUTE, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_MINUTE_TO_SECOND, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_INTERVAL_SECOND, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_BINARY, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_VARBINARY, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BinaryData, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_BIT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_BIT_VARYING, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BinaryData, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SQL_CLOB, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReference(member=SQL_BLOB, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=OTHER, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[])], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JavaObjectData, sub_type=None)), name=jo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JavaObjectData, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getBytesLength, postfix_operators=[], prefix_operators=[], qualifier=jo, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=U_S0500, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RowOutputBinary")], member=runtimeError, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=typeCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l, 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[.s]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[getSize] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[l] , identifier[Type] operator[SEP] operator[SEP] identifier[types] operator[SEP] { Keyword[int] identifier[s] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[l] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[s] operator[+=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[!=] Other[null] operator[SEP] { Keyword[switch] operator[SEP] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[typeCode] operator[SEP] { Keyword[case] identifier[Types] operator[SEP] identifier[SQL_ALL_TYPES] operator[:] Keyword[throw] identifier[Error] operator[SEP] identifier[runtimeError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[U_S0500] , literal[String] operator[SEP] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_CHAR] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_VARCHAR] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[VARCHAR_IGNORECASE] operator[:] identifier[s] operator[+=] Other[4] operator[SEP] identifier[s] operator[+=] identifier[StringConverter] operator[SEP] identifier[getUTFSize] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[TINYINT] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_SMALLINT] operator[:] identifier[s] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTEGER] operator[:] identifier[s] operator[+=] Other[4] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BIGINT] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_REAL] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_FLOAT] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_DOUBLE] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_NUMERIC] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_DECIMAL] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] identifier[BigDecimal] identifier[bigdecimal] operator[=] operator[SEP] identifier[BigDecimal] operator[SEP] identifier[o] operator[SEP] identifier[BigInteger] identifier[bigint] operator[=] identifier[JavaSystem] operator[SEP] identifier[unscaledValue] operator[SEP] identifier[bigdecimal] operator[SEP] operator[SEP] identifier[s] operator[+=] identifier[bigint] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BOOLEAN] operator[:] identifier[s] operator[+=] Other[1] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_DATE] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_TIME] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_TIME_WITH_TIME_ZONE] operator[:] identifier[s] operator[+=] Other[12] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_TIMESTAMP] operator[:] identifier[s] operator[+=] Other[12] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_TIMESTAMP_WITH_TIME_ZONE] operator[:] identifier[s] operator[+=] Other[16] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_YEAR] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_YEAR_TO_MONTH] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_MONTH] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_DAY] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_DAY_TO_HOUR] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_DAY_TO_MINUTE] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_DAY_TO_SECOND] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_HOUR] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_HOUR_TO_MINUTE] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_HOUR_TO_SECOND] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_MINUTE] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_MINUTE_TO_SECOND] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_INTERVAL_SECOND] operator[:] identifier[s] operator[+=] Other[12] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BINARY] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_VARBINARY] operator[:] identifier[s] operator[+=] Other[4] operator[SEP] identifier[s] operator[+=] operator[SEP] operator[SEP] identifier[BinaryData] operator[SEP] identifier[o] operator[SEP] operator[SEP] identifier[length] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BIT] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BIT_VARYING] operator[:] identifier[s] operator[+=] Other[4] operator[SEP] identifier[s] operator[+=] operator[SEP] operator[SEP] identifier[BinaryData] operator[SEP] identifier[o] operator[SEP] operator[SEP] identifier[length] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_CLOB] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BLOB] operator[:] identifier[s] operator[+=] Other[8] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Types] operator[SEP] identifier[OTHER] operator[:] identifier[JavaObjectData] identifier[jo] operator[=] operator[SEP] identifier[JavaObjectData] operator[SEP] identifier[o] operator[SEP] identifier[s] operator[+=] Other[4] operator[SEP] identifier[s] operator[+=] identifier[jo] operator[SEP] identifier[getBytesLength] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] identifier[Error] operator[SEP] identifier[runtimeError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[U_S0500] , literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[s] operator[SEP] }
public Coordinate metersToTile(Coordinate coord, int zoomLevel) { Coordinate pixels = metersToPixels(coord.x, coord.y, zoomLevel); int tx = (int) pixels.x / 256; int ty = (int) pixels.y / 256; return new Coordinate(tx, ty, zoomLevel); }
class class_name[name] begin[{] method[metersToTile, return_type[type[Coordinate]], modifier[public], parameter[coord, zoomLevel]] begin[{] local_variable[type[Coordinate], pixels] local_variable[type[int], tx] local_variable[type[int], ty] return[ClassCreator(arguments=[MemberReference(member=tx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=zoomLevel, 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=Coordinate, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Coordinate] identifier[metersToTile] operator[SEP] identifier[Coordinate] identifier[coord] , Keyword[int] identifier[zoomLevel] operator[SEP] { identifier[Coordinate] identifier[pixels] operator[=] identifier[metersToPixels] operator[SEP] identifier[coord] operator[SEP] identifier[x] , identifier[coord] operator[SEP] identifier[y] , identifier[zoomLevel] operator[SEP] operator[SEP] Keyword[int] identifier[tx] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[pixels] operator[SEP] identifier[x] operator[/] Other[256] operator[SEP] Keyword[int] identifier[ty] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[pixels] operator[SEP] identifier[y] operator[/] Other[256] operator[SEP] Keyword[return] Keyword[new] identifier[Coordinate] operator[SEP] identifier[tx] , identifier[ty] , identifier[zoomLevel] operator[SEP] operator[SEP] }
public void printXmlTrailer(PrintWriter out, ResourceBundle reg) throws DBException { String strTrailer = reg.getString("xmlTrailer"); if ((strTrailer == null) || (strTrailer.length() == 0)) strTrailer = " <trailer>" + " </trailer>"; out.println(strTrailer); }
class class_name[name] begin[{] method[printXmlTrailer, return_type[void], modifier[public], parameter[out, reg]] begin[{] local_variable[type[String], strTrailer] if[binary_operation[binary_operation[member[.strTrailer], ==, literal[null]], ||, binary_operation[call[strTrailer.length, parameter[]], ==, literal[0]]]] begin[{] assign[member[.strTrailer], binary_operation[literal[" <trailer>"], +, literal[" </trailer>"]]] else begin[{] None end[}] call[out.println, parameter[member[.strTrailer]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[printXmlTrailer] operator[SEP] identifier[PrintWriter] identifier[out] , identifier[ResourceBundle] identifier[reg] operator[SEP] Keyword[throws] identifier[DBException] { identifier[String] identifier[strTrailer] operator[=] identifier[reg] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[strTrailer] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[strTrailer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] identifier[strTrailer] operator[=] literal[String] operator[+] literal[String] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[strTrailer] operator[SEP] operator[SEP] }
@Override public Enumeration<URL> getResources(String name) throws IOException { if (this.rootClassLoader == null) { return findResources(name); } return new ResourceEnumeration(this.rootClassLoader.getResources(name), findResources(name)); }
class class_name[name] begin[{] method[getResources, return_type[type[Enumeration]], modifier[public], parameter[name]] begin[{] if[binary_operation[THIS[member[None.rootClassLoader]], ==, literal[null]]] begin[{] return[call[.findResources, parameter[member[.name]]]] else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rootClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResources, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceEnumeration, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Enumeration] operator[<] identifier[URL] operator[>] identifier[getResources] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[rootClassLoader] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[findResources] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ResourceEnumeration] operator[SEP] Keyword[this] operator[SEP] identifier[rootClassLoader] operator[SEP] identifier[getResources] operator[SEP] identifier[name] operator[SEP] , identifier[findResources] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] }
@Override Set<E> createElementSet() { final Set<E> delegate = countMap.keySet(); return new ForwardingSet<E>() { @Override protected Set<E> delegate() { return delegate; } @Override public boolean contains(@NullableDecl Object object) { return object != null && Collections2.safeContains(delegate, object); } @Override public boolean containsAll(Collection<?> collection) { return standardContainsAll(collection); } @Override public boolean remove(Object object) { return object != null && Collections2.safeRemove(delegate, object); } @Override public boolean removeAll(Collection<?> c) { return standardRemoveAll(c); } }; }
class class_name[name] begin[{] method[createElementSet, return_type[type[Set]], modifier[default], parameter[]] begin[{] local_variable[type[Set], delegate] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'protected'}, name=delegate, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=[], name=Set, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeContains, postfix_operators=[], prefix_operators=[], qualifier=Collections2, selectors=[], type_arguments=None), operator=&&), label=None)], documentation=None, modifiers={'public'}, name=contains, parameters=[FormalParameter(annotations=[Annotation(element=None, name=NullableDecl)], modifiers=set(), name=object, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=collection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=standardContainsAll, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=containsAll, parameters=[FormalParameter(annotations=[], modifiers=set(), name=collection, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Collection, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeRemove, postfix_operators=[], prefix_operators=[], qualifier=Collections2, selectors=[], type_arguments=None), operator=&&), label=None)], documentation=None, modifiers={'public'}, name=remove, parameters=[FormalParameter(annotations=[], modifiers=set(), name=object, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=standardRemoveAll, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=removeAll, parameters=[FormalParameter(annotations=[], modifiers=set(), name=c, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Collection, 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=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=ForwardingSet, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] identifier[Set] operator[<] identifier[E] operator[>] identifier[createElementSet] operator[SEP] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[E] operator[>] identifier[delegate] operator[=] identifier[countMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ForwardingSet] operator[<] identifier[E] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] identifier[Set] operator[<] identifier[E] operator[>] identifier[delegate] operator[SEP] operator[SEP] { Keyword[return] identifier[delegate] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] annotation[@] identifier[NullableDecl] identifier[Object] identifier[object] operator[SEP] { Keyword[return] identifier[object] operator[!=] Other[null] operator[&&] identifier[Collections2] operator[SEP] identifier[safeContains] operator[SEP] identifier[delegate] , identifier[object] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[containsAll] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[collection] operator[SEP] { Keyword[return] identifier[standardContainsAll] operator[SEP] identifier[collection] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[Object] identifier[object] operator[SEP] { Keyword[return] identifier[object] operator[!=] Other[null] operator[&&] identifier[Collections2] operator[SEP] identifier[safeRemove] operator[SEP] identifier[delegate] , identifier[object] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[removeAll] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[c] operator[SEP] { Keyword[return] identifier[standardRemoveAll] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } operator[SEP] }
protected static Capabilities substituteMobilePlatform(Capabilities originalCapabilities, String newPlatform) { DesiredCapabilities dc = new DesiredCapabilities(originalCapabilities); dc.setCapability(PLATFORM_NAME, newPlatform); return dc; }
class class_name[name] begin[{] method[substituteMobilePlatform, return_type[type[Capabilities]], modifier[static protected], parameter[originalCapabilities, newPlatform]] begin[{] local_variable[type[DesiredCapabilities], dc] call[dc.setCapability, parameter[member[.PLATFORM_NAME], member[.newPlatform]]] return[member[.dc]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[Capabilities] identifier[substituteMobilePlatform] operator[SEP] identifier[Capabilities] identifier[originalCapabilities] , identifier[String] identifier[newPlatform] operator[SEP] { identifier[DesiredCapabilities] identifier[dc] operator[=] Keyword[new] identifier[DesiredCapabilities] operator[SEP] identifier[originalCapabilities] operator[SEP] operator[SEP] identifier[dc] operator[SEP] identifier[setCapability] operator[SEP] identifier[PLATFORM_NAME] , identifier[newPlatform] operator[SEP] operator[SEP] Keyword[return] identifier[dc] operator[SEP] }
private String getDefaultActivationSpecJndiName(BeanMetaData bmd) { EJBModuleMetaDataImpl mmd = bmd._moduleMetaData; EJBApplicationMetaData amd = mmd.getEJBApplicationMetaData(); String appName = amd.getLogicalName(); StringBuilder sb = new StringBuilder(); if (appName != null) { sb.append(appName).append('/'); } sb.append(mmd.ivLogicalName).append('/'); sb.append(bmd.enterpriseBeanName); return sb.toString(); }
class class_name[name] begin[{] method[getDefaultActivationSpecJndiName, return_type[type[String]], modifier[private], parameter[bmd]] begin[{] local_variable[type[EJBModuleMetaDataImpl], mmd] local_variable[type[EJBApplicationMetaData], amd] local_variable[type[String], appName] local_variable[type[StringBuilder], sb] if[binary_operation[member[.appName], !=, literal[null]]] begin[{] call[sb.append, parameter[member[.appName]]] else begin[{] None end[}] call[sb.append, parameter[member[mmd.ivLogicalName]]] call[sb.append, parameter[member[bmd.enterpriseBeanName]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getDefaultActivationSpecJndiName] operator[SEP] identifier[BeanMetaData] identifier[bmd] operator[SEP] { identifier[EJBModuleMetaDataImpl] identifier[mmd] operator[=] identifier[bmd] operator[SEP] identifier[_moduleMetaData] operator[SEP] identifier[EJBApplicationMetaData] identifier[amd] operator[=] identifier[mmd] operator[SEP] identifier[getEJBApplicationMetaData] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[appName] operator[=] identifier[amd] operator[SEP] identifier[getLogicalName] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[appName] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[appName] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[mmd] operator[SEP] identifier[ivLogicalName] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[bmd] operator[SEP] identifier[enterpriseBeanName] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public CommerceOrder[] findByGroupId_PrevAndNext(long commerceOrderId, long groupId, OrderByComparator<CommerceOrder> orderByComparator) throws NoSuchOrderException { CommerceOrder commerceOrder = findByPrimaryKey(commerceOrderId); Session session = null; try { session = openSession(); CommerceOrder[] array = new CommerceOrderImpl[3]; array[0] = getByGroupId_PrevAndNext(session, commerceOrder, groupId, orderByComparator, true); array[1] = commerceOrder; array[2] = getByGroupId_PrevAndNext(session, commerceOrder, groupId, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
class class_name[name] begin[{] method[findByGroupId_PrevAndNext, return_type[type[CommerceOrder]], modifier[public], parameter[commerceOrderId, groupId, orderByComparator]] begin[{] local_variable[type[CommerceOrder], commerceOrder] local_variable[type[Session], session] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=openSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceOrderImpl, sub_type=None)), name=array)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=CommerceOrder, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=commerceOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=groupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getByGroupId_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=commerceOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=commerceOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=groupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getByGroupId_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceOrder] operator[SEP] operator[SEP] identifier[findByGroupId_PrevAndNext] operator[SEP] Keyword[long] identifier[commerceOrderId] , Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CommerceOrder] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchOrderException] { identifier[CommerceOrder] identifier[commerceOrder] operator[=] identifier[findByPrimaryKey] operator[SEP] identifier[commerceOrderId] operator[SEP] operator[SEP] identifier[Session] identifier[session] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[session] operator[=] identifier[openSession] operator[SEP] operator[SEP] operator[SEP] identifier[CommerceOrder] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] identifier[CommerceOrderImpl] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[0] operator[SEP] operator[=] identifier[getByGroupId_PrevAndNext] operator[SEP] identifier[session] , identifier[commerceOrder] , identifier[groupId] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[1] operator[SEP] operator[=] identifier[commerceOrder] operator[SEP] identifier[array] operator[SEP] Other[2] operator[SEP] operator[=] identifier[getByGroupId_PrevAndNext] operator[SEP] identifier[session] , identifier[commerceOrder] , identifier[groupId] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[array] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[processException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeSession] operator[SEP] identifier[session] operator[SEP] operator[SEP] } }
public @Nonnull StringAssert endsWith(@Nonnull String suffix) { strings.assertEndsWith(description, actual, suffix); return this; }
class class_name[name] begin[{] method[endsWith, return_type[type[StringAssert]], modifier[public], parameter[suffix]] begin[{] call[strings.assertEndsWith, parameter[member[.description], member[.actual], member[.suffix]]] return[THIS[]] end[}] END[}]
Keyword[public] annotation[@] identifier[Nonnull] identifier[StringAssert] identifier[endsWith] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[suffix] operator[SEP] { identifier[strings] operator[SEP] identifier[assertEndsWith] operator[SEP] identifier[description] , identifier[actual] , identifier[suffix] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static List<String> retriveJavaScriptResources(Chart<?> chart) { List<String> resources = new ArrayList<String>(); Class<?> clazz = chart.getClass(); if (clazz.isAnnotationPresent(JqPlotPlugin.class)) { JqPlotResources[] jqPlotResourceses = clazz.getAnnotation( JqPlotPlugin.class).values(); for (JqPlotResources jqPlotResources : jqPlotResourceses) { resources.add(jqPlotResources.getResource()); } } //can it/should we make this more generic? if(chart.getChartConfiguration().getHighlighter() != null) { resources.add(JqPlotResources.Highlighter.getResource()); } return resources; }
class class_name[name] begin[{] method[retriveJavaScriptResources, return_type[type[List]], modifier[public static], parameter[chart]] begin[{] local_variable[type[List], resources] local_variable[type[Class], clazz] if[call[clazz.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JqPlotPlugin, sub_type=None))]]] begin[{] local_variable[type[JqPlotResources], jqPlotResourceses] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=jqPlotResources, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=jqPlotResourceses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=jqPlotResources)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JqPlotResources, sub_type=None))), label=None) else begin[{] None end[}] if[binary_operation[call[chart.getChartConfiguration, parameter[]], !=, literal[null]]] begin[{] call[resources.add, parameter[call[JqPlotResources.Highlighter.getResource, parameter[]]]] else begin[{] None end[}] return[member[.resources]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[retriveJavaScriptResources] operator[SEP] identifier[Chart] operator[<] operator[?] operator[>] identifier[chart] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[resources] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[chart] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[JqPlotPlugin] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[JqPlotResources] operator[SEP] operator[SEP] identifier[jqPlotResourceses] operator[=] identifier[clazz] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[JqPlotPlugin] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[JqPlotResources] identifier[jqPlotResources] operator[:] identifier[jqPlotResourceses] operator[SEP] { identifier[resources] operator[SEP] identifier[add] operator[SEP] identifier[jqPlotResources] operator[SEP] identifier[getResource] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[chart] operator[SEP] identifier[getChartConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getHighlighter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[resources] operator[SEP] identifier[add] operator[SEP] identifier[JqPlotResources] operator[SEP] identifier[Highlighter] operator[SEP] identifier[getResource] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resources] operator[SEP] }
private DistributedUserLayout _getUserLayout(IPerson person, IUserProfile profile) { final String userName = (String) person.getAttribute("username"); final FragmentDefinition ownedFragment = this.fragmentUtils.getFragmentDefinitionByOwner(person); final boolean isLayoutOwnerDefault = this.isLayoutOwnerDefault(person); final Set<String> fragmentNames = new LinkedHashSet<>(); final Document ILF; final Document PLF = this.getPLF(person, profile); // If this user is an owner then ownedFragment will be non null. For // fragment owners and owners of any default layout from which a // fragment owners layout is copied there should not be any imported // distributed layouts. Instead, load their PLF, mark as an owned // if a fragment owner, and return. if (ownedFragment != null || isLayoutOwnerDefault) { ILF = (Document) PLF.cloneNode(true); final Element layoutNode = ILF.getDocumentElement(); final Element ownerDocument = layoutNode.getOwnerDocument().getDocumentElement(); final NodeList channelNodes = ownerDocument.getElementsByTagName("channel"); for (int i = 0; i < channelNodes.getLength(); i++) { Element channelNode = (Element) channelNodes.item(i); final Node chanIdNode = channelNode.getAttributeNode("chanID"); if (chanIdNode == null || MissingPortletDefinition.CHANNEL_ID.equals(chanIdNode.getNodeValue())) { channelNode.getParentNode().removeChild(channelNode); } } if (ownedFragment != null) { fragmentNames.add(ownedFragment.getName()); layoutNode.setAttributeNS( Constants.NS_URI, Constants.ATT_FRAGMENT_NAME, ownedFragment.getName()); logger.debug( "User '{}' is owner of '{}' fragment.", userName, ownedFragment.getName()); } else if (isLayoutOwnerDefault) { layoutNode.setAttributeNS( Constants.NS_URI, Constants.ATT_TEMPLATE_LOGIN_ID, (String) person.getAttribute("username")); } } else { final Locale locale = profile.getLocaleManager().getLocales().get(0); final List<FragmentDefinition> applicableFragmentDefinitions = this.fragmentUtils.getFragmentDefinitionsApplicableToPerson(person); final List<Document> applicableLayouts = this.fragmentUtils.getFragmentDefinitionUserViewLayouts( applicableFragmentDefinitions, locale); final IntegrationResult integrationResult = new IntegrationResult(); ILF = this.createCompositeILF(person, PLF, applicableLayouts, integrationResult); // push optimizations made during merge back into db. if (integrationResult.isChangedPLF()) { if (logger.isDebugEnabled()) { logger.debug( "Saving PLF for {} due to changes during merge.", person.getAttribute(IPerson.USERNAME)); } super.setUserLayout(person, profile, PLF, false); } fragmentNames.addAll( this.fragmentUtils.getFragmentNames(applicableFragmentDefinitions)); } return this.createDistributedUserLayout(person, profile, ILF, fragmentNames); }
class class_name[name] begin[{] method[_getUserLayout, return_type[type[DistributedUserLayout]], modifier[private], parameter[person, profile]] begin[{] local_variable[type[String], userName] local_variable[type[FragmentDefinition], ownedFragment] local_variable[type[boolean], isLayoutOwnerDefault] local_variable[type[Set], fragmentNames] local_variable[type[Document], ILF] local_variable[type[Document], PLF] if[binary_operation[binary_operation[member[.ownedFragment], !=, literal[null]], ||, member[.isLayoutOwnerDefault]]] begin[{] assign[member[.ILF], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=cloneNode, postfix_operators=[], prefix_operators=[], qualifier=PLF, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None))] local_variable[type[Element], layoutNode] local_variable[type[Element], ownerDocument] local_variable[type[NodeList], channelNodes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=channelNodes, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=channelNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="chanID")], member=getAttributeNode, postfix_operators=[], prefix_operators=[], qualifier=channelNode, selectors=[], type_arguments=None), name=chanIdNode)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=chanIdNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=[], prefix_operators=[], qualifier=chanIdNode, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=MissingPortletDefinition.CHANNEL_ID, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getParentNode, postfix_operators=[], prefix_operators=[], qualifier=channelNode, selectors=[MethodInvocation(arguments=[MemberReference(member=channelNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=channelNodes, 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) if[binary_operation[member[.ownedFragment], !=, literal[null]]] begin[{] call[fragmentNames.add, parameter[call[ownedFragment.getName, parameter[]]]] call[layoutNode.setAttributeNS, parameter[member[Constants.NS_URI], member[Constants.ATT_FRAGMENT_NAME], call[ownedFragment.getName, parameter[]]]] call[logger.debug, parameter[literal["User '{}' is owner of '{}' fragment."], member[.userName], call[ownedFragment.getName, parameter[]]]] else begin[{] if[member[.isLayoutOwnerDefault]] begin[{] call[layoutNode.setAttributeNS, parameter[member[Constants.NS_URI], member[Constants.ATT_TEMPLATE_LOGIN_ID], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="username")], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=person, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]] else begin[{] None end[}] end[}] else begin[{] local_variable[type[Locale], locale] local_variable[type[List], applicableFragmentDefinitions] local_variable[type[List], applicableLayouts] local_variable[type[IntegrationResult], integrationResult] assign[member[.ILF], THIS[call[None.createCompositeILF, parameter[member[.person], member[.PLF], member[.applicableLayouts], member[.integrationResult]]]]] if[call[integrationResult.isChangedPLF, parameter[]]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[literal["Saving PLF for {} due to changes during merge."], call[person.getAttribute, parameter[member[IPerson.USERNAME]]]]] else begin[{] None end[}] SuperMethodInvocation(arguments=[MemberReference(member=person, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PLF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setUserLayout, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) else begin[{] None end[}] call[fragmentNames.addAll, parameter[THIS[member[None.fragmentUtils]call[None.getFragmentNames, parameter[member[.applicableFragmentDefinitions]]]]]] end[}] return[THIS[call[None.createDistributedUserLayout, parameter[member[.person], member[.profile], member[.ILF], member[.fragmentNames]]]]] end[}] END[}]
Keyword[private] identifier[DistributedUserLayout] identifier[_getUserLayout] operator[SEP] identifier[IPerson] identifier[person] , identifier[IUserProfile] identifier[profile] operator[SEP] { Keyword[final] identifier[String] identifier[userName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[person] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[FragmentDefinition] identifier[ownedFragment] operator[=] Keyword[this] operator[SEP] identifier[fragmentUtils] operator[SEP] identifier[getFragmentDefinitionByOwner] operator[SEP] identifier[person] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isLayoutOwnerDefault] operator[=] Keyword[this] operator[SEP] identifier[isLayoutOwnerDefault] operator[SEP] identifier[person] operator[SEP] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[fragmentNames] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Document] identifier[ILF] operator[SEP] Keyword[final] identifier[Document] identifier[PLF] operator[=] Keyword[this] operator[SEP] identifier[getPLF] operator[SEP] identifier[person] , identifier[profile] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ownedFragment] operator[!=] Other[null] operator[||] identifier[isLayoutOwnerDefault] operator[SEP] { identifier[ILF] operator[=] operator[SEP] identifier[Document] operator[SEP] identifier[PLF] operator[SEP] identifier[cloneNode] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[final] identifier[Element] identifier[layoutNode] operator[=] identifier[ILF] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Element] identifier[ownerDocument] operator[=] identifier[layoutNode] operator[SEP] identifier[getOwnerDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[NodeList] identifier[channelNodes] operator[=] identifier[ownerDocument] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[channelNodes] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Element] identifier[channelNode] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[channelNodes] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[final] identifier[Node] identifier[chanIdNode] operator[=] identifier[channelNode] operator[SEP] identifier[getAttributeNode] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[chanIdNode] operator[==] Other[null] operator[||] identifier[MissingPortletDefinition] operator[SEP] identifier[CHANNEL_ID] operator[SEP] identifier[equals] operator[SEP] identifier[chanIdNode] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[channelNode] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] identifier[removeChild] operator[SEP] identifier[channelNode] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[ownedFragment] operator[!=] Other[null] operator[SEP] { identifier[fragmentNames] operator[SEP] identifier[add] operator[SEP] identifier[ownedFragment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[layoutNode] operator[SEP] identifier[setAttributeNS] operator[SEP] identifier[Constants] operator[SEP] identifier[NS_URI] , identifier[Constants] operator[SEP] identifier[ATT_FRAGMENT_NAME] , identifier[ownedFragment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[userName] , identifier[ownedFragment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isLayoutOwnerDefault] operator[SEP] { identifier[layoutNode] operator[SEP] identifier[setAttributeNS] operator[SEP] identifier[Constants] operator[SEP] identifier[NS_URI] , identifier[Constants] operator[SEP] identifier[ATT_TEMPLATE_LOGIN_ID] , operator[SEP] identifier[String] operator[SEP] identifier[person] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[final] identifier[Locale] identifier[locale] operator[=] identifier[profile] operator[SEP] identifier[getLocaleManager] operator[SEP] operator[SEP] operator[SEP] identifier[getLocales] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[FragmentDefinition] operator[>] identifier[applicableFragmentDefinitions] operator[=] Keyword[this] operator[SEP] identifier[fragmentUtils] operator[SEP] identifier[getFragmentDefinitionsApplicableToPerson] operator[SEP] identifier[person] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Document] operator[>] identifier[applicableLayouts] operator[=] Keyword[this] operator[SEP] identifier[fragmentUtils] operator[SEP] identifier[getFragmentDefinitionUserViewLayouts] operator[SEP] identifier[applicableFragmentDefinitions] , identifier[locale] operator[SEP] operator[SEP] Keyword[final] identifier[IntegrationResult] identifier[integrationResult] operator[=] Keyword[new] identifier[IntegrationResult] operator[SEP] operator[SEP] operator[SEP] identifier[ILF] operator[=] Keyword[this] operator[SEP] identifier[createCompositeILF] operator[SEP] identifier[person] , identifier[PLF] , identifier[applicableLayouts] , identifier[integrationResult] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[integrationResult] operator[SEP] identifier[isChangedPLF] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[person] operator[SEP] identifier[getAttribute] operator[SEP] identifier[IPerson] operator[SEP] identifier[USERNAME] operator[SEP] operator[SEP] operator[SEP] } Keyword[super] operator[SEP] identifier[setUserLayout] operator[SEP] identifier[person] , identifier[profile] , identifier[PLF] , literal[boolean] operator[SEP] operator[SEP] } identifier[fragmentNames] operator[SEP] identifier[addAll] operator[SEP] Keyword[this] operator[SEP] identifier[fragmentUtils] operator[SEP] identifier[getFragmentNames] operator[SEP] identifier[applicableFragmentDefinitions] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[createDistributedUserLayout] operator[SEP] identifier[person] , identifier[profile] , identifier[ILF] , identifier[fragmentNames] operator[SEP] operator[SEP] }
public void severe(String mesg, Throwable t) { log(Level.SEVERE, mesg, t); }
class class_name[name] begin[{] method[severe, return_type[void], modifier[public], parameter[mesg, t]] begin[{] call[.log, parameter[member[Level.SEVERE], member[.mesg], member[.t]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[severe] operator[SEP] identifier[String] identifier[mesg] , identifier[Throwable] identifier[t] operator[SEP] { identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , identifier[mesg] , identifier[t] operator[SEP] operator[SEP] }
public static final Renderer<Double> instance() { // NOPMD it's thread save! if (PercentDoubleRenderer.instanceRenderer == null) { synchronized (PercentDoubleRenderer.class) { if (PercentDoubleRenderer.instanceRenderer == null) { PercentDoubleRenderer.instanceRenderer = new PercentDoubleRenderer(); } } } return PercentDoubleRenderer.instanceRenderer; }
class class_name[name] begin[{] method[instance, return_type[type[Renderer]], modifier[final public static], parameter[]] begin[{] if[binary_operation[member[PercentDoubleRenderer.instanceRenderer], ==, literal[null]]] begin[{] SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PercentDoubleRenderer, sub_type=None))] BEGIN[{] if[binary_operation[member[PercentDoubleRenderer.instanceRenderer], ==, literal[null]]] begin[{] assign[member[PercentDoubleRenderer.instanceRenderer], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PercentDoubleRenderer, sub_type=None))] else begin[{] None end[}] END[}] else begin[{] None end[}] return[member[PercentDoubleRenderer.instanceRenderer]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[Renderer] operator[<] identifier[Double] operator[>] identifier[instance] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[PercentDoubleRenderer] operator[SEP] identifier[instanceRenderer] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[PercentDoubleRenderer] operator[SEP] Keyword[class] operator[SEP] { Keyword[if] operator[SEP] identifier[PercentDoubleRenderer] operator[SEP] identifier[instanceRenderer] operator[==] Other[null] operator[SEP] { identifier[PercentDoubleRenderer] operator[SEP] identifier[instanceRenderer] operator[=] Keyword[new] identifier[PercentDoubleRenderer] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[PercentDoubleRenderer] operator[SEP] identifier[instanceRenderer] operator[SEP] }
public static void rcvResetBrowse(CommsByteBuffer request, Conversation conversation, int requestNumber, boolean allocatedFromBufferPool, boolean partOfExchange) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "rcvResetBrowse", new Object[] { request, conversation, ""+requestNumber, ""+allocatedFromBufferPool }); // Strip information from reset request. short connectionObjectId = request.getShort(); // Connection Id short browserSessionId = request.getShort(); // Id of browser session. if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "rcvResetBrowse> connectionObjectId = "+connectionObjectId+ "\nrcvResetBrowse> browserSessionId = "+browserSessionId); BrowserSession browserSession = null; ConversationState convState = null; try { // Locate browser session from conversation state. convState = (ConversationState)conversation.getAttachment(); CATMainConsumer mainConsumer = (CATMainConsumer)convState.getObject(browserSessionId); browserSession = mainConsumer.getBrowserSession(); if (browserSession == null) { // The browser session from the main consumer should not be null here SIErrorException e = new SIErrorException( nls.getFormattedMessage("BROWSER_SESSION_NULL_SICO20", null, null) ); FFDCFilter.processException(e, CLASS_NAME + ".rcvResetBrowse", CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_04); throw e; } } catch(NullPointerException npe) { FFDCFilter.processException(npe, CLASS_NAME + ".rcvResetBrowse", CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_01); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Browser session was null!", npe); // This is an internal error, so inform the client StaticCATHelper.sendExceptionToClient(npe, CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_01, // d186970 conversation, requestNumber); } if (browserSession != null) { try { browserSession.reset(); } catch (SIException e) { //No FFDC code needed //Only FFDC if we haven't received a meTerminated event. if(!convState.hasMETerminated()) { FFDCFilter.processException(e, CLASS_NAME + ".rcvResetBrowse", CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_02); } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, e.getMessage(), e); // Send error to client. StaticCATHelper.sendExceptionToClient(e, CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_02, // d186970 conversation, requestNumber); } } // Send response. CommsByteBuffer reply = poolManager.allocate(); try { conversation.send(reply, JFapChannelConstants.SEG_RESET_BROWSE_R, requestNumber, JFapChannelConstants.PRIORITY_MEDIUM, true, ThrottlingPolicy.BLOCK_THREAD, null); } catch (SIException e) { FFDCFilter.processException(e, CLASS_NAME + ".rcvResetBrowse", CommsConstants.STATICCATBROWSER_RCVRESETBROWSERSESS_03); SibTr.error(tc, "COMMUNICATION_ERROR_SICO2020", e); // Can't really do much as a communications exception implies that // we have lost contact with the client anyway. } request.release(allocatedFromBufferPool); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "rcvResetBrowse"); }
class class_name[name] begin[{] method[rcvResetBrowse, return_type[void], modifier[public static], parameter[request, conversation, requestNumber, allocatedFromBufferPool, partOfExchange]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["rcvResetBrowse"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MemberReference(member=allocatedFromBufferPool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[short], connectionObjectId] local_variable[type[short], browserSessionId] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["rcvResetBrowse> connectionObjectId = "], +, member[.connectionObjectId]], +, literal["\nrcvResetBrowse> browserSessionId = "]], +, member[.browserSessionId]]]] else begin[{] None end[}] local_variable[type[BrowserSession], browserSession] local_variable[type[ConversationState], convState] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=convState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getAttachment, postfix_operators=[], prefix_operators=[], qualifier=conversation, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ConversationState, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=browserSessionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=convState, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CATMainConsumer, sub_type=None)), name=mainConsumer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CATMainConsumer, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=browserSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBrowserSession, postfix_operators=[], prefix_operators=[], qualifier=mainConsumer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=browserSession, 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=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BROWSER_SESSION_NULL_SICO20"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIErrorException, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SIErrorException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".rcvResetBrowse"), operator=+), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_04, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=npe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".rcvResetBrowse"), operator=+), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_01, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Browser session was null!"), MemberReference(member=npe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=npe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_01, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendExceptionToClient, postfix_operators=[], prefix_operators=[], qualifier=StaticCATHelper, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=npe, types=['NullPointerException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.browserSession], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=browserSession, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=hasMETerminated, postfix_operators=[], prefix_operators=['!'], qualifier=convState, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".rcvResetBrowse"), operator=+), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_02, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_02, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendExceptionToClient, postfix_operators=[], prefix_operators=[], qualifier=StaticCATHelper, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[CommsByteBuffer], reply] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SEG_RESET_BROWSE_R, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PRIORITY_MEDIUM, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=BLOCK_THREAD, postfix_operators=[], prefix_operators=[], qualifier=ThrottlingPolicy, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=send, postfix_operators=[], prefix_operators=[], qualifier=conversation, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".rcvResetBrowse"), operator=+), MemberReference(member=STATICCATBROWSER_RCVRESETBROWSERSESS_03, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="COMMUNICATION_ERROR_SICO2020"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) call[request.release, parameter[member[.allocatedFromBufferPool]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["rcvResetBrowse"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[rcvResetBrowse] operator[SEP] identifier[CommsByteBuffer] identifier[request] , identifier[Conversation] identifier[conversation] , Keyword[int] identifier[requestNumber] , Keyword[boolean] identifier[allocatedFromBufferPool] , Keyword[boolean] identifier[partOfExchange] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[request] , identifier[conversation] , literal[String] operator[+] identifier[requestNumber] , literal[String] operator[+] identifier[allocatedFromBufferPool] } operator[SEP] operator[SEP] Keyword[short] identifier[connectionObjectId] operator[=] identifier[request] operator[SEP] identifier[getShort] operator[SEP] operator[SEP] operator[SEP] Keyword[short] identifier[browserSessionId] operator[=] identifier[request] operator[SEP] identifier[getShort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[connectionObjectId] operator[+] literal[String] operator[+] identifier[browserSessionId] operator[SEP] operator[SEP] identifier[BrowserSession] identifier[browserSession] operator[=] Other[null] operator[SEP] identifier[ConversationState] identifier[convState] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[convState] operator[=] operator[SEP] identifier[ConversationState] operator[SEP] identifier[conversation] operator[SEP] identifier[getAttachment] operator[SEP] operator[SEP] operator[SEP] identifier[CATMainConsumer] identifier[mainConsumer] operator[=] operator[SEP] identifier[CATMainConsumer] operator[SEP] identifier[convState] operator[SEP] identifier[getObject] operator[SEP] identifier[browserSessionId] operator[SEP] operator[SEP] identifier[browserSession] operator[=] identifier[mainConsumer] operator[SEP] identifier[getBrowserSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[browserSession] operator[==] Other[null] operator[SEP] { identifier[SIErrorException] identifier[e] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_04] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NullPointerException] identifier[npe] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[npe] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_01] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[npe] operator[SEP] operator[SEP] identifier[StaticCATHelper] operator[SEP] identifier[sendExceptionToClient] operator[SEP] identifier[npe] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_01] , identifier[conversation] , identifier[requestNumber] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[browserSession] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[browserSession] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[convState] operator[SEP] identifier[hasMETerminated] operator[SEP] operator[SEP] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_02] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[StaticCATHelper] operator[SEP] identifier[sendExceptionToClient] operator[SEP] identifier[e] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_02] , identifier[conversation] , identifier[requestNumber] operator[SEP] operator[SEP] } } identifier[CommsByteBuffer] identifier[reply] operator[=] identifier[poolManager] operator[SEP] identifier[allocate] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[conversation] operator[SEP] identifier[send] operator[SEP] identifier[reply] , identifier[JFapChannelConstants] operator[SEP] identifier[SEG_RESET_BROWSE_R] , identifier[requestNumber] , identifier[JFapChannelConstants] operator[SEP] identifier[PRIORITY_MEDIUM] , literal[boolean] , identifier[ThrottlingPolicy] operator[SEP] identifier[BLOCK_THREAD] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[STATICCATBROWSER_RCVRESETBROWSERSESS_03] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[request] operator[SEP] identifier[release] operator[SEP] identifier[allocatedFromBufferPool] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static void main(String... args) { // 输出所有常量 System.out.println("输出所有常量"); Map<String, ?> constants = getConstantFrom(Character.class, true, true); System.out.println(constants); // 输出方法的返回类型 System.out.println(); System.out.println("输出方法的返回类型" + java.lang.ClassLoader.class.getName()); for (Method method : ClassLoader.class.getMethods()) { Class<?>[] classes = resolveTypeParameters(ClassLoader.class, method.getGenericReturnType()); System.out.print(method.getName() + " = "); System.out.println(Arrays.toString(classes)); } // 输出超类的类型 System.out.println(); System.out.println("输出超类的类型" + java.util.Properties.class.getName()); Type genericSuperclassType = java.util.Properties.class.getGenericSuperclass(); System.out.print(genericSuperclassType + " = "); System.out.println(Arrays .toString(resolveTypeParameters(java.util.Properties.class, genericSuperclassType))); System.out.println(); System.out.println("输出派生类的类型" + java.util.Properties.class.getName()); for (Type genericInterfaceType : java.util.Properties.class.getGenericInterfaces()) { // 输出派生类的类型 Class<?>[] classes = resolveTypeParameters(java.util.Properties.class, genericInterfaceType); System.out.print(genericInterfaceType + " = "); System.out.println(Arrays.toString(classes)); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[System.out.println, parameter[literal["输出所有常量"]]] local_variable[type[Map], constants] call[System.out.println, parameter[member[.constants]]] call[System.out.println, parameter[]] call[System.out.println, parameter[binary_operation[literal["输出方法的返回类型"], +, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.lang, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassLoader, sub_type=None))]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClassLoader, sub_type=None)), MethodInvocation(arguments=[], member=getGenericReturnType, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=resolveTypeParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=classes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[None], name=Class, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" = "), operator=+)], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=classes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getMethods, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassLoader, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) call[System.out.println, parameter[]] call[System.out.println, parameter[binary_operation[literal["输出超类的类型"], +, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.util, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None))]]] local_variable[type[Type], genericSuperclassType] call[System.out.print, parameter[binary_operation[member[.genericSuperclassType], +, literal[" = "]]]] call[System.out.println, parameter[call[Arrays.toString, parameter[call[.resolveTypeParameters, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.util, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None)), member[.genericSuperclassType]]]]]]] call[System.out.println, parameter[]] call[System.out.println, parameter[binary_operation[literal["输出派生类的类型"], +, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.util, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None))]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.util, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None)), MemberReference(member=genericInterfaceType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveTypeParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=classes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[None], name=Class, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=genericInterfaceType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" = "), operator=+)], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=classes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=java.util, selectors=[MethodInvocation(arguments=[], member=getGenericInterfaces, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=genericInterfaceType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[constants] operator[=] identifier[getConstantFrom] operator[SEP] identifier[Character] operator[SEP] Keyword[class] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[constants] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[ClassLoader] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[ClassLoader] operator[SEP] Keyword[class] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[classes] operator[=] identifier[resolveTypeParameters] operator[SEP] identifier[ClassLoader] operator[SEP] Keyword[class] , identifier[method] operator[SEP] identifier[getGenericReturnType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[classes] operator[SEP] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Type] identifier[genericSuperclassType] operator[=] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] operator[SEP] identifier[getGenericSuperclass] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[genericSuperclassType] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[resolveTypeParameters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] , identifier[genericSuperclassType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Type] identifier[genericInterfaceType] operator[:] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] operator[SEP] identifier[getGenericInterfaces] operator[SEP] operator[SEP] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[classes] operator[=] identifier[resolveTypeParameters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Properties] operator[SEP] Keyword[class] , identifier[genericInterfaceType] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[genericInterfaceType] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[classes] operator[SEP] operator[SEP] operator[SEP] } }
@Override public ICompositeGroupService newGroupService() throws GroupsException { try { ReferenceCompositeGroupService service = new ReferenceCompositeGroupService(); service.initializeComponentServices(); return service; } catch (Exception ex) { log.error("ReferenceCompositeGroupServiceFactory.newGroupService(): " + ex); throw new GroupsException(ex); } }
class class_name[name] begin[{] method[newGroupService, return_type[type[ICompositeGroupService]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReferenceCompositeGroupService, sub_type=None)), name=service)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ReferenceCompositeGroupService, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=initializeComponentServices, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=service, 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="ReferenceCompositeGroupServiceFactory.newGroupService(): "), operandr=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, 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=GroupsException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ICompositeGroupService] identifier[newGroupService] operator[SEP] operator[SEP] Keyword[throws] identifier[GroupsException] { Keyword[try] { identifier[ReferenceCompositeGroupService] identifier[service] operator[=] Keyword[new] identifier[ReferenceCompositeGroupService] operator[SEP] operator[SEP] operator[SEP] identifier[service] operator[SEP] identifier[initializeComponentServices] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[ex] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[GroupsException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } }
public void marshall(StartFaceSearchRequest startFaceSearchRequest, ProtocolMarshaller protocolMarshaller) { if (startFaceSearchRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startFaceSearchRequest.getVideo(), VIDEO_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getFaceMatchThreshold(), FACEMATCHTHRESHOLD_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getCollectionId(), COLLECTIONID_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getNotificationChannel(), NOTIFICATIONCHANNEL_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getJobTag(), JOBTAG_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[startFaceSearchRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.startFaceSearchRequest], ==, 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=getVideo, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=VIDEO_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=getClientRequestToken, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=CLIENTREQUESTTOKEN_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=getFaceMatchThreshold, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=FACEMATCHTHRESHOLD_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=getCollectionId, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=COLLECTIONID_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=getNotificationChannel, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=NOTIFICATIONCHANNEL_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=getJobTag, postfix_operators=[], prefix_operators=[], qualifier=startFaceSearchRequest, selectors=[], type_arguments=None), MemberReference(member=JOBTAG_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[StartFaceSearchRequest] identifier[startFaceSearchRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[startFaceSearchRequest] 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[startFaceSearchRequest] operator[SEP] identifier[getVideo] operator[SEP] operator[SEP] , identifier[VIDEO_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startFaceSearchRequest] operator[SEP] identifier[getClientRequestToken] operator[SEP] operator[SEP] , identifier[CLIENTREQUESTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startFaceSearchRequest] operator[SEP] identifier[getFaceMatchThreshold] operator[SEP] operator[SEP] , identifier[FACEMATCHTHRESHOLD_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startFaceSearchRequest] operator[SEP] identifier[getCollectionId] operator[SEP] operator[SEP] , identifier[COLLECTIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startFaceSearchRequest] operator[SEP] identifier[getNotificationChannel] operator[SEP] operator[SEP] , identifier[NOTIFICATIONCHANNEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startFaceSearchRequest] operator[SEP] identifier[getJobTag] operator[SEP] operator[SEP] , identifier[JOBTAG_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 String getFirstParam(String paramName) { Collection<String> values = this.params.get(paramName); if(values == null || values.isEmpty()) { return null; } else { return values.iterator().next(); } }
class class_name[name] begin[{] method[getFirstParam, return_type[type[String]], modifier[public], parameter[paramName]] begin[{] local_variable[type[Collection], values] if[binary_operation[binary_operation[member[.values], ==, literal[null]], ||, call[values.isEmpty, parameter[]]]] begin[{] return[literal[null]] else begin[{] return[call[values.iterator, parameter[]]] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[getFirstParam] operator[SEP] identifier[String] identifier[paramName] operator[SEP] { identifier[Collection] operator[<] identifier[String] operator[>] identifier[values] operator[=] Keyword[this] operator[SEP] identifier[params] operator[SEP] identifier[get] operator[SEP] identifier[paramName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[||] identifier[values] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[return] identifier[values] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } }
public void clear() { valueBoxBase.setText(""); clearStatusText(); if (getPlaceholder() == null || getPlaceholder().isEmpty()) { label.removeStyleName(CssName.ACTIVE); } }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] call[valueBoxBase.setText, parameter[literal[""]]] call[.clearStatusText, parameter[]] if[binary_operation[binary_operation[call[.getPlaceholder, parameter[]], ==, literal[null]], ||, call[.getPlaceholder, parameter[]]]] begin[{] call[label.removeStyleName, parameter[member[CssName.ACTIVE]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { identifier[valueBoxBase] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[clearStatusText] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getPlaceholder] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[getPlaceholder] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[label] operator[SEP] identifier[removeStyleName] operator[SEP] identifier[CssName] operator[SEP] identifier[ACTIVE] operator[SEP] operator[SEP] } }
@Override @SuppressWarnings("unchecked") public NutMap mergeWith(Map<String, Object> map, boolean onlyAbsent) { for (Map.Entry<String, Object> en : map.entrySet()) { String key = en.getKey(); Object val = en.getValue(); if (null == key || null == val) continue; Object myVal = this.get(key); // 如果两边都是 Map ,则融合 if (null != myVal && myVal instanceof Map && val instanceof Map) { Map<String, Object> m0 = (Map<String, Object>) myVal; Map<String, Object> m1 = (Map<String, Object>) val; NutMap m2 = NutMap.WRAP(m0).mergeWith(m1, onlyAbsent); // 搞出了新 Map,设置一下 if (m2 != m0) this.put(key, m2); } // 只有没有的时候才设置 else if (onlyAbsent) { this.setnx(key, val); } // 否则直接替换 else { this.put(key, val); } } return this; }
class class_name[name] begin[{] method[mergeWith, return_type[type[NutMap]], modifier[public], parameter[map, onlyAbsent]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=en, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=en, selectors=[], type_arguments=None), name=val)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=myVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=myVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=myVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None), operator=instanceof), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None), operator=instanceof), operator=&&), else_statement=IfStatement(condition=MemberReference(member=onlyAbsent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setnx, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=myVal, postfix_operators=[], prefix_operators=[], qualifier=, 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=[], name=Map, sub_type=None)), name=m0)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, 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=[], name=Map, sub_type=None)), name=m1)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=m0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=WRAP, postfix_operators=[], prefix_operators=[], qualifier=NutMap, selectors=[MethodInvocation(arguments=[MemberReference(member=m1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=onlyAbsent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mergeWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=m2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NutMap, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=en)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[NutMap] identifier[mergeWith] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] , Keyword[boolean] identifier[onlyAbsent] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[en] operator[:] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[en] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[val] operator[=] identifier[en] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[key] operator[||] Other[null] operator[==] identifier[val] operator[SEP] Keyword[continue] operator[SEP] identifier[Object] identifier[myVal] operator[=] Keyword[this] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[myVal] operator[&&] identifier[myVal] Keyword[instanceof] identifier[Map] operator[&&] identifier[val] Keyword[instanceof] identifier[Map] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[m0] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[myVal] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[m1] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[val] operator[SEP] identifier[NutMap] identifier[m2] operator[=] identifier[NutMap] operator[SEP] identifier[WRAP] operator[SEP] identifier[m0] operator[SEP] operator[SEP] identifier[mergeWith] operator[SEP] identifier[m1] , identifier[onlyAbsent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m2] operator[!=] identifier[m0] operator[SEP] Keyword[this] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[m2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[onlyAbsent] operator[SEP] { Keyword[this] operator[SEP] identifier[setnx] operator[SEP] identifier[key] , identifier[val] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[val] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] }
private ResourceGenerator resolveResourceGenerator(String path) { ResourceGenerator resourceGenerator = null; for (ResourceGeneratorResolverWrapper resolver : resolverRegistry) { if (resolver.matchPath(path)) { resourceGenerator = resolver.getResourceGenerator(); if (resolver.getType().equals(ResolverType.PREFIXED)) { loadGeneratorIfNeeded(resolver.getResourcePath(path)); } break; } } // Lazy load generator if (resourceGenerator == null) { resourceGenerator = loadCommonGenerator(path); } return resourceGenerator; }
class class_name[name] begin[{] method[resolveResourceGenerator, return_type[type[ResourceGenerator]], modifier[private], parameter[path]] begin[{] local_variable[type[ResourceGenerator], resourceGenerator] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matchPath, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resourceGenerator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getResourceGenerator, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[MethodInvocation(arguments=[MemberReference(member=PREFIXED, postfix_operators=[], prefix_operators=[], qualifier=ResolverType, 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=[MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourcePath, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[], type_arguments=None)], member=loadGeneratorIfNeeded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=resolverRegistry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resolver)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceGeneratorResolverWrapper, sub_type=None))), label=None) if[binary_operation[member[.resourceGenerator], ==, literal[null]]] begin[{] assign[member[.resourceGenerator], call[.loadCommonGenerator, parameter[member[.path]]]] else begin[{] None end[}] return[member[.resourceGenerator]] end[}] END[}]
Keyword[private] identifier[ResourceGenerator] identifier[resolveResourceGenerator] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[ResourceGenerator] identifier[resourceGenerator] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[ResourceGeneratorResolverWrapper] identifier[resolver] operator[:] identifier[resolverRegistry] operator[SEP] { Keyword[if] operator[SEP] identifier[resolver] operator[SEP] identifier[matchPath] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[resourceGenerator] operator[=] identifier[resolver] operator[SEP] identifier[getResourceGenerator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resolver] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ResolverType] operator[SEP] identifier[PREFIXED] operator[SEP] operator[SEP] { identifier[loadGeneratorIfNeeded] operator[SEP] identifier[resolver] operator[SEP] identifier[getResourcePath] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[resourceGenerator] operator[==] Other[null] operator[SEP] { identifier[resourceGenerator] operator[=] identifier[loadCommonGenerator] operator[SEP] identifier[path] operator[SEP] operator[SEP] } Keyword[return] identifier[resourceGenerator] operator[SEP] }
public static Dynamic bootstrap(String name, MethodDescription.InDefinedShape bootstrapMethod, Object... rawArgument) { return bootstrap(name, bootstrapMethod, Arrays.asList(rawArgument)); }
class class_name[name] begin[{] method[bootstrap, return_type[type[Dynamic]], modifier[public static], parameter[name, bootstrapMethod, rawArgument]] begin[{] return[call[.bootstrap, parameter[member[.name], member[.bootstrapMethod], call[Arrays.asList, parameter[member[.rawArgument]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Dynamic] identifier[bootstrap] operator[SEP] identifier[String] identifier[name] , identifier[MethodDescription] operator[SEP] identifier[InDefinedShape] identifier[bootstrapMethod] , identifier[Object] operator[...] identifier[rawArgument] operator[SEP] { Keyword[return] identifier[bootstrap] operator[SEP] identifier[name] , identifier[bootstrapMethod] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[rawArgument] operator[SEP] operator[SEP] operator[SEP] }
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForSubscriptionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, QueryOptions queryOptions) { return listQueryResultsForSubscriptionWithServiceResponseAsync(policyStatesResource, subscriptionId, queryOptions).map(new Func1<ServiceResponse<PolicyStatesQueryResultsInner>, PolicyStatesQueryResultsInner>() { @Override public PolicyStatesQueryResultsInner call(ServiceResponse<PolicyStatesQueryResultsInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listQueryResultsForSubscriptionAsync, return_type[type[Observable]], modifier[public], parameter[policyStatesResource, subscriptionId, queryOptions]] begin[{] return[call[.listQueryResultsForSubscriptionWithServiceResponseAsync, parameter[member[.policyStatesResource], member[.subscriptionId], member[.queryOptions]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[PolicyStatesQueryResultsInner] operator[>] identifier[listQueryResultsForSubscriptionAsync] operator[SEP] identifier[PolicyStatesResource] identifier[policyStatesResource] , identifier[String] identifier[subscriptionId] , identifier[QueryOptions] identifier[queryOptions] operator[SEP] { Keyword[return] identifier[listQueryResultsForSubscriptionWithServiceResponseAsync] operator[SEP] identifier[policyStatesResource] , identifier[subscriptionId] , identifier[queryOptions] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[PolicyStatesQueryResultsInner] operator[>] , identifier[PolicyStatesQueryResultsInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[PolicyStatesQueryResultsInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[PolicyStatesQueryResultsInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static boolean includes( final AreaSizeD a, final AreaSizeD b) { Objects.requireNonNull(a, "Area A"); Objects.requireNonNull(b, "Area B"); return b.sizeX() <= a.sizeX() && b.sizeY() <= a.sizeY(); }
class class_name[name] begin[{] method[includes, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{] call[Objects.requireNonNull, parameter[member[.a], literal["Area A"]]] call[Objects.requireNonNull, parameter[member[.b], literal["Area B"]]] return[binary_operation[binary_operation[call[b.sizeX, parameter[]], <=, call[a.sizeX, parameter[]]], &&, binary_operation[call[b.sizeY, parameter[]], <=, call[a.sizeY, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[includes] operator[SEP] Keyword[final] identifier[AreaSizeD] identifier[a] , Keyword[final] identifier[AreaSizeD] identifier[b] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[a] , literal[String] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[b] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[b] operator[SEP] identifier[sizeX] operator[SEP] operator[SEP] operator[<=] identifier[a] operator[SEP] identifier[sizeX] operator[SEP] operator[SEP] operator[&&] identifier[b] operator[SEP] identifier[sizeY] operator[SEP] operator[SEP] operator[<=] identifier[a] operator[SEP] identifier[sizeY] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public FineUploader5Retry setPreventRetryResponseProperty (@Nonnull @Nonempty final String sPreventRetryResponseProperty) { ValueEnforcer.notEmpty (sPreventRetryResponseProperty, "PreventRetryResponseProperty"); m_sRetryPreventRetryResponseProperty = sPreventRetryResponseProperty; return this; }
class class_name[name] begin[{] method[setPreventRetryResponseProperty, return_type[type[FineUploader5Retry]], modifier[public], parameter[sPreventRetryResponseProperty]] begin[{] call[ValueEnforcer.notEmpty, parameter[member[.sPreventRetryResponseProperty], literal["PreventRetryResponseProperty"]]] assign[member[.m_sRetryPreventRetryResponseProperty], member[.sPreventRetryResponseProperty]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[FineUploader5Retry] identifier[setPreventRetryResponseProperty] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[String] identifier[sPreventRetryResponseProperty] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notEmpty] operator[SEP] identifier[sPreventRetryResponseProperty] , literal[String] operator[SEP] operator[SEP] identifier[m_sRetryPreventRetryResponseProperty] operator[=] identifier[sPreventRetryResponseProperty] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@XmlElementDecl(namespace = "http://www.tibco.com/xmlns/ApplicationManagement", name = "NVPair") public JAXBElement<NVPairType> createNVPair(NVPairType value) { return new JAXBElement<NVPairType>(_NVPair_QNAME, NVPairType.class, null, value); }
class class_name[name] begin[{] method[createNVPair, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_NVPair_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NVPairType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, 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=NVPairType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[NVPairType] operator[>] identifier[createNVPair] operator[SEP] identifier[NVPairType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[NVPairType] operator[>] operator[SEP] identifier[_NVPair_QNAME] , identifier[NVPairType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public ListResponse<T> list() throws IOException, PlivoRestException { validate(); Response<ListResponse<T>> response = obtainCall().execute(); handleResponse(response); return response.body(); }
class class_name[name] begin[{] method[list, return_type[type[ListResponse]], modifier[public], parameter[]] begin[{] call[.validate, parameter[]] local_variable[type[Response], response] call[.handleResponse, parameter[member[.response]]] return[call[response.body, parameter[]]] end[}] END[}]
Keyword[public] identifier[ListResponse] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[PlivoRestException] { identifier[validate] operator[SEP] operator[SEP] operator[SEP] identifier[Response] operator[<] identifier[ListResponse] operator[<] identifier[T] operator[>] operator[>] identifier[response] operator[=] identifier[obtainCall] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] identifier[handleResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
@Override @SuppressWarnings("deprecation") //have to use old Element here because of superclass protected com.google.gwt.user.client.Element getContainerElement() { return DOM.asOld(getRenderTargetElement()); }
class class_name[name] begin[{] method[getContainerElement, return_type[type[com]], modifier[protected], parameter[]] begin[{] return[call[DOM.asOld, parameter[call[.getRenderTargetElement, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[gwt] operator[SEP] identifier[user] operator[SEP] identifier[client] operator[SEP] identifier[Element] identifier[getContainerElement] operator[SEP] operator[SEP] { Keyword[return] identifier[DOM] operator[SEP] identifier[asOld] operator[SEP] identifier[getRenderTargetElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void writeTo(OutputStream os, long startPosition, long len) throws IOException { int segmentSize = 1 << log2OfSegmentSize; int remainingBytesInSegment = segmentSize - (int)(startPosition & bitmask); long remainingBytesInCopy = len; while(remainingBytesInCopy > 0) { long bytesToCopyFromSegment = Math.min(remainingBytesInSegment, remainingBytesInCopy); os.write(segments[(int)(startPosition >>> log2OfSegmentSize)], (int)(startPosition & bitmask), (int)bytesToCopyFromSegment); startPosition += bytesToCopyFromSegment; remainingBytesInSegment = segmentSize - (int)(startPosition & bitmask); remainingBytesInCopy -= bytesToCopyFromSegment; } }
class class_name[name] begin[{] method[writeTo, return_type[void], modifier[public], parameter[os, startPosition, len]] begin[{] local_variable[type[int], segmentSize] local_variable[type[int], remainingBytesInSegment] local_variable[type[long], remainingBytesInCopy] while[binary_operation[member[.remainingBytesInCopy], >, literal[0]]] begin[{] local_variable[type[long], bytesToCopyFromSegment] call[os.write, parameter[member[.segments], Cast(expression=BinaryOperation(operandl=MemberReference(member=startPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitmask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), type=BasicType(dimensions=[], name=int)), Cast(expression=MemberReference(member=bytesToCopyFromSegment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))]] assign[member[.startPosition], member[.bytesToCopyFromSegment]] assign[member[.remainingBytesInSegment], binary_operation[member[.segmentSize], -, Cast(expression=BinaryOperation(operandl=MemberReference(member=startPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitmask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), type=BasicType(dimensions=[], name=int))]] assign[member[.remainingBytesInCopy], member[.bytesToCopyFromSegment]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeTo] operator[SEP] identifier[OutputStream] identifier[os] , Keyword[long] identifier[startPosition] , Keyword[long] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[segmentSize] operator[=] Other[1] operator[<<] identifier[log2OfSegmentSize] operator[SEP] Keyword[int] identifier[remainingBytesInSegment] operator[=] identifier[segmentSize] operator[-] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[startPosition] operator[&] identifier[bitmask] operator[SEP] operator[SEP] Keyword[long] identifier[remainingBytesInCopy] operator[=] identifier[len] operator[SEP] Keyword[while] operator[SEP] identifier[remainingBytesInCopy] operator[>] Other[0] operator[SEP] { Keyword[long] identifier[bytesToCopyFromSegment] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[remainingBytesInSegment] , identifier[remainingBytesInCopy] operator[SEP] operator[SEP] identifier[os] operator[SEP] identifier[write] operator[SEP] identifier[segments] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[startPosition] operator[>] operator[>] operator[>] identifier[log2OfSegmentSize] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[startPosition] operator[&] identifier[bitmask] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] identifier[bytesToCopyFromSegment] operator[SEP] operator[SEP] identifier[startPosition] operator[+=] identifier[bytesToCopyFromSegment] operator[SEP] identifier[remainingBytesInSegment] operator[=] identifier[segmentSize] operator[-] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[startPosition] operator[&] identifier[bitmask] operator[SEP] operator[SEP] identifier[remainingBytesInCopy] operator[-=] identifier[bytesToCopyFromSegment] operator[SEP] } }
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "tan") public JAXBElement<ElementaryFunctionsType> createTan(ElementaryFunctionsType value) { return new JAXBElement<ElementaryFunctionsType>(_Tan_QNAME, ElementaryFunctionsType.class, null, value); }
class class_name[name] begin[{] method[createTan, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Tan_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ElementaryFunctionsType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, 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=ElementaryFunctionsType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ElementaryFunctionsType] operator[>] identifier[createTan] operator[SEP] identifier[ElementaryFunctionsType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ElementaryFunctionsType] operator[>] operator[SEP] identifier[_Tan_QNAME] , identifier[ElementaryFunctionsType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
@Override public void revert(DataSet data) { revertFeatures(data.getFeatures(), data.getFeaturesMaskArray()); revertLabels(data.getLabels(), data.getLabelsMaskArray()); }
class class_name[name] begin[{] method[revert, return_type[void], modifier[public], parameter[data]] begin[{] call[.revertFeatures, parameter[call[data.getFeatures, parameter[]], call[data.getFeaturesMaskArray, parameter[]]]] call[.revertLabels, parameter[call[data.getLabels, parameter[]], call[data.getLabelsMaskArray, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[revert] operator[SEP] identifier[DataSet] identifier[data] operator[SEP] { identifier[revertFeatures] operator[SEP] identifier[data] operator[SEP] identifier[getFeatures] operator[SEP] operator[SEP] , identifier[data] operator[SEP] identifier[getFeaturesMaskArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[revertLabels] operator[SEP] identifier[data] operator[SEP] identifier[getLabels] operator[SEP] operator[SEP] , identifier[data] operator[SEP] identifier[getLabelsMaskArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public synchronized void enableAutomaticReconnection() { if (automaticReconnectEnabled) { return; } XMPPConnection connection = weakRefConnection.get(); if (connection == null) { throw new IllegalStateException("Connection instance no longer available"); } connection.addConnectionListener(connectionListener); automaticReconnectEnabled = true; }
class class_name[name] begin[{] method[enableAutomaticReconnection, return_type[void], modifier[synchronized public], parameter[]] begin[{] if[member[.automaticReconnectEnabled]] begin[{] return[None] else begin[{] None end[}] local_variable[type[XMPPConnection], connection] if[binary_operation[member[.connection], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection instance no longer available")], 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) else begin[{] None end[}] call[connection.addConnectionListener, parameter[member[.connectionListener]]] assign[member[.automaticReconnectEnabled], literal[true]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[enableAutomaticReconnection] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[automaticReconnectEnabled] operator[SEP] { Keyword[return] operator[SEP] } identifier[XMPPConnection] identifier[connection] operator[=] identifier[weakRefConnection] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connection] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[connection] operator[SEP] identifier[addConnectionListener] operator[SEP] identifier[connectionListener] operator[SEP] operator[SEP] identifier[automaticReconnectEnabled] operator[=] literal[boolean] operator[SEP] }
public static File computeRelativeFile(File file, File rel, File dir) { String path = file.getAbsolutePath(); String relativePath = path.substring(rel.getAbsolutePath().length()); return new File(dir, relativePath); }
class class_name[name] begin[{] method[computeRelativeFile, return_type[type[File]], modifier[public static], parameter[file, rel, dir]] begin[{] local_variable[type[String], path] local_variable[type[String], relativePath] return[ClassCreator(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=relativePath, 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))] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[computeRelativeFile] operator[SEP] identifier[File] identifier[file] , identifier[File] identifier[rel] , identifier[File] identifier[dir] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[relativePath] operator[=] identifier[path] operator[SEP] identifier[substring] operator[SEP] identifier[rel] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[dir] , identifier[relativePath] operator[SEP] operator[SEP] }
public Integer getRegistryID(BaseMessage internalMessageReply) { Integer intRegistryID = null; Object objRegistryID = null; if (internalMessageReply.getMessageHeader() instanceof TrxMessageHeader) // Always objRegistryID = ((TrxMessageHeader)internalMessageReply.getMessageHeader()).getMessageHeaderMap().get(TrxMessageHeader.REGISTRY_ID); if (objRegistryID == null) objRegistryID = internalMessageReply.get(TrxMessageHeader.REGISTRY_ID); if (objRegistryID instanceof Integer) intRegistryID = (Integer)objRegistryID; else if (objRegistryID instanceof String) { try { intRegistryID = new Integer(Integer.parseInt((String)objRegistryID)); } catch (NumberFormatException ex) { intRegistryID = null; } } return intRegistryID; }
class class_name[name] begin[{] method[getRegistryID, return_type[type[Integer]], modifier[public], parameter[internalMessageReply]] begin[{] local_variable[type[Integer], intRegistryID] local_variable[type[Object], objRegistryID] if[binary_operation[call[internalMessageReply.getMessageHeader, parameter[]], instanceof, type[TrxMessageHeader]]] begin[{] assign[member[.objRegistryID], Cast(expression=MethodInvocation(arguments=[], member=getMessageHeader, postfix_operators=[], prefix_operators=[], qualifier=internalMessageReply, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TrxMessageHeader, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.objRegistryID], ==, literal[null]]] begin[{] assign[member[.objRegistryID], call[internalMessageReply.get, parameter[member[TrxMessageHeader.REGISTRY_ID]]]] else begin[{] None end[}] if[binary_operation[member[.objRegistryID], instanceof, type[Integer]]] begin[{] assign[member[.intRegistryID], Cast(expression=MemberReference(member=objRegistryID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] else begin[{] if[binary_operation[member[.objRegistryID], instanceof, type[String]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=intRegistryID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=objRegistryID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=intRegistryID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] return[member[.intRegistryID]] end[}] END[}]
Keyword[public] identifier[Integer] identifier[getRegistryID] operator[SEP] identifier[BaseMessage] identifier[internalMessageReply] operator[SEP] { identifier[Integer] identifier[intRegistryID] operator[=] Other[null] operator[SEP] identifier[Object] identifier[objRegistryID] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[internalMessageReply] operator[SEP] identifier[getMessageHeader] operator[SEP] operator[SEP] Keyword[instanceof] identifier[TrxMessageHeader] operator[SEP] identifier[objRegistryID] operator[=] operator[SEP] operator[SEP] identifier[TrxMessageHeader] operator[SEP] identifier[internalMessageReply] operator[SEP] identifier[getMessageHeader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageHeaderMap] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[TrxMessageHeader] operator[SEP] identifier[REGISTRY_ID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[objRegistryID] operator[==] Other[null] operator[SEP] identifier[objRegistryID] operator[=] identifier[internalMessageReply] operator[SEP] identifier[get] operator[SEP] identifier[TrxMessageHeader] operator[SEP] identifier[REGISTRY_ID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[objRegistryID] Keyword[instanceof] identifier[Integer] operator[SEP] identifier[intRegistryID] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[objRegistryID] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[objRegistryID] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[try] { identifier[intRegistryID] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[objRegistryID] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ex] operator[SEP] { identifier[intRegistryID] operator[=] Other[null] operator[SEP] } } Keyword[return] identifier[intRegistryID] operator[SEP] }
public static <T extends Comparable<? super T>, A, D> Collector<T, ?, D> minAll(Collector<T, A, D> downstream) { return maxAll(Comparator.<T> reverseOrder(), downstream); }
class class_name[name] begin[{] method[minAll, return_type[type[Collector]], modifier[public static], parameter[downstream]] begin[{] return[call[.maxAll, parameter[call[.Comparator, parameter[]], member[.downstream]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] , identifier[A] , identifier[D] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[D] operator[>] identifier[minAll] operator[SEP] identifier[Collector] operator[<] identifier[T] , identifier[A] , identifier[D] operator[>] identifier[downstream] operator[SEP] { Keyword[return] identifier[maxAll] operator[SEP] identifier[Comparator] operator[SEP] operator[<] identifier[T] operator[>] identifier[reverseOrder] operator[SEP] operator[SEP] , identifier[downstream] operator[SEP] operator[SEP] }
public static <T> T[] validIndex(final T[] array, final int index) { return INSTANCE.validIndex(array, index); }
class class_name[name] begin[{] method[validIndex, return_type[type[T]], modifier[public static], parameter[array, index]] begin[{] return[call[INSTANCE.validIndex, parameter[member[.array], member[.index]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[validIndex] operator[SEP] Keyword[final] identifier[T] operator[SEP] operator[SEP] identifier[array] , Keyword[final] Keyword[int] identifier[index] operator[SEP] { Keyword[return] identifier[INSTANCE] operator[SEP] identifier[validIndex] operator[SEP] identifier[array] , identifier[index] operator[SEP] operator[SEP] }
@Override public boolean databaseExists(final String name) { List<String> databases = this.describeDatabases(); for (String databaseName : databases) { if (databaseName.trim().equals(name)) { return true; } } return false; }
class class_name[name] begin[{] method[databaseExists, return_type[type[boolean]], modifier[public], parameter[name]] begin[{] local_variable[type[List], databases] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=databaseName, 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=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=databases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=databaseName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[databaseExists] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[databases] operator[=] Keyword[this] operator[SEP] identifier[describeDatabases] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[databaseName] operator[:] identifier[databases] operator[SEP] { Keyword[if] operator[SEP] identifier[databaseName] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public synchronized static Session getSession() { if(session == null){ Properties properties = IOUtil.loadProperties("jdbc.properties"); session = getSession(properties); } return session; }
class class_name[name] begin[{] method[getSession, return_type[type[Session]], modifier[synchronized public static], parameter[]] begin[{] if[binary_operation[member[.session], ==, literal[null]]] begin[{] local_variable[type[Properties], properties] assign[member[.session], call[.getSession, parameter[member[.properties]]]] else begin[{] None end[}] return[member[.session]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[static] identifier[Session] identifier[getSession] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[session] operator[==] Other[null] operator[SEP] { identifier[Properties] identifier[properties] operator[=] identifier[IOUtil] operator[SEP] identifier[loadProperties] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[session] operator[=] identifier[getSession] operator[SEP] identifier[properties] operator[SEP] operator[SEP] } Keyword[return] identifier[session] operator[SEP] }
public void setTextColor(@ColorInt int color) { jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_COLOR, ColorUtils.colorToRgbaString(color)); }
class class_name[name] begin[{] method[setTextColor, return_type[void], modifier[public], parameter[color]] begin[{] call[jsonObject.addProperty, parameter[member[SymbolOptions.PROPERTY_TEXT_COLOR], call[ColorUtils.colorToRgbaString, parameter[member[.color]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTextColor] operator[SEP] annotation[@] identifier[ColorInt] Keyword[int] identifier[color] operator[SEP] { identifier[jsonObject] operator[SEP] identifier[addProperty] operator[SEP] identifier[SymbolOptions] operator[SEP] identifier[PROPERTY_TEXT_COLOR] , identifier[ColorUtils] operator[SEP] identifier[colorToRgbaString] operator[SEP] identifier[color] operator[SEP] operator[SEP] operator[SEP] }
public static Comparator<MonetaryAmount> sortNumberDesc(){ return new Comparator<MonetaryAmount>() { @Override public int compare(MonetaryAmount o1, MonetaryAmount o2) { return sortNumber().compare(o1, o2) * -1; } }; }
class class_name[name] begin[{] method[sortNumberDesc, return_type[type[Comparator]], modifier[public static], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=sortNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=o2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, 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=1), operator=*), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=o1, type=ReferenceType(arguments=None, dimensions=[], name=MonetaryAmount, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=o2, type=ReferenceType(arguments=None, dimensions=[], name=MonetaryAmount, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MonetaryAmount, sub_type=None))], dimensions=None, name=Comparator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Comparator] operator[<] identifier[MonetaryAmount] operator[>] identifier[sortNumberDesc] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Comparator] operator[<] identifier[MonetaryAmount] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[MonetaryAmount] identifier[o1] , identifier[MonetaryAmount] identifier[o2] operator[SEP] { Keyword[return] identifier[sortNumber] operator[SEP] operator[SEP] operator[SEP] identifier[compare] operator[SEP] identifier[o1] , identifier[o2] operator[SEP] operator[*] operator[-] Other[1] operator[SEP] } } operator[SEP] }