code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public void initialize(Bootstrap<PlatformConfiguration> bootstrap) { for (Initializer initializer : wrapper.getInitializers()) { initializer.initialize(bootstrap); LOGGER.debug("Registered Initializer: {}", initializer.getClass().getCanonicalName()); } for (Bundle bundle : wrapper.getBundles()) { bootstrap.addBundle(bundle); LOGGER.debug("Registered Bundle: {}", bundle.getClass().getCanonicalName()); } for (Command command : wrapper.getCommands()) { bootstrap.addCommand(command); LOGGER.debug("Registered Command: {}", command.getClass().getCanonicalName()); } }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[bootstrap]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bootstrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=initializer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Registered Initializer: {}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=initializer, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getInitializers, postfix_operators=[], prefix_operators=[], qualifier=wrapper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=initializer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Initializer, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bundle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addBundle, postfix_operators=[], prefix_operators=[], qualifier=bootstrap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Registered Bundle: {}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getBundles, postfix_operators=[], prefix_operators=[], qualifier=wrapper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bundle)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Bundle, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addCommand, postfix_operators=[], prefix_operators=[], qualifier=bootstrap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Registered Command: {}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCommands, postfix_operators=[], prefix_operators=[], qualifier=wrapper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Command, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[Bootstrap] operator[<] identifier[PlatformConfiguration] operator[>] identifier[bootstrap] operator[SEP] { Keyword[for] operator[SEP] identifier[Initializer] identifier[initializer] operator[:] identifier[wrapper] operator[SEP] identifier[getInitializers] operator[SEP] operator[SEP] operator[SEP] { identifier[initializer] operator[SEP] identifier[initialize] operator[SEP] identifier[bootstrap] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[initializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Bundle] identifier[bundle] operator[:] identifier[wrapper] operator[SEP] identifier[getBundles] operator[SEP] operator[SEP] operator[SEP] { identifier[bootstrap] operator[SEP] identifier[addBundle] operator[SEP] identifier[bundle] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[bundle] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Command] identifier[command] operator[:] identifier[wrapper] operator[SEP] identifier[getCommands] operator[SEP] operator[SEP] operator[SEP] { identifier[bootstrap] operator[SEP] identifier[addCommand] operator[SEP] identifier[command] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[command] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { if (chars == null) { failNull(String.format(message, values)); } if (StringUtils.isBlank(chars)) { fail(String.format(message, values)); } return chars; }
class class_name[name] begin[{] method[notBlank, return_type[type[T]], modifier[public], parameter[chars, message, values]] begin[{] if[binary_operation[member[.chars], ==, literal[null]]] begin[{] call[.failNull, parameter[call[String.format, parameter[member[.message], member[.values]]]]] else begin[{] None end[}] if[call[StringUtils.isBlank, parameter[member[.chars]]]] begin[{] call[.fail, parameter[call[String.format, parameter[member[.message], member[.values]]]]] else begin[{] None end[}] return[member[.chars]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[CharSequence] operator[>] identifier[T] identifier[notBlank] operator[SEP] Keyword[final] identifier[T] identifier[chars] , Keyword[final] identifier[String] identifier[message] , Keyword[final] identifier[Object] operator[...] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[chars] operator[==] Other[null] operator[SEP] { identifier[failNull] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[message] , identifier[values] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[chars] operator[SEP] operator[SEP] { identifier[fail] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[message] , identifier[values] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[chars] operator[SEP] }
void setDayOfMonth(String day) { final int i = CmsSerialDateUtil.toIntWithDefault(day, -1); if (m_model.getDayOfMonth() != i) { removeExceptionsOnChange(new Command() { public void execute() { m_model.setDayOfMonth(i); onValueChange(); } }); } }
class class_name[name] begin[{] method[setDayOfMonth, return_type[void], modifier[default], parameter[day]] begin[{] local_variable[type[int], i] if[binary_operation[call[m_model.getDayOfMonth, parameter[]], !=, member[.i]]] begin[{] call[.removeExceptionsOnChange, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDayOfMonth, postfix_operators=[], prefix_operators=[], qualifier=m_model, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=onValueChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Command, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[setDayOfMonth] operator[SEP] identifier[String] identifier[day] operator[SEP] { Keyword[final] Keyword[int] identifier[i] operator[=] identifier[CmsSerialDateUtil] operator[SEP] identifier[toIntWithDefault] operator[SEP] identifier[day] , operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_model] operator[SEP] identifier[getDayOfMonth] operator[SEP] operator[SEP] operator[!=] identifier[i] operator[SEP] { identifier[removeExceptionsOnChange] operator[SEP] Keyword[new] identifier[Command] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] { identifier[m_model] operator[SEP] identifier[setDayOfMonth] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[onValueChange] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } }
public DescribeEnvironmentMembershipsRequest withPermissions(String... permissions) { if (this.permissions == null) { setPermissions(new java.util.ArrayList<String>(permissions.length)); } for (String ele : permissions) { this.permissions.add(ele); } return this; }
class class_name[name] begin[{] method[withPermissions, return_type[type[DescribeEnvironmentMembershipsRequest]], modifier[public], parameter[permissions]] begin[{] if[binary_operation[THIS[member[None.permissions]], ==, literal[null]]] begin[{] call[.setPermissions, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=permissions, 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=String, 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=permissions, 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=permissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeEnvironmentMembershipsRequest] identifier[withPermissions] operator[SEP] identifier[String] operator[...] identifier[permissions] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[permissions] operator[==] Other[null] operator[SEP] { identifier[setPermissions] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[permissions] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[permissions] operator[SEP] { Keyword[this] operator[SEP] identifier[permissions] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void setOffsets(Map<String, String> offsets) throws IOException { Utils.checkState(open, "Not open"); fileContextProvider.setOffsets(offsets); // we reset the events on every setOffsets(). events.clear(); }
class class_name[name] begin[{] method[setOffsets, return_type[void], modifier[public], parameter[offsets]] begin[{] call[Utils.checkState, parameter[member[.open], literal["Not open"]]] call[fileContextProvider.setOffsets, parameter[member[.offsets]]] call[events.clear, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOffsets] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[offsets] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Utils] operator[SEP] identifier[checkState] operator[SEP] identifier[open] , literal[String] operator[SEP] operator[SEP] identifier[fileContextProvider] operator[SEP] identifier[setOffsets] operator[SEP] identifier[offsets] operator[SEP] operator[SEP] identifier[events] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public static IDLProxyObject createSingle(InputStream is, boolean debug, File path) throws IOException { return createSingle(is, debug, path, true); }
class class_name[name] begin[{] method[createSingle, return_type[type[IDLProxyObject]], modifier[public static], parameter[is, debug, path]] begin[{] return[call[.createSingle, parameter[member[.is], member[.debug], member[.path], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IDLProxyObject] identifier[createSingle] operator[SEP] identifier[InputStream] identifier[is] , Keyword[boolean] identifier[debug] , identifier[File] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[createSingle] operator[SEP] identifier[is] , identifier[debug] , identifier[path] , literal[boolean] operator[SEP] operator[SEP] }
@Override public LoadBalancerHealthCheck getLoadBalancerHealthCheck( @Nonnull String providerLBHealthCheckId, @Nullable String providerLoadBalancerId ) throws CloudException, InternalException { APITrace.begin(provider, "LB.getLoadBalancerHealthCheck"); try { Map<String, String> parameters = getELBParameters(getContext(), ELBMethod.DESCRIBE_LOAD_BALANCERS); ELBMethod method; NodeList blocks; Document doc; if( providerLoadBalancerId != null && providerLoadBalancerId.length() > 32 ) { return null; } parameters.put("LoadBalancerNames.member.1", providerLoadBalancerId); method = new ELBMethod(provider, getContext(), parameters); try { doc = method.invoke(); } catch( EC2Exception e ) { String code = e.getCode(); if( code != null && code.equals("LoadBalancerNotFound") ) { return null; } logger.error(e.getSummary()); throw new CloudException(e); } blocks = doc.getElementsByTagName("HealthCheck"); if( blocks.getLength() > 0 ) { LoadBalancerHealthCheck lbhc = toLBHealthCheck(providerLoadBalancerId, blocks.item(0)); return lbhc; } return null; } finally { APITrace.end(); } }
class class_name[name] begin[{] method[getLoadBalancerHealthCheck, return_type[type[LoadBalancerHealthCheck]], modifier[public], parameter[providerLBHealthCheckId, providerLoadBalancerId]] begin[{] call[APITrace.begin, parameter[member[.provider], literal["LB.getLoadBalancerHealthCheck"]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=DESCRIBE_LOAD_BALANCERS, postfix_operators=[], prefix_operators=[], qualifier=ELBMethod, selectors=[])], member=getELBParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=parameters)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ELBMethod, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=blocks)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=doc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=providerLoadBalancerId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=providerLoadBalancerId, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LoadBalancerNames.member.1"), MemberReference(member=providerLoadBalancerId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=parameters, 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=ELBMethod, sub_type=None))), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCode, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=code)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LoadBalancerNotFound")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=code, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSummary, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CloudException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EC2Exception']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=blocks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HealthCheck")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=blocks, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=providerLoadBalancerId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=[], prefix_operators=[], qualifier=blocks, selectors=[], type_arguments=None)], member=toLBHealthCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=lbhc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LoadBalancerHealthCheck, sub_type=None)), ReturnStatement(expression=MemberReference(member=lbhc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=end, postfix_operators=[], prefix_operators=[], qualifier=APITrace, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[LoadBalancerHealthCheck] identifier[getLoadBalancerHealthCheck] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[providerLBHealthCheckId] , annotation[@] identifier[Nullable] identifier[String] identifier[providerLoadBalancerId] operator[SEP] Keyword[throws] identifier[CloudException] , identifier[InternalException] { identifier[APITrace] operator[SEP] identifier[begin] operator[SEP] identifier[provider] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[=] identifier[getELBParameters] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] , identifier[ELBMethod] operator[SEP] identifier[DESCRIBE_LOAD_BALANCERS] operator[SEP] operator[SEP] identifier[ELBMethod] identifier[method] operator[SEP] identifier[NodeList] identifier[blocks] operator[SEP] identifier[Document] identifier[doc] operator[SEP] Keyword[if] operator[SEP] identifier[providerLoadBalancerId] operator[!=] Other[null] operator[&&] identifier[providerLoadBalancerId] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[32] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[providerLoadBalancerId] operator[SEP] operator[SEP] identifier[method] operator[=] Keyword[new] identifier[ELBMethod] operator[SEP] identifier[provider] , identifier[getContext] operator[SEP] operator[SEP] , identifier[parameters] operator[SEP] operator[SEP] Keyword[try] { identifier[doc] operator[=] identifier[method] operator[SEP] identifier[invoke] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[EC2Exception] identifier[e] operator[SEP] { identifier[String] identifier[code] operator[=] identifier[e] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[code] operator[!=] Other[null] operator[&&] identifier[code] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getSummary] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CloudException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[blocks] operator[=] identifier[doc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[blocks] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[LoadBalancerHealthCheck] identifier[lbhc] operator[=] identifier[toLBHealthCheck] operator[SEP] identifier[providerLoadBalancerId] , identifier[blocks] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[lbhc] operator[SEP] } Keyword[return] Other[null] operator[SEP] } Keyword[finally] { identifier[APITrace] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] } }
public LoopInfo<R> setValues(int currentIndex, int effectiveIndex, R lastRes) { this.currentIndex = currentIndex; this.effectiveIndex = effectiveIndex; this.lastRes = lastRes; return this; }
class class_name[name] begin[{] method[setValues, return_type[type[LoopInfo]], modifier[public], parameter[currentIndex, effectiveIndex, lastRes]] begin[{] assign[THIS[member[None.currentIndex]], member[.currentIndex]] assign[THIS[member[None.effectiveIndex]], member[.effectiveIndex]] assign[THIS[member[None.lastRes]], member[.lastRes]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[LoopInfo] operator[<] identifier[R] operator[>] identifier[setValues] operator[SEP] Keyword[int] identifier[currentIndex] , Keyword[int] identifier[effectiveIndex] , identifier[R] identifier[lastRes] operator[SEP] { Keyword[this] operator[SEP] identifier[currentIndex] operator[=] identifier[currentIndex] operator[SEP] Keyword[this] operator[SEP] identifier[effectiveIndex] operator[=] identifier[effectiveIndex] operator[SEP] Keyword[this] operator[SEP] identifier[lastRes] operator[=] identifier[lastRes] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void map(K1 arg0, V1 arg1, OutputCollector<Text, Text> arg2, Reporter arg3) throws IOException { throw new IOException ("should not be called\n"); }
class class_name[name] begin[{] method[map, return_type[void], modifier[public], parameter[arg0, arg1, arg2, arg3]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="should not be called\n")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[map] operator[SEP] identifier[K1] identifier[arg0] , identifier[V1] identifier[arg1] , identifier[OutputCollector] operator[<] identifier[Text] , identifier[Text] operator[>] identifier[arg2] , identifier[Reporter] identifier[arg3] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
private void step_3() { final String markdown = "`A code` that is rendered differently\n\n```\nHello!\n```"; final Markwon markwon = Markwon.builder(this) .usePlugin(new AbstractMarkwonPlugin() { @Override public void configureTheme(@NonNull MarkwonTheme.Builder builder) { builder .codeBackgroundColor(Color.BLACK) .codeTextColor(Color.RED); } }) .build(); markwon.setMarkdown(textView, markdown); }
class class_name[name] begin[{] method[step_3, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[String], markdown] local_variable[type[Markwon], markwon] call[markwon.setMarkdown, parameter[member[.textView], member[.markdown]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[step_3] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[markdown] operator[=] literal[String] operator[SEP] Keyword[final] identifier[Markwon] identifier[markwon] operator[=] identifier[Markwon] operator[SEP] identifier[builder] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[usePlugin] operator[SEP] Keyword[new] identifier[AbstractMarkwonPlugin] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[configureTheme] operator[SEP] annotation[@] identifier[NonNull] identifier[MarkwonTheme] operator[SEP] identifier[Builder] identifier[builder] operator[SEP] { identifier[builder] operator[SEP] identifier[codeBackgroundColor] operator[SEP] identifier[Color] operator[SEP] identifier[BLACK] operator[SEP] operator[SEP] identifier[codeTextColor] operator[SEP] identifier[Color] operator[SEP] identifier[RED] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[markwon] operator[SEP] identifier[setMarkdown] operator[SEP] identifier[textView] , identifier[markdown] operator[SEP] operator[SEP] }
private void cacheStream() { try { File fi = getTemproralCacheFile(); if (fi.exists()) { if (!fi.delete()) { throw new IllegalStateException("Cannot delete file " + fi.getAbsolutePath() + "!"); } } FileOutputStream fout = new FileOutputStream(fi); InputStream in = grabStream(); byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int n; while (-1 != (n = in.read(buffer))) { fout.write(buffer, 0, n); } fout.flush(); fout.close(); in.close(); File cacheFile = getCacheFile(); if (!fi.renameTo(cacheFile)) { throw new IllegalStateException("Cannot rename file \"" + fi.getAbsolutePath() + "\" to \"" + cacheFile.getAbsolutePath() + "\"!"); } } catch (Exception e) { e.printStackTrace(); } }
class class_name[name] begin[{] method[cacheStream, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTemproralCacheFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=fi)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=fi, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=delete, postfix_operators=[], prefix_operators=['!'], qualifier=fi, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot delete file "), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=fi, 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=IllegalStateException, sub_type=None)), label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=fi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileOutputStream, sub_type=None)), name=fout)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileOutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=grabStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=DEFAULT_BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=buffer)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=fout, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), operator=!=), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=fout, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=fout, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCacheFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cacheFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=cacheFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renameTo, postfix_operators=[], prefix_operators=['!'], qualifier=fi, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot rename file \""), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=fi, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" to \""), operator=+), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=cacheFile, 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=IllegalStateException, sub_type=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[cacheStream] operator[SEP] operator[SEP] { Keyword[try] { identifier[File] identifier[fi] operator[=] identifier[getTemproralCacheFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fi] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[fi] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[fi] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } identifier[FileOutputStream] identifier[fout] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[fi] operator[SEP] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[grabStream] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[DEFAULT_BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[while] operator[SEP] operator[-] Other[1] operator[!=] operator[SEP] identifier[n] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] operator[SEP] { identifier[fout] operator[SEP] identifier[write] operator[SEP] identifier[buffer] , Other[0] , identifier[n] operator[SEP] operator[SEP] } identifier[fout] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[fout] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[cacheFile] operator[=] identifier[getCacheFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fi] operator[SEP] identifier[renameTo] operator[SEP] identifier[cacheFile] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[fi] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[cacheFile] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
public static ExtendedKeyUsage getExtendedKeyUsage(Set<String> usages) { KeyPurposeId[] keyUsages = new KeyPurposeId[usages.size()]; int i = 0; for (String usage : usages) { keyUsages[i++] = KeyPurposeId.getInstance(new ASN1ObjectIdentifier(usage)); } return new ExtendedKeyUsage(keyUsages); }
class class_name[name] begin[{] method[getExtendedKeyUsage, return_type[type[ExtendedKeyUsage]], modifier[public static], parameter[usages]] begin[{] local_variable[type[KeyPurposeId], keyUsages] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keyUsages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=usage, 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=ASN1ObjectIdentifier, sub_type=None))], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyPurposeId, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=usages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=usage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=keyUsages, 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=ExtendedKeyUsage, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ExtendedKeyUsage] identifier[getExtendedKeyUsage] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[usages] operator[SEP] { identifier[KeyPurposeId] operator[SEP] operator[SEP] identifier[keyUsages] operator[=] Keyword[new] identifier[KeyPurposeId] operator[SEP] identifier[usages] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[usage] operator[:] identifier[usages] operator[SEP] { identifier[keyUsages] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[KeyPurposeId] operator[SEP] identifier[getInstance] operator[SEP] Keyword[new] identifier[ASN1ObjectIdentifier] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ExtendedKeyUsage] operator[SEP] identifier[keyUsages] operator[SEP] operator[SEP] }
public static Class<?> getJavaClass(String typeName) { Class<?> clazz = javaClassMapping.get(typeName.toLowerCase()); return clazz == null ? Object.class : clazz; }
class class_name[name] begin[{] method[getJavaClass, return_type[type[Class]], modifier[public static], parameter[typeName]] begin[{] local_variable[type[Class], clazz] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getJavaClass] operator[SEP] identifier[String] identifier[typeName] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[javaClassMapping] operator[SEP] identifier[get] operator[SEP] identifier[typeName] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[clazz] operator[==] Other[null] operator[?] identifier[Object] operator[SEP] Keyword[class] operator[:] identifier[clazz] operator[SEP] }
public static <T> T toBean(Map<String, ?> property, Class<T> clazz) { T bean = null; try { bean = clazz.newInstance(); BeanUtils.populate(bean, property); } catch (Exception e) { throw new RuntimeException(e); } return bean; }
class class_name[name] begin[{] method[toBean, return_type[type[T]], modifier[public static], parameter[property, clazz]] begin[{] local_variable[type[T], bean] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=populate, postfix_operators=[], prefix_operators=[], qualifier=BeanUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.bean]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[toBean] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[property] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { identifier[T] identifier[bean] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[bean] operator[=] identifier[clazz] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[BeanUtils] operator[SEP] identifier[populate] operator[SEP] identifier[bean] , identifier[property] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[bean] operator[SEP] }
public String getFolderPath(CmsObject cms, String pageFolderRootPath) { checkInitialized(); if (m_folderOrName != null) { return m_folderOrName.getFolderPath(cms, pageFolderRootPath); } else { String siteRoot = null; if (pageFolderRootPath != null) { siteRoot = OpenCms.getSiteManager().getSiteRoot(pageFolderRootPath); } if (siteRoot == null) { siteRoot = cms.getRequestContext().getSiteRoot(); } return CmsStringUtil.joinPaths(siteRoot, CmsADEManager.CONTENT_FOLDER_NAME, m_typeName); } }
class class_name[name] begin[{] method[getFolderPath, return_type[type[String]], modifier[public], parameter[cms, pageFolderRootPath]] begin[{] call[.checkInitialized, parameter[]] if[binary_operation[member[.m_folderOrName], !=, literal[null]]] begin[{] return[call[m_folderOrName.getFolderPath, parameter[member[.cms], member[.pageFolderRootPath]]]] else begin[{] local_variable[type[String], siteRoot] if[binary_operation[member[.pageFolderRootPath], !=, literal[null]]] begin[{] assign[member[.siteRoot], call[OpenCms.getSiteManager, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.siteRoot], ==, literal[null]]] begin[{] assign[member[.siteRoot], call[cms.getRequestContext, parameter[]]] else begin[{] None end[}] return[call[CmsStringUtil.joinPaths, parameter[member[.siteRoot], member[CmsADEManager.CONTENT_FOLDER_NAME], member[.m_typeName]]]] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[getFolderPath] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[pageFolderRootPath] operator[SEP] { identifier[checkInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_folderOrName] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[m_folderOrName] operator[SEP] identifier[getFolderPath] operator[SEP] identifier[cms] , identifier[pageFolderRootPath] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[siteRoot] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[pageFolderRootPath] operator[!=] Other[null] operator[SEP] { identifier[siteRoot] operator[=] identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] identifier[pageFolderRootPath] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[siteRoot] operator[==] Other[null] operator[SEP] { identifier[siteRoot] operator[=] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[CmsStringUtil] operator[SEP] identifier[joinPaths] operator[SEP] identifier[siteRoot] , identifier[CmsADEManager] operator[SEP] identifier[CONTENT_FOLDER_NAME] , identifier[m_typeName] operator[SEP] operator[SEP] } }
private Type wrap(Type type) { if (type.equals(Types.BOOLEAN_P)) { return Types.BOOLEAN; } else if (type.equals(Types.BYTE_P)) { return Types.BYTE; } else if (type.equals(Types.CHAR)) { return Types.CHARACTER; } else if (type.equals(Types.DOUBLE_P)) { return Types.DOUBLE; } else if (type.equals(Types.FLOAT_P)) { return Types.FLOAT; } else if (type.equals(Types.INT)) { return Types.INTEGER; } else if (type.equals(Types.LONG_P)) { return Types.LONG; } else if (type.equals(Types.SHORT_P)) { return Types.SHORT; } else { return type; } }
class class_name[name] begin[{] method[wrap, return_type[type[Type]], modifier[private], parameter[type]] begin[{] if[call[type.equals, parameter[member[Types.BOOLEAN_P]]]] begin[{] return[member[Types.BOOLEAN]] else begin[{] if[call[type.equals, parameter[member[Types.BYTE_P]]]] begin[{] return[member[Types.BYTE]] else begin[{] if[call[type.equals, parameter[member[Types.CHAR]]]] begin[{] return[member[Types.CHARACTER]] else begin[{] if[call[type.equals, parameter[member[Types.DOUBLE_P]]]] begin[{] return[member[Types.DOUBLE]] else begin[{] if[call[type.equals, parameter[member[Types.FLOAT_P]]]] begin[{] return[member[Types.FLOAT]] else begin[{] if[call[type.equals, parameter[member[Types.INT]]]] begin[{] return[member[Types.INTEGER]] else begin[{] if[call[type.equals, parameter[member[Types.LONG_P]]]] begin[{] return[member[Types.LONG]] else begin[{] if[call[type.equals, parameter[member[Types.SHORT_P]]]] begin[{] return[member[Types.SHORT]] else begin[{] return[member[.type]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[private] identifier[Type] identifier[wrap] operator[SEP] identifier[Type] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[BOOLEAN_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[BOOLEAN] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[BYTE_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[BYTE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[CHAR] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[CHARACTER] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[DOUBLE_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[DOUBLE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[FLOAT_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[FLOAT] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[INT] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[INTEGER] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[LONG_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[LONG] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Types] operator[SEP] identifier[SHORT_P] operator[SEP] operator[SEP] { Keyword[return] identifier[Types] operator[SEP] identifier[SHORT] operator[SEP] } Keyword[else] { Keyword[return] identifier[type] operator[SEP] } }
public void onClose() { status = Status.CLOSED; RuntimeException ce = null; for (final Agent agent : agents) { try { agent.onClose(); } catch (final Exception ex) { if (ce == null) { ce = new RuntimeException(getClass().getName() + ": underlying agent error on close"); } ce.addSuppressed(ex); } } agents = EMPTY_AGENTS; if (ce != null) { throw ce; } }
class class_name[name] begin[{] method[onClose, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.status], member[Status.CLOSED]] local_variable[type[RuntimeException], ce] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=onClose, postfix_operators=[], prefix_operators=[], qualifier=agent, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, 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=": underlying agent error on close"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSuppressed, postfix_operators=[], prefix_operators=[], qualifier=ce, 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)]), control=EnhancedForControl(iterable=MemberReference(member=agents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=agent)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Agent, sub_type=None))), label=None) assign[member[.agents], member[.EMPTY_AGENTS]] if[binary_operation[member[.ce], !=, literal[null]]] begin[{] ThrowStatement(expression=MemberReference(member=ce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onClose] operator[SEP] operator[SEP] { identifier[status] operator[=] identifier[Status] operator[SEP] identifier[CLOSED] operator[SEP] identifier[RuntimeException] identifier[ce] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Agent] identifier[agent] operator[:] identifier[agents] operator[SEP] { Keyword[try] { identifier[agent] operator[SEP] identifier[onClose] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[ce] operator[==] Other[null] operator[SEP] { identifier[ce] operator[=] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[ce] operator[SEP] identifier[addSuppressed] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } } identifier[agents] operator[=] identifier[EMPTY_AGENTS] operator[SEP] Keyword[if] operator[SEP] identifier[ce] operator[!=] Other[null] operator[SEP] { Keyword[throw] identifier[ce] operator[SEP] } }
static CompactCharSequence[][] getAllValuesCompactCharSequence(InputStream is, char delimiter) throws Exception { // FileReader reader = new FileReader(fileName); BufferedReader br = new BufferedReader(new InputStreamReader(is)); ArrayList<CompactCharSequence[]> rows = new ArrayList<CompactCharSequence[]>(); String line = br.readLine(); int numcolumns = -1; while (line != null) { String[] d = line.split(String.valueOf(delimiter)); if (numcolumns == -1) { numcolumns = d.length; } CompactCharSequence[] ccs = new CompactCharSequence[d.length]; for (int i = 0; i < d.length; i++) { ccs[i] = new CompactCharSequence(d[i]); } rows.add(ccs); line = br.readLine(); } br.close(); // reader.close(); CompactCharSequence[][] data = new CompactCharSequence[rows.size()][numcolumns]; for (int i = 0; i < rows.size(); i++) { CompactCharSequence[] row = rows.get(i); for (int j = 0; j < row.length; j++) { // if (row[j].length() > 1 && row[j].charAt(0) == '"') { // System.out.println(row[j]); if (row[j].length() > 2) { row[j] = new CompactCharSequence(row[j].subSequence(1, row[j].length() - 1).toString()); } else { row[j] = new CompactCharSequence(""); } } if (j < row.length && j < data[0].length) { data[i][j] = row[j]; } } } return data; }
class class_name[name] begin[{] method[getAllValuesCompactCharSequence, return_type[type[CompactCharSequence]], modifier[static], parameter[is, delimiter]] begin[{] local_variable[type[BufferedReader], br] local_variable[type[ArrayList], rows] local_variable[type[String], line] local_variable[type[int], numcolumns] while[binary_operation[member[.line], !=, literal[null]]] begin[{] local_variable[type[String], d] if[binary_operation[member[.numcolumns], ==, literal[1]]] begin[{] assign[member[.numcolumns], member[d.length]] else begin[{] None end[}] local_variable[type[CompactCharSequence], ccs] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ccs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=CompactCharSequence, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=d, 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) call[rows.add, parameter[member[.ccs]]] assign[member[.line], call[br.readLine, parameter[]]] end[}] call[br.close, parameter[]] local_variable[type[CompactCharSequence], data] 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=rows, selectors=[], type_arguments=None), name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=CompactCharSequence, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"'), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompactCharSequence, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=subSequence, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompactCharSequence, sub_type=None))), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=row, 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=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=rows, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.data]] end[}] END[}]
Keyword[static] identifier[CompactCharSequence] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getAllValuesCompactCharSequence] operator[SEP] identifier[InputStream] identifier[is] , Keyword[char] identifier[delimiter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[BufferedReader] identifier[br] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[is] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[CompactCharSequence] operator[SEP] operator[SEP] operator[>] identifier[rows] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CompactCharSequence] operator[SEP] operator[SEP] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numcolumns] operator[=] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[line] operator[!=] Other[null] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[d] operator[=] identifier[line] operator[SEP] identifier[split] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[delimiter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numcolumns] operator[==] operator[-] Other[1] operator[SEP] { identifier[numcolumns] operator[=] identifier[d] operator[SEP] identifier[length] operator[SEP] } identifier[CompactCharSequence] operator[SEP] operator[SEP] identifier[ccs] operator[=] Keyword[new] identifier[CompactCharSequence] operator[SEP] identifier[d] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[d] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ccs] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[CompactCharSequence] operator[SEP] identifier[d] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[rows] operator[SEP] identifier[add] operator[SEP] identifier[ccs] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] } identifier[br] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[CompactCharSequence] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] identifier[CompactCharSequence] operator[SEP] identifier[rows] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[numcolumns] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rows] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[CompactCharSequence] operator[SEP] operator[SEP] identifier[row] operator[=] identifier[rows] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[row] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[2] operator[SEP] { identifier[row] operator[SEP] identifier[j] operator[SEP] operator[=] Keyword[new] identifier[CompactCharSequence] operator[SEP] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[subSequence] operator[SEP] Other[1] , identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[row] operator[SEP] identifier[j] operator[SEP] operator[=] Keyword[new] identifier[CompactCharSequence] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[j] operator[<] identifier[row] operator[SEP] identifier[length] operator[&&] identifier[j] operator[<] identifier[data] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[length] operator[SEP] { identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] } } } Keyword[return] identifier[data] operator[SEP] }
private static BufferedImage readJpeg(InputStream in) throws IOException { Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("JPEG"); ImageReader reader = null; while (readers.hasNext()) { reader = readers.next(); if (reader.canReadRaster()) { break; } } if (reader == null) return null; try { ImageInputStream input = ImageIO.createImageInputStream(in); reader.setInput(input); // Read the image raster Raster raster = reader.readRaster(0, null); BufferedImage image = createJPEG4(raster); ByteArrayOutputStream out = new ByteArrayOutputStream(); writeJpeg(image, out, 1); out.flush(); return read(new ByteArrayInputStream(out.toByteArray())); } finally { try { reader.dispose(); } catch (Throwable e) {} } }
class class_name[name] begin[{] method[readJpeg, return_type[type[BufferedImage]], modifier[private static], parameter[in]] begin[{] local_variable[type[Iterator], readers] local_variable[type[ImageReader], reader] while[call[readers.hasNext, parameter[]]] begin[{] assign[member[.reader], call[readers.next, parameter[]]] if[call[reader.canReadRaster, parameter[]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] if[binary_operation[member[.reader], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createImageInputStream, postfix_operators=[], prefix_operators=[], qualifier=ImageIO, selectors=[], type_arguments=None), name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ImageInputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInput, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=readRaster, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), name=raster)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Raster, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=raster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createJPEG4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=image)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedImage, sub_type=None)), 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=ByteArrayOutputStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=image, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=writeJpeg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=dispose, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[BufferedImage] identifier[readJpeg] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Iterator] operator[<] identifier[ImageReader] operator[>] identifier[readers] operator[=] identifier[ImageIO] operator[SEP] identifier[getImageReadersByFormatName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ImageReader] identifier[reader] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[readers] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[reader] operator[=] identifier[readers] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reader] operator[SEP] identifier[canReadRaster] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[reader] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[try] { identifier[ImageInputStream] identifier[input] operator[=] identifier[ImageIO] operator[SEP] identifier[createImageInputStream] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[setInput] operator[SEP] identifier[input] operator[SEP] operator[SEP] identifier[Raster] identifier[raster] operator[=] identifier[reader] operator[SEP] identifier[readRaster] operator[SEP] Other[0] , Other[null] operator[SEP] operator[SEP] identifier[BufferedImage] identifier[image] operator[=] identifier[createJPEG4] operator[SEP] identifier[raster] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[out] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[writeJpeg] operator[SEP] identifier[image] , identifier[out] , Other[1] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[read] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[out] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[reader] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { } } }
protected boolean skipProcessing(HttpServletRequest request) { return ((request.getAttribute(OAUTH_PROCESSING_HANDLED) != null) && (Boolean.TRUE.equals(request.getAttribute(OAUTH_PROCESSING_HANDLED)))); }
class class_name[name] begin[{] method[skipProcessing, return_type[type[boolean]], modifier[protected], parameter[request]] begin[{] return[binary_operation[binary_operation[call[request.getAttribute, parameter[member[.OAUTH_PROCESSING_HANDLED]]], !=, literal[null]], &&, call[Boolean.TRUE.equals, parameter[call[request.getAttribute, parameter[member[.OAUTH_PROCESSING_HANDLED]]]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[skipProcessing] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[OAUTH_PROCESSING_HANDLED] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] identifier[equals] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[OAUTH_PROCESSING_HANDLED] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void setSelected(boolean b) { selected = b; //showGridTableAction.setEnabled(b); //showNcMLAction.setEnabled(b); //showNcMLAction.setEnabled(b); //showNetcdfDatasetAction.setEnabled(b); //showGridDatasetInfoAction.setEnabled(b); //showNetcdfXMLAction.setEnabled( b); navToolbarAction.setEnabled(b); moveToolbarAction.setEnabled(b); //controller.showGridAction.setEnabled( b); //controller.showContoursAction.setEnabled( b); //controller.showContourLabelsAction.setEnabled( b); redrawAction.setEnabled(b); minmaxHorizAction.setEnabled(b); minmaxLogAction.setEnabled(b); minmaxHoldAction.setEnabled(b); fieldLoopAction.setEnabled(b); levelLoopAction.setEnabled(b); timeLoopAction.setEnabled(b); runtimeLoopAction.setEnabled(b); navPanel.setEnabledActions(b); }
class class_name[name] begin[{] method[setSelected, return_type[void], modifier[private], parameter[b]] begin[{] assign[member[.selected], member[.b]] call[navToolbarAction.setEnabled, parameter[member[.b]]] call[moveToolbarAction.setEnabled, parameter[member[.b]]] call[redrawAction.setEnabled, parameter[member[.b]]] call[minmaxHorizAction.setEnabled, parameter[member[.b]]] call[minmaxLogAction.setEnabled, parameter[member[.b]]] call[minmaxHoldAction.setEnabled, parameter[member[.b]]] call[fieldLoopAction.setEnabled, parameter[member[.b]]] call[levelLoopAction.setEnabled, parameter[member[.b]]] call[timeLoopAction.setEnabled, parameter[member[.b]]] call[runtimeLoopAction.setEnabled, parameter[member[.b]]] call[navPanel.setEnabledActions, parameter[member[.b]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setSelected] operator[SEP] Keyword[boolean] identifier[b] operator[SEP] { identifier[selected] operator[=] identifier[b] operator[SEP] identifier[navToolbarAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[moveToolbarAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[redrawAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[minmaxHorizAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[minmaxLogAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[minmaxHoldAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[fieldLoopAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[levelLoopAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[timeLoopAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[runtimeLoopAction] operator[SEP] identifier[setEnabled] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[navPanel] operator[SEP] identifier[setEnabledActions] operator[SEP] identifier[b] operator[SEP] operator[SEP] }
public static DoubleBinding toRadians(final ObservableDoubleValue angdeg) { return createDoubleBinding(() -> Math.toRadians(angdeg.get()), angdeg); }
class class_name[name] begin[{] method[toRadians, return_type[type[DoubleBinding]], modifier[public static], parameter[angdeg]] begin[{] return[call[.createDoubleBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=angdeg, selectors=[], type_arguments=None)], member=toRadians, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), parameters=[]), member[.angdeg]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DoubleBinding] identifier[toRadians] operator[SEP] Keyword[final] identifier[ObservableDoubleValue] identifier[angdeg] operator[SEP] { Keyword[return] identifier[createDoubleBinding] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] identifier[angdeg] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] , identifier[angdeg] operator[SEP] operator[SEP] }
public static String getHistory(final Throwable th) { VariablePrinter printer = new VariablePrinter(); printHistory(th, printer); return printer.getMessages(); }
class class_name[name] begin[{] method[getHistory, return_type[type[String]], modifier[public static], parameter[th]] begin[{] local_variable[type[VariablePrinter], printer] call[.printHistory, parameter[member[.th], member[.printer]]] return[call[printer.getMessages, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getHistory] operator[SEP] Keyword[final] identifier[Throwable] identifier[th] operator[SEP] { identifier[VariablePrinter] identifier[printer] operator[=] Keyword[new] identifier[VariablePrinter] operator[SEP] operator[SEP] operator[SEP] identifier[printHistory] operator[SEP] identifier[th] , identifier[printer] operator[SEP] operator[SEP] Keyword[return] identifier[printer] operator[SEP] identifier[getMessages] operator[SEP] operator[SEP] operator[SEP] }
public static <TItem> Bson max(final String fieldName, final TItem value) { return new SimpleUpdate<TItem>(fieldName, value, "$max"); }
class class_name[name] begin[{] method[max, return_type[type[Bson]], modifier[public static], parameter[fieldName, value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="$max")], 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=TItem, sub_type=None))], dimensions=None, name=SimpleUpdate, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[TItem] operator[>] identifier[Bson] identifier[max] operator[SEP] Keyword[final] identifier[String] identifier[fieldName] , Keyword[final] identifier[TItem] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[SimpleUpdate] operator[<] identifier[TItem] operator[>] operator[SEP] identifier[fieldName] , identifier[value] , literal[String] operator[SEP] operator[SEP] }
public void undeploy(String id) { Process entity = access().getProcess(id); entity.setState(STATE_FINISH); access().updateProcess(entity); cache(entity); }
class class_name[name] begin[{] method[undeploy, return_type[void], modifier[public], parameter[id]] begin[{] local_variable[type[Process], entity] call[entity.setState, parameter[member[.STATE_FINISH]]] call[.access, parameter[]] call[.cache, parameter[member[.entity]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[undeploy] operator[SEP] identifier[String] identifier[id] operator[SEP] { identifier[Process] identifier[entity] operator[=] identifier[access] operator[SEP] operator[SEP] operator[SEP] identifier[getProcess] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[setState] operator[SEP] identifier[STATE_FINISH] operator[SEP] operator[SEP] identifier[access] operator[SEP] operator[SEP] operator[SEP] identifier[updateProcess] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[entity] operator[SEP] operator[SEP] }
protected Parameter removeParameter(final String name) { if (name == null) { throw new IllegalArgumentException("Parameter name cannot be null"); } final Iterator<Parameter> iter = result.simpleParameters.getChildren().iterator(); while (iter.hasNext()) { final Parameter p = iter.next(); if (name.equals(p.name)) { iter.remove(); return p; } } return null; }
class class_name[name] begin[{] method[removeParameter, return_type[type[Parameter]], modifier[protected], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter name 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[Iterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[Parameter], p] if[call[name.equals, parameter[member[p.name]]]] begin[{] call[iter.remove, parameter[]] return[member[.p]] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[Parameter] identifier[removeParameter] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[Iterator] operator[<] identifier[Parameter] operator[>] identifier[iter] operator[=] identifier[result] operator[SEP] identifier[simpleParameters] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Parameter] identifier[p] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[p] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[iter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[p] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public void marshall(DescribeCommunicationsRequest describeCommunicationsRequest, ProtocolMarshaller protocolMarshaller) { if (describeCommunicationsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeCommunicationsRequest.getCaseId(), CASEID_BINDING); protocolMarshaller.marshall(describeCommunicationsRequest.getBeforeTime(), BEFORETIME_BINDING); protocolMarshaller.marshall(describeCommunicationsRequest.getAfterTime(), AFTERTIME_BINDING); protocolMarshaller.marshall(describeCommunicationsRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(describeCommunicationsRequest.getMaxResults(), MAXRESULTS_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[describeCommunicationsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeCommunicationsRequest], ==, 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=getCaseId, postfix_operators=[], prefix_operators=[], qualifier=describeCommunicationsRequest, selectors=[], type_arguments=None), MemberReference(member=CASEID_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=getBeforeTime, postfix_operators=[], prefix_operators=[], qualifier=describeCommunicationsRequest, selectors=[], type_arguments=None), MemberReference(member=BEFORETIME_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=getAfterTime, postfix_operators=[], prefix_operators=[], qualifier=describeCommunicationsRequest, selectors=[], type_arguments=None), MemberReference(member=AFTERTIME_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=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=describeCommunicationsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_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=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=describeCommunicationsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_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[DescribeCommunicationsRequest] identifier[describeCommunicationsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeCommunicationsRequest] 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[describeCommunicationsRequest] operator[SEP] identifier[getCaseId] operator[SEP] operator[SEP] , identifier[CASEID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeCommunicationsRequest] operator[SEP] identifier[getBeforeTime] operator[SEP] operator[SEP] , identifier[BEFORETIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeCommunicationsRequest] operator[SEP] identifier[getAfterTime] operator[SEP] operator[SEP] , identifier[AFTERTIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeCommunicationsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeCommunicationsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_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 static <T, U, R> BiFunction<T, U, R> biFunction(CheckedBiFunction<T, U, R> function, Consumer<Throwable> handler) { return (t, u) -> { try { return function.apply(t, u); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("Exception handler must throw a RuntimeException", e); } }; }
class class_name[name] begin[{] method[biFunction, return_type[type[BiFunction]], modifier[public static], parameter[function, handler]] begin[{] return[LambdaExpression(body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception handler must throw a RuntimeException"), 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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)], parameters=[InferredFormalParameter(name=t), InferredFormalParameter(name=u)])] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] identifier[BiFunction] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] identifier[biFunction] operator[SEP] identifier[CheckedBiFunction] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] identifier[function] , identifier[Consumer] operator[<] identifier[Throwable] operator[>] identifier[handler] operator[SEP] { Keyword[return] operator[SEP] identifier[t] , identifier[u] operator[SEP] operator[->] { Keyword[try] { Keyword[return] identifier[function] operator[SEP] identifier[apply] operator[SEP] identifier[t] , identifier[u] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[handler] operator[SEP] identifier[accept] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } operator[SEP] }
public static StorageObjectSummary createFromS3ObjectSummary(S3ObjectSummary objSummary) { return new StorageObjectSummary( objSummary.getBucketName(), objSummary.getKey(), // S3 ETag is not always MD5, but since this code path is only // used in skip duplicate files in PUT command, It's not // critical to guarantee that it's MD5 objSummary.getETag(), objSummary.getSize() ); }
class class_name[name] begin[{] method[createFromS3ObjectSummary, return_type[type[StorageObjectSummary]], modifier[public static], parameter[objSummary]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBucketName, postfix_operators=[], prefix_operators=[], qualifier=objSummary, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=objSummary, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getETag, postfix_operators=[], prefix_operators=[], qualifier=objSummary, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=objSummary, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StorageObjectSummary, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[StorageObjectSummary] identifier[createFromS3ObjectSummary] operator[SEP] identifier[S3ObjectSummary] identifier[objSummary] operator[SEP] { Keyword[return] Keyword[new] identifier[StorageObjectSummary] operator[SEP] identifier[objSummary] operator[SEP] identifier[getBucketName] operator[SEP] operator[SEP] , identifier[objSummary] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[objSummary] operator[SEP] identifier[getETag] operator[SEP] operator[SEP] , identifier[objSummary] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ByteBuffer append(byte[] bytes, int off, int len) { int newCount = count + len; ensureCapacity(newCount); System.arraycopy(bytes, off, buf, count, len); count = newCount; return this; }
class class_name[name] begin[{] method[append, return_type[type[ByteBuffer]], modifier[public], parameter[bytes, off, len]] begin[{] local_variable[type[int], newCount] call[.ensureCapacity, parameter[member[.newCount]]] call[System.arraycopy, parameter[member[.bytes], member[.off], member[.buf], member[.count], member[.len]]] assign[member[.count], member[.newCount]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ByteBuffer] identifier[append] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] { Keyword[int] identifier[newCount] operator[=] identifier[count] operator[+] identifier[len] operator[SEP] identifier[ensureCapacity] operator[SEP] identifier[newCount] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[bytes] , identifier[off] , identifier[buf] , identifier[count] , identifier[len] operator[SEP] operator[SEP] identifier[count] operator[=] identifier[newCount] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void uninit() { log.debug("Un-init scope"); for (IBasicScope child : children.keySet()) { if (child instanceof Scope) { ((Scope) child).uninit(); } } stop(); setEnabled(false); if (hasParent()) { if (parent.hasChildScope(name)) { parent.removeChildScope(this); } } }
class class_name[name] begin[{] method[uninit, return_type[void], modifier[public], parameter[]] begin[{] call[log.debug, parameter[literal["Un-init scope"]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Scope, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Scope, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IBasicScope, sub_type=None))), label=None) call[.stop, parameter[]] call[.setEnabled, parameter[literal[false]]] if[call[.hasParent, parameter[]]] begin[{] if[call[parent.hasChildScope, parameter[member[.name]]]] begin[{] call[parent.removeChildScope, parameter[THIS[]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[uninit] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IBasicScope] identifier[child] operator[:] identifier[children] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[Scope] operator[SEP] { operator[SEP] operator[SEP] identifier[Scope] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[uninit] operator[SEP] operator[SEP] operator[SEP] } } identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasParent] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] operator[SEP] identifier[hasChildScope] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[parent] operator[SEP] identifier[removeChildScope] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } }
protected String parseString(String v) { /* * Parsing a string requires several steps to be taken. First, we need * to strip quotes from the ends of the string. */ v = v.substring(1, v.length() - 1); StringBuffer result = new StringBuffer(); // Second, step through the string and replace escaped characters for (int i = 0; i < v.length(); i++) { if (v.charAt(i) == '\\') { if (v.length() <= i + 1) { throw new RuntimeException("unexpected end-of-string"); } else { char replace = 0; int len = 2; switch (v.charAt(i + 1)) { case 'b': replace = '\b'; break; case 't': replace = '\t'; break; case 'n': replace = '\n'; break; case 'f': replace = '\f'; break; case 'r': replace = '\r'; break; case '"': replace = '\"'; break; case '\'': replace = '\''; break; case '\\': replace = '\\'; break; case 'u': len = 6; // unicode escapes are six digits long, // including "slash u" String unicode = v.substring(i + 2, i + 6); replace = (char) Integer.parseInt(unicode, 16); // unicode i = i + 5; break; default: throw new RuntimeException("unknown escape character"); } result = result.append(replace); i = i + 1; } } else { result = result.append(v.charAt(i)); } } return result.toString(); }
class class_name[name] begin[{] method[parseString, return_type[type[String]], modifier[protected], parameter[v]] begin[{] assign[member[.v], call[v.substring, parameter[literal[1], binary_operation[call[v.length, parameter[]], -, literal[1]]]]] local_variable[type[StringBuffer], result] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operator=<=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=replace)], modifiers=set(), type=BasicType(dimensions=[], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='b')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\b')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='t')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='n')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='f')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='r')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\"')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\')), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='u')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), name=unicode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=unicode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=char))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=+)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown escape character")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unexpected end-of-string")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[result.toString, parameter[]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[parseString] operator[SEP] identifier[String] identifier[v] operator[SEP] { identifier[v] operator[=] identifier[v] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[v] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[v] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[v] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[v] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] identifier[i] operator[+] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[char] identifier[replace] operator[=] Other[0] operator[SEP] Keyword[int] identifier[len] operator[=] Other[2] operator[SEP] Keyword[switch] operator[SEP] identifier[v] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[replace] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[len] operator[=] Other[6] operator[SEP] identifier[String] identifier[unicode] operator[=] identifier[v] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[+] Other[2] , identifier[i] operator[+] Other[6] operator[SEP] operator[SEP] identifier[replace] operator[=] operator[SEP] Keyword[char] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[unicode] , Other[16] operator[SEP] operator[SEP] identifier[i] operator[=] identifier[i] operator[+] Other[5] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[result] operator[=] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[replace] operator[SEP] operator[SEP] identifier[i] operator[=] identifier[i] operator[+] Other[1] operator[SEP] } } Keyword[else] { identifier[result] operator[=] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[v] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private String getItemIndexViewURL(String reposBaseURL, String fedoraContext, String PID, Date versDateTime) { String itemIndexURL = null; try { if (versDateTime == null) { itemIndexURL = reposBaseURL + "/" + fedoraContext + "/objects/" + URLEncoder.encode(PID, "UTF-8") + "/methods/" + URLEncoder.encode("fedora-system:3", "UTF-8") + "/viewItemIndex"; } else { itemIndexURL = reposBaseURL + "/" + fedoraContext + "/objects/" + URLEncoder.encode(PID, "UTF-8") + "/methods/" + URLEncoder.encode("fedora-system:3", "UTF-8") + "/viewItemIndex?asOfDateTime=" + DateUtility.convertDateToString(versDateTime); } } catch (UnsupportedEncodingException e) { // should never happen... throw new RuntimeException(e); } return itemIndexURL; }
class class_name[name] begin[{] method[getItemIndexViewURL, return_type[type[String]], modifier[private], parameter[reposBaseURL, fedoraContext, PID, versDateTime]] begin[{] local_variable[type[String], itemIndexURL] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=versDateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=itemIndexURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=reposBaseURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=fedoraContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/objects/"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=PID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/methods/"), operator=+), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fedora-system:3"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/viewItemIndex?asOfDateTime="), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=versDateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertDateToString, postfix_operators=[], prefix_operators=[], qualifier=DateUtility, selectors=[], type_arguments=None), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=itemIndexURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=reposBaseURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=fedoraContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/objects/"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=PID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/methods/"), operator=+), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fedora-system:3"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/viewItemIndex"), operator=+)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) return[member[.itemIndexURL]] end[}] END[}]
Keyword[private] identifier[String] identifier[getItemIndexViewURL] operator[SEP] identifier[String] identifier[reposBaseURL] , identifier[String] identifier[fedoraContext] , identifier[String] identifier[PID] , identifier[Date] identifier[versDateTime] operator[SEP] { identifier[String] identifier[itemIndexURL] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[versDateTime] operator[==] Other[null] operator[SEP] { identifier[itemIndexURL] operator[=] identifier[reposBaseURL] operator[+] literal[String] operator[+] identifier[fedoraContext] operator[+] literal[String] operator[+] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[PID] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[else] { identifier[itemIndexURL] operator[=] identifier[reposBaseURL] operator[+] literal[String] operator[+] identifier[fedoraContext] operator[+] literal[String] operator[+] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[PID] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[DateUtility] operator[SEP] identifier[convertDateToString] operator[SEP] identifier[versDateTime] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[itemIndexURL] operator[SEP] }
@Override protected void reportInvalidContent(int evtType) throws XMLStreamException { switch (mVldContent) { case XMLValidator.CONTENT_ALLOW_NONE: reportValidationProblem(ErrorConsts.ERR_VLD_EMPTY, mElementStack.getTopElementDesc(), ErrorConsts.tokenTypeDesc(evtType)); break; case XMLValidator.CONTENT_ALLOW_WS: case XMLValidator.CONTENT_ALLOW_WS_NONSTRICT: // should this ever occur? reportValidationProblem(ErrorConsts.ERR_VLD_NON_MIXED, mElementStack.getTopElementDesc(), null); break; case XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT: case XMLValidator.CONTENT_ALLOW_ANY_TEXT: /* Not 100% sure if this should ever happen... depends on * interpretation of 'any' content model? */ reportValidationProblem(ErrorConsts.ERR_VLD_ANY, mElementStack.getTopElementDesc(), ErrorConsts.tokenTypeDesc(evtType)); break; default: // should never occur: throwParseError("Internal error: trying to report invalid content for "+evtType); } }
class class_name[name] begin[{] method[reportInvalidContent, return_type[void], modifier[protected], parameter[evtType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=CONTENT_ALLOW_NONE, postfix_operators=[], prefix_operators=[], qualifier=XMLValidator, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERR_VLD_EMPTY, postfix_operators=[], prefix_operators=[], qualifier=ErrorConsts, selectors=[]), MethodInvocation(arguments=[], member=getTopElementDesc, postfix_operators=[], prefix_operators=[], qualifier=mElementStack, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=evtType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tokenTypeDesc, postfix_operators=[], prefix_operators=[], qualifier=ErrorConsts, selectors=[], type_arguments=None)], member=reportValidationProblem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CONTENT_ALLOW_WS, postfix_operators=[], prefix_operators=[], qualifier=XMLValidator, selectors=[]), MemberReference(member=CONTENT_ALLOW_WS_NONSTRICT, postfix_operators=[], prefix_operators=[], qualifier=XMLValidator, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERR_VLD_NON_MIXED, postfix_operators=[], prefix_operators=[], qualifier=ErrorConsts, selectors=[]), MethodInvocation(arguments=[], member=getTopElementDesc, postfix_operators=[], prefix_operators=[], qualifier=mElementStack, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=reportValidationProblem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=CONTENT_ALLOW_VALIDATABLE_TEXT, postfix_operators=[], prefix_operators=[], qualifier=XMLValidator, selectors=[]), MemberReference(member=CONTENT_ALLOW_ANY_TEXT, postfix_operators=[], prefix_operators=[], qualifier=XMLValidator, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERR_VLD_ANY, postfix_operators=[], prefix_operators=[], qualifier=ErrorConsts, selectors=[]), MethodInvocation(arguments=[], member=getTopElementDesc, postfix_operators=[], prefix_operators=[], qualifier=mElementStack, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=evtType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tokenTypeDesc, postfix_operators=[], prefix_operators=[], qualifier=ErrorConsts, selectors=[], type_arguments=None)], member=reportValidationProblem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Internal error: trying to report invalid content for "), operandr=MemberReference(member=evtType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=throwParseError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=mVldContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[reportInvalidContent] operator[SEP] Keyword[int] identifier[evtType] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[switch] operator[SEP] identifier[mVldContent] operator[SEP] { Keyword[case] identifier[XMLValidator] operator[SEP] identifier[CONTENT_ALLOW_NONE] operator[:] identifier[reportValidationProblem] operator[SEP] identifier[ErrorConsts] operator[SEP] identifier[ERR_VLD_EMPTY] , identifier[mElementStack] operator[SEP] identifier[getTopElementDesc] operator[SEP] operator[SEP] , identifier[ErrorConsts] operator[SEP] identifier[tokenTypeDesc] operator[SEP] identifier[evtType] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[XMLValidator] operator[SEP] identifier[CONTENT_ALLOW_WS] operator[:] Keyword[case] identifier[XMLValidator] operator[SEP] identifier[CONTENT_ALLOW_WS_NONSTRICT] operator[:] identifier[reportValidationProblem] operator[SEP] identifier[ErrorConsts] operator[SEP] identifier[ERR_VLD_NON_MIXED] , identifier[mElementStack] operator[SEP] identifier[getTopElementDesc] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[XMLValidator] operator[SEP] identifier[CONTENT_ALLOW_VALIDATABLE_TEXT] operator[:] Keyword[case] identifier[XMLValidator] operator[SEP] identifier[CONTENT_ALLOW_ANY_TEXT] operator[:] identifier[reportValidationProblem] operator[SEP] identifier[ErrorConsts] operator[SEP] identifier[ERR_VLD_ANY] , identifier[mElementStack] operator[SEP] identifier[getTopElementDesc] operator[SEP] operator[SEP] , identifier[ErrorConsts] operator[SEP] identifier[tokenTypeDesc] operator[SEP] identifier[evtType] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[throwParseError] operator[SEP] literal[String] operator[+] identifier[evtType] operator[SEP] operator[SEP] } }
public static Basic2DMatrix fromMatrixMarket(InputStream is) throws IOException { return Matrix.fromMatrixMarket(is).to(Matrices.BASIC_2D); }
class class_name[name] begin[{] method[fromMatrixMarket, return_type[type[Basic2DMatrix]], modifier[public static], parameter[is]] begin[{] return[call[Matrix.fromMatrixMarket, parameter[member[.is]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Basic2DMatrix] identifier[fromMatrixMarket] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[Matrix] operator[SEP] identifier[fromMatrixMarket] operator[SEP] identifier[is] operator[SEP] operator[SEP] identifier[to] operator[SEP] identifier[Matrices] operator[SEP] identifier[BASIC_2D] operator[SEP] operator[SEP] }
public void removeStream(SIBUuid12 stream) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeStream", stream); // nuke the stream out of our internal store _internalOutputStreamManager.remove(stream); deregisterControlAdapterMBean(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "removeStream"); }
class class_name[name] begin[{] method[removeStream, return_type[void], modifier[public], parameter[stream]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["removeStream"], member[.stream]]] else begin[{] None end[}] call[_internalOutputStreamManager.remove, parameter[member[.stream]]] call[.deregisterControlAdapterMBean, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["removeStream"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeStream] operator[SEP] identifier[SIBUuid12] identifier[stream] 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] , identifier[stream] operator[SEP] operator[SEP] identifier[_internalOutputStreamManager] operator[SEP] identifier[remove] operator[SEP] identifier[stream] operator[SEP] operator[SEP] identifier[deregisterControlAdapterMBean] 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] }
@Nullable public <T> T gauge(String name, T obj, ToDoubleFunction<T> valueFunction) { return gauge(name, emptyList(), obj, valueFunction); }
class class_name[name] begin[{] method[gauge, return_type[type[T]], modifier[public], parameter[name, obj, valueFunction]] begin[{] return[call[.gauge, parameter[member[.name], call[.emptyList, parameter[]], member[.obj], member[.valueFunction]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[gauge] operator[SEP] identifier[String] identifier[name] , identifier[T] identifier[obj] , identifier[ToDoubleFunction] operator[<] identifier[T] operator[>] identifier[valueFunction] operator[SEP] { Keyword[return] identifier[gauge] operator[SEP] identifier[name] , identifier[emptyList] operator[SEP] operator[SEP] , identifier[obj] , identifier[valueFunction] operator[SEP] operator[SEP] }
@Override public void clear() { modCount++; Entry<K,V> tab[] = table; for (int i = 0; i < tab.length; i++) tab[i] = null; size = 0; }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] member[.modCount] local_variable[type[Entry], tab] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=tab, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), 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=tab, 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) assign[member[.size], literal[0]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { identifier[modCount] operator[++] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[tab] operator[SEP] operator[SEP] operator[=] identifier[table] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tab] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[tab] operator[SEP] identifier[i] operator[SEP] operator[=] Other[null] operator[SEP] identifier[size] operator[=] Other[0] operator[SEP] }
public User getCurrentUser() throws ProvisioningApiException { try { GetUsersSuccessResponse resp = usersApi.getCurrentUser(); if (!resp.getStatus().getCode().equals(0)) { throw new ProvisioningApiException("Error getting current user. Code: " + resp.getStatus().getCode()); } return new User((Map<String, Object>)resp.getData().getUser()); } catch(ApiException e) { throw new ProvisioningApiException("Error getting current user", e); } }
class class_name[name] begin[{] method[getCurrentUser, return_type[type[User]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCurrentUser, postfix_operators=[], prefix_operators=[], qualifier=usersApi, selectors=[], type_arguments=None), name=resp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GetUsersSuccessResponse, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=['!'], qualifier=resp, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error getting current user. Code: "), operandr=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProvisioningApiException, sub_type=None)), label=None)])), ReturnStatement(expression=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[MethodInvocation(arguments=[], member=getUser, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=User, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error getting current user"), 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=ProvisioningApiException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ApiException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[User] identifier[getCurrentUser] operator[SEP] operator[SEP] Keyword[throws] identifier[ProvisioningApiException] { Keyword[try] { identifier[GetUsersSuccessResponse] identifier[resp] operator[=] identifier[usersApi] operator[SEP] identifier[getCurrentUser] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[resp] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] Other[0] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProvisioningApiException] operator[SEP] literal[String] operator[+] identifier[resp] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[User] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ApiException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProvisioningApiException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
void createNewEntry(AsteriskChannelImpl channel, int reportedPosition, Date dateReceived) { AsteriskQueueEntryImpl qe = new AsteriskQueueEntryImpl(server, this, channel, reportedPosition, dateReceived); long delay = serviceLevel * 1000L; if (delay > 0) { ServiceLevelTimerTask timerTask = new ServiceLevelTimerTask(qe); timer.schedule(timerTask, delay); synchronized (serviceLevelTimerTasks) { serviceLevelTimerTasks.put(qe, timerTask); } } synchronized (entries) { entries.add(qe); // at the end of the list // Keep the lock ! // This will fire PCE on the newly created queue entry // but hopefully this one has no listeners yet shift(); } // Set the channel property ony here as queue entries and channels // maintain a reciprocal reference. // That way property change on channel and new entry event on queue will be // lanched when BOTH channel and queue are correctly set. channel.setQueueEntry(qe); fireNewEntry(qe); server.fireNewQueueEntry(qe); }
class class_name[name] begin[{] method[createNewEntry, return_type[void], modifier[default], parameter[channel, reportedPosition, dateReceived]] begin[{] local_variable[type[AsteriskQueueEntryImpl], qe] local_variable[type[long], delay] if[binary_operation[member[.delay], >, literal[0]]] begin[{] local_variable[type[ServiceLevelTimerTask], timerTask] call[timer.schedule, parameter[member[.timerTask], member[.delay]]] SYNCHRONIZED[member[.serviceLevelTimerTasks]] BEGIN[{] call[serviceLevelTimerTasks.put, parameter[member[.qe], member[.timerTask]]] END[}] else begin[{] None end[}] SYNCHRONIZED[member[.entries]] BEGIN[{] call[entries.add, parameter[member[.qe]]] call[.shift, parameter[]] END[}] call[channel.setQueueEntry, parameter[member[.qe]]] call[.fireNewEntry, parameter[member[.qe]]] call[server.fireNewQueueEntry, parameter[member[.qe]]] end[}] END[}]
Keyword[void] identifier[createNewEntry] operator[SEP] identifier[AsteriskChannelImpl] identifier[channel] , Keyword[int] identifier[reportedPosition] , identifier[Date] identifier[dateReceived] operator[SEP] { identifier[AsteriskQueueEntryImpl] identifier[qe] operator[=] Keyword[new] identifier[AsteriskQueueEntryImpl] operator[SEP] identifier[server] , Keyword[this] , identifier[channel] , identifier[reportedPosition] , identifier[dateReceived] operator[SEP] operator[SEP] Keyword[long] identifier[delay] operator[=] identifier[serviceLevel] operator[*] Other[1000L] operator[SEP] Keyword[if] operator[SEP] identifier[delay] operator[>] Other[0] operator[SEP] { identifier[ServiceLevelTimerTask] identifier[timerTask] operator[=] Keyword[new] identifier[ServiceLevelTimerTask] operator[SEP] identifier[qe] operator[SEP] operator[SEP] identifier[timer] operator[SEP] identifier[schedule] operator[SEP] identifier[timerTask] , identifier[delay] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[serviceLevelTimerTasks] operator[SEP] { identifier[serviceLevelTimerTasks] operator[SEP] identifier[put] operator[SEP] identifier[qe] , identifier[timerTask] operator[SEP] operator[SEP] } } Keyword[synchronized] operator[SEP] identifier[entries] operator[SEP] { identifier[entries] operator[SEP] identifier[add] operator[SEP] identifier[qe] operator[SEP] operator[SEP] identifier[shift] operator[SEP] operator[SEP] operator[SEP] } identifier[channel] operator[SEP] identifier[setQueueEntry] operator[SEP] identifier[qe] operator[SEP] operator[SEP] identifier[fireNewEntry] operator[SEP] identifier[qe] operator[SEP] operator[SEP] identifier[server] operator[SEP] identifier[fireNewQueueEntry] operator[SEP] identifier[qe] operator[SEP] operator[SEP] }
public boolean nextValidToken() throws IOException { while (tokeniser.nextToken()) { if (tokeniser.getTokenType() == PRTokeniser.TK_COMMENT) continue; return true; } return false; }
class class_name[name] begin[{] method[nextValidToken, return_type[type[boolean]], modifier[public], parameter[]] begin[{] while[call[tokeniser.nextToken, parameter[]]] begin[{] if[binary_operation[call[tokeniser.getTokenType, parameter[]], ==, member[PRTokeniser.TK_COMMENT]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] return[literal[true]] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[nextValidToken] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[while] operator[SEP] identifier[tokeniser] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tokeniser] operator[SEP] identifier[getTokenType] operator[SEP] operator[SEP] operator[==] identifier[PRTokeniser] operator[SEP] identifier[TK_COMMENT] operator[SEP] Keyword[continue] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private void collectFractionalDigits(int number, char[] digitsBuffer, int startIndex) { int index = startIndex; char digitOnes = DigitArrays.DigitOnes1000[number]; char digitTens = DigitArrays.DigitTens1000[number]; if (isCurrencyFormat) { // Currency case. Always collects fractional digits. digitsBuffer[index++] = digitTens; digitsBuffer[index++] = digitOnes; } else if (number != 0) { // Decimal case. Hundreds will always be collected digitsBuffer[index++] = DigitArrays.DigitHundreds1000[number]; // Ending zeros won't be collected. if (digitOnes != '0') { digitsBuffer[index++] = digitTens; digitsBuffer[index++] = digitOnes; } else if (digitTens != '0') digitsBuffer[index++] = digitTens; } else // This is decimal pattern and fractional part is zero. // We must remove decimal point from result. index--; fastPathData.lastFreeIndex = index; }
class class_name[name] begin[{] method[collectFractionalDigits, return_type[void], modifier[private], parameter[number, digitsBuffer, startIndex]] begin[{] local_variable[type[int], index] local_variable[type[char], digitOnes] local_variable[type[char], digitTens] if[member[.isCurrencyFormat]] begin[{] assign[member[.digitsBuffer], member[.digitTens]] assign[member[.digitsBuffer], member[.digitOnes]] else begin[{] if[binary_operation[member[.number], !=, literal[0]]] begin[{] assign[member[.digitsBuffer], member[DigitArrays.DigitHundreds1000]] if[binary_operation[member[.digitOnes], !=, literal['0']]] begin[{] assign[member[.digitsBuffer], member[.digitTens]] assign[member[.digitsBuffer], member[.digitOnes]] else begin[{] if[binary_operation[member[.digitTens], !=, literal['0']]] begin[{] assign[member[.digitsBuffer], member[.digitTens]] else begin[{] None end[}] end[}] else begin[{] member[.index] end[}] end[}] assign[member[fastPathData.lastFreeIndex], member[.index]] end[}] END[}]
Keyword[private] Keyword[void] identifier[collectFractionalDigits] operator[SEP] Keyword[int] identifier[number] , Keyword[char] operator[SEP] operator[SEP] identifier[digitsBuffer] , Keyword[int] identifier[startIndex] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[startIndex] operator[SEP] Keyword[char] identifier[digitOnes] operator[=] identifier[DigitArrays] operator[SEP] identifier[DigitOnes1000] operator[SEP] identifier[number] operator[SEP] operator[SEP] Keyword[char] identifier[digitTens] operator[=] identifier[DigitArrays] operator[SEP] identifier[DigitTens1000] operator[SEP] identifier[number] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isCurrencyFormat] operator[SEP] { identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[digitTens] operator[SEP] identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[digitOnes] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[number] operator[!=] Other[0] operator[SEP] { identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[DigitArrays] operator[SEP] identifier[DigitHundreds1000] operator[SEP] identifier[number] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[digitOnes] operator[!=] literal[String] operator[SEP] { identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[digitTens] operator[SEP] identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[digitOnes] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[digitTens] operator[!=] literal[String] operator[SEP] identifier[digitsBuffer] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[digitTens] operator[SEP] } Keyword[else] identifier[index] operator[--] operator[SEP] identifier[fastPathData] operator[SEP] identifier[lastFreeIndex] operator[=] identifier[index] operator[SEP] }
@Override public GetDataflowGraphResult getDataflowGraph(GetDataflowGraphRequest request) { request = beforeClientExecution(request); return executeGetDataflowGraph(request); }
class class_name[name] begin[{] method[getDataflowGraph, return_type[type[GetDataflowGraphResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetDataflowGraph, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetDataflowGraphResult] identifier[getDataflowGraph] operator[SEP] identifier[GetDataflowGraphRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetDataflowGraph] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
protected long doCount(String spaceId) throws IOException { TopDocs result = getIndexSearcher().search(buildQuery(spaceId, null), 1); return result != null ? result.totalHits : -1; }
class class_name[name] begin[{] method[doCount, return_type[type[long]], modifier[protected], parameter[spaceId]] begin[{] local_variable[type[TopDocs], result] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), if_true=MemberReference(member=totalHits, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]))] end[}] END[}]
Keyword[protected] Keyword[long] identifier[doCount] operator[SEP] identifier[String] identifier[spaceId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[TopDocs] identifier[result] operator[=] identifier[getIndexSearcher] operator[SEP] operator[SEP] operator[SEP] identifier[search] operator[SEP] identifier[buildQuery] operator[SEP] identifier[spaceId] , Other[null] operator[SEP] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[!=] Other[null] operator[?] identifier[result] operator[SEP] identifier[totalHits] operator[:] operator[-] Other[1] operator[SEP] }
public ParametricFactorGraph build() { return new ParametricFactorGraph(new DynamicFactorGraph(variables, constantFactors, constantFactorNames), parametricFactors, factorPatterns, parametricFactorNames); }
class class_name[name] begin[{] method[build, return_type[type[ParametricFactorGraph]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=variables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=constantFactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=constantFactorNames, 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=DynamicFactorGraph, sub_type=None)), MemberReference(member=parametricFactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factorPatterns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parametricFactorNames, 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=ParametricFactorGraph, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ParametricFactorGraph] identifier[build] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ParametricFactorGraph] operator[SEP] Keyword[new] identifier[DynamicFactorGraph] operator[SEP] identifier[variables] , identifier[constantFactors] , identifier[constantFactorNames] operator[SEP] , identifier[parametricFactors] , identifier[factorPatterns] , identifier[parametricFactorNames] operator[SEP] operator[SEP] }
@Override public CPDefinition fetchByC_ERC(long companyId, String externalReferenceCode) { return fetchByC_ERC(companyId, externalReferenceCode, true); }
class class_name[name] begin[{] method[fetchByC_ERC, return_type[type[CPDefinition]], modifier[public], parameter[companyId, externalReferenceCode]] begin[{] return[call[.fetchByC_ERC, parameter[member[.companyId], member[.externalReferenceCode], literal[true]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPDefinition] identifier[fetchByC_ERC] operator[SEP] Keyword[long] identifier[companyId] , identifier[String] identifier[externalReferenceCode] operator[SEP] { Keyword[return] identifier[fetchByC_ERC] operator[SEP] identifier[companyId] , identifier[externalReferenceCode] , literal[boolean] operator[SEP] operator[SEP] }
public Content getNavLinkNext() { Content nextletterLabel = getResource("doclet.Next_Letter"); if (next == -1) { return HtmlTree.LI(nextletterLabel); } else { Content nextLink = getHyperLink(DocPaths.indexN(next), nextletterLabel); return HtmlTree.LI(nextLink); } }
class class_name[name] begin[{] method[getNavLinkNext, return_type[type[Content]], modifier[public], parameter[]] begin[{] local_variable[type[Content], nextletterLabel] if[binary_operation[member[.next], ==, literal[1]]] begin[{] return[call[HtmlTree.LI, parameter[member[.nextletterLabel]]]] else begin[{] local_variable[type[Content], nextLink] return[call[HtmlTree.LI, parameter[member[.nextLink]]]] end[}] end[}] END[}]
Keyword[public] identifier[Content] identifier[getNavLinkNext] operator[SEP] operator[SEP] { identifier[Content] identifier[nextletterLabel] operator[=] identifier[getResource] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] identifier[HtmlTree] operator[SEP] identifier[LI] operator[SEP] identifier[nextletterLabel] operator[SEP] operator[SEP] } Keyword[else] { identifier[Content] identifier[nextLink] operator[=] identifier[getHyperLink] operator[SEP] identifier[DocPaths] operator[SEP] identifier[indexN] operator[SEP] identifier[next] operator[SEP] , identifier[nextletterLabel] operator[SEP] operator[SEP] Keyword[return] identifier[HtmlTree] operator[SEP] identifier[LI] operator[SEP] identifier[nextLink] operator[SEP] operator[SEP] } }
public void unregisterKvState( JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId) { KvStateEntry<?, ?, ?> entry = registeredKvStates.remove(kvStateId); if (entry != null) { entry.clear(); final KvStateRegistryListener listener = getKvStateRegistryListener(jobId); if (listener != null) { listener.notifyKvStateUnregistered( jobId, jobVertexId, keyGroupRange, registrationName); } } }
class class_name[name] begin[{] method[unregisterKvState, return_type[void], modifier[public], parameter[jobId, jobVertexId, keyGroupRange, registrationName, kvStateId]] begin[{] local_variable[type[KvStateEntry], entry] if[binary_operation[member[.entry], !=, literal[null]]] begin[{] call[entry.clear, parameter[]] local_variable[type[KvStateRegistryListener], listener] if[binary_operation[member[.listener], !=, literal[null]]] begin[{] call[listener.notifyKvStateUnregistered, parameter[member[.jobId], member[.jobVertexId], member[.keyGroupRange], member[.registrationName]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[unregisterKvState] operator[SEP] identifier[JobID] identifier[jobId] , identifier[JobVertexID] identifier[jobVertexId] , identifier[KeyGroupRange] identifier[keyGroupRange] , identifier[String] identifier[registrationName] , identifier[KvStateID] identifier[kvStateId] operator[SEP] { identifier[KvStateEntry] operator[<] operator[?] , operator[?] , operator[?] operator[>] identifier[entry] operator[=] identifier[registeredKvStates] operator[SEP] identifier[remove] operator[SEP] identifier[kvStateId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] { identifier[entry] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[KvStateRegistryListener] identifier[listener] operator[=] identifier[getKvStateRegistryListener] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] { identifier[listener] operator[SEP] identifier[notifyKvStateUnregistered] operator[SEP] identifier[jobId] , identifier[jobVertexId] , identifier[keyGroupRange] , identifier[registrationName] operator[SEP] operator[SEP] } } }
private DeviceData checkWithHostAddress(DeviceData deviceData, DeviceProxy deviceProxy) throws DevFailed { // ToDo DevVarLongStringArray lsa = deviceData.extractLongStringArray(); try { java.net.InetAddress iadd = java.net.InetAddress.getByName(deviceProxy.get_host_name()); String hostAddress = iadd.getHostAddress(); System.err.println("Host address is " + hostAddress); System.err.println("Server returns " + lsa.svalue[0]); if (! lsa.svalue[0].startsWith("tcp://"+hostAddress)) { // Addresses are different String wrongAdd = lsa.svalue[0]; int idx = lsa.svalue[0].lastIndexOf(':'); // get port if (idx>0) { lsa.svalue[0] = "tcp://" + hostAddress + lsa.svalue[0].substring(idx); lsa.svalue[1] = "tcp://" + hostAddress + lsa.svalue[1].substring(idx); System.out.println(wrongAdd + " ---> "+lsa.svalue[0]); deviceData = new DeviceData(); deviceData.insert(lsa); isEndpointAvailable(lsa.svalue[0]); } } } catch (UnknownHostException e) { Except.throw_exception("UnknownHostException", e.toString(), "ZmqEventConsumer.checkZmqAddress()"); } //System.out.println("---> Connect on "+deviceData.extractLongStringArray().svalue[0]); return deviceData; }
class class_name[name] begin[{] method[checkWithHostAddress, return_type[type[DeviceData]], modifier[private], parameter[deviceData, deviceProxy]] begin[{] local_variable[type[DevVarLongStringArray], lsa] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get_host_name, postfix_operators=[], prefix_operators=[], qualifier=deviceProxy, selectors=[], type_arguments=None)], member=getByName, postfix_operators=[], prefix_operators=[], qualifier=java.net.InetAddress, selectors=[], type_arguments=None), name=iadd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=net, sub_type=ReferenceType(arguments=None, dimensions=None, name=InetAddress, sub_type=None)))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=[], prefix_operators=[], qualifier=iadd, selectors=[], type_arguments=None), name=hostAddress)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Host address is "), operandr=MemberReference(member=hostAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Server returns "), operandr=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=svalue, postfix_operators=[], prefix_operators=['!'], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="tcp://"), operandr=MemberReference(member=hostAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), name=wrongAdd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=':')], member=lastIndexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="tcp://"), operandr=MemberReference(member=hostAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="tcp://"), operandr=MemberReference(member=hostAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), MethodInvocation(arguments=[MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=wrongAdd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ---> "), operator=+), operandr=MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=deviceData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DeviceData, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lsa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insert, postfix_operators=[], prefix_operators=[], qualifier=deviceData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=svalue, postfix_operators=[], prefix_operators=[], qualifier=lsa, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=isEndpointAvailable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UnknownHostException"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ZmqEventConsumer.checkZmqAddress()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnknownHostException']))], finally_block=None, label=None, resources=None) return[member[.deviceData]] end[}] END[}]
Keyword[private] identifier[DeviceData] identifier[checkWithHostAddress] operator[SEP] identifier[DeviceData] identifier[deviceData] , identifier[DeviceProxy] identifier[deviceProxy] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[DevVarLongStringArray] identifier[lsa] operator[=] identifier[deviceData] operator[SEP] identifier[extractLongStringArray] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[InetAddress] identifier[iadd] operator[=] identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] identifier[deviceProxy] operator[SEP] identifier[get_host_name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[hostAddress] operator[=] identifier[iadd] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[hostAddress] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[+] identifier[hostAddress] operator[SEP] operator[SEP] { identifier[String] identifier[wrongAdd] operator[=] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[idx] operator[=] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[>] Other[0] operator[SEP] { identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[=] literal[String] operator[+] identifier[hostAddress] operator[+] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[SEP] operator[SEP] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[1] operator[SEP] operator[=] literal[String] operator[+] identifier[hostAddress] operator[+] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[wrongAdd] operator[+] literal[String] operator[+] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[deviceData] operator[=] Keyword[new] identifier[DeviceData] operator[SEP] operator[SEP] operator[SEP] identifier[deviceData] operator[SEP] identifier[insert] operator[SEP] identifier[lsa] operator[SEP] operator[SEP] identifier[isEndpointAvailable] operator[SEP] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[UnknownHostException] identifier[e] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[deviceData] operator[SEP] }
@Pure @Inline(value = "(int) Math.round($1)", imported = {Math.class}) public static int pix2pix(double pixelCoord) { return (int) Math.round(pixelCoord); }
class class_name[name] begin[{] method[pix2pix, return_type[type[int]], modifier[public static], parameter[pixelCoord]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=pixelCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[Inline] operator[SEP] identifier[value] operator[=] literal[String] , identifier[imported] operator[=] { identifier[Math] operator[SEP] Keyword[class] } operator[SEP] Keyword[public] Keyword[static] Keyword[int] identifier[pix2pix] operator[SEP] Keyword[double] identifier[pixelCoord] operator[SEP] { Keyword[return] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[pixelCoord] operator[SEP] operator[SEP] }
public static String encodeToString(byte[] source, int off, int len, int options) { byte[] encoded = encode(source, off, len, options); return new String(encoded, UTF_8); }
class class_name[name] begin[{] method[encodeToString, return_type[type[String]], modifier[public static], parameter[source, off, len, options]] begin[{] local_variable[type[byte], encoded] return[ClassCreator(arguments=[MemberReference(member=encoded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UTF_8, 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=String, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encodeToString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[off] , Keyword[int] identifier[len] , Keyword[int] identifier[options] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[encoded] operator[=] identifier[encode] operator[SEP] identifier[source] , identifier[off] , identifier[len] , identifier[options] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[encoded] , identifier[UTF_8] operator[SEP] operator[SEP] }
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case BasePackage.SF__CHILDREN: return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
class class_name[name] begin[{] method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SF__CHILDREN, postfix_operators=[], prefix_operators=[], qualifier=BasePackage, selectors=[])], statements=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=InternalEList, sub_type=None)), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=otherEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eInverseRemove, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[BasePackage] operator[SEP] identifier[SF__CHILDREN] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[InternalEList] operator[<] operator[?] operator[>] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[basicRemove] operator[SEP] identifier[otherEnd] , identifier[msgs] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eInverseRemove] operator[SEP] identifier[otherEnd] , identifier[featureID] , identifier[msgs] operator[SEP] operator[SEP] }
@Override public void evaluate(DoubleSolution solution) { List<List<Double>> s1 ; List<Double> s1Temp ; s1 = new ArrayList<>() ; for (int i = 0 ; i < dTypeG; i++) { s1Temp = new ArrayList<>() ; for (int j = 0 ; j < icaComponent.get(0).size(); j++) { s1Temp.add(solution.getVariableValue(i*(icaComponent.get(0).size())+j)) ; } s1.add(s1Temp) ; } List<List<Double>> x1 = multiplyWithOutAMP(matrixA, s1) ; List<List<Double>> cor1 = correlation(x1, mixed) ; double sum = 0.0 ; for (int i = 0 ; i < icaComponent.size(); i++) { for (int j = 0 ; j < icaComponent.get(i).size(); j++) { sum += Math.pow(icaComponent.get(i).get(j) - s1.get(i).get(j), 2) ; } } double obj1 = diagonal1(cor1)+diagonal2(cor1) ; double obj2 = sum/(icaComponent.size() * icaComponent.get(0).size()) ; if (obj1 > f1max) { f1max = obj1 ; } if (obj1 < f1min) { f1min = obj1 ; } if (obj2 > f1max) { f1max = obj2 ; } if (obj2 < f1min) { f1min = obj2 ; } if (scaling) { obj2 = (obj2 - f2min)*(f1max - f1min)/(f2max - f2min)+f1min ; } solution.setObjective(0, obj1); solution.setObjective(1, obj2); }
class class_name[name] begin[{] method[evaluate, return_type[void], modifier[public], parameter[solution]] begin[{] local_variable[type[List], s1] local_variable[type[List], s1Temp] assign[member[.s1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s1Temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=icaComponent, selectors=[], type_arguments=None), operator=*), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getVariableValue, postfix_operators=[], prefix_operators=[], qualifier=solution, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=s1Temp, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=icaComponent, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s1Temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=s1, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dTypeG, 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) local_variable[type[List], x1] local_variable[type[List], cor1] local_variable[type[double], sum] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=icaComponent, selectors=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=s1, selectors=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=-), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=icaComponent, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=icaComponent, 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) local_variable[type[double], obj1] local_variable[type[double], obj2] if[binary_operation[member[.obj1], >, member[.f1max]]] begin[{] assign[member[.f1max], member[.obj1]] else begin[{] None end[}] if[binary_operation[member[.obj1], <, member[.f1min]]] begin[{] assign[member[.f1min], member[.obj1]] else begin[{] None end[}] if[binary_operation[member[.obj2], >, member[.f1max]]] begin[{] assign[member[.f1max], member[.obj2]] else begin[{] None end[}] if[binary_operation[member[.obj2], <, member[.f1min]]] begin[{] assign[member[.f1min], member[.obj2]] else begin[{] None end[}] if[member[.scaling]] begin[{] assign[member[.obj2], binary_operation[binary_operation[binary_operation[binary_operation[member[.obj2], -, member[.f2min]], *, binary_operation[member[.f1max], -, member[.f1min]]], /, binary_operation[member[.f2max], -, member[.f2min]]], +, member[.f1min]]] else begin[{] None end[}] call[solution.setObjective, parameter[literal[0], member[.obj1]]] call[solution.setObjective, parameter[literal[1], member[.obj2]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[evaluate] operator[SEP] identifier[DoubleSolution] identifier[solution] operator[SEP] { identifier[List] operator[<] identifier[List] operator[<] identifier[Double] operator[>] operator[>] identifier[s1] operator[SEP] identifier[List] operator[<] identifier[Double] operator[>] identifier[s1Temp] operator[SEP] identifier[s1] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dTypeG] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[s1Temp] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[icaComponent] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[s1Temp] operator[SEP] identifier[add] operator[SEP] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] identifier[i] operator[*] operator[SEP] identifier[icaComponent] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[+] identifier[j] operator[SEP] operator[SEP] operator[SEP] } identifier[s1] operator[SEP] identifier[add] operator[SEP] identifier[s1Temp] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[List] operator[<] identifier[Double] operator[>] operator[>] identifier[x1] operator[=] identifier[multiplyWithOutAMP] operator[SEP] identifier[matrixA] , identifier[s1] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[Double] operator[>] operator[>] identifier[cor1] operator[=] identifier[correlation] operator[SEP] identifier[x1] , identifier[mixed] operator[SEP] operator[SEP] Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[icaComponent] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[icaComponent] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[sum] operator[+=] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[icaComponent] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[-] identifier[s1] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , Other[2] operator[SEP] operator[SEP] } } Keyword[double] identifier[obj1] operator[=] identifier[diagonal1] operator[SEP] identifier[cor1] operator[SEP] operator[+] identifier[diagonal2] operator[SEP] identifier[cor1] operator[SEP] operator[SEP] Keyword[double] identifier[obj2] operator[=] identifier[sum] operator[/] operator[SEP] identifier[icaComponent] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[*] identifier[icaComponent] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj1] operator[>] identifier[f1max] operator[SEP] { identifier[f1max] operator[=] identifier[obj1] operator[SEP] } Keyword[if] operator[SEP] identifier[obj1] operator[<] identifier[f1min] operator[SEP] { identifier[f1min] operator[=] identifier[obj1] operator[SEP] } Keyword[if] operator[SEP] identifier[obj2] operator[>] identifier[f1max] operator[SEP] { identifier[f1max] operator[=] identifier[obj2] operator[SEP] } Keyword[if] operator[SEP] identifier[obj2] operator[<] identifier[f1min] operator[SEP] { identifier[f1min] operator[=] identifier[obj2] operator[SEP] } Keyword[if] operator[SEP] identifier[scaling] operator[SEP] { identifier[obj2] operator[=] operator[SEP] identifier[obj2] operator[-] identifier[f2min] operator[SEP] operator[*] operator[SEP] identifier[f1max] operator[-] identifier[f1min] operator[SEP] operator[/] operator[SEP] identifier[f2max] operator[-] identifier[f2min] operator[SEP] operator[+] identifier[f1min] operator[SEP] } identifier[solution] operator[SEP] identifier[setObjective] operator[SEP] Other[0] , identifier[obj1] operator[SEP] operator[SEP] identifier[solution] operator[SEP] identifier[setObjective] operator[SEP] Other[1] , identifier[obj2] operator[SEP] operator[SEP] }
public ServiceFuture<ApplicationInsightsComponentExportConfigurationInner> deleteAsync(String resourceGroupName, String resourceName, String exportId, final ServiceCallback<ApplicationInsightsComponentExportConfigurationInner> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, exportId), serviceCallback); }
class class_name[name] begin[{] method[deleteAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, resourceName, exportId, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.deleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.exportId]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ApplicationInsightsComponentExportConfigurationInner] operator[>] identifier[deleteAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[String] identifier[exportId] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[ApplicationInsightsComponentExportConfigurationInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[deleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[exportId] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static boolean isJarFileURL(URL url) { return (URL_PROTOCOL_FILE.equals(url.getProtocol()) && // url.getPath().toLowerCase().endsWith(FileUtil.JAR_FILE_EXT)); }
class class_name[name] begin[{] method[isJarFileURL, return_type[type[boolean]], modifier[public static], parameter[url]] begin[{] return[binary_operation[call[URL_PROTOCOL_FILE.equals, parameter[call[url.getProtocol, parameter[]]]], &&, call[url.getPath, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isJarFileURL] operator[SEP] identifier[URL] identifier[url] operator[SEP] { Keyword[return] operator[SEP] identifier[URL_PROTOCOL_FILE] operator[SEP] identifier[equals] operator[SEP] identifier[url] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[url] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] identifier[FileUtil] operator[SEP] identifier[JAR_FILE_EXT] operator[SEP] operator[SEP] operator[SEP] }
private long getSafePts(long pts, int trackIndex) { if (mLastPts[trackIndex] >= pts) { // Enforce a non-zero minimum spacing // between pts mLastPts[trackIndex] += 9643; return mLastPts[trackIndex]; } mLastPts[trackIndex] = pts; return pts; }
class class_name[name] begin[{] method[getSafePts, return_type[type[long]], modifier[private], parameter[pts, trackIndex]] begin[{] if[binary_operation[member[.mLastPts], >=, member[.pts]]] begin[{] assign[member[.mLastPts], literal[9643]] return[member[.mLastPts]] else begin[{] None end[}] assign[member[.mLastPts], member[.pts]] return[member[.pts]] end[}] END[}]
Keyword[private] Keyword[long] identifier[getSafePts] operator[SEP] Keyword[long] identifier[pts] , Keyword[int] identifier[trackIndex] operator[SEP] { Keyword[if] operator[SEP] identifier[mLastPts] operator[SEP] identifier[trackIndex] operator[SEP] operator[>=] identifier[pts] operator[SEP] { identifier[mLastPts] operator[SEP] identifier[trackIndex] operator[SEP] operator[+=] Other[9643] operator[SEP] Keyword[return] identifier[mLastPts] operator[SEP] identifier[trackIndex] operator[SEP] operator[SEP] } identifier[mLastPts] operator[SEP] identifier[trackIndex] operator[SEP] operator[=] identifier[pts] operator[SEP] Keyword[return] identifier[pts] operator[SEP] }
protected void notifyServiceSummaryUpdate(ServiceSummary serviceSummary) throws ActivityException { WorkflowServices wfs = ServiceLocator.getWorkflowServices(); try { wfs.notify("service-summary-update-" + getMasterRequestId(), null, 2); } catch (ServiceException e) { throw new ActivityException("Cannot publish Service Summary update event", e); } }
class class_name[name] begin[{] method[notifyServiceSummaryUpdate, return_type[void], modifier[protected], parameter[serviceSummary]] begin[{] local_variable[type[WorkflowServices], wfs] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="service-summary-update-"), operandr=MethodInvocation(arguments=[], member=getMasterRequestId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=notify, postfix_operators=[], prefix_operators=[], qualifier=wfs, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot publish Service Summary update event"), 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=ActivityException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ServiceException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[notifyServiceSummaryUpdate] operator[SEP] identifier[ServiceSummary] identifier[serviceSummary] operator[SEP] Keyword[throws] identifier[ActivityException] { identifier[WorkflowServices] identifier[wfs] operator[=] identifier[ServiceLocator] operator[SEP] identifier[getWorkflowServices] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[wfs] operator[SEP] identifier[notify] operator[SEP] literal[String] operator[+] identifier[getMasterRequestId] operator[SEP] operator[SEP] , Other[null] , Other[2] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ServiceException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ActivityException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
private void deleteFringeMigrate( DeleteStack stack, GBSNode p) { GBSNode endp = p; /* Last node processed */ int endIndex = stack.index(); /* Index to last parent */ stack.add(0, p); /* Put last node in stack for possible */ /* use by rebalance */ /* Maximum number of right child nodes */ /* before the fringe must be rebalanced */ int maxBal = maximumFringeImbalance(); stack.processSubFringe(p); /* See DeleteStack.processNode */ endp = stack.lastNode(); endIndex = stack.lastIndex(); deleteCheckFringeBalance( stack, endp, endIndex, maxBal); }
class class_name[name] begin[{] method[deleteFringeMigrate, return_type[void], modifier[private], parameter[stack, p]] begin[{] local_variable[type[GBSNode], endp] local_variable[type[int], endIndex] call[stack.add, parameter[literal[0], member[.p]]] local_variable[type[int], maxBal] call[stack.processSubFringe, parameter[member[.p]]] assign[member[.endp], call[stack.lastNode, parameter[]]] assign[member[.endIndex], call[stack.lastIndex, parameter[]]] call[.deleteCheckFringeBalance, parameter[member[.stack], member[.endp], member[.endIndex], member[.maxBal]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[deleteFringeMigrate] operator[SEP] identifier[DeleteStack] identifier[stack] , identifier[GBSNode] identifier[p] operator[SEP] { identifier[GBSNode] identifier[endp] operator[=] identifier[p] operator[SEP] Keyword[int] identifier[endIndex] operator[=] identifier[stack] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] identifier[stack] operator[SEP] identifier[add] operator[SEP] Other[0] , identifier[p] operator[SEP] operator[SEP] Keyword[int] identifier[maxBal] operator[=] identifier[maximumFringeImbalance] operator[SEP] operator[SEP] operator[SEP] identifier[stack] operator[SEP] identifier[processSubFringe] operator[SEP] identifier[p] operator[SEP] operator[SEP] identifier[endp] operator[=] identifier[stack] operator[SEP] identifier[lastNode] operator[SEP] operator[SEP] operator[SEP] identifier[endIndex] operator[=] identifier[stack] operator[SEP] identifier[lastIndex] operator[SEP] operator[SEP] operator[SEP] identifier[deleteCheckFringeBalance] operator[SEP] identifier[stack] , identifier[endp] , identifier[endIndex] , identifier[maxBal] operator[SEP] operator[SEP] }
public ResumeDomainStreamResponse resumeDomainStream(ResumeDomainStreamRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty."); checkStringNotEmpty(request.getApp(), "App should NOT be empty."); checkStringNotEmpty(request.getStream(), "Stream should NOT be empty."); InternalRequest internalRequest = createRequest(HttpMethodName.PUT, request, LIVE_DOMAIN, request.getDomain(), LIVE_APP, request.getApp(), LIVE_STREAM, request.getStream()); internalRequest.addParameter(RESUME, null); return invokeHttpClient(internalRequest, ResumeDomainStreamResponse.class); }
class class_name[name] begin[{] method[resumeDomainStream, return_type[type[ResumeDomainStreamResponse]], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]] call[.checkStringNotEmpty, parameter[call[request.getDomain, parameter[]], literal["Domain should NOT be empty."]]] call[.checkStringNotEmpty, parameter[call[request.getApp, parameter[]], literal["App should NOT be empty."]]] call[.checkStringNotEmpty, parameter[call[request.getStream, parameter[]], literal["Stream should NOT be empty."]]] local_variable[type[InternalRequest], internalRequest] call[internalRequest.addParameter, parameter[member[.RESUME], literal[null]]] return[call[.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResumeDomainStreamResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[ResumeDomainStreamResponse] identifier[resumeDomainStream] operator[SEP] identifier[ResumeDomainStreamRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getDomain] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getApp] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getStream] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] identifier[createRequest] operator[SEP] identifier[HttpMethodName] operator[SEP] identifier[PUT] , identifier[request] , identifier[LIVE_DOMAIN] , identifier[request] operator[SEP] identifier[getDomain] operator[SEP] operator[SEP] , identifier[LIVE_APP] , identifier[request] operator[SEP] identifier[getApp] operator[SEP] operator[SEP] , identifier[LIVE_STREAM] , identifier[request] operator[SEP] identifier[getStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[internalRequest] operator[SEP] identifier[addParameter] operator[SEP] identifier[RESUME] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[ResumeDomainStreamResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static <T> Id<T> newId(final TypeToken<T> type) { return (Id<T>) Ids.newId(type.getType()); }
class class_name[name] begin[{] method[newId, return_type[type[Id]], modifier[public static], parameter[type]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None)], member=newId, postfix_operators=[], prefix_operators=[], qualifier=Ids, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Id, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Id] operator[<] identifier[T] operator[>] identifier[newId] operator[SEP] Keyword[final] identifier[TypeToken] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[return] operator[SEP] identifier[Id] operator[<] identifier[T] operator[>] operator[SEP] identifier[Ids] operator[SEP] identifier[newId] operator[SEP] identifier[type] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private InputStream getResourceInputStream(String path) { InputStream is = config.getContext().getResourceAsStream(path); if (is == null) { try { is = ClassLoaderResourceUtils.getResourceAsStream(path, this); } catch (FileNotFoundException e) { throw new BundlingProcessException(e); } } return is; }
class class_name[name] begin[{] method[getResourceInputStream, return_type[type[InputStream]], modifier[private], parameter[path]] begin[{] local_variable[type[InputStream], is] if[binary_operation[member[.is], ==, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=getResourceAsStream, postfix_operators=[], prefix_operators=[], qualifier=ClassLoaderResourceUtils, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BundlingProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.is]] end[}] END[}]
Keyword[private] identifier[InputStream] identifier[getResourceInputStream] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[InputStream] identifier[is] operator[=] identifier[config] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[is] operator[==] Other[null] operator[SEP] { Keyword[try] { identifier[is] operator[=] identifier[ClassLoaderResourceUtils] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[path] , Keyword[this] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BundlingProcessException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[is] operator[SEP] }
public static Polygon fromLngLats(@NonNull List<List<Point>> coordinates) { return new Polygon(TYPE, null, coordinates); }
class class_name[name] begin[{] method[fromLngLats, return_type[type[Polygon]], modifier[public static], parameter[coordinates]] begin[{] return[ClassCreator(arguments=[MemberReference(member=TYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=coordinates, 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=Polygon, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Polygon] identifier[fromLngLats] operator[SEP] annotation[@] identifier[NonNull] identifier[List] operator[<] identifier[List] operator[<] identifier[Point] operator[>] operator[>] identifier[coordinates] operator[SEP] { Keyword[return] Keyword[new] identifier[Polygon] operator[SEP] identifier[TYPE] , Other[null] , identifier[coordinates] operator[SEP] operator[SEP] }
final long attachTimeout() { if (attachTimeout == 0) { synchronized(this) { if (attachTimeout == 0) { try { String s = System.getProperty("sun.tools.attach.attachTimeout"); attachTimeout = Long.parseLong(s); } catch (SecurityException se) { } catch (NumberFormatException ne) { } if (attachTimeout <= 0) { attachTimeout = defaultAttachTimeout; } } } } return attachTimeout; }
class class_name[name] begin[{] method[attachTimeout, return_type[type[long]], modifier[final], parameter[]] begin[{] if[binary_operation[member[.attachTimeout], ==, literal[0]]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[member[.attachTimeout], ==, literal[0]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sun.tools.attach.attachTimeout")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseLong, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['SecurityException'])), CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ne, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.attachTimeout], <=, literal[0]]] begin[{] assign[member[.attachTimeout], member[.defaultAttachTimeout]] else begin[{] None end[}] else begin[{] None end[}] END[}] else begin[{] None end[}] return[member[.attachTimeout]] end[}] END[}]
Keyword[final] Keyword[long] identifier[attachTimeout] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[attachTimeout] operator[==] Other[0] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[attachTimeout] operator[==] Other[0] operator[SEP] { Keyword[try] { identifier[String] identifier[s] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[attachTimeout] operator[=] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[se] operator[SEP] { } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ne] operator[SEP] { } Keyword[if] operator[SEP] identifier[attachTimeout] operator[<=] Other[0] operator[SEP] { identifier[attachTimeout] operator[=] identifier[defaultAttachTimeout] operator[SEP] } } } } Keyword[return] identifier[attachTimeout] operator[SEP] }
public List<NamedAttributeNode<NamedEntityGraph<T>>> getAllNamedAttributeNode() { List<NamedAttributeNode<NamedEntityGraph<T>>> list = new ArrayList<NamedAttributeNode<NamedEntityGraph<T>>>(); List<Node> nodeList = childNode.get("named-attribute-node"); for(Node node: nodeList) { NamedAttributeNode<NamedEntityGraph<T>> type = new NamedAttributeNodeImpl<NamedEntityGraph<T>>(this, "named-attribute-node", childNode, node); list.add(type); } return list; }
class class_name[name] begin[{] method[getAllNamedAttributeNode, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="named-attribute-node"), MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=NamedEntityGraph, sub_type=None))], dimensions=None, name=NamedAttributeNodeImpl, sub_type=None)), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=NamedEntityGraph, sub_type=None))], dimensions=[], name=NamedAttributeNode, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[NamedAttributeNode] operator[<] identifier[NamedEntityGraph] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllNamedAttributeNode] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[NamedAttributeNode] operator[<] identifier[NamedEntityGraph] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[NamedAttributeNode] operator[<] identifier[NamedEntityGraph] operator[<] identifier[T] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodeList] operator[SEP] { identifier[NamedAttributeNode] operator[<] identifier[NamedEntityGraph] operator[<] identifier[T] operator[>] operator[>] identifier[type] operator[=] Keyword[new] identifier[NamedAttributeNodeImpl] operator[<] identifier[NamedEntityGraph] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public void echo(SystemLogHolder holder, LogRecord logRecord) { TraceWriter detailLog = traceLog; // Tee to messages.log (always) RoutedMessage routedMessage = null; if (externalMessageRouter.get() != null) { String message = formatter.messageLogFormat(logRecord, logRecord.getMessage()); routedMessage = new RoutedMessageImpl(logRecord.getMessage(), logRecord.getMessage(), message, logRecord); } else { routedMessage = new RoutedMessageImpl(logRecord.getMessage(), logRecord.getMessage(), null, logRecord); } invokeMessageRouters(routedMessage); if (logSource != null) { publishToLogSource(routedMessage); } //send events to handlers if (TraceComponent.isAnyTracingEnabled()) { publishTraceLogRecord(detailLog, logRecord, NULL_ID, NULL_FORMATTED_MSG, NULL_FORMATTED_MSG); } }
class class_name[name] begin[{] method[echo, return_type[void], modifier[public], parameter[holder, logRecord]] begin[{] local_variable[type[TraceWriter], detailLog] local_variable[type[RoutedMessage], routedMessage] if[binary_operation[call[externalMessageRouter.get, parameter[]], !=, literal[null]]] begin[{] local_variable[type[String], message] assign[member[.routedMessage], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=logRecord, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=logRecord, selectors=[], type_arguments=None), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logRecord, 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=RoutedMessageImpl, sub_type=None))] else begin[{] assign[member[.routedMessage], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=logRecord, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=logRecord, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=logRecord, 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=RoutedMessageImpl, sub_type=None))] end[}] call[.invokeMessageRouters, parameter[member[.routedMessage]]] if[binary_operation[member[.logSource], !=, literal[null]]] begin[{] call[.publishToLogSource, parameter[member[.routedMessage]]] else begin[{] None end[}] if[call[TraceComponent.isAnyTracingEnabled, parameter[]]] begin[{] call[.publishTraceLogRecord, parameter[member[.detailLog], member[.logRecord], member[.NULL_ID], member[.NULL_FORMATTED_MSG], member[.NULL_FORMATTED_MSG]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[echo] operator[SEP] identifier[SystemLogHolder] identifier[holder] , identifier[LogRecord] identifier[logRecord] operator[SEP] { identifier[TraceWriter] identifier[detailLog] operator[=] identifier[traceLog] operator[SEP] identifier[RoutedMessage] identifier[routedMessage] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[externalMessageRouter] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[message] operator[=] identifier[formatter] operator[SEP] identifier[messageLogFormat] operator[SEP] identifier[logRecord] , identifier[logRecord] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[routedMessage] operator[=] Keyword[new] identifier[RoutedMessageImpl] operator[SEP] identifier[logRecord] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[logRecord] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[message] , identifier[logRecord] operator[SEP] operator[SEP] } Keyword[else] { identifier[routedMessage] operator[=] Keyword[new] identifier[RoutedMessageImpl] operator[SEP] identifier[logRecord] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[logRecord] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , Other[null] , identifier[logRecord] operator[SEP] operator[SEP] } identifier[invokeMessageRouters] operator[SEP] identifier[routedMessage] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logSource] operator[!=] Other[null] operator[SEP] { identifier[publishToLogSource] operator[SEP] identifier[routedMessage] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[publishTraceLogRecord] operator[SEP] identifier[detailLog] , identifier[logRecord] , identifier[NULL_ID] , identifier[NULL_FORMATTED_MSG] , identifier[NULL_FORMATTED_MSG] operator[SEP] operator[SEP] } }
public boolean hasSlashStarMapping() { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINEST)){ logger.entering (CLASS_NAME, "hasSlashStarMapping"); } WebAppConfiguration webAppConfig = null; WebApp webApp = this._webApp; if (webApp != null) { webAppConfig = webApp.getConfiguration(); } if (webAppConfig != null) { Map<String,List<String>> mappings = webAppConfig.getServletMappings(); if (mappings != null) { for (List<String> list : mappings.values()) { for (String urlPattern : list) { if (urlPattern != null && ("/*").equals(urlPattern)) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINEST)){ logger.exiting (CLASS_NAME, "hasSlashStarMapping: true"); } return true; } } } } } if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINEST)){ logger.exiting (CLASS_NAME, "hasSlashStarMapping"); } return false; }
class class_name[name] begin[{] method[hasSlashStarMapping, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINEST]]]]] begin[{] call[logger.entering, parameter[member[.CLASS_NAME], literal["hasSlashStarMapping"]]] else begin[{] None end[}] local_variable[type[WebAppConfiguration], webAppConfig] local_variable[type[WebApp], webApp] if[binary_operation[member[.webApp], !=, literal[null]]] begin[{] assign[member[.webAppConfig], call[webApp.getConfiguration, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.webAppConfig], !=, literal[null]]] begin[{] local_variable[type[Map], mappings] if[binary_operation[member[.mappings], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=urlPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=urlPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="/*"), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ejs.ras.TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=FINEST, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hasSlashStarMapping: true")], member=exiting, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=urlPattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=mappings, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINEST]]]]] begin[{] call[logger.exiting, parameter[member[.CLASS_NAME], literal["hasSlashStarMapping"]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasSlashStarMapping] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] } identifier[WebAppConfiguration] identifier[webAppConfig] operator[=] Other[null] operator[SEP] identifier[WebApp] identifier[webApp] operator[=] Keyword[this] operator[SEP] identifier[_webApp] operator[SEP] Keyword[if] operator[SEP] identifier[webApp] operator[!=] Other[null] operator[SEP] { identifier[webAppConfig] operator[=] identifier[webApp] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[webAppConfig] operator[!=] Other[null] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[mappings] operator[=] identifier[webAppConfig] operator[SEP] identifier[getServletMappings] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mappings] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[:] identifier[mappings] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[urlPattern] operator[:] identifier[list] operator[SEP] { Keyword[if] operator[SEP] identifier[urlPattern] operator[!=] Other[null] operator[&&] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[urlPattern] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } } } } } Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void initialize(CmsUUID id, Locale initialComparisonLocale) throws CmsException { removeAllComponents(); CmsObject cms = A_CmsUI.getCmsObject(); CmsResource res = cms.readResource(id); m_currentRoot = res; CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(res.getRootPath()); Locale rootLocale = OpenCms.getLocaleManager().getDefaultLocale(cms, res); m_rootLocale = rootLocale; Locale mainLocale = site.getMainTranslationLocale(null); List<Locale> secondaryLocales = site.getSecondaryTranslationLocales(); List<Locale> possibleLocaleSelections = getMainLocaleSelectOptions(cms, res, mainLocale, secondaryLocales); m_rootLocaleSelector = new ComboBox(); m_rootLocaleSelector.addStyleName("o-sitemap-localeselect"); m_rootLocaleSelector.setNullSelectionAllowed(false); for (Locale selectableLocale : possibleLocaleSelections) { m_rootLocaleSelector.addItem(selectableLocale); m_rootLocaleSelector.setItemIcon(selectableLocale, FontOpenCms.SPACE); m_rootLocaleSelector.setItemCaption( selectableLocale, selectableLocale.getDisplayName(A_CmsUI.get().getLocale())); } m_rootLocaleSelector.setItemIcon(mainLocale, MAIN_LOCALE_ICON); m_rootLocaleSelector.setValue(m_rootLocale); m_rootLocaleSelector.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @SuppressWarnings("synthetic-access") public void valueChange(ValueChangeEvent event) { if (!m_handlingLocaleChange) { m_handlingLocaleChange = true; try { Locale newLocale = (Locale)(event.getProperty().getValue()); switchToLocale(newLocale); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); CmsErrorDialog.showErrorDialog(e); } finally { m_handlingLocaleChange = false; } } } }); m_comparisonLocaleSelector = new ComboBox(); m_comparisonLocaleSelector.addStyleName("o-sitemap-localeselect"); m_comparisonLocaleSelector.setNullSelectionAllowed(false); List<Locale> comparisonLocales = getComparisonLocales(); Locale selectedComparisonLocale = null; for (Locale comparisonLocale : comparisonLocales) { m_comparisonLocaleSelector.addItem(comparisonLocale); m_comparisonLocaleSelector.setItemIcon(comparisonLocale, FontOpenCms.SPACE); m_comparisonLocaleSelector.setItemCaption( comparisonLocale, comparisonLocale.getDisplayName(A_CmsUI.get().getLocale())); if ((selectedComparisonLocale == null) && !comparisonLocale.equals(m_rootLocale)) { selectedComparisonLocale = comparisonLocale; } if ((initialComparisonLocale != null) && comparisonLocale.equals(initialComparisonLocale) && !comparisonLocale.equals(m_rootLocale)) { // if an initial comparison locale is given, it should have priority over the first comparison locale selectedComparisonLocale = comparisonLocale; } } m_comparisonLocale = selectedComparisonLocale; m_comparisonLocaleSelector.setValue(selectedComparisonLocale); m_comparisonLocaleSelector.setItemIcon(mainLocale, MAIN_LOCALE_ICON); m_comparisonLocaleSelector.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @SuppressWarnings("synthetic-access") public void valueChange(ValueChangeEvent event) { if (!m_handlingLocaleChange) { m_handlingLocaleChange = true; try { Locale locale = (Locale)(event.getProperty().getValue()); if (m_rootLocale.equals(locale)) { Locale oldComparisonLocale = m_comparisonLocale; if (getLocaleGroup().getResourcesByLocale().keySet().contains(oldComparisonLocale)) { m_comparisonLocale = locale; switchToLocale(oldComparisonLocale); updateLocaleWidgets(); } else { Notification.show( CmsVaadinUtils.getMessageText( Messages.GUI_LOCALECOMPARE_CANNOT_SWITCH_COMPARISON_LOCALE_0)); m_comparisonLocaleSelector.setValue(oldComparisonLocale); } } else { m_comparisonLocale = locale; updateLocaleWidgets(); initTree(m_currentRoot); } } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); CmsErrorDialog.showErrorDialog(e); } finally { m_handlingLocaleChange = false; } } } }); CssLayout localeSelectors = new CssLayout(); localeSelectors.addStyleName(OpenCmsTheme.SITEMAP_LOCALE_BAR); m_rootLocaleSelector.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_LOCALECOMPARE_MAIN_LOCALE_0)); m_comparisonLocaleSelector.setCaption( CmsVaadinUtils.getMessageText(Messages.GUI_LOCALECOMPARE_COMPARISON_LOCALE_0)); localeSelectors.setWidth("100%"); localeSelectors.addComponent(m_rootLocaleSelector); localeSelectors.addComponent(m_comparisonLocaleSelector); // localeSelectors.setComponentAlignment(wrapper2, Alignment.MIDDLE_RIGHT); setSpacing(true); addComponent(localeSelectors); addComponent(m_treeContainer); m_treeContainer.setWidth("100%"); initTree(res); }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[id, initialComparisonLocale]] begin[{] call[.removeAllComponents, parameter[]] local_variable[type[CmsObject], cms] local_variable[type[CmsResource], res] assign[member[.m_currentRoot], member[.res]] local_variable[type[CmsSite], site] local_variable[type[Locale], rootLocale] assign[member[.m_rootLocale], member[.rootLocale]] local_variable[type[Locale], mainLocale] local_variable[type[List], secondaryLocales] local_variable[type[List], possibleLocaleSelections] assign[member[.m_rootLocaleSelector], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ComboBox, sub_type=None))] call[m_rootLocaleSelector.addStyleName, parameter[literal["o-sitemap-localeselect"]]] call[m_rootLocaleSelector.setNullSelectionAllowed, parameter[literal[false]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selectableLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addItem, postfix_operators=[], prefix_operators=[], qualifier=m_rootLocaleSelector, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selectableLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SPACE, postfix_operators=[], prefix_operators=[], qualifier=FontOpenCms, selectors=[])], member=setItemIcon, postfix_operators=[], prefix_operators=[], qualifier=m_rootLocaleSelector, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selectableLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=A_CmsUI, selectors=[MethodInvocation(arguments=[], member=getLocale, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getDisplayName, postfix_operators=[], prefix_operators=[], qualifier=selectableLocale, selectors=[], type_arguments=None)], member=setItemCaption, postfix_operators=[], prefix_operators=[], qualifier=m_rootLocaleSelector, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=possibleLocaleSelections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=selectableLocale)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None))), label=None) call[m_rootLocaleSelector.setItemIcon, parameter[member[.mainLocale], member[.MAIN_LOCALE_ICON]]] call[m_rootLocaleSelector.setValue, parameter[member[.m_rootLocale]]] call[m_rootLocaleSelector.addValueChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="synthetic-access"), name=SuppressWarnings)], body=[IfStatement(condition=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None)), name=newLocale)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=switchToLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=showErrorDialog, postfix_operators=[], prefix_operators=[], qualifier=CmsErrorDialog, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, resources=None)]))], documentation=None, modifiers={'public'}, name=valueChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ValueChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValueChangeListener, sub_type=None))]] assign[member[.m_comparisonLocaleSelector], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ComboBox, sub_type=None))] call[m_comparisonLocaleSelector.addStyleName, parameter[literal["o-sitemap-localeselect"]]] call[m_comparisonLocaleSelector.setNullSelectionAllowed, parameter[literal[false]]] local_variable[type[List], comparisonLocales] local_variable[type[Locale], selectedComparisonLocale] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addItem, postfix_operators=[], prefix_operators=[], qualifier=m_comparisonLocaleSelector, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SPACE, postfix_operators=[], prefix_operators=[], qualifier=FontOpenCms, selectors=[])], member=setItemIcon, postfix_operators=[], prefix_operators=[], qualifier=m_comparisonLocaleSelector, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=A_CmsUI, selectors=[MethodInvocation(arguments=[], member=getLocale, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getDisplayName, postfix_operators=[], prefix_operators=[], qualifier=comparisonLocale, selectors=[], type_arguments=None)], member=setItemCaption, postfix_operators=[], prefix_operators=[], qualifier=m_comparisonLocaleSelector, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=selectedComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=m_rootLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=comparisonLocale, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=selectedComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=initialComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=initialComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=comparisonLocale, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=m_rootLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=comparisonLocale, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=selectedComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=comparisonLocales, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=comparisonLocale)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None))), label=None) assign[member[.m_comparisonLocale], member[.selectedComparisonLocale]] call[m_comparisonLocaleSelector.setValue, parameter[member[.selectedComparisonLocale]]] call[m_comparisonLocaleSelector.setItemIcon, parameter[member[.mainLocale], member[.MAIN_LOCALE_ICON]]] call[m_comparisonLocaleSelector.addValueChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="synthetic-access"), name=SuppressWarnings)], body=[IfStatement(condition=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None)), name=locale)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=m_rootLocale, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=updateLocaleWidgets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_currentRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initTree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=m_comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=oldComparisonLocale)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getLocaleGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getResourcesByLocale, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=keySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=oldComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=GUI_LOCALECOMPARE_CANNOT_SWITCH_COMPARISON_LOCALE_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=getMessageText, postfix_operators=[], prefix_operators=[], qualifier=CmsVaadinUtils, selectors=[], type_arguments=None)], member=show, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=m_comparisonLocaleSelector, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_comparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=switchToLocale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=updateLocaleWidgets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=showErrorDialog, postfix_operators=[], prefix_operators=[], qualifier=CmsErrorDialog, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_handlingLocaleChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, resources=None)]))], documentation=None, modifiers={'public'}, name=valueChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ValueChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValueChangeListener, sub_type=None))]] local_variable[type[CssLayout], localeSelectors] call[localeSelectors.addStyleName, parameter[member[OpenCmsTheme.SITEMAP_LOCALE_BAR]]] call[m_rootLocaleSelector.setCaption, parameter[call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_LOCALECOMPARE_MAIN_LOCALE_0]]]]] call[m_comparisonLocaleSelector.setCaption, parameter[call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_LOCALECOMPARE_COMPARISON_LOCALE_0]]]]] call[localeSelectors.setWidth, parameter[literal["100%"]]] call[localeSelectors.addComponent, parameter[member[.m_rootLocaleSelector]]] call[localeSelectors.addComponent, parameter[member[.m_comparisonLocaleSelector]]] call[.setSpacing, parameter[literal[true]]] call[.addComponent, parameter[member[.localeSelectors]]] call[.addComponent, parameter[member[.m_treeContainer]]] call[m_treeContainer.setWidth, parameter[literal["100%"]]] call[.initTree, parameter[member[.res]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[CmsUUID] identifier[id] , identifier[Locale] identifier[initialComparisonLocale] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[removeAllComponents] operator[SEP] operator[SEP] operator[SEP] identifier[CmsObject] identifier[cms] operator[=] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] operator[SEP] identifier[CmsResource] identifier[res] operator[=] identifier[cms] operator[SEP] identifier[readResource] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[m_currentRoot] operator[=] identifier[res] operator[SEP] identifier[CmsSite] identifier[site] operator[=] identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteForRootPath] operator[SEP] identifier[res] operator[SEP] identifier[getRootPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Locale] identifier[rootLocale] operator[=] identifier[OpenCms] operator[SEP] identifier[getLocaleManager] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultLocale] operator[SEP] identifier[cms] , identifier[res] operator[SEP] operator[SEP] identifier[m_rootLocale] operator[=] identifier[rootLocale] operator[SEP] identifier[Locale] identifier[mainLocale] operator[=] identifier[site] operator[SEP] identifier[getMainTranslationLocale] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Locale] operator[>] identifier[secondaryLocales] operator[=] identifier[site] operator[SEP] identifier[getSecondaryTranslationLocales] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Locale] operator[>] identifier[possibleLocaleSelections] operator[=] identifier[getMainLocaleSelectOptions] operator[SEP] identifier[cms] , identifier[res] , identifier[mainLocale] , identifier[secondaryLocales] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[=] Keyword[new] identifier[ComboBox] operator[SEP] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[addStyleName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[setNullSelectionAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Locale] identifier[selectableLocale] operator[:] identifier[possibleLocaleSelections] operator[SEP] { identifier[m_rootLocaleSelector] operator[SEP] identifier[addItem] operator[SEP] identifier[selectableLocale] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[setItemIcon] operator[SEP] identifier[selectableLocale] , identifier[FontOpenCms] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[setItemCaption] operator[SEP] identifier[selectableLocale] , identifier[selectableLocale] operator[SEP] identifier[getDisplayName] operator[SEP] identifier[A_CmsUI] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[m_rootLocaleSelector] operator[SEP] identifier[setItemIcon] operator[SEP] identifier[mainLocale] , identifier[MAIN_LOCALE_ICON] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[setValue] operator[SEP] identifier[m_rootLocale] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ValueChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[valueChange] operator[SEP] identifier[ValueChangeEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[m_handlingLocaleChange] operator[SEP] { identifier[m_handlingLocaleChange] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[Locale] identifier[newLocale] operator[=] operator[SEP] identifier[Locale] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[switchToLocale] operator[SEP] identifier[newLocale] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[CmsErrorDialog] operator[SEP] identifier[showErrorDialog] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[m_handlingLocaleChange] operator[=] literal[boolean] operator[SEP] } } } } operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[=] Keyword[new] identifier[ComboBox] operator[SEP] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[addStyleName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setNullSelectionAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Locale] operator[>] identifier[comparisonLocales] operator[=] identifier[getComparisonLocales] operator[SEP] operator[SEP] operator[SEP] identifier[Locale] identifier[selectedComparisonLocale] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Locale] identifier[comparisonLocale] operator[:] identifier[comparisonLocales] operator[SEP] { identifier[m_comparisonLocaleSelector] operator[SEP] identifier[addItem] operator[SEP] identifier[comparisonLocale] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setItemIcon] operator[SEP] identifier[comparisonLocale] , identifier[FontOpenCms] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setItemCaption] operator[SEP] identifier[comparisonLocale] , identifier[comparisonLocale] operator[SEP] identifier[getDisplayName] operator[SEP] identifier[A_CmsUI] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[selectedComparisonLocale] operator[==] Other[null] operator[SEP] operator[&&] operator[!] identifier[comparisonLocale] operator[SEP] identifier[equals] operator[SEP] identifier[m_rootLocale] operator[SEP] operator[SEP] { identifier[selectedComparisonLocale] operator[=] identifier[comparisonLocale] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[initialComparisonLocale] operator[!=] Other[null] operator[SEP] operator[&&] identifier[comparisonLocale] operator[SEP] identifier[equals] operator[SEP] identifier[initialComparisonLocale] operator[SEP] operator[&&] operator[!] identifier[comparisonLocale] operator[SEP] identifier[equals] operator[SEP] identifier[m_rootLocale] operator[SEP] operator[SEP] { identifier[selectedComparisonLocale] operator[=] identifier[comparisonLocale] operator[SEP] } } identifier[m_comparisonLocale] operator[=] identifier[selectedComparisonLocale] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setValue] operator[SEP] identifier[selectedComparisonLocale] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setItemIcon] operator[SEP] identifier[mainLocale] , identifier[MAIN_LOCALE_ICON] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ValueChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[valueChange] operator[SEP] identifier[ValueChangeEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[m_handlingLocaleChange] operator[SEP] { identifier[m_handlingLocaleChange] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[Locale] identifier[locale] operator[=] operator[SEP] identifier[Locale] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_rootLocale] operator[SEP] identifier[equals] operator[SEP] identifier[locale] operator[SEP] operator[SEP] { identifier[Locale] identifier[oldComparisonLocale] operator[=] identifier[m_comparisonLocale] operator[SEP] Keyword[if] operator[SEP] identifier[getLocaleGroup] operator[SEP] operator[SEP] operator[SEP] identifier[getResourcesByLocale] operator[SEP] operator[SEP] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[oldComparisonLocale] operator[SEP] operator[SEP] { identifier[m_comparisonLocale] operator[=] identifier[locale] operator[SEP] identifier[switchToLocale] operator[SEP] identifier[oldComparisonLocale] operator[SEP] operator[SEP] identifier[updateLocaleWidgets] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Notification] operator[SEP] identifier[show] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_LOCALECOMPARE_CANNOT_SWITCH_COMPARISON_LOCALE_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setValue] operator[SEP] identifier[oldComparisonLocale] operator[SEP] operator[SEP] } } Keyword[else] { identifier[m_comparisonLocale] operator[=] identifier[locale] operator[SEP] identifier[updateLocaleWidgets] operator[SEP] operator[SEP] operator[SEP] identifier[initTree] operator[SEP] identifier[m_currentRoot] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[CmsErrorDialog] operator[SEP] identifier[showErrorDialog] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[m_handlingLocaleChange] operator[=] literal[boolean] operator[SEP] } } } } operator[SEP] operator[SEP] identifier[CssLayout] identifier[localeSelectors] operator[=] Keyword[new] identifier[CssLayout] operator[SEP] operator[SEP] operator[SEP] identifier[localeSelectors] operator[SEP] identifier[addStyleName] operator[SEP] identifier[OpenCmsTheme] operator[SEP] identifier[SITEMAP_LOCALE_BAR] operator[SEP] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] identifier[setCaption] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_LOCALECOMPARE_MAIN_LOCALE_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] identifier[setCaption] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_LOCALECOMPARE_COMPARISON_LOCALE_0] operator[SEP] operator[SEP] operator[SEP] identifier[localeSelectors] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[localeSelectors] operator[SEP] identifier[addComponent] operator[SEP] identifier[m_rootLocaleSelector] operator[SEP] operator[SEP] identifier[localeSelectors] operator[SEP] identifier[addComponent] operator[SEP] identifier[m_comparisonLocaleSelector] operator[SEP] operator[SEP] identifier[setSpacing] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[localeSelectors] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[m_treeContainer] operator[SEP] operator[SEP] identifier[m_treeContainer] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[initTree] operator[SEP] identifier[res] operator[SEP] operator[SEP] }
private static State getSameParent ( final State parent, final MetaKey key ) { State current = parent; while ( current != null ) { if ( current.key.equals ( key ) ) { return current; } current = current.parent; } return null; }
class class_name[name] begin[{] method[getSameParent, return_type[type[State]], modifier[private static], parameter[parent, key]] begin[{] local_variable[type[State], current] while[binary_operation[member[.current], !=, literal[null]]] begin[{] if[call[current.key.equals, parameter[member[.key]]]] begin[{] return[member[.current]] else begin[{] None end[}] assign[member[.current], member[current.parent]] end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[State] identifier[getSameParent] operator[SEP] Keyword[final] identifier[State] identifier[parent] , Keyword[final] identifier[MetaKey] identifier[key] operator[SEP] { identifier[State] identifier[current] operator[=] identifier[parent] operator[SEP] Keyword[while] operator[SEP] identifier[current] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[return] identifier[current] operator[SEP] } identifier[current] operator[=] identifier[current] operator[SEP] identifier[parent] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public DependencyTree parse2T(String sent){ if(pos==null||seg==null||parser==null||sent==null) return null; String[][] wc = tag(sent); if(wc==null) return null; return parse2T(wc[0], wc[1]); }
class class_name[name] begin[{] method[parse2T, return_type[type[DependencyTree]], modifier[public], parameter[sent]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.pos], ==, literal[null]], ||, binary_operation[member[.seg], ==, literal[null]]], ||, binary_operation[member[.parser], ==, literal[null]]], ||, binary_operation[member[.sent], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], wc] if[binary_operation[member[.wc], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[.parse2T, parameter[member[.wc], member[.wc]]]] end[}] END[}]
Keyword[public] identifier[DependencyTree] identifier[parse2T] operator[SEP] identifier[String] identifier[sent] operator[SEP] { Keyword[if] operator[SEP] identifier[pos] operator[==] Other[null] operator[||] identifier[seg] operator[==] Other[null] operator[||] identifier[parser] operator[==] Other[null] operator[||] identifier[sent] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[wc] operator[=] identifier[tag] operator[SEP] identifier[sent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[wc] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[parse2T] operator[SEP] identifier[wc] operator[SEP] Other[0] operator[SEP] , identifier[wc] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] }
public WrappedByteBuffer putString(String v, Charset cs) { java.nio.ByteBuffer strBuf = cs.encode(v); _autoExpand(strBuf.limit()); _buf.put(strBuf); return this; }
class class_name[name] begin[{] method[putString, return_type[type[WrappedByteBuffer]], modifier[public], parameter[v, cs]] begin[{] local_variable[type[java], strBuf] call[._autoExpand, parameter[call[strBuf.limit, parameter[]]]] call[_buf.put, parameter[member[.strBuf]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WrappedByteBuffer] identifier[putString] operator[SEP] identifier[String] identifier[v] , identifier[Charset] identifier[cs] operator[SEP] { identifier[java] operator[SEP] identifier[nio] operator[SEP] identifier[ByteBuffer] identifier[strBuf] operator[=] identifier[cs] operator[SEP] identifier[encode] operator[SEP] identifier[v] operator[SEP] operator[SEP] identifier[_autoExpand] operator[SEP] identifier[strBuf] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[_buf] operator[SEP] identifier[put] operator[SEP] identifier[strBuf] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
Path getRootDirectory() { Path rawRoot = config().get("baratine.root", Path.class, Paths.get("/tmp/baratine")); return rawRoot; }
class class_name[name] begin[{] method[getRootDirectory, return_type[type[Path]], modifier[default], parameter[]] begin[{] local_variable[type[Path], rawRoot] return[member[.rawRoot]] end[}] END[}]
identifier[Path] identifier[getRootDirectory] operator[SEP] operator[SEP] { identifier[Path] identifier[rawRoot] operator[=] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] , identifier[Path] operator[SEP] Keyword[class] , identifier[Paths] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[rawRoot] operator[SEP] }
@Nonnull public static Homoglyph build (@Nonnull @WillClose final Reader aReader) throws IOException { ValueEnforcer.notNull (aReader, "reader"); try (final NonBlockingBufferedReader aBR = new NonBlockingBufferedReader (aReader)) { final ICommonsList <IntSet> aList = new CommonsArrayList <> (); String sLine; while ((sLine = aBR.readLine ()) != null) { sLine = sLine.trim (); if (sLine.startsWith ("#") || sLine.length () == 0) continue; final IntSet aSet = new IntSet (sLine.length () / 3); for (final String sCharCode : StringHelper.getExploded (',', sLine)) { final int nVal = StringParser.parseInt (sCharCode, 16, -1); if (nVal >= 0) aSet.add (nVal); } aList.add (aSet); } return new Homoglyph (aList); } }
class class_name[name] begin[{] method[build, return_type[type[Homoglyph]], modifier[public static], parameter[aReader]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aReader], literal["reader"]]] 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=[], dimensions=None, name=CommonsArrayList, sub_type=None)), name=aList)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IntSet, sub_type=None))], dimensions=[], name=ICommonsList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=sLine)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=sLine, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=sLine, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=sLine, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=||), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=sLine, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=/)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IntSet, sub_type=None)), name=aSet)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IntSet, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=sCharCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=StringParser, selectors=[], type_arguments=None), name=nVal)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=aSet, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), MemberReference(member=sLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExploded, postfix_operators=[], prefix_operators=[], qualifier=StringHelper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sCharCode)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=aList, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=sLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=aBR, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=aList, 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=Homoglyph, sub_type=None)), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers={'final'}, name=aBR, type=ReferenceType(arguments=None, dimensions=[], name=NonBlockingBufferedReader, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=aReader, 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=NonBlockingBufferedReader, sub_type=None)))]) end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[Homoglyph] identifier[build] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[WillClose] Keyword[final] identifier[Reader] identifier[aReader] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aReader] , literal[String] operator[SEP] operator[SEP] Keyword[try] operator[SEP] Keyword[final] identifier[NonBlockingBufferedReader] identifier[aBR] operator[=] Keyword[new] identifier[NonBlockingBufferedReader] operator[SEP] identifier[aReader] operator[SEP] operator[SEP] { Keyword[final] identifier[ICommonsList] operator[<] identifier[IntSet] operator[>] identifier[aList] operator[=] Keyword[new] identifier[CommonsArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[sLine] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[sLine] operator[=] identifier[aBR] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[sLine] operator[=] identifier[sLine] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sLine] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[sLine] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[continue] operator[SEP] Keyword[final] identifier[IntSet] identifier[aSet] operator[=] Keyword[new] identifier[IntSet] operator[SEP] identifier[sLine] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[/] Other[3] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[sCharCode] operator[:] identifier[StringHelper] operator[SEP] identifier[getExploded] operator[SEP] literal[String] , identifier[sLine] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[nVal] operator[=] identifier[StringParser] operator[SEP] identifier[parseInt] operator[SEP] identifier[sCharCode] , Other[16] , operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nVal] operator[>=] Other[0] operator[SEP] identifier[aSet] operator[SEP] identifier[add] operator[SEP] identifier[nVal] operator[SEP] operator[SEP] } identifier[aList] operator[SEP] identifier[add] operator[SEP] identifier[aSet] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Homoglyph] operator[SEP] identifier[aList] operator[SEP] operator[SEP] } }
public static PacProxySelector buildPacSelectorForUrl(String url) { PacProxySelector result = null; PacScriptSource pacSource = new UrlPacScriptSource(url); if (pacSource.isScriptValid()) { result = new PacProxySelector(pacSource); } return result; }
class class_name[name] begin[{] method[buildPacSelectorForUrl, return_type[type[PacProxySelector]], modifier[public static], parameter[url]] begin[{] local_variable[type[PacProxySelector], result] local_variable[type[PacScriptSource], pacSource] if[call[pacSource.isScriptValid, parameter[]]] begin[{] assign[member[.result], ClassCreator(arguments=[MemberReference(member=pacSource, 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=PacProxySelector, sub_type=None))] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PacProxySelector] identifier[buildPacSelectorForUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[PacProxySelector] identifier[result] operator[=] Other[null] operator[SEP] identifier[PacScriptSource] identifier[pacSource] operator[=] Keyword[new] identifier[UrlPacScriptSource] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pacSource] operator[SEP] identifier[isScriptValid] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] Keyword[new] identifier[PacProxySelector] operator[SEP] identifier[pacSource] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Override public String[] getObjectHistory(Context context, String PID) throws ServerException { PID = Server.getPID(PID).toString(); m_authorizationModule.enforceGetObjectHistory(context, PID); DOReader reader = m_manager.getReader(Server.USE_DEFINITIVE_STORE, context, PID); return reader.getObjectHistory(PID); }
class class_name[name] begin[{] method[getObjectHistory, return_type[type[String]], modifier[public], parameter[context, PID]] begin[{] assign[member[.PID], call[Server.getPID, parameter[member[.PID]]]] call[m_authorizationModule.enforceGetObjectHistory, parameter[member[.context], member[.PID]]] local_variable[type[DOReader], reader] return[call[reader.getObjectHistory, parameter[member[.PID]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getObjectHistory] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[PID] operator[SEP] Keyword[throws] identifier[ServerException] { identifier[PID] operator[=] identifier[Server] operator[SEP] identifier[getPID] operator[SEP] identifier[PID] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[m_authorizationModule] operator[SEP] identifier[enforceGetObjectHistory] operator[SEP] identifier[context] , identifier[PID] operator[SEP] operator[SEP] identifier[DOReader] identifier[reader] operator[=] identifier[m_manager] operator[SEP] identifier[getReader] operator[SEP] identifier[Server] operator[SEP] identifier[USE_DEFINITIVE_STORE] , identifier[context] , identifier[PID] operator[SEP] operator[SEP] Keyword[return] identifier[reader] operator[SEP] identifier[getObjectHistory] operator[SEP] identifier[PID] operator[SEP] operator[SEP] }
public boolean isNew(TrackInfo trackInfo) { return isNew(trackInfo.name, trackInfo.artist, trackInfo.album, trackInfo.albumCover, trackInfo.albumCoverFormat, trackInfo.data, trackInfo.year, trackInfo.genre, trackInfo.bmp, trackInfo.duration); }
class class_name[name] begin[{] method[isNew, return_type[type[boolean]], modifier[public], parameter[trackInfo]] begin[{] return[call[.isNew, parameter[member[trackInfo.name], member[trackInfo.artist], member[trackInfo.album], member[trackInfo.albumCover], member[trackInfo.albumCoverFormat], member[trackInfo.data], member[trackInfo.year], member[trackInfo.genre], member[trackInfo.bmp], member[trackInfo.duration]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isNew] operator[SEP] identifier[TrackInfo] identifier[trackInfo] operator[SEP] { Keyword[return] identifier[isNew] operator[SEP] identifier[trackInfo] operator[SEP] identifier[name] , identifier[trackInfo] operator[SEP] identifier[artist] , identifier[trackInfo] operator[SEP] identifier[album] , identifier[trackInfo] operator[SEP] identifier[albumCover] , identifier[trackInfo] operator[SEP] identifier[albumCoverFormat] , identifier[trackInfo] operator[SEP] identifier[data] , identifier[trackInfo] operator[SEP] identifier[year] , identifier[trackInfo] operator[SEP] identifier[genre] , identifier[trackInfo] operator[SEP] identifier[bmp] , identifier[trackInfo] operator[SEP] identifier[duration] operator[SEP] operator[SEP] }
protected TimeZone guessTimeZone() { // TODO fix using real data // for single-zone countries, pick that zone // for others, pick the most populous zone // for now, just use fixed value // NOTE: in a few cases can do better by looking at language. // Eg haw+US should go to Pacific/Honolulu // fr+CA should go to America/Montreal String timezoneString = territory_tzid_hack_map.get(getTerritory()); if (timezoneString == null) { String[] attempt = TimeZone.getAvailableIDs(getTerritory()); if (attempt.length == 0) { timezoneString = "Etc/GMT"; // gotta do something } else { int i; // this all needs to be fixed to use real data. But for now, do slightly better by skipping cruft for (i = 0; i < attempt.length; ++i) { if (attempt[i].indexOf("/") >= 0) break; } if (i > attempt.length) i = 0; timezoneString = attempt[i]; } } return TimeZone.getTimeZone(timezoneString); }
class class_name[name] begin[{] method[guessTimeZone, return_type[type[TimeZone]], modifier[protected], parameter[]] begin[{] local_variable[type[String], timezoneString] if[binary_operation[member[.timezoneString], ==, literal[null]]] begin[{] local_variable[type[String], attempt] if[binary_operation[member[attempt.length], ==, literal[0]]] begin[{] assign[member[.timezoneString], literal["Etc/GMT"]] else begin[{] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attempt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=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=attempt, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.i], >, member[attempt.length]]] begin[{] assign[member[.i], literal[0]] else begin[{] None end[}] assign[member[.timezoneString], member[.attempt]] end[}] else begin[{] None end[}] return[call[TimeZone.getTimeZone, parameter[member[.timezoneString]]]] end[}] END[}]
Keyword[protected] identifier[TimeZone] identifier[guessTimeZone] operator[SEP] operator[SEP] { identifier[String] identifier[timezoneString] operator[=] identifier[territory_tzid_hack_map] operator[SEP] identifier[get] operator[SEP] identifier[getTerritory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[timezoneString] operator[==] Other[null] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[attempt] operator[=] identifier[TimeZone] operator[SEP] identifier[getAvailableIDs] operator[SEP] identifier[getTerritory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attempt] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[timezoneString] operator[=] literal[String] operator[SEP] } Keyword[else] { Keyword[int] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[attempt] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[attempt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[>] identifier[attempt] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[timezoneString] operator[=] identifier[attempt] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] identifier[TimeZone] operator[SEP] identifier[getTimeZone] operator[SEP] identifier[timezoneString] operator[SEP] operator[SEP] }
@Override public RecordReader<LongWritable,VariantContextWritable> createRecordReader(InputSplit split, TaskAttemptContext ctx) throws InterruptedException, IOException { final Path path; if (split instanceof FileSplit) path = ((FileSplit)split).getPath(); else if (split instanceof FileVirtualSplit) path = ((FileVirtualSplit)split).getPath(); else throw new IllegalArgumentException( "split '"+split+"' has unknown type: cannot extract path"); if (this.conf == null) this.conf = ctx.getConfiguration(); final VCFFormat fmt = getFormat(path); if (fmt == null) throw new IllegalArgumentException( "unknown VCF format, cannot create RecordReader: "+path); final RecordReader<LongWritable, VariantContextWritable> rr; switch (fmt) { case VCF: rr = new VCFRecordReader(); break; case BCF: rr = new BCFRecordReader(); break; default: assert false; return null; } rr.initialize(split, ctx); return rr; }
class class_name[name] begin[{] method[createRecordReader, return_type[type[RecordReader]], modifier[public], parameter[split, ctx]] begin[{] local_variable[type[Path], path] if[binary_operation[member[.split], instanceof, type[FileSplit]]] begin[{] assign[member[.path], Cast(expression=MemberReference(member=split, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FileSplit, sub_type=None))] else begin[{] if[binary_operation[member[.split], instanceof, type[FileVirtualSplit]]] begin[{] assign[member[.path], Cast(expression=MemberReference(member=split, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FileVirtualSplit, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="split '"), operandr=MemberReference(member=split, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' has unknown type: cannot extract path"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] if[binary_operation[THIS[member[None.conf]], ==, literal[null]]] begin[{] assign[THIS[member[None.conf]], call[ctx.getConfiguration, parameter[]]] else begin[{] None end[}] local_variable[type[VCFFormat], fmt] if[binary_operation[member[.fmt], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown VCF format, cannot create RecordReader: "), operandr=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[RecordReader], rr] SwitchStatement(cases=[SwitchStatementCase(case=['VCF'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=VCFRecordReader, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BCF'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BCFRecordReader, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[AssertStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None, value=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])], expression=MemberReference(member=fmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) call[rr.initialize, parameter[member[.split], member[.ctx]]] return[member[.rr]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RecordReader] operator[<] identifier[LongWritable] , identifier[VariantContextWritable] operator[>] identifier[createRecordReader] operator[SEP] identifier[InputSplit] identifier[split] , identifier[TaskAttemptContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[IOException] { Keyword[final] identifier[Path] identifier[path] operator[SEP] Keyword[if] operator[SEP] identifier[split] Keyword[instanceof] identifier[FileSplit] operator[SEP] identifier[path] operator[=] operator[SEP] operator[SEP] identifier[FileSplit] operator[SEP] identifier[split] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[split] Keyword[instanceof] identifier[FileVirtualSplit] operator[SEP] identifier[path] operator[=] operator[SEP] operator[SEP] identifier[FileVirtualSplit] operator[SEP] identifier[split] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[split] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[conf] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[conf] operator[=] identifier[ctx] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[VCFFormat] identifier[fmt] operator[=] identifier[getFormat] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fmt] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[path] operator[SEP] operator[SEP] Keyword[final] identifier[RecordReader] operator[<] identifier[LongWritable] , identifier[VariantContextWritable] operator[>] identifier[rr] operator[SEP] Keyword[switch] operator[SEP] identifier[fmt] operator[SEP] { Keyword[case] identifier[VCF] operator[:] identifier[rr] operator[=] Keyword[new] identifier[VCFRecordReader] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BCF] operator[:] identifier[rr] operator[=] Keyword[new] identifier[BCFRecordReader] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[assert] literal[boolean] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[rr] operator[SEP] identifier[initialize] operator[SEP] identifier[split] , identifier[ctx] operator[SEP] operator[SEP] Keyword[return] identifier[rr] operator[SEP] }
public void setButtonMode (int mode) { if (this.mode == mode) { return; } if (this.mode == BreakpointsParam.BUTTON_MODE_SIMPLE) { if (isBreakAll) { setBreakAll(false); setBreakRequest(true); setBreakResponse(true); } } else if (isBreakRequest || isBreakResponse) { setBreakRequest(false); setBreakResponse(false); setBreakAll(true); } this.mode = mode; }
class class_name[name] begin[{] method[setButtonMode, return_type[void], modifier[public], parameter[mode]] begin[{] if[binary_operation[THIS[member[None.mode]], ==, member[.mode]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[THIS[member[None.mode]], ==, member[BreakpointsParam.BUTTON_MODE_SIMPLE]]] begin[{] if[member[.isBreakAll]] begin[{] call[.setBreakAll, parameter[literal[false]]] call[.setBreakRequest, parameter[literal[true]]] call[.setBreakResponse, parameter[literal[true]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[.isBreakRequest], ||, member[.isBreakResponse]]] begin[{] call[.setBreakRequest, parameter[literal[false]]] call[.setBreakResponse, parameter[literal[false]]] call[.setBreakAll, parameter[literal[true]]] else begin[{] None end[}] end[}] assign[THIS[member[None.mode]], member[.mode]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setButtonMode] operator[SEP] Keyword[int] identifier[mode] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[mode] operator[==] identifier[mode] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[mode] operator[==] identifier[BreakpointsParam] operator[SEP] identifier[BUTTON_MODE_SIMPLE] operator[SEP] { Keyword[if] operator[SEP] identifier[isBreakAll] operator[SEP] { identifier[setBreakAll] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setBreakRequest] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setBreakResponse] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[isBreakRequest] operator[||] identifier[isBreakResponse] operator[SEP] { identifier[setBreakRequest] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setBreakResponse] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setBreakAll] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[mode] operator[=] identifier[mode] operator[SEP] }
public void marshall(DescribeAggregateComplianceByConfigRulesRequest describeAggregateComplianceByConfigRulesRequest, ProtocolMarshaller protocolMarshaller) { if (describeAggregateComplianceByConfigRulesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeAggregateComplianceByConfigRulesRequest.getConfigurationAggregatorName(), CONFIGURATIONAGGREGATORNAME_BINDING); protocolMarshaller.marshall(describeAggregateComplianceByConfigRulesRequest.getFilters(), FILTERS_BINDING); protocolMarshaller.marshall(describeAggregateComplianceByConfigRulesRequest.getLimit(), LIMIT_BINDING); protocolMarshaller.marshall(describeAggregateComplianceByConfigRulesRequest.getNextToken(), NEXTTOKEN_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[describeAggregateComplianceByConfigRulesRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeAggregateComplianceByConfigRulesRequest], ==, 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=getConfigurationAggregatorName, postfix_operators=[], prefix_operators=[], qualifier=describeAggregateComplianceByConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=CONFIGURATIONAGGREGATORNAME_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=getFilters, postfix_operators=[], prefix_operators=[], qualifier=describeAggregateComplianceByConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=FILTERS_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=getLimit, postfix_operators=[], prefix_operators=[], qualifier=describeAggregateComplianceByConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=LIMIT_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=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=describeAggregateComplianceByConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_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[DescribeAggregateComplianceByConfigRulesRequest] identifier[describeAggregateComplianceByConfigRulesRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeAggregateComplianceByConfigRulesRequest] 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[describeAggregateComplianceByConfigRulesRequest] operator[SEP] identifier[getConfigurationAggregatorName] operator[SEP] operator[SEP] , identifier[CONFIGURATIONAGGREGATORNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeAggregateComplianceByConfigRulesRequest] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] , identifier[FILTERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeAggregateComplianceByConfigRulesRequest] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] , identifier[LIMIT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeAggregateComplianceByConfigRulesRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void clear() { Mutator<K> mutator = HFactory.createMutator(this.keyspace, this.keySerializer, new BatchSizeHint(1, this.mutateInterval)); SliceCounterQuery<K, N> query = HFactory.createCounterSliceQuery(this.keyspace, this.keySerializer, this.nameSerializer). setColumnFamily(this.cf). setKey(this.rowKey); SliceCounterIterator<K, N> iterator = new SliceCounterIterator<K, N>(query, null, (N) null, false, this.count); while(iterator.hasNext()) { HCounterColumn<N> column = iterator.next(); mutator.incrementCounter(this.rowKey, this.cf, column.getName(), column.getValue() * -1); } mutator.execute(); }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Mutator], mutator] local_variable[type[SliceCounterQuery], query] local_variable[type[SliceCounterIterator], iterator] while[call[iterator.hasNext, parameter[]]] begin[{] local_variable[type[HCounterColumn], column] call[mutator.incrementCounter, parameter[THIS[member[None.rowKey]], THIS[member[None.cf]], call[column.getName, parameter[]], binary_operation[call[column.getValue, parameter[]], *, literal[1]]]] end[}] call[mutator.execute, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { identifier[Mutator] operator[<] identifier[K] operator[>] identifier[mutator] operator[=] identifier[HFactory] operator[SEP] identifier[createMutator] operator[SEP] Keyword[this] operator[SEP] identifier[keyspace] , Keyword[this] operator[SEP] identifier[keySerializer] , Keyword[new] identifier[BatchSizeHint] operator[SEP] Other[1] , Keyword[this] operator[SEP] identifier[mutateInterval] operator[SEP] operator[SEP] operator[SEP] identifier[SliceCounterQuery] operator[<] identifier[K] , identifier[N] operator[>] identifier[query] operator[=] identifier[HFactory] operator[SEP] identifier[createCounterSliceQuery] operator[SEP] Keyword[this] operator[SEP] identifier[keyspace] , Keyword[this] operator[SEP] identifier[keySerializer] , Keyword[this] operator[SEP] identifier[nameSerializer] operator[SEP] operator[SEP] identifier[setColumnFamily] operator[SEP] Keyword[this] operator[SEP] identifier[cf] operator[SEP] operator[SEP] identifier[setKey] operator[SEP] Keyword[this] operator[SEP] identifier[rowKey] operator[SEP] operator[SEP] identifier[SliceCounterIterator] operator[<] identifier[K] , identifier[N] operator[>] identifier[iterator] operator[=] Keyword[new] identifier[SliceCounterIterator] operator[<] identifier[K] , identifier[N] operator[>] operator[SEP] identifier[query] , Other[null] , operator[SEP] identifier[N] operator[SEP] Other[null] , literal[boolean] , Keyword[this] operator[SEP] identifier[count] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[HCounterColumn] operator[<] identifier[N] operator[>] identifier[column] operator[=] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[mutator] operator[SEP] identifier[incrementCounter] operator[SEP] Keyword[this] operator[SEP] identifier[rowKey] , Keyword[this] operator[SEP] identifier[cf] , identifier[column] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[column] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[*] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[mutator] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] }
public static List<CommerceOrder> findByBillingAddressId( long billingAddressId, int start, int end) { return getPersistence() .findByBillingAddressId(billingAddressId, start, end); }
class class_name[name] begin[{] method[findByBillingAddressId, return_type[type[List]], modifier[public static], parameter[billingAddressId, start, end]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceOrder] operator[>] identifier[findByBillingAddressId] operator[SEP] Keyword[long] identifier[billingAddressId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByBillingAddressId] operator[SEP] identifier[billingAddressId] , identifier[start] , identifier[end] operator[SEP] operator[SEP] }
public static ComplexNumber Add(ComplexNumber z1, ComplexNumber z2) { return new ComplexNumber(z1.real + z2.real, z1.imaginary + z2.imaginary); }
class class_name[name] begin[{] method[Add, return_type[type[ComplexNumber]], modifier[public static], parameter[z1, z2]] begin[{] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=z1, selectors=[]), operandr=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=z2, selectors=[]), operator=+), BinaryOperation(operandl=MemberReference(member=imaginary, postfix_operators=[], prefix_operators=[], qualifier=z1, selectors=[]), operandr=MemberReference(member=imaginary, postfix_operators=[], prefix_operators=[], qualifier=z2, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ComplexNumber, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ComplexNumber] identifier[Add] operator[SEP] identifier[ComplexNumber] identifier[z1] , identifier[ComplexNumber] identifier[z2] operator[SEP] { Keyword[return] Keyword[new] identifier[ComplexNumber] operator[SEP] identifier[z1] operator[SEP] identifier[real] operator[+] identifier[z2] operator[SEP] identifier[real] , identifier[z1] operator[SEP] identifier[imaginary] operator[+] identifier[z2] operator[SEP] identifier[imaginary] operator[SEP] operator[SEP] }
private double pVap( double T, double P ) { double A = 6.1121 * (1.0007 + 3.46E-6 * P); double b = 17.502; double c = 240.97; double e = A * exp(b * T / (c + T)); return e; }
class class_name[name] begin[{] method[pVap, return_type[type[double]], modifier[private], parameter[T, P]] begin[{] local_variable[type[double], A] local_variable[type[double], b] local_variable[type[double], c] local_variable[type[double], e] return[member[.e]] end[}] END[}]
Keyword[private] Keyword[double] identifier[pVap] operator[SEP] Keyword[double] identifier[T] , Keyword[double] identifier[P] operator[SEP] { Keyword[double] identifier[A] operator[=] literal[Float] operator[*] operator[SEP] literal[Float] operator[+] literal[Float] operator[*] identifier[P] operator[SEP] operator[SEP] Keyword[double] identifier[b] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[c] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[e] operator[=] identifier[A] operator[*] identifier[exp] operator[SEP] identifier[b] operator[*] identifier[T] operator[/] operator[SEP] identifier[c] operator[+] identifier[T] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[e] operator[SEP] }
@Override public void refreshAllIndexes() throws QueryException { List<Index> indexes = listIndexes(); IndexUpdater.updateAllIndexes(indexes, database, dbQueue); }
class class_name[name] begin[{] method[refreshAllIndexes, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[List], indexes] call[IndexUpdater.updateAllIndexes, parameter[member[.indexes], member[.database], member[.dbQueue]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[refreshAllIndexes] operator[SEP] operator[SEP] Keyword[throws] identifier[QueryException] { identifier[List] operator[<] identifier[Index] operator[>] identifier[indexes] operator[=] identifier[listIndexes] operator[SEP] operator[SEP] operator[SEP] identifier[IndexUpdater] operator[SEP] identifier[updateAllIndexes] operator[SEP] identifier[indexes] , identifier[database] , identifier[dbQueue] operator[SEP] operator[SEP] }
@Override public InternalResource[] list(InternalResource resource, final ResourceFilter filter) throws IOException { final List<Resource> resources = new ArrayList<Resource>(); String path = PathUtils.addTrailingSlash(resource.getPath()); if(doList(path, new ResourceFilter() { @Override public boolean accept(Resource resource) { boolean res = filter.accept(resource); if(res) resources.add(resource); return res; } })) { return resources.toArray(new InternalResource[resources.size()]); } else return null; }
class class_name[name] begin[{] method[list, return_type[type[InternalResource]], modifier[public], parameter[resource, filter]] begin[{] local_variable[type[List], resources] local_variable[type[String], path] if[call[.doList, parameter[member[.path], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), name=res)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=resource, type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceFilter, sub_type=None))]]] begin[{] return[call[resources.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InternalResource, sub_type=None))]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[InternalResource] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[InternalResource] identifier[resource] , Keyword[final] identifier[ResourceFilter] identifier[filter] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[List] operator[<] identifier[Resource] operator[>] identifier[resources] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Resource] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] identifier[PathUtils] operator[SEP] identifier[addTrailingSlash] operator[SEP] identifier[resource] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doList] operator[SEP] identifier[path] , Keyword[new] identifier[ResourceFilter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[Resource] identifier[resource] operator[SEP] { Keyword[boolean] identifier[res] operator[=] identifier[filter] operator[SEP] identifier[accept] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[res] operator[SEP] identifier[resources] operator[SEP] identifier[add] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[return] identifier[res] operator[SEP] } } operator[SEP] operator[SEP] { Keyword[return] identifier[resources] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[InternalResource] operator[SEP] identifier[resources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[return] Other[null] operator[SEP] }
protected long getPersistentData(int priority, Reliability reliability) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "getPersistentData", new Object[] { new Integer(priority), reliability }); long prefix = getSubset(reliability).getPersistentData(priority); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getPersistentData", new Long(prefix)); return prefix; }
class class_name[name] begin[{] method[getPersistentData, return_type[type[long]], modifier[protected], parameter[priority, reliability]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getPersistentData"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassCreator(arguments=[MemberReference(member=priority, 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=Integer, sub_type=None)), MemberReference(member=reliability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), 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[long], prefix] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getPersistentData"], ClassCreator(arguments=[MemberReference(member=prefix, 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=Long, sub_type=None))]] else begin[{] None end[}] return[member[.prefix]] end[}] END[}]
Keyword[protected] Keyword[long] identifier[getPersistentData] operator[SEP] Keyword[int] identifier[priority] , identifier[Reliability] identifier[reliability] operator[SEP] Keyword[throws] identifier[SIResourceException] { 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] { Keyword[new] identifier[Integer] operator[SEP] identifier[priority] operator[SEP] , identifier[reliability] } operator[SEP] operator[SEP] Keyword[long] identifier[prefix] operator[=] identifier[getSubset] operator[SEP] identifier[reliability] operator[SEP] operator[SEP] identifier[getPersistentData] operator[SEP] identifier[priority] 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] , Keyword[new] identifier[Long] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[prefix] operator[SEP] }
public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginUpdateTags, return_type[type[LocalNetworkGatewayInner]], modifier[public], parameter[resourceGroupName, localNetworkGatewayName, tags]] begin[{] return[call[.beginUpdateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.localNetworkGatewayName], member[.tags]]]] end[}] END[}]
Keyword[public] identifier[LocalNetworkGatewayInner] identifier[beginUpdateTags] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[localNetworkGatewayName] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { Keyword[return] identifier[beginUpdateTagsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[localNetworkGatewayName] , identifier[tags] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
private boolean checkGeometric(int u1, int u2, int[] mapping) { int v1 = mapping[u1]; int v2 = mapping[u2]; if (targetTypes[v1] != null && targetTypes[v1] != Type.Geometric) return false; if (targetTypes[v2] != null && targetTypes[v2] != Type.Geometric) return false; IDoubleBondStereochemistry queryElement = (IDoubleBondStereochemistry) queryElements[u1]; IBond qbond = queryElement.getStereoBond(); IBond tbond; int config = 0; // no configuration in target if (targetTypes[v1] == Type.Geometric && targetTypes[v2] == Type.Geometric) { IDoubleBondStereochemistry targetElement = (IDoubleBondStereochemistry) targetElements[v1]; tbond = targetElement.getStereoBond(); // although the atoms were mapped and 'v1' and 'v2' are bond in double-bond // elements they are not in the same element if (!targetElement.getStereoBond().contains(target.getAtom(v1)) || !targetElement.getStereoBond().contains(target.getAtom(v2))) return false; IBond[] qbonds = queryElement.getBonds(); IBond[] tbonds = targetElement.getBonds(); // bond is undirected so we need to ensure v1 is the first atom in the bond // we also need to to swap the substituents later if (!queryElement.getStereoBond().getBegin().equals(query.getAtom(u1))) swap(qbonds, 0, 1); if (!targetElement.getStereoBond().getBegin().equals(target.getAtom(v1))) swap(tbonds, 0, 1); if (getMappedBond(qbonds[0], mapping).equals(tbonds[0]) != getMappedBond(qbonds[1], mapping).equals(tbonds[1])) config = targetElement.getConfigOrder() ^ 0x3; // flipped else config = targetElement.getConfigOrder(); } else { tbond = target.getBond(target.getAtom(v1), target.getAtom(v2)); } Expr expr = ((QueryBond)qbond).getExpression(); return expr.matches(tbond, config); }
class class_name[name] begin[{] method[checkGeometric, return_type[type[boolean]], modifier[private], parameter[u1, u2, mapping]] begin[{] local_variable[type[int], v1] local_variable[type[int], v2] if[binary_operation[binary_operation[member[.targetTypes], !=, literal[null]], &&, binary_operation[member[.targetTypes], !=, member[Type.Geometric]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.targetTypes], !=, literal[null]], &&, binary_operation[member[.targetTypes], !=, member[Type.Geometric]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[IDoubleBondStereochemistry], queryElement] local_variable[type[IBond], qbond] local_variable[type[IBond], tbond] local_variable[type[int], config] if[binary_operation[binary_operation[member[.targetTypes], ==, member[Type.Geometric]], &&, binary_operation[member[.targetTypes], ==, member[Type.Geometric]]]] begin[{] local_variable[type[IDoubleBondStereochemistry], targetElement] assign[member[.tbond], call[targetElement.getStereoBond, parameter[]]] if[binary_operation[call[targetElement.getStereoBond, parameter[]], ||, call[targetElement.getStereoBond, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[IBond], qbonds] local_variable[type[IBond], tbonds] if[call[queryElement.getStereoBond, parameter[]]] begin[{] call[.swap, parameter[member[.qbonds], literal[0], literal[1]]] else begin[{] None end[}] if[call[targetElement.getStereoBond, parameter[]]] begin[{] call[.swap, parameter[member[.tbonds], literal[0], literal[1]]] else begin[{] None end[}] if[binary_operation[call[.getMappedBond, parameter[member[.qbonds], member[.mapping]]], !=, call[.getMappedBond, parameter[member[.qbonds], member[.mapping]]]]] begin[{] assign[member[.config], binary_operation[call[targetElement.getConfigOrder, parameter[]], ^, literal[0x3]]] else begin[{] assign[member[.config], call[targetElement.getConfigOrder, parameter[]]] end[}] else begin[{] assign[member[.tbond], call[target.getBond, parameter[call[target.getAtom, parameter[member[.v1]]], call[target.getAtom, parameter[member[.v2]]]]]] end[}] local_variable[type[Expr], expr] return[call[expr.matches, parameter[member[.tbond], member[.config]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[checkGeometric] operator[SEP] Keyword[int] identifier[u1] , Keyword[int] identifier[u2] , Keyword[int] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] { Keyword[int] identifier[v1] operator[=] identifier[mapping] operator[SEP] identifier[u1] operator[SEP] operator[SEP] Keyword[int] identifier[v2] operator[=] identifier[mapping] operator[SEP] identifier[u2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[targetTypes] operator[SEP] identifier[v1] operator[SEP] operator[!=] Other[null] operator[&&] identifier[targetTypes] operator[SEP] identifier[v1] operator[SEP] operator[!=] identifier[Type] operator[SEP] identifier[Geometric] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[targetTypes] operator[SEP] identifier[v2] operator[SEP] operator[!=] Other[null] operator[&&] identifier[targetTypes] operator[SEP] identifier[v2] operator[SEP] operator[!=] identifier[Type] operator[SEP] identifier[Geometric] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[IDoubleBondStereochemistry] identifier[queryElement] operator[=] operator[SEP] identifier[IDoubleBondStereochemistry] operator[SEP] identifier[queryElements] operator[SEP] identifier[u1] operator[SEP] operator[SEP] identifier[IBond] identifier[qbond] operator[=] identifier[queryElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] identifier[IBond] identifier[tbond] operator[SEP] Keyword[int] identifier[config] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[targetTypes] operator[SEP] identifier[v1] operator[SEP] operator[==] identifier[Type] operator[SEP] identifier[Geometric] operator[&&] identifier[targetTypes] operator[SEP] identifier[v2] operator[SEP] operator[==] identifier[Type] operator[SEP] identifier[Geometric] operator[SEP] { identifier[IDoubleBondStereochemistry] identifier[targetElement] operator[=] operator[SEP] identifier[IDoubleBondStereochemistry] operator[SEP] identifier[targetElements] operator[SEP] identifier[v1] operator[SEP] operator[SEP] identifier[tbond] operator[=] identifier[targetElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[targetElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[target] operator[SEP] identifier[getAtom] operator[SEP] identifier[v1] operator[SEP] operator[SEP] operator[||] operator[!] identifier[targetElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[target] operator[SEP] identifier[getAtom] operator[SEP] identifier[v2] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[IBond] operator[SEP] operator[SEP] identifier[qbonds] operator[=] identifier[queryElement] operator[SEP] identifier[getBonds] operator[SEP] operator[SEP] operator[SEP] identifier[IBond] operator[SEP] operator[SEP] identifier[tbonds] operator[=] identifier[targetElement] operator[SEP] identifier[getBonds] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[queryElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] identifier[getBegin] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[query] operator[SEP] identifier[getAtom] operator[SEP] identifier[u1] operator[SEP] operator[SEP] operator[SEP] identifier[swap] operator[SEP] identifier[qbonds] , Other[0] , Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[targetElement] operator[SEP] identifier[getStereoBond] operator[SEP] operator[SEP] operator[SEP] identifier[getBegin] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[target] operator[SEP] identifier[getAtom] operator[SEP] identifier[v1] operator[SEP] operator[SEP] operator[SEP] identifier[swap] operator[SEP] identifier[tbonds] , Other[0] , Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getMappedBond] operator[SEP] identifier[qbonds] operator[SEP] Other[0] operator[SEP] , identifier[mapping] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[tbonds] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[!=] identifier[getMappedBond] operator[SEP] identifier[qbonds] operator[SEP] Other[1] operator[SEP] , identifier[mapping] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[tbonds] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[=] identifier[targetElement] operator[SEP] identifier[getConfigOrder] operator[SEP] operator[SEP] operator[^] literal[Integer] operator[SEP] Keyword[else] identifier[config] operator[=] identifier[targetElement] operator[SEP] identifier[getConfigOrder] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[tbond] operator[=] identifier[target] operator[SEP] identifier[getBond] operator[SEP] identifier[target] operator[SEP] identifier[getAtom] operator[SEP] identifier[v1] operator[SEP] , identifier[target] operator[SEP] identifier[getAtom] operator[SEP] identifier[v2] operator[SEP] operator[SEP] operator[SEP] } identifier[Expr] identifier[expr] operator[=] operator[SEP] operator[SEP] identifier[QueryBond] operator[SEP] identifier[qbond] operator[SEP] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[expr] operator[SEP] identifier[matches] operator[SEP] identifier[tbond] , identifier[config] operator[SEP] operator[SEP] }
public GetContentModerationResult withModerationLabels(ContentModerationDetection... moderationLabels) { if (this.moderationLabels == null) { setModerationLabels(new java.util.ArrayList<ContentModerationDetection>(moderationLabels.length)); } for (ContentModerationDetection ele : moderationLabels) { this.moderationLabels.add(ele); } return this; }
class class_name[name] begin[{] method[withModerationLabels, return_type[type[GetContentModerationResult]], modifier[public], parameter[moderationLabels]] begin[{] if[binary_operation[THIS[member[None.moderationLabels]], ==, literal[null]]] begin[{] call[.setModerationLabels, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=moderationLabels, 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=ContentModerationDetection, 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=moderationLabels, 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=moderationLabels, 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=ContentModerationDetection, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[GetContentModerationResult] identifier[withModerationLabels] operator[SEP] identifier[ContentModerationDetection] operator[...] identifier[moderationLabels] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[moderationLabels] operator[==] Other[null] operator[SEP] { identifier[setModerationLabels] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ContentModerationDetection] operator[>] operator[SEP] identifier[moderationLabels] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ContentModerationDetection] identifier[ele] operator[:] identifier[moderationLabels] operator[SEP] { Keyword[this] operator[SEP] identifier[moderationLabels] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Override public LightweightTypeReference getExpectedReturnType(XExpression expression) { IResolvedTypes delegate = getDelegate(expression); return delegate.getExpectedReturnType(expression); }
class class_name[name] begin[{] method[getExpectedReturnType, return_type[type[LightweightTypeReference]], modifier[public], parameter[expression]] begin[{] local_variable[type[IResolvedTypes], delegate] return[call[delegate.getExpectedReturnType, parameter[member[.expression]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[LightweightTypeReference] identifier[getExpectedReturnType] operator[SEP] identifier[XExpression] identifier[expression] operator[SEP] { identifier[IResolvedTypes] identifier[delegate] operator[=] identifier[getDelegate] operator[SEP] identifier[expression] operator[SEP] operator[SEP] Keyword[return] identifier[delegate] operator[SEP] identifier[getExpectedReturnType] operator[SEP] identifier[expression] operator[SEP] operator[SEP] }
@Override public int doEndTag() throws JspException { try { BinaryResourcesHandler rsHandler = null; if ((rsHandler = (BinaryResourcesHandler) pageContext.getServletContext() .getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE)) == null) throw new IllegalStateException( "Binary ResourceBundlesHandler not present in servlet context. Initialization of Jawr either failed or never occurred."); JawrConfig jawrConfig = rsHandler.getConfig(); this.renderer = RendererFactory.getImgRenderer(jawrConfig, isPlainImage()); this.renderer.renderImage(getImgSrcToRender(), getAttributeMap(), pageContext.getOut()); } catch (IOException e) { throw new JspException(e); } finally { // Reset the Thread local for the Jawr context ThreadLocalJawrContext.reset(); } return (EVAL_PAGE); }
class class_name[name] begin[{] method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=rsHandler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BinaryResourcesHandler, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=rsHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getServletContext, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[MemberReference(member=BINARY_CONTEXT_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=JawrConstant, selectors=[])], member=getAttribute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=BinaryResourcesHandler, sub_type=None))), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Binary ResourceBundlesHandler not present in servlet context. Initialization of Jawr either failed or never occurred.")], 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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getConfig, postfix_operators=[], prefix_operators=[], qualifier=rsHandler, selectors=[], type_arguments=None), name=jawrConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JawrConfig, sub_type=None)), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=renderer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=jawrConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=isPlainImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getImgRenderer, postfix_operators=[], prefix_operators=[], qualifier=RendererFactory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=renderer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getImgSrcToRender, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAttributeMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[], type_arguments=None)], member=renderImage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JspException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=ThreadLocalJawrContext, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[member[.EVAL_PAGE]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { Keyword[try] { identifier[BinaryResourcesHandler] identifier[rsHandler] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[rsHandler] operator[=] operator[SEP] identifier[BinaryResourcesHandler] operator[SEP] identifier[pageContext] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[JawrConstant] operator[SEP] identifier[BINARY_CONTEXT_ATTRIBUTE] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JawrConfig] identifier[jawrConfig] operator[=] identifier[rsHandler] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[renderer] operator[=] identifier[RendererFactory] operator[SEP] identifier[getImgRenderer] operator[SEP] identifier[jawrConfig] , identifier[isPlainImage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[renderer] operator[SEP] identifier[renderImage] operator[SEP] identifier[getImgSrcToRender] operator[SEP] operator[SEP] , identifier[getAttributeMap] operator[SEP] operator[SEP] , identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JspException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[ThreadLocalJawrContext] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[EVAL_PAGE] operator[SEP] operator[SEP] }
@Override public List<CommerceUserSegmentEntry> findAll(int start, int end) { return findAll(start, end, null); }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[start, end]] begin[{] return[call[.findAll, parameter[member[.start], member[.end], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceUserSegmentEntry] operator[>] identifier[findAll] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[findAll] operator[SEP] identifier[start] , identifier[end] , Other[null] operator[SEP] operator[SEP] }
@Override public Optional<HttpUriRequest> onNewRecord(RestEntry<JsonObject> record) { Preconditions.checkArgument(!StringUtils.isEmpty(accessToken), "Access token has not been acquired."); Preconditions.checkNotNull(record, "Record should not be null"); RequestBuilder builder = null; JsonObject payload = null; if (batchSize > 1) { if (!batchRecords.isPresent()) { batchRecords = Optional.of(new JsonArray()); } batchRecords.get().add(newSubrequest(record)); if (batchRecords.get().size() < batchSize) { //No need to send. Return absent. return Optional.absent(); } payload = newPayloadForBatch(); builder = RequestBuilder.post().setUri(combineUrl(getCurServerHost(), batchResourcePath)); } else { switch (operation) { case INSERT_ONLY_NOT_EXIST: builder = RequestBuilder.post(); break; case UPSERT: builder = RequestBuilder.patch(); break; default: throw new IllegalArgumentException(operation + " is not supported."); } builder.setUri(combineUrl(getCurServerHost(), record.getResourcePath())); payload = record.getRestEntryVal(); } return Optional.of(newRequest(builder, payload)); }
class class_name[name] begin[{] method[onNewRecord, return_type[type[Optional]], modifier[public], parameter[record]] begin[{] call[Preconditions.checkArgument, parameter[call[StringUtils.isEmpty, parameter[member[.accessToken]]], literal["Access token has not been acquired."]]] call[Preconditions.checkNotNull, parameter[member[.record], literal["Record should not be null"]]] local_variable[type[RequestBuilder], builder] local_variable[type[JsonObject], payload] if[binary_operation[member[.batchSize], >, literal[1]]] begin[{] if[call[batchRecords.isPresent, parameter[]]] begin[{] assign[member[.batchRecords], call[Optional.of, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonArray, sub_type=None))]]] else begin[{] None end[}] call[batchRecords.get, parameter[]] if[binary_operation[call[batchRecords.get, parameter[]], <, member[.batchSize]]] begin[{] return[call[Optional.absent, parameter[]]] else begin[{] None end[}] assign[member[.payload], call[.newPayloadForBatch, parameter[]]] assign[member[.builder], call[RequestBuilder.post, parameter[]]] else begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['INSERT_ONLY_NOT_EXIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=post, postfix_operators=[], prefix_operators=[], qualifier=RequestBuilder, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['UPSERT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=patch, postfix_operators=[], prefix_operators=[], qualifier=RequestBuilder, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not supported."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) call[builder.setUri, parameter[call[.combineUrl, parameter[call[.getCurServerHost, parameter[]], call[record.getResourcePath, parameter[]]]]]] assign[member[.payload], call[record.getRestEntryVal, parameter[]]] end[}] return[call[Optional.of, parameter[call[.newRequest, parameter[member[.builder], member[.payload]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Optional] operator[<] identifier[HttpUriRequest] operator[>] identifier[onNewRecord] operator[SEP] identifier[RestEntry] operator[<] identifier[JsonObject] operator[>] identifier[record] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[accessToken] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[record] , literal[String] operator[SEP] operator[SEP] identifier[RequestBuilder] identifier[builder] operator[=] Other[null] operator[SEP] identifier[JsonObject] identifier[payload] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[batchSize] operator[>] Other[1] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[batchRecords] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[batchRecords] operator[=] identifier[Optional] operator[SEP] identifier[of] operator[SEP] Keyword[new] identifier[JsonArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[batchRecords] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[newSubrequest] operator[SEP] identifier[record] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[batchRecords] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[batchSize] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP] } identifier[payload] operator[=] identifier[newPayloadForBatch] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[=] identifier[RequestBuilder] operator[SEP] identifier[post] operator[SEP] operator[SEP] operator[SEP] identifier[setUri] operator[SEP] identifier[combineUrl] operator[SEP] identifier[getCurServerHost] operator[SEP] operator[SEP] , identifier[batchResourcePath] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[switch] operator[SEP] identifier[operation] operator[SEP] { Keyword[case] identifier[INSERT_ONLY_NOT_EXIST] operator[:] identifier[builder] operator[=] identifier[RequestBuilder] operator[SEP] identifier[post] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[UPSERT] operator[:] identifier[builder] operator[=] identifier[RequestBuilder] operator[SEP] identifier[patch] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[operation] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[setUri] operator[SEP] identifier[combineUrl] operator[SEP] identifier[getCurServerHost] operator[SEP] operator[SEP] , identifier[record] operator[SEP] identifier[getResourcePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[payload] operator[=] identifier[record] operator[SEP] identifier[getRestEntryVal] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[newRequest] operator[SEP] identifier[builder] , identifier[payload] operator[SEP] operator[SEP] operator[SEP] }
@Override public Enumeration<String> getAttributeNames() { if (isInvalid()) { throw new IllegalStateException("Session is invalid"); } return Collections.enumeration(this.attributes.keySet()); }
class class_name[name] begin[{] method[getAttributeNames, return_type[type[Enumeration]], modifier[public], parameter[]] begin[{] if[call[.isInvalid, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Session is invalid")], 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[}] return[call[Collections.enumeration, parameter[THIS[member[None.attributes]call[None.keySet, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[getAttributeNames] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isInvalid] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[enumeration] operator[SEP] Keyword[this] operator[SEP] identifier[attributes] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void solve(DefaultSolverScope<Solution_> solverScope) { ConstructionHeuristicPhaseScope<Solution_> phaseScope = new ConstructionHeuristicPhaseScope<>(solverScope); phaseStarted(phaseScope); for (Placement placement : entityPlacer) { ConstructionHeuristicStepScope<Solution_> stepScope = new ConstructionHeuristicStepScope<>(phaseScope); stepStarted(stepScope); decider.decideNextStep(stepScope, placement); if (stepScope.getStep() == null) { if (termination.isPhaseTerminated(phaseScope)) { logger.trace("{} Step index ({}), time spent ({}) terminated without picking a nextStep.", logIndentation, stepScope.getStepIndex(), stepScope.getPhaseScope().calculateSolverTimeMillisSpentUpToNow()); } else if (stepScope.getSelectedMoveCount() == 0L) { logger.warn("{} No doable selected move at step index ({}), time spent ({})." + " Terminating phase early.", logIndentation, stepScope.getStepIndex(), stepScope.getPhaseScope().calculateSolverTimeMillisSpentUpToNow()); } else { throw new IllegalStateException("The step index (" + stepScope.getStepIndex() + ") has selected move count (" + stepScope.getSelectedMoveCount() + ") but failed to pick a nextStep (" + stepScope.getStep() + ")."); } // Although stepStarted has been called, stepEnded is not called for this step break; } doStep(stepScope); stepEnded(stepScope); phaseScope.setLastCompletedStepScope(stepScope); if (termination.isPhaseTerminated(phaseScope)) { break; } } phaseEnded(phaseScope); }
class class_name[name] begin[{] method[solve, return_type[void], modifier[public], parameter[solverScope]] begin[{] local_variable[type[ConstructionHeuristicPhaseScope], phaseScope] call[.phaseStarted, parameter[member[.phaseScope]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=phaseScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ConstructionHeuristicStepScope, sub_type=None)), name=stepScope)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Solution_, sub_type=None))], dimensions=[], name=ConstructionHeuristicStepScope, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stepStarted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=placement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decideNextStep, postfix_operators=[], prefix_operators=[], qualifier=decider, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStep, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=phaseScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPhaseTerminated, postfix_operators=[], prefix_operators=[], qualifier=termination, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getSelectedMoveCount, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0L), operator===), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The step index ("), operandr=MethodInvocation(arguments=[], member=getStepIndex, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") has selected move count ("), operator=+), operandr=MethodInvocation(arguments=[], member=getSelectedMoveCount, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") but failed to pick a nextStep ("), operator=+), operandr=MethodInvocation(arguments=[], member=getStep, postfix_operators=[], prefix_operators=[], qualifier=stepScope, 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=IllegalStateException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{} No doable selected move at step index ({}), time spent ({})."), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Terminating phase early."), operator=+), MemberReference(member=logIndentation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getStepIndex, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPhaseScope, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[MethodInvocation(arguments=[], member=calculateSolverTimeMillisSpentUpToNow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{} Step index ({}), time spent ({}) terminated without picking a nextStep."), MemberReference(member=logIndentation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getStepIndex, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPhaseScope, postfix_operators=[], prefix_operators=[], qualifier=stepScope, selectors=[MethodInvocation(arguments=[], member=calculateSolverTimeMillisSpentUpToNow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=trace, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stepEnded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLastCompletedStepScope, postfix_operators=[], prefix_operators=[], qualifier=phaseScope, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=phaseScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPhaseTerminated, postfix_operators=[], prefix_operators=[], qualifier=termination, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entityPlacer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=placement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Placement, sub_type=None))), label=None) call[.phaseEnded, parameter[member[.phaseScope]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[solve] operator[SEP] identifier[DefaultSolverScope] operator[<] identifier[Solution_] operator[>] identifier[solverScope] operator[SEP] { identifier[ConstructionHeuristicPhaseScope] operator[<] identifier[Solution_] operator[>] identifier[phaseScope] operator[=] Keyword[new] identifier[ConstructionHeuristicPhaseScope] operator[<] operator[>] operator[SEP] identifier[solverScope] operator[SEP] operator[SEP] identifier[phaseStarted] operator[SEP] identifier[phaseScope] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Placement] identifier[placement] operator[:] identifier[entityPlacer] operator[SEP] { identifier[ConstructionHeuristicStepScope] operator[<] identifier[Solution_] operator[>] identifier[stepScope] operator[=] Keyword[new] identifier[ConstructionHeuristicStepScope] operator[<] operator[>] operator[SEP] identifier[phaseScope] operator[SEP] operator[SEP] identifier[stepStarted] operator[SEP] identifier[stepScope] operator[SEP] operator[SEP] identifier[decider] operator[SEP] identifier[decideNextStep] operator[SEP] identifier[stepScope] , identifier[placement] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stepScope] operator[SEP] identifier[getStep] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[termination] operator[SEP] identifier[isPhaseTerminated] operator[SEP] identifier[phaseScope] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[logIndentation] , identifier[stepScope] operator[SEP] identifier[getStepIndex] operator[SEP] operator[SEP] , identifier[stepScope] operator[SEP] identifier[getPhaseScope] operator[SEP] operator[SEP] operator[SEP] identifier[calculateSolverTimeMillisSpentUpToNow] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[stepScope] operator[SEP] identifier[getSelectedMoveCount] operator[SEP] operator[SEP] operator[==] Other[0L] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] literal[String] , identifier[logIndentation] , identifier[stepScope] operator[SEP] identifier[getStepIndex] operator[SEP] operator[SEP] , identifier[stepScope] operator[SEP] identifier[getPhaseScope] operator[SEP] operator[SEP] operator[SEP] identifier[calculateSolverTimeMillisSpentUpToNow] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[stepScope] operator[SEP] identifier[getStepIndex] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[stepScope] operator[SEP] identifier[getSelectedMoveCount] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[stepScope] operator[SEP] identifier[getStep] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[doStep] operator[SEP] identifier[stepScope] operator[SEP] operator[SEP] identifier[stepEnded] operator[SEP] identifier[stepScope] operator[SEP] operator[SEP] identifier[phaseScope] operator[SEP] identifier[setLastCompletedStepScope] operator[SEP] identifier[stepScope] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[termination] operator[SEP] identifier[isPhaseTerminated] operator[SEP] identifier[phaseScope] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } identifier[phaseEnded] operator[SEP] identifier[phaseScope] operator[SEP] operator[SEP] }
public final Cursor<T> queryByExample (Connection conn, T obj) { return new Cursor<T>(this, conn, obj, null, false); }
class class_name[name] begin[{] method[queryByExample, return_type[type[Cursor]], modifier[final public], parameter[conn, obj]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Cursor, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] identifier[Cursor] operator[<] identifier[T] operator[>] identifier[queryByExample] operator[SEP] identifier[Connection] identifier[conn] , identifier[T] identifier[obj] operator[SEP] { Keyword[return] Keyword[new] identifier[Cursor] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[conn] , identifier[obj] , Other[null] , literal[boolean] operator[SEP] operator[SEP] }
private Logger createClassLogger(InjectionPoint injectionPoint) { return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); }
class class_name[name] begin[{] method[createClassLogger, return_type[type[Logger]], modifier[private], parameter[injectionPoint]] begin[{] return[call[Logger.getLogger, parameter[call[injectionPoint.getMember, parameter[]]]]] end[}] END[}]
Keyword[private] identifier[Logger] identifier[createClassLogger] operator[SEP] identifier[InjectionPoint] identifier[injectionPoint] operator[SEP] { Keyword[return] identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] identifier[injectionPoint] operator[SEP] identifier[getMember] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void restoreState() { if (artifactUploadState.areAllUploadsFinished()) { artifactUploadState.clearUploadTempData(); hideUploadProgressButton(); upload.setEnabled(true); } else if (artifactUploadState.isAtLeastOneUploadInProgress()) { showUploadProgressButton(); } }
class class_name[name] begin[{] method[restoreState, return_type[void], modifier[public], parameter[]] begin[{] if[call[artifactUploadState.areAllUploadsFinished, parameter[]]] begin[{] call[artifactUploadState.clearUploadTempData, parameter[]] call[.hideUploadProgressButton, parameter[]] call[upload.setEnabled, parameter[literal[true]]] else begin[{] if[call[artifactUploadState.isAtLeastOneUploadInProgress, parameter[]]] begin[{] call[.showUploadProgressButton, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[restoreState] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[artifactUploadState] operator[SEP] identifier[areAllUploadsFinished] operator[SEP] operator[SEP] operator[SEP] { identifier[artifactUploadState] operator[SEP] identifier[clearUploadTempData] operator[SEP] operator[SEP] operator[SEP] identifier[hideUploadProgressButton] operator[SEP] operator[SEP] operator[SEP] identifier[upload] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[artifactUploadState] operator[SEP] identifier[isAtLeastOneUploadInProgress] operator[SEP] operator[SEP] operator[SEP] { identifier[showUploadProgressButton] operator[SEP] operator[SEP] operator[SEP] } }
protected boolean semanticallyEquivalent(BioPAXElement element) { final bioSource bioSource = (bioSource) element; return (CELLTYPE != null ? CELLTYPE.equals(bioSource.getCELLTYPE()) : bioSource.getCELLTYPE() == null) && (TAXON_XREF != null ? TAXON_XREF.equals(bioSource.getTAXON_XREF()) : bioSource.getTAXON_XREF() == null) && (TISSUE != null ? !TISSUE.equals(bioSource.getTISSUE()) : bioSource.getTISSUE() != null); }
class class_name[name] begin[{] method[semanticallyEquivalent, return_type[type[boolean]], modifier[protected], parameter[element]] begin[{] local_variable[type[bioSource], bioSource] return[binary_operation[binary_operation[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=CELLTYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCELLTYPE, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCELLTYPE, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CELLTYPE, selectors=[], type_arguments=None)), &&, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=TAXON_XREF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTAXON_XREF, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTAXON_XREF, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=TAXON_XREF, selectors=[], type_arguments=None))], &&, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=TISSUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTISSUE, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTISSUE, postfix_operators=[], prefix_operators=[], qualifier=bioSource, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=TISSUE, selectors=[], type_arguments=None))]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[semanticallyEquivalent] operator[SEP] identifier[BioPAXElement] identifier[element] operator[SEP] { Keyword[final] identifier[bioSource] identifier[bioSource] operator[=] operator[SEP] identifier[bioSource] operator[SEP] identifier[element] operator[SEP] Keyword[return] operator[SEP] identifier[CELLTYPE] operator[!=] Other[null] operator[?] identifier[CELLTYPE] operator[SEP] identifier[equals] operator[SEP] identifier[bioSource] operator[SEP] identifier[getCELLTYPE] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[bioSource] operator[SEP] identifier[getCELLTYPE] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[TAXON_XREF] operator[!=] Other[null] operator[?] identifier[TAXON_XREF] operator[SEP] identifier[equals] operator[SEP] identifier[bioSource] operator[SEP] identifier[getTAXON_XREF] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[bioSource] operator[SEP] identifier[getTAXON_XREF] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[TISSUE] operator[!=] Other[null] operator[?] operator[!] identifier[TISSUE] operator[SEP] identifier[equals] operator[SEP] identifier[bioSource] operator[SEP] identifier[getTISSUE] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[bioSource] operator[SEP] identifier[getTISSUE] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] }
public BatchDeleteBuildsResult withBuildsNotDeleted(BuildNotDeleted... buildsNotDeleted) { if (this.buildsNotDeleted == null) { setBuildsNotDeleted(new java.util.ArrayList<BuildNotDeleted>(buildsNotDeleted.length)); } for (BuildNotDeleted ele : buildsNotDeleted) { this.buildsNotDeleted.add(ele); } return this; }
class class_name[name] begin[{] method[withBuildsNotDeleted, return_type[type[BatchDeleteBuildsResult]], modifier[public], parameter[buildsNotDeleted]] begin[{] if[binary_operation[THIS[member[None.buildsNotDeleted]], ==, literal[null]]] begin[{] call[.setBuildsNotDeleted, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=buildsNotDeleted, 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=BuildNotDeleted, 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=buildsNotDeleted, 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=buildsNotDeleted, 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=BuildNotDeleted, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[BatchDeleteBuildsResult] identifier[withBuildsNotDeleted] operator[SEP] identifier[BuildNotDeleted] operator[...] identifier[buildsNotDeleted] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buildsNotDeleted] operator[==] Other[null] operator[SEP] { identifier[setBuildsNotDeleted] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[BuildNotDeleted] operator[>] operator[SEP] identifier[buildsNotDeleted] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[BuildNotDeleted] identifier[ele] operator[:] identifier[buildsNotDeleted] operator[SEP] { Keyword[this] operator[SEP] identifier[buildsNotDeleted] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }