code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private Token nextToken() { skipSpaces(); if (hasNextChar()) { char ch = nextChar(); if (Character.isJavaIdentifierStart(ch)) { StringBuffer buf = new StringBuffer(); buf.append(ch); while ((ch = peekChar()) != -1 && Character.isJavaIdentifierPart(ch)) { buf.append(ch); nextChar(); } return new Id(buf.toString()); } if (ch == '\'' || ch == '"') { return parseQuotedChars(ch); } else { // For now... return new Char(ch); } } return null; }
class class_name[name] begin[{] method[nextToken, return_type[type[Token]], modifier[private], parameter[]] begin[{] call[.skipSpaces, parameter[]] if[call[.hasNextChar, parameter[]]] begin[{] local_variable[type[char], ch] if[call[Character.isJavaIdentifierStart, parameter[member[.ch]]]] begin[{] local_variable[type[StringBuffer], buf] call[buf.append, parameter[member[.ch]]] while[binary_operation[binary_operation[assign[member[.ch], call[.peekChar, parameter[]]], !=, literal[1]], &&, call[Character.isJavaIdentifierPart, parameter[member[.ch]]]]] begin[{] call[buf.append, parameter[member[.ch]]] call[.nextChar, parameter[]] end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Id, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.ch], ==, literal['\'']], ||, binary_operation[member[.ch], ==, literal['"']]]] begin[{] return[call[.parseQuotedChars, parameter[member[.ch]]]] else begin[{] return[ClassCreator(arguments=[MemberReference(member=ch, 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=Char, sub_type=None))] end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[Token] identifier[nextToken] operator[SEP] operator[SEP] { identifier[skipSpaces] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasNextChar] operator[SEP] operator[SEP] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[nextChar] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isJavaIdentifierStart] operator[SEP] identifier[ch] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[buf] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[ch] operator[=] identifier[peekChar] operator[SEP] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[&&] identifier[Character] operator[SEP] identifier[isJavaIdentifierPart] operator[SEP] identifier[ch] operator[SEP] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] identifier[nextChar] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Id] operator[SEP] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ch] operator[==] literal[String] operator[||] identifier[ch] operator[==] literal[String] operator[SEP] { Keyword[return] identifier[parseQuotedChars] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[Char] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@Override public ResourceSet<Document> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); }
class class_name[name] begin[{] method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=firstPage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResourceSet, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Document] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] { Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[client] , identifier[firstPage] operator[SEP] identifier[client] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public <T> DynamicType.Builder<T> makeInterface(Class<T> interfaceType) { return (DynamicType.Builder<T>) makeInterface(Collections.<Type>singletonList(interfaceType)); }
class class_name[name] begin[{] method[makeInterface, return_type[type[DynamicType]], modifier[public], parameter[interfaceType]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=interfaceType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))])], member=makeInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DynamicType, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Builder, sub_type=None)))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[DynamicType] operator[SEP] identifier[Builder] operator[<] identifier[T] operator[>] identifier[makeInterface] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[interfaceType] operator[SEP] { Keyword[return] operator[SEP] identifier[DynamicType] operator[SEP] identifier[Builder] operator[<] identifier[T] operator[>] operator[SEP] identifier[makeInterface] operator[SEP] identifier[Collections] operator[SEP] operator[<] identifier[Type] operator[>] identifier[singletonList] operator[SEP] identifier[interfaceType] operator[SEP] operator[SEP] operator[SEP] }
@Throws(IllegalEqualException.class) public static boolean notEquals(final boolean expected, final boolean check) { if (expected == check) { throw new IllegalEqualException(check); } return check; }
class class_name[name] begin[{] method[notEquals, return_type[type[boolean]], modifier[public static], parameter[expected, check]] begin[{] if[binary_operation[member[.expected], ==, member[.check]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=check, 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=IllegalEqualException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.check]] end[}] END[}]
annotation[@] identifier[Throws] operator[SEP] identifier[IllegalEqualException] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[notEquals] operator[SEP] Keyword[final] Keyword[boolean] identifier[expected] , Keyword[final] Keyword[boolean] identifier[check] operator[SEP] { Keyword[if] operator[SEP] identifier[expected] operator[==] identifier[check] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalEqualException] operator[SEP] identifier[check] operator[SEP] operator[SEP] } Keyword[return] identifier[check] operator[SEP] }
public static void bind(HttpServletRequest request) { if (request != null && threadLocal.get() != null) { throw new IllegalStateException("HttpServletRequestHolder.bind() called for a " + "thread that already has a request associated with it. It's likely that the request " + "was not correctly removed from the thread before it is put back into the thread pool."); } threadLocal.set(request); }
class class_name[name] begin[{] method[bind, return_type[void], modifier[public static], parameter[request]] begin[{] if[binary_operation[binary_operation[member[.request], !=, literal[null]], &&, binary_operation[call[threadLocal.get, parameter[]], !=, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HttpServletRequestHolder.bind() called for a "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="thread that already has a request associated with it. It's likely that the request "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="was not correctly removed from the thread before it is put back into the thread pool."), 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) else begin[{] None end[}] call[threadLocal.set, parameter[member[.request]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[bind] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[request] operator[!=] Other[null] operator[&&] identifier[threadLocal] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[threadLocal] operator[SEP] identifier[set] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static String digits(long value, int digits) { long hi = 1L << (digits * 4); return Long.toHexString(hi | (value & (hi - 1))).substring(1); }
class class_name[name] begin[{] method[digits, return_type[type[String]], modifier[private static], parameter[value, digits]] begin[{] local_variable[type[long], hi] return[call[Long.toHexString, parameter[binary_operation[member[.hi], |, binary_operation[member[.value], &, binary_operation[member[.hi], -, literal[1]]]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[digits] operator[SEP] Keyword[long] identifier[value] , Keyword[int] identifier[digits] operator[SEP] { Keyword[long] identifier[hi] operator[=] Other[1L] operator[<<] operator[SEP] identifier[digits] operator[*] Other[4] operator[SEP] operator[SEP] Keyword[return] identifier[Long] operator[SEP] identifier[toHexString] operator[SEP] identifier[hi] operator[|] operator[SEP] identifier[value] operator[&] operator[SEP] identifier[hi] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] }
private File getIndexDirectory() { File file = new File(luceneDirPath); if (!file.isDirectory()) { file.mkdir(); } return file; }
class class_name[name] begin[{] method[getIndexDirectory, return_type[type[File]], modifier[private], parameter[]] begin[{] local_variable[type[File], file] if[call[file.isDirectory, parameter[]]] begin[{] call[file.mkdir, parameter[]] else begin[{] None end[}] return[member[.file]] end[}] END[}]
Keyword[private] identifier[File] identifier[getIndexDirectory] operator[SEP] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[luceneDirPath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[file] operator[SEP] identifier[mkdir] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[file] operator[SEP] }
public static void close(FileDescriptor fd) throws IOException { try { if (fd != null && fd.valid()) { Libcore.os.close(fd); } } catch (ErrnoException errnoException) { throw errnoException.rethrowAsIOException(); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public static], parameter[fd]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=valid, postfix_operators=[], prefix_operators=[], qualifier=fd, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=Libcore.os, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[], member=rethrowAsIOException, postfix_operators=[], prefix_operators=[], qualifier=errnoException, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=errnoException, types=['ErrnoException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[close] operator[SEP] identifier[FileDescriptor] identifier[fd] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[if] operator[SEP] identifier[fd] operator[!=] Other[null] operator[&&] identifier[fd] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] { identifier[Libcore] operator[SEP] identifier[os] operator[SEP] identifier[close] operator[SEP] identifier[fd] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ErrnoException] identifier[errnoException] operator[SEP] { Keyword[throw] identifier[errnoException] operator[SEP] identifier[rethrowAsIOException] operator[SEP] operator[SEP] operator[SEP] } }
public void marshall(DescribeCertificateAuthorityAuditReportRequest describeCertificateAuthorityAuditReportRequest, ProtocolMarshaller protocolMarshaller) { if (describeCertificateAuthorityAuditReportRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeCertificateAuthorityAuditReportRequest.getCertificateAuthorityArn(), CERTIFICATEAUTHORITYARN_BINDING); protocolMarshaller.marshall(describeCertificateAuthorityAuditReportRequest.getAuditReportId(), AUDITREPORTID_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[describeCertificateAuthorityAuditReportRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeCertificateAuthorityAuditReportRequest], ==, 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=getCertificateAuthorityArn, postfix_operators=[], prefix_operators=[], qualifier=describeCertificateAuthorityAuditReportRequest, selectors=[], type_arguments=None), MemberReference(member=CERTIFICATEAUTHORITYARN_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=getAuditReportId, postfix_operators=[], prefix_operators=[], qualifier=describeCertificateAuthorityAuditReportRequest, selectors=[], type_arguments=None), MemberReference(member=AUDITREPORTID_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[DescribeCertificateAuthorityAuditReportRequest] identifier[describeCertificateAuthorityAuditReportRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeCertificateAuthorityAuditReportRequest] 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[describeCertificateAuthorityAuditReportRequest] operator[SEP] identifier[getCertificateAuthorityArn] operator[SEP] operator[SEP] , identifier[CERTIFICATEAUTHORITYARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeCertificateAuthorityAuditReportRequest] operator[SEP] identifier[getAuditReportId] operator[SEP] operator[SEP] , identifier[AUDITREPORTID_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 Vec categoricalToInt(final Vec src) { if( src.isInt() && (src.domain()==null || src.domain().length == 0)) return copyOver(src, Vec.T_NUM, null); if( !src.isCategorical() ) throw new IllegalArgumentException("categoricalToInt conversion only works on categorical columns."); // check if the 1st lvl of the domain can be parsed as int boolean useDomain=false; Vec newVec = copyOver(src, Vec.T_NUM, null); try { Integer.parseInt(src.domain()[0]); useDomain=true; } catch (NumberFormatException e) { // makeCopy and return... } if( useDomain ) { new MRTask() { @Override public void map(Chunk c) { for (int i=0;i<c._len;++i) if( !c.isNA(i) ) c.set(i, Integer.parseInt(src.domain()[(int)c.at8(i)])); } }.doAll(newVec); } return newVec; }
class class_name[name] begin[{] method[categoricalToInt, return_type[type[Vec]], modifier[public static], parameter[src]] begin[{] if[binary_operation[call[src.isInt, parameter[]], &&, binary_operation[binary_operation[call[src.domain, parameter[]], ==, literal[null]], ||, binary_operation[call[src.domain, parameter[]], ==, literal[0]]]]] begin[{] return[call[.copyOver, parameter[member[.src], member[Vec.T_NUM], literal[null]]]] else begin[{] None end[}] if[call[src.isCategorical, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="categoricalToInt conversion only works on categorical columns.")], 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[boolean], useDomain] local_variable[type[Vec], newVec] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=domain, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=useDomain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) if[member[.useDomain]] begin[{] ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNA, postfix_operators=[], prefix_operators=['!'], qualifier=c, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=domain, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[ArraySelector(index=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=at8, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)))], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_len, postfix_operators=[], prefix_operators=[], qualifier=c, 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)], documentation=None, modifiers={'public'}, name=map, parameters=[FormalParameter(annotations=[], modifiers=set(), name=c, type=ReferenceType(arguments=None, dimensions=[], name=Chunk, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=newVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=MRTask, sub_type=None)) else begin[{] None end[}] return[member[.newVec]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vec] identifier[categoricalToInt] operator[SEP] Keyword[final] identifier[Vec] identifier[src] operator[SEP] { Keyword[if] operator[SEP] identifier[src] operator[SEP] identifier[isInt] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[src] operator[SEP] identifier[domain] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[src] operator[SEP] identifier[domain] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[copyOver] operator[SEP] identifier[src] , identifier[Vec] operator[SEP] identifier[T_NUM] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[src] operator[SEP] identifier[isCategorical] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[useDomain] operator[=] literal[boolean] operator[SEP] identifier[Vec] identifier[newVec] operator[=] identifier[copyOver] operator[SEP] identifier[src] , identifier[Vec] operator[SEP] identifier[T_NUM] , Other[null] operator[SEP] operator[SEP] Keyword[try] { identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[src] operator[SEP] identifier[domain] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[useDomain] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { } Keyword[if] operator[SEP] identifier[useDomain] operator[SEP] { Keyword[new] identifier[MRTask] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[map] operator[SEP] identifier[Chunk] identifier[c] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[c] operator[SEP] identifier[_len] operator[SEP] operator[++] identifier[i] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[isNA] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[src] operator[SEP] identifier[domain] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] identifier[at8] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] identifier[doAll] operator[SEP] identifier[newVec] operator[SEP] operator[SEP] } Keyword[return] identifier[newVec] operator[SEP] }
public void connectBeginToEnd(SGraphSegment segment) { if (segment.getGraph() != getGraph()) { throw new IllegalArgumentException(); } final SGraphPoint point = new SGraphPoint(getGraph()); setBegin(point); segment.setEnd(point); final SGraph g = getGraph(); assert g != null; g.updatePointCount(-1); }
class class_name[name] begin[{] method[connectBeginToEnd, return_type[void], modifier[public], parameter[segment]] begin[{] if[binary_operation[call[segment.getGraph, parameter[]], !=, call[.getGraph, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[SGraphPoint], point] call[.setBegin, parameter[member[.point]]] call[segment.setEnd, parameter[member[.point]]] local_variable[type[SGraph], g] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) call[g.updatePointCount, parameter[literal[1]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[connectBeginToEnd] operator[SEP] identifier[SGraphSegment] identifier[segment] operator[SEP] { Keyword[if] operator[SEP] identifier[segment] operator[SEP] identifier[getGraph] operator[SEP] operator[SEP] operator[!=] identifier[getGraph] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[SGraphPoint] identifier[point] operator[=] Keyword[new] identifier[SGraphPoint] operator[SEP] identifier[getGraph] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setBegin] operator[SEP] identifier[point] operator[SEP] operator[SEP] identifier[segment] operator[SEP] identifier[setEnd] operator[SEP] identifier[point] operator[SEP] operator[SEP] Keyword[final] identifier[SGraph] identifier[g] operator[=] identifier[getGraph] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[g] operator[!=] Other[null] operator[SEP] identifier[g] operator[SEP] identifier[updatePointCount] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") protected static NodeDiscoveryProvider buildLocationProvider(ClusterConfig config) { NodeDiscoveryConfig discoveryProviderConfig = config.getDiscoveryConfig(); if (discoveryProviderConfig != null) { return discoveryProviderConfig.getType().newProvider(discoveryProviderConfig); } if (config.getMulticastConfig().isEnabled()) { return new MulticastDiscoveryProvider(new MulticastDiscoveryConfig()); } else { return new BootstrapDiscoveryProvider(Collections.emptyList()); } }
class class_name[name] begin[{] method[buildLocationProvider, return_type[type[NodeDiscoveryProvider]], modifier[static protected], parameter[config]] begin[{] local_variable[type[NodeDiscoveryConfig], discoveryProviderConfig] if[binary_operation[member[.discoveryProviderConfig], !=, literal[null]]] begin[{] return[call[discoveryProviderConfig.getType, parameter[]]] else begin[{] None end[}] if[call[config.getMulticastConfig, parameter[]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MulticastDiscoveryConfig, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MulticastDiscoveryProvider, sub_type=None))] else begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BootstrapDiscoveryProvider, sub_type=None))] end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[static] identifier[NodeDiscoveryProvider] identifier[buildLocationProvider] operator[SEP] identifier[ClusterConfig] identifier[config] operator[SEP] { identifier[NodeDiscoveryConfig] identifier[discoveryProviderConfig] operator[=] identifier[config] operator[SEP] identifier[getDiscoveryConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[discoveryProviderConfig] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[discoveryProviderConfig] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[newProvider] operator[SEP] identifier[discoveryProviderConfig] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[getMulticastConfig] operator[SEP] operator[SEP] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[MulticastDiscoveryProvider] operator[SEP] Keyword[new] identifier[MulticastDiscoveryConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[BootstrapDiscoveryProvider] operator[SEP] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private void filterJPAParameterInfo(Type type, String name, String fieldName) { String attributeName = getAttributeName(fieldName); Attribute entityAttribute = ((MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(persistenceUnit)) .getEntityAttribute(entityClass, attributeName); Class fieldType = entityAttribute.getJavaType(); if (type.equals(Type.INDEXED)) { typedParameter.addJPAParameter(new JPAParameter(null, Integer.valueOf(name), fieldType)); } else { typedParameter.addJPAParameter(new JPAParameter(name, null, fieldType)); } }
class class_name[name] begin[{] method[filterJPAParameterInfo, return_type[void], modifier[private], parameter[type, name, fieldName]] begin[{] local_variable[type[String], attributeName] local_variable[type[Attribute], entityAttribute] local_variable[type[Class], fieldType] if[call[type.equals, parameter[member[Type.INDEXED]]]] begin[{] call[typedParameter.addJPAParameter, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MemberReference(member=fieldType, 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=JPAParameter, sub_type=None))]] else begin[{] call[typedParameter.addJPAParameter, parameter[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=fieldType, 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=JPAParameter, sub_type=None))]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[filterJPAParameterInfo] operator[SEP] identifier[Type] identifier[type] , identifier[String] identifier[name] , identifier[String] identifier[fieldName] operator[SEP] { identifier[String] identifier[attributeName] operator[=] identifier[getAttributeName] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] identifier[Attribute] identifier[entityAttribute] operator[=] operator[SEP] operator[SEP] identifier[MetamodelImpl] operator[SEP] identifier[kunderaMetadata] operator[SEP] identifier[getApplicationMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getMetamodel] operator[SEP] identifier[persistenceUnit] operator[SEP] operator[SEP] operator[SEP] identifier[getEntityAttribute] operator[SEP] identifier[entityClass] , identifier[attributeName] operator[SEP] operator[SEP] identifier[Class] identifier[fieldType] operator[=] identifier[entityAttribute] operator[SEP] identifier[getJavaType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[Type] operator[SEP] identifier[INDEXED] operator[SEP] operator[SEP] { identifier[typedParameter] operator[SEP] identifier[addJPAParameter] operator[SEP] Keyword[new] identifier[JPAParameter] operator[SEP] Other[null] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[name] operator[SEP] , identifier[fieldType] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[typedParameter] operator[SEP] identifier[addJPAParameter] operator[SEP] Keyword[new] identifier[JPAParameter] operator[SEP] identifier[name] , Other[null] , identifier[fieldType] operator[SEP] operator[SEP] operator[SEP] } }
private void setUnicodeLocaleExtension(String subtags) { // wipe out existing attributes/keywords if (_uattributes != null) { _uattributes.clear(); } if (_ukeywords != null) { _ukeywords.clear(); } StringTokenIterator itr = new StringTokenIterator(subtags, LanguageTag.SEP); // parse attributes while (!itr.isDone()) { if (!UnicodeLocaleExtension.isAttribute(itr.current())) { break; } if (_uattributes == null) { _uattributes = new HashSet<CaseInsensitiveString>(4); } _uattributes.add(new CaseInsensitiveString(itr.current())); itr.next(); } // parse keywords CaseInsensitiveString key = null; String type; int typeStart = -1; int typeEnd = -1; while (!itr.isDone()) { if (key != null) { if (UnicodeLocaleExtension.isKey(itr.current())) { // next keyword - emit previous one assert(typeStart == -1 || typeEnd != -1); type = (typeStart == -1) ? "" : subtags.substring(typeStart, typeEnd); if (_ukeywords == null) { _ukeywords = new HashMap<CaseInsensitiveString, String>(4); } _ukeywords.put(key, type); // reset keyword info CaseInsensitiveString tmpKey = new CaseInsensitiveString(itr.current()); key = _ukeywords.containsKey(tmpKey) ? null : tmpKey; typeStart = typeEnd = -1; } else { if (typeStart == -1) { typeStart = itr.currentStart(); } typeEnd = itr.currentEnd(); } } else if (UnicodeLocaleExtension.isKey(itr.current())) { // 1. first keyword or // 2. next keyword, but previous one was duplicate key = new CaseInsensitiveString(itr.current()); if (_ukeywords != null && _ukeywords.containsKey(key)) { // duplicate key = null; } } if (!itr.hasNext()) { if (key != null) { // last keyword assert(typeStart == -1 || typeEnd != -1); type = (typeStart == -1) ? "" : subtags.substring(typeStart, typeEnd); if (_ukeywords == null) { _ukeywords = new HashMap<CaseInsensitiveString, String>(4); } _ukeywords.put(key, type); } break; } itr.next(); } }
class class_name[name] begin[{] method[setUnicodeLocaleExtension, return_type[void], modifier[private], parameter[subtags]] begin[{] if[binary_operation[member[._uattributes], !=, literal[null]]] begin[{] call[_uattributes.clear, parameter[]] else begin[{] None end[}] if[binary_operation[member[._ukeywords], !=, literal[null]]] begin[{] call[_ukeywords.clear, parameter[]] else begin[{] None end[}] local_variable[type[StringTokenIterator], itr] while[call[itr.isDone, parameter[]]] begin[{] if[call[UnicodeLocaleExtension.isAttribute, parameter[call[itr.current, parameter[]]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[member[._uattributes], ==, literal[null]]] begin[{] assign[member[._uattributes], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], 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=CaseInsensitiveString, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))] else begin[{] None end[}] call[_uattributes.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=current, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CaseInsensitiveString, sub_type=None))]] call[itr.next, parameter[]] end[}] local_variable[type[CaseInsensitiveString], key] local_variable[type[String], type] local_variable[type[int], typeStart] local_variable[type[int], typeEnd] while[call[itr.isDone, parameter[]]] begin[{] if[binary_operation[member[.key], !=, literal[null]]] begin[{] if[call[UnicodeLocaleExtension.isKey, parameter[call[itr.current, parameter[]]]]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=typeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operator=||), label=None, value=None) assign[member[.type], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=subtags, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))] if[binary_operation[member[._ukeywords], ==, literal[null]]] begin[{] assign[member[._ukeywords], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], 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=CaseInsensitiveString, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] call[_ukeywords.put, parameter[member[.key], member[.type]]] local_variable[type[CaseInsensitiveString], tmpKey] assign[member[.key], TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=tmpKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=_ukeywords, selectors=[], type_arguments=None), if_false=MemberReference(member=tmpKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] assign[member[.typeStart], assign[member[.typeEnd], literal[1]]] else begin[{] if[binary_operation[member[.typeStart], ==, literal[1]]] begin[{] assign[member[.typeStart], call[itr.currentStart, parameter[]]] else begin[{] None end[}] assign[member[.typeEnd], call[itr.currentEnd, parameter[]]] end[}] else begin[{] if[call[UnicodeLocaleExtension.isKey, parameter[call[itr.current, parameter[]]]]] begin[{] assign[member[.key], ClassCreator(arguments=[MethodInvocation(arguments=[], member=current, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CaseInsensitiveString, sub_type=None))] if[binary_operation[binary_operation[member[._ukeywords], !=, literal[null]], &&, call[_ukeywords.containsKey, parameter[member[.key]]]]] begin[{] assign[member[.key], literal[null]] else begin[{] None end[}] else begin[{] None end[}] end[}] if[call[itr.hasNext, parameter[]]] begin[{] if[binary_operation[member[.key], !=, literal[null]]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=typeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operator=||), label=None, value=None) assign[member[.type], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=typeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=subtags, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))] if[binary_operation[member[._ukeywords], ==, literal[null]]] begin[{] assign[member[._ukeywords], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], 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=CaseInsensitiveString, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] call[_ukeywords.put, parameter[member[.key], member[.type]]] else begin[{] None end[}] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[itr.next, parameter[]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setUnicodeLocaleExtension] operator[SEP] identifier[String] identifier[subtags] operator[SEP] { Keyword[if] operator[SEP] identifier[_uattributes] operator[!=] Other[null] operator[SEP] { identifier[_uattributes] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_ukeywords] operator[!=] Other[null] operator[SEP] { identifier[_ukeywords] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } identifier[StringTokenIterator] identifier[itr] operator[=] Keyword[new] identifier[StringTokenIterator] operator[SEP] identifier[subtags] , identifier[LanguageTag] operator[SEP] identifier[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[itr] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[UnicodeLocaleExtension] operator[SEP] identifier[isAttribute] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[_uattributes] operator[==] Other[null] operator[SEP] { identifier[_uattributes] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[CaseInsensitiveString] operator[>] operator[SEP] Other[4] operator[SEP] operator[SEP] } identifier[_uattributes] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } identifier[CaseInsensitiveString] identifier[key] operator[=] Other[null] operator[SEP] identifier[String] identifier[type] operator[SEP] Keyword[int] identifier[typeStart] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[typeEnd] operator[=] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[itr] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[UnicodeLocaleExtension] operator[SEP] identifier[isKey] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[assert] operator[SEP] identifier[typeStart] operator[==] operator[-] Other[1] operator[||] identifier[typeEnd] operator[!=] operator[-] Other[1] operator[SEP] operator[SEP] identifier[type] operator[=] operator[SEP] identifier[typeStart] operator[==] operator[-] Other[1] operator[SEP] operator[?] literal[String] operator[:] identifier[subtags] operator[SEP] identifier[substring] operator[SEP] identifier[typeStart] , identifier[typeEnd] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_ukeywords] operator[==] Other[null] operator[SEP] { identifier[_ukeywords] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[CaseInsensitiveString] , identifier[String] operator[>] operator[SEP] Other[4] operator[SEP] operator[SEP] } identifier[_ukeywords] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[type] operator[SEP] operator[SEP] identifier[CaseInsensitiveString] identifier[tmpKey] operator[=] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[_ukeywords] operator[SEP] identifier[containsKey] operator[SEP] identifier[tmpKey] operator[SEP] operator[?] Other[null] operator[:] identifier[tmpKey] operator[SEP] identifier[typeStart] operator[=] identifier[typeEnd] operator[=] operator[-] Other[1] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[typeStart] operator[==] operator[-] Other[1] operator[SEP] { identifier[typeStart] operator[=] identifier[itr] operator[SEP] identifier[currentStart] operator[SEP] operator[SEP] operator[SEP] } identifier[typeEnd] operator[=] identifier[itr] operator[SEP] identifier[currentEnd] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[UnicodeLocaleExtension] operator[SEP] identifier[isKey] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[key] operator[=] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_ukeywords] operator[!=] Other[null] operator[&&] identifier[_ukeywords] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[key] operator[=] Other[null] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] { Keyword[assert] operator[SEP] identifier[typeStart] operator[==] operator[-] Other[1] operator[||] identifier[typeEnd] operator[!=] operator[-] Other[1] operator[SEP] operator[SEP] identifier[type] operator[=] operator[SEP] identifier[typeStart] operator[==] operator[-] Other[1] operator[SEP] operator[?] literal[String] operator[:] identifier[subtags] operator[SEP] identifier[substring] operator[SEP] identifier[typeStart] , identifier[typeEnd] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_ukeywords] operator[==] Other[null] operator[SEP] { identifier[_ukeywords] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[CaseInsensitiveString] , identifier[String] operator[>] operator[SEP] Other[4] operator[SEP] operator[SEP] } identifier[_ukeywords] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[type] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } }
boolean advance(BytesRef word) throws IOException { if (prefixBuf == null) { // first advance //set prefixBuf to word temporary. When advance() completes, we either null out or copy. prefixBuf = word; prefixBufOnLoan = true; if (seekPrefix()) {//... and we have to ensureBufIsACopy(); return true; } else { prefixBuf = null;//just to be darned sure 'word' isn't referenced here return false; } } else { // subsequent advance //append to existing assert !prefixBufOnLoan; prefixBufBuilder.append(SEPARATOR_CHAR); prefixBufBuilder.append(word); prefixBuf = prefixBufBuilder.get(); if (seekPrefix()) { return true; } else { prefixBuf = null; return false; } } }
class class_name[name] begin[{] method[advance, return_type[type[boolean]], modifier[default], parameter[word]] begin[{] if[binary_operation[member[.prefixBuf], ==, literal[null]]] begin[{] assign[member[.prefixBuf], member[.word]] assign[member[.prefixBufOnLoan], literal[true]] if[call[.seekPrefix, parameter[]]] begin[{] call[.ensureBufIsACopy, parameter[]] return[literal[true]] else begin[{] assign[member[.prefixBuf], literal[null]] return[literal[false]] end[}] else begin[{] AssertStatement(condition=MemberReference(member=prefixBufOnLoan, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), label=None, value=None) call[prefixBufBuilder.append, parameter[member[.SEPARATOR_CHAR]]] call[prefixBufBuilder.append, parameter[member[.word]]] assign[member[.prefixBuf], call[prefixBufBuilder.get, parameter[]]] if[call[.seekPrefix, parameter[]]] begin[{] return[literal[true]] else begin[{] assign[member[.prefixBuf], literal[null]] return[literal[false]] end[}] end[}] end[}] END[}]
Keyword[boolean] identifier[advance] operator[SEP] identifier[BytesRef] identifier[word] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[prefixBuf] operator[==] Other[null] operator[SEP] { identifier[prefixBuf] operator[=] identifier[word] operator[SEP] identifier[prefixBufOnLoan] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[seekPrefix] operator[SEP] operator[SEP] operator[SEP] { identifier[ensureBufIsACopy] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[prefixBuf] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[assert] operator[!] identifier[prefixBufOnLoan] operator[SEP] identifier[prefixBufBuilder] operator[SEP] identifier[append] operator[SEP] identifier[SEPARATOR_CHAR] operator[SEP] operator[SEP] identifier[prefixBufBuilder] operator[SEP] identifier[append] operator[SEP] identifier[word] operator[SEP] operator[SEP] identifier[prefixBuf] operator[=] identifier[prefixBufBuilder] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[seekPrefix] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[prefixBuf] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } }
public void setTickmarkDirection(final Direction DIRECTION) { this.tickmarkDirection = DIRECTION; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
class class_name[name] begin[{] method[setTickmarkDirection, return_type[void], modifier[public], parameter[DIRECTION]] begin[{] assign[THIS[member[None.tickmarkDirection]], member[.DIRECTION]] call[.init, parameter[call[.getInnerBounds, parameter[]], call[.getInnerBounds, parameter[]]]] call[.repaint, parameter[call[.getInnerBounds, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTickmarkDirection] operator[SEP] Keyword[final] identifier[Direction] identifier[DIRECTION] operator[SEP] { Keyword[this] operator[SEP] identifier[tickmarkDirection] operator[=] identifier[DIRECTION] operator[SEP] identifier[init] operator[SEP] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] , identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[SEP] operator[SEP] identifier[repaint] operator[SEP] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public CharsetBuilder convert(String nioCharsetName, String cloudhopperCharset) { mappings.add(new CharsetMapping(nioCharsetName, cloudhopperCharset)); return this; }
class class_name[name] begin[{] method[convert, return_type[type[CharsetBuilder]], modifier[public], parameter[nioCharsetName, cloudhopperCharset]] begin[{] call[mappings.add, parameter[ClassCreator(arguments=[MemberReference(member=nioCharsetName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cloudhopperCharset, 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=CharsetMapping, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CharsetBuilder] identifier[convert] operator[SEP] identifier[String] identifier[nioCharsetName] , identifier[String] identifier[cloudhopperCharset] operator[SEP] { identifier[mappings] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[CharsetMapping] operator[SEP] identifier[nioCharsetName] , identifier[cloudhopperCharset] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private static void addMinistryPerYearToMap(final String name, final Map<Integer, List<GovernmentBodyAnnualSummary>> map, final HSSFSheet mySheet) { if (mySheet.getSheetName().chars().allMatch(Character::isDigit)) { final int year = Integer.parseInt(mySheet.getSheetName()); final List<GovernmentBodyAnnualSummary> yearList = new ArrayList<>(); final Iterator<Row> rowIterator = mySheet.iterator(); // Skip header row, ignore first rowIterator.next(); while (rowIterator.hasNext()) { addGovernmentBodyAnnualSummaryToList(name, year, yearList, rowIterator.next()); } map.put(year, yearList); } }
class class_name[name] begin[{] method[addMinistryPerYearToMap, return_type[void], modifier[private static], parameter[name, map, mySheet]] begin[{] if[call[mySheet.getSheetName, parameter[]]] begin[{] local_variable[type[int], year] local_variable[type[List], yearList] local_variable[type[Iterator], rowIterator] call[rowIterator.next, parameter[]] while[call[rowIterator.hasNext, parameter[]]] begin[{] call[.addGovernmentBodyAnnualSummaryToList, parameter[member[.name], member[.year], member[.yearList], call[rowIterator.next, parameter[]]]] end[}] call[map.put, parameter[member[.year], member[.yearList]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addMinistryPerYearToMap] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Map] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[GovernmentBodyAnnualSummary] operator[>] operator[>] identifier[map] , Keyword[final] identifier[HSSFSheet] identifier[mySheet] operator[SEP] { Keyword[if] operator[SEP] identifier[mySheet] operator[SEP] identifier[getSheetName] operator[SEP] operator[SEP] operator[SEP] identifier[chars] operator[SEP] operator[SEP] operator[SEP] identifier[allMatch] operator[SEP] identifier[Character] operator[::] identifier[isDigit] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[year] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[mySheet] operator[SEP] identifier[getSheetName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[GovernmentBodyAnnualSummary] operator[>] identifier[yearList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[Row] operator[>] identifier[rowIterator] operator[=] identifier[mySheet] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[rowIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[rowIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[addGovernmentBodyAnnualSummaryToList] operator[SEP] identifier[name] , identifier[year] , identifier[yearList] , identifier[rowIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[year] , identifier[yearList] operator[SEP] operator[SEP] } }
public static Date addMonth(Date date1, int addMonth) { Date resultDate = null; Calendar c = Calendar.getInstance(); c.setTime(date1); // 设置当前日期 c.add(Calendar.MONTH, addMonth); // 日期加1 resultDate = c.getTime(); // 结果 return resultDate; }
class class_name[name] begin[{] method[addMonth, return_type[type[Date]], modifier[public static], parameter[date1, addMonth]] begin[{] local_variable[type[Date], resultDate] local_variable[type[Calendar], c] call[c.setTime, parameter[member[.date1]]] call[c.add, parameter[member[Calendar.MONTH], member[.addMonth]]] assign[member[.resultDate], call[c.getTime, parameter[]]] return[member[.resultDate]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[addMonth] operator[SEP] identifier[Date] identifier[date1] , Keyword[int] identifier[addMonth] operator[SEP] { identifier[Date] identifier[resultDate] operator[=] Other[null] operator[SEP] identifier[Calendar] identifier[c] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setTime] operator[SEP] identifier[date1] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] , identifier[addMonth] operator[SEP] operator[SEP] identifier[resultDate] operator[=] identifier[c] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[resultDate] operator[SEP] }
public static <T> Position.Readable<T> readOnly(final Typed<T> typed, final Supplier<T> supplier) { return readOnly(Validate.notNull(typed, "type").getType(), supplier); }
class class_name[name] begin[{] method[readOnly, return_type[type[Position]], modifier[public static], parameter[typed, supplier]] begin[{] return[call[.readOnly, parameter[call[Validate.notNull, parameter[member[.typed], literal["type"]]], member[.supplier]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Position] operator[SEP] identifier[Readable] operator[<] identifier[T] operator[>] identifier[readOnly] operator[SEP] Keyword[final] identifier[Typed] operator[<] identifier[T] operator[>] identifier[typed] , Keyword[final] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[supplier] operator[SEP] { Keyword[return] identifier[readOnly] operator[SEP] identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[typed] , literal[String] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[supplier] operator[SEP] operator[SEP] }
public long position(final byte[] pattern, final long start) throws SQLException { if (start < 1) { throw SQLExceptionMapper.getSQLException("Start should be > 0, first position is 1."); } if (start > actualSize) { throw SQLExceptionMapper.getSQLException("Start should be <= " + actualSize); } final long actualStart = start - 1; for (int i = (int) actualStart; i < actualSize; i++) { if (blobContent[i] == pattern[0]) { boolean isEqual = true; for (int j = 1; j < pattern.length; j++) { if (i + j >= actualSize) { return -1; } if (blobContent[i + j] != pattern[j]) { isEqual = false; } } if (isEqual) { return i + 1; } } } return -1; }
class class_name[name] begin[{] method[position, return_type[type[long]], modifier[public], parameter[pattern, start]] begin[{] if[binary_operation[member[.start], <, literal[1]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start should be > 0, first position is 1.")], member=getSQLException, postfix_operators=[], prefix_operators=[], qualifier=SQLExceptionMapper, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[binary_operation[member[.start], >, member[.actualSize]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start should be <= "), operandr=MemberReference(member=actualSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getSQLException, postfix_operators=[], prefix_operators=[], qualifier=SQLExceptionMapper, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] local_variable[type[long], actualStart] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=blobContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=isEqual)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=actualSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=blobContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isEqual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), 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=pattern, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=MemberReference(member=isEqual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=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)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=actualSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Cast(expression=MemberReference(member=actualStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[long] identifier[position] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[pattern] , Keyword[final] Keyword[long] identifier[start] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[start] operator[<] Other[1] operator[SEP] { Keyword[throw] identifier[SQLExceptionMapper] operator[SEP] identifier[getSQLException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[start] operator[>] identifier[actualSize] operator[SEP] { Keyword[throw] identifier[SQLExceptionMapper] operator[SEP] identifier[getSQLException] operator[SEP] literal[String] operator[+] identifier[actualSize] operator[SEP] operator[SEP] } Keyword[final] Keyword[long] identifier[actualStart] operator[=] identifier[start] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[actualStart] operator[SEP] identifier[i] operator[<] identifier[actualSize] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[blobContent] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[pattern] operator[SEP] Other[0] operator[SEP] operator[SEP] { Keyword[boolean] identifier[isEqual] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[pattern] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[+] identifier[j] operator[>=] identifier[actualSize] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[blobContent] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[!=] identifier[pattern] operator[SEP] identifier[j] operator[SEP] operator[SEP] { identifier[isEqual] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[isEqual] operator[SEP] { Keyword[return] identifier[i] operator[+] Other[1] operator[SEP] } } } Keyword[return] operator[-] Other[1] operator[SEP] }
@SuppressWarnings("unchecked") public static List<Long> getAt(long[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
class class_name[name] begin[{] method[getAt, return_type[type[List]], modifier[public static], parameter[array, range]] begin[{] return[call[.primitiveArrayGet, parameter[member[.array], member[.range]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Long] operator[>] identifier[getAt] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[array] , identifier[ObjectRange] identifier[range] operator[SEP] { Keyword[return] identifier[primitiveArrayGet] operator[SEP] identifier[array] , identifier[range] operator[SEP] operator[SEP] }
private File resolveIndexDirectoryPath() throws IOException { if (StringUtils.isEmpty(indexDirectoryPath)) { indexDirectoryPath = System.getProperty("java.io.tmpdir") + appContext.getApplicationName(); } File dir = new File(indexDirectoryPath, getClass().getPackage().getName()); if (!dir.exists() && !dir.mkdirs()) { throw new IOException("Failed to create help search index directory."); } log.info("Help search index located at " + dir); return dir; }
class class_name[name] begin[{] method[resolveIndexDirectoryPath, return_type[type[File]], modifier[private], parameter[]] begin[{] if[call[StringUtils.isEmpty, parameter[member[.indexDirectoryPath]]]] begin[{] assign[member[.indexDirectoryPath], binary_operation[call[System.getProperty, parameter[literal["java.io.tmpdir"]]], +, call[appContext.getApplicationName, parameter[]]]] else begin[{] None end[}] local_variable[type[File], dir] if[binary_operation[call[dir.exists, parameter[]], &&, call[dir.mkdirs, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create help search index directory.")], 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) else begin[{] None end[}] call[log.info, parameter[binary_operation[literal["Help search index located at "], +, member[.dir]]]] return[member[.dir]] end[}] END[}]
Keyword[private] identifier[File] identifier[resolveIndexDirectoryPath] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[indexDirectoryPath] operator[SEP] operator[SEP] { identifier[indexDirectoryPath] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] identifier[appContext] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] operator[SEP] } identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[indexDirectoryPath] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[dir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[dir] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[dir] operator[SEP] operator[SEP] Keyword[return] identifier[dir] operator[SEP] }
@SafeVarargs public final RequestBuilder params(Map.Entry<String, ?>... params) { this.params = Lists.of(params); return this; }
class class_name[name] begin[{] method[params, return_type[type[RequestBuilder]], modifier[final public], parameter[params]] begin[{] assign[THIS[member[None.params]], call[Lists.of, parameter[member[.params]]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[final] identifier[RequestBuilder] identifier[params] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , operator[?] operator[>] operator[...] identifier[params] operator[SEP] { Keyword[this] operator[SEP] identifier[params] operator[=] identifier[Lists] operator[SEP] identifier[of] operator[SEP] identifier[params] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static Header[] parseHeaders(InputStream is, String charset) throws IOException, HttpException { LOG.trace("enter HeaderParser.parseHeaders(InputStream, String)"); ArrayList<Header> headers = new ArrayList<Header>(); String name = null; StringBuffer value = null; for (; ;) { String line = LaxHttpParser.readLine(is, charset); if ((line == null) || (line.trim().length() < 1)) { break; } // Parse the header name and value // Check for folded headers first // Detect LWS-char see HTTP/1.0 or HTTP/1.1 Section 2.2 // discussion on folded headers if ((line.charAt(0) == ' ') || (line.charAt(0) == '\t')) { // we have continuation folded header // so append value if (value != null) { value.append(' '); value.append(line.trim()); } } else { // make sure we save the previous name,value pair if present if (name != null) { headers.add(new Header(name, value.toString())); } // Otherwise we should have normal HTTP header line // Parse the header name and value int colon = line.indexOf(":"); // START IA/HERITRIX change // Don't throw an exception if can't parse. We want to keep // going even though header is bad. Rather, create // pseudo-header. if (colon < 0) { // throw new ProtocolException("Unable to parse header: " + // line); name = "HttpClient-Bad-Header-Line-Failed-Parse"; value = new StringBuffer(line); } else { name = line.substring(0, colon).trim(); value = new StringBuffer(line.substring(colon + 1).trim()); } // END IA/HERITRIX change } } // make sure we save the last name,value pair if present if (name != null) { headers.add(new Header(name, value.toString())); } return (Header[]) headers.toArray(new Header[headers.size()]); }
class class_name[name] begin[{] method[parseHeaders, return_type[type[Header]], modifier[public static], parameter[is, charset]] begin[{] call[LOG.trace, parameter[literal["enter HeaderParser.parseHeaders(InputStream, String)"]]] local_variable[type[ArrayList], headers] local_variable[type[String], name] local_variable[type[StringBuffer], value] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=LaxHttpParser, selectors=[], type_arguments=None), name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Header, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=headers, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=colon)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=colon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=colon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=colon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HttpClient-Bad-Header-Line-Failed-Parse")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=line, 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=StringBuffer, sub_type=None))), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], member=append, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=None, init=None, update=None), label=None) if[binary_operation[member[.name], !=, literal[null]]] begin[{] call[headers.add, parameter[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Header, sub_type=None))]] else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=headers, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Header, sub_type=None))], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=headers, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=Header, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Header] operator[SEP] operator[SEP] identifier[parseHeaders] operator[SEP] identifier[InputStream] identifier[is] , identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] , identifier[HttpException] { identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[Header] operator[>] identifier[headers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Header] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] Other[null] operator[SEP] identifier[StringBuffer] identifier[value] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[line] operator[=] identifier[LaxHttpParser] operator[SEP] identifier[readLine] operator[SEP] identifier[is] , identifier[charset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[line] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[1] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[line] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] operator[||] operator[SEP] identifier[line] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[value] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] { identifier[headers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Header] operator[SEP] identifier[name] , identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[colon] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[colon] operator[<] Other[0] operator[SEP] { identifier[name] operator[=] literal[String] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[line] operator[SEP] operator[SEP] } Keyword[else] { identifier[name] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[colon] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[colon] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] { identifier[headers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Header] operator[SEP] identifier[name] , identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[Header] operator[SEP] operator[SEP] operator[SEP] identifier[headers] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Header] operator[SEP] identifier[headers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Reference(name = "listener", service = VirtualHostListener.class, policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE) protected void setListener(ServiceReference<VirtualHostListener> reference) { _listeners.addReference(reference); notifyListener(_listeners.getService(reference)); }
class class_name[name] begin[{] method[setListener, return_type[void], modifier[protected], parameter[reference]] begin[{] call[_listeners.addReference, parameter[member[.reference]]] call[.notifyListener, parameter[call[_listeners.getService, parameter[member[.reference]]]]] end[}] END[}]
annotation[@] identifier[Reference] operator[SEP] identifier[name] operator[=] literal[String] , identifier[service] operator[=] identifier[VirtualHostListener] operator[SEP] Keyword[class] , identifier[policy] operator[=] identifier[ReferencePolicy] operator[SEP] identifier[DYNAMIC] , identifier[cardinality] operator[=] identifier[ReferenceCardinality] operator[SEP] identifier[MULTIPLE] operator[SEP] Keyword[protected] Keyword[void] identifier[setListener] operator[SEP] identifier[ServiceReference] operator[<] identifier[VirtualHostListener] operator[>] identifier[reference] operator[SEP] { identifier[_listeners] operator[SEP] identifier[addReference] operator[SEP] identifier[reference] operator[SEP] operator[SEP] identifier[notifyListener] operator[SEP] identifier[_listeners] operator[SEP] identifier[getService] operator[SEP] identifier[reference] operator[SEP] operator[SEP] operator[SEP] }
public static VectorByteBufferedIntegral4s64 createWithBase( final ByteBuffer b, final MutableLongType base, final int offset) { return new VectorByteBufferedIntegral4s64(b, base, offset); }
class class_name[name] begin[{] method[createWithBase, return_type[type[VectorByteBufferedIntegral4s64]], modifier[public static], parameter[b, base, offset]] begin[{] return[ClassCreator(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, 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=VectorByteBufferedIntegral4s64, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[VectorByteBufferedIntegral4s64] identifier[createWithBase] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[b] , Keyword[final] identifier[MutableLongType] identifier[base] , Keyword[final] Keyword[int] identifier[offset] operator[SEP] { Keyword[return] Keyword[new] identifier[VectorByteBufferedIntegral4s64] operator[SEP] identifier[b] , identifier[base] , identifier[offset] operator[SEP] operator[SEP] }
public List<File> findNRecentSnapshots(int n) throws IOException { List<File> files = Util.sortDataDir(snapDir.listFiles(), "snapshot", false); int i = 0; List<File> list = new ArrayList<File>(); for (File f: files) { if (i==n) break; i++; list.add(f); } return list; }
class class_name[name] begin[{] method[findNRecentSnapshots, return_type[type[List]], modifier[public], parameter[n]] begin[{] local_variable[type[List], files] local_variable[type[int], i] local_variable[type[List], list] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BreakStatement(goto=None, label=None)), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, 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=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[File] operator[>] identifier[findNRecentSnapshots] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[File] operator[>] identifier[files] operator[=] identifier[Util] operator[SEP] identifier[sortDataDir] operator[SEP] identifier[snapDir] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] , literal[String] , literal[boolean] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[List] operator[<] identifier[File] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[f] operator[:] identifier[files] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[==] identifier[n] operator[SEP] Keyword[break] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
@Override public void filterResponse(HttpResponse response, HttpMessageContents contents, HttpMessageInfo messageInfo) { if (contents.getBinaryContents().length > threshold) { log.warning("Too large response " + messageInfo.getUrl() + ": " + contents.getBinaryContents().length + " bytes"); if (log.isLoggable(Level.FINEST)) { log.finest("Response content: " + contents.getTextContents()); } } }
class class_name[name] begin[{] method[filterResponse, return_type[void], modifier[public], parameter[response, contents, messageInfo]] begin[{] if[binary_operation[call[contents.getBinaryContents, parameter[]], >, member[.threshold]]] begin[{] call[log.warning, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Too large response "], +, call[messageInfo.getUrl, parameter[]]], +, literal[": "]], +, call[contents.getBinaryContents, parameter[]]], +, literal[" bytes"]]]] if[call[log.isLoggable, parameter[member[Level.FINEST]]]] begin[{] call[log.finest, parameter[binary_operation[literal["Response content: "], +, call[contents.getTextContents, parameter[]]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[filterResponse] operator[SEP] identifier[HttpResponse] identifier[response] , identifier[HttpMessageContents] identifier[contents] , identifier[HttpMessageInfo] identifier[messageInfo] operator[SEP] { Keyword[if] operator[SEP] identifier[contents] operator[SEP] identifier[getBinaryContents] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[>] identifier[threshold] operator[SEP] { identifier[log] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[messageInfo] operator[SEP] identifier[getUrl] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[contents] operator[SEP] identifier[getBinaryContents] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[contents] operator[SEP] identifier[getTextContents] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Deprecated @SuppressWarnings("rawtypes") public static void populateArgumentsForCriteria(Class<?> targetClass, Criteria c, Map argMap, ConversionService conversionService) { populateArgumentsForCriteria(null, targetClass, c, argMap, conversionService); }
class class_name[name] begin[{] method[populateArgumentsForCriteria, return_type[void], modifier[public static], parameter[targetClass, c, argMap, conversionService]] begin[{] call[.populateArgumentsForCriteria, parameter[literal[null], member[.targetClass], member[.c], member[.argMap], member[.conversionService]]] end[}] END[}]
annotation[@] identifier[Deprecated] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[populateArgumentsForCriteria] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[targetClass] , identifier[Criteria] identifier[c] , identifier[Map] identifier[argMap] , identifier[ConversionService] identifier[conversionService] operator[SEP] { identifier[populateArgumentsForCriteria] operator[SEP] Other[null] , identifier[targetClass] , identifier[c] , identifier[argMap] , identifier[conversionService] operator[SEP] operator[SEP] }
public String getArguments(MethodInvocation invocation) { try { Object[] args = invocation.getArguments(); if (args == null) return null; if (args.length != 1) return null;// 参数是一个主键 if (args[0] == null) return null; return args[0].toString(); } catch (Exception ex) { Debug.logError("[JdonFramework] method:" + invocation.getMethod().getName() + " " + ex, module); return null; } }
class class_name[name] begin[{] method[getArguments, return_type[type[String]], modifier[public], parameter[invocation]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getArguments, postfix_operators=[], prefix_operators=[], qualifier=invocation, selectors=[], type_arguments=None), name=args)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), ReturnStatement(expression=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[JdonFramework] method:"), operandr=MethodInvocation(arguments=[], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=invocation, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logError, postfix_operators=[], prefix_operators=[], qualifier=Debug, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[String] identifier[getArguments] operator[SEP] identifier[MethodInvocation] identifier[invocation] operator[SEP] { Keyword[try] { identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[=] identifier[invocation] operator[SEP] identifier[getArguments] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[!=] Other[1] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] Other[0] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[Debug] operator[SEP] identifier[logError] operator[SEP] literal[String] operator[+] identifier[invocation] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ex] , identifier[module] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) { int newOps = 0; if ((ops & SelectionKey.OP_READ) != 0) newOps |= PollArrayWrapper.POLLIN; if ((ops & SelectionKey.OP_WRITE) != 0) newOps |= PollArrayWrapper.POLLOUT; if ((ops & SelectionKey.OP_CONNECT) != 0) newOps |= PollArrayWrapper.POLLIN; sk.selector.putEventOps(sk, newOps); }
class class_name[name] begin[{] method[translateAndSetInterestOps, return_type[void], modifier[public], parameter[ops, sk]] begin[{] local_variable[type[int], newOps] if[binary_operation[binary_operation[member[.ops], &, member[SelectionKey.OP_READ]], !=, literal[0]]] begin[{] assign[member[.newOps], member[PollArrayWrapper.POLLIN]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.ops], &, member[SelectionKey.OP_WRITE]], !=, literal[0]]] begin[{] assign[member[.newOps], member[PollArrayWrapper.POLLOUT]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.ops], &, member[SelectionKey.OP_CONNECT]], !=, literal[0]]] begin[{] assign[member[.newOps], member[PollArrayWrapper.POLLIN]] else begin[{] None end[}] call[sk.selector.putEventOps, parameter[member[.sk], member[.newOps]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[translateAndSetInterestOps] operator[SEP] Keyword[int] identifier[ops] , identifier[SelectionKeyImpl] identifier[sk] operator[SEP] { Keyword[int] identifier[newOps] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ops] operator[&] identifier[SelectionKey] operator[SEP] identifier[OP_READ] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[newOps] operator[|=] identifier[PollArrayWrapper] operator[SEP] identifier[POLLIN] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ops] operator[&] identifier[SelectionKey] operator[SEP] identifier[OP_WRITE] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[newOps] operator[|=] identifier[PollArrayWrapper] operator[SEP] identifier[POLLOUT] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ops] operator[&] identifier[SelectionKey] operator[SEP] identifier[OP_CONNECT] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[newOps] operator[|=] identifier[PollArrayWrapper] operator[SEP] identifier[POLLIN] operator[SEP] identifier[sk] operator[SEP] identifier[selector] operator[SEP] identifier[putEventOps] operator[SEP] identifier[sk] , identifier[newOps] operator[SEP] operator[SEP] }
public Matrix4x3d reflect(double a, double b, double c, double d) { return reflect(a, b, c, d, this); }
class class_name[name] begin[{] method[reflect, return_type[type[Matrix4x3d]], modifier[public], parameter[a, b, c, d]] begin[{] return[call[.reflect, parameter[member[.a], member[.b], member[.c], member[.d], THIS[]]]] end[}] END[}]
Keyword[public] identifier[Matrix4x3d] identifier[reflect] operator[SEP] Keyword[double] identifier[a] , Keyword[double] identifier[b] , Keyword[double] identifier[c] , Keyword[double] identifier[d] operator[SEP] { Keyword[return] identifier[reflect] operator[SEP] identifier[a] , identifier[b] , identifier[c] , identifier[d] , Keyword[this] operator[SEP] operator[SEP] }
public SID addSubAuthority(byte[] sub) { if (sub == null || sub.length != 4) { throw new IllegalArgumentException("Invalid sub-authority to be added"); } this.subAuthorities.add(Arrays.copyOf(sub, sub.length)); return this; }
class class_name[name] begin[{] method[addSubAuthority, return_type[type[SID]], modifier[public], parameter[sub]] begin[{] if[binary_operation[binary_operation[member[.sub], ==, literal[null]], ||, binary_operation[member[sub.length], !=, literal[4]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid sub-authority to be added")], 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[}] THIS[member[None.subAuthorities]call[None.add, parameter[call[Arrays.copyOf, parameter[member[.sub], member[sub.length]]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[SID] identifier[addSubAuthority] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[sub] operator[SEP] { Keyword[if] operator[SEP] identifier[sub] operator[==] Other[null] operator[||] identifier[sub] operator[SEP] identifier[length] operator[!=] Other[4] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[subAuthorities] operator[SEP] identifier[add] operator[SEP] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[sub] , identifier[sub] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected int unmarkFrames() { final int res = this.frames.size(); while (!this.frames.empty()) { final CLFrame f = this.control.get(this.frames.back()); this.frames.pop(); assert f.mark(); f.setMark(false); } return res; }
class class_name[name] begin[{] method[unmarkFrames, return_type[type[int]], modifier[protected], parameter[]] begin[{] local_variable[type[int], res] while[THIS[member[None.frames]call[None.empty, parameter[]]]] begin[{] local_variable[type[CLFrame], f] THIS[member[None.frames]call[None.pop, parameter[]]] AssertStatement(condition=MethodInvocation(arguments=[], member=mark, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None, value=None) call[f.setMark, parameter[literal[false]]] end[}] return[member[.res]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[unmarkFrames] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[res] operator[=] Keyword[this] operator[SEP] identifier[frames] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[frames] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[CLFrame] identifier[f] operator[=] Keyword[this] operator[SEP] identifier[control] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] identifier[frames] operator[SEP] identifier[back] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[frames] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[f] operator[SEP] identifier[mark] operator[SEP] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[setMark] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[return] identifier[res] operator[SEP] }
public void putInt(int index, int v) { // Reversing the endian v = Integer.reverseBytes(v); unsafe.putInt(base, address + index, v); }
class class_name[name] begin[{] method[putInt, return_type[void], modifier[public], parameter[index, v]] begin[{] assign[member[.v], call[Integer.reverseBytes, parameter[member[.v]]]] call[unsafe.putInt, parameter[member[.base], binary_operation[member[.address], +, member[.index]], member[.v]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[putInt] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[v] operator[SEP] { identifier[v] operator[=] identifier[Integer] operator[SEP] identifier[reverseBytes] operator[SEP] identifier[v] operator[SEP] operator[SEP] identifier[unsafe] operator[SEP] identifier[putInt] operator[SEP] identifier[base] , identifier[address] operator[+] identifier[index] , identifier[v] operator[SEP] operator[SEP] }
@Deprecated public static int getEPSGCodefromUTS(Coordinate refLonLat) { // define base EPSG code value of all UTM zones; int epsg_code = 32600; // add 100 for all zones in southern hemisphere if (refLonLat.y < 0) { epsg_code += 100; } // finally, add zone number to code epsg_code += getUTMZoneForLongitude(refLonLat.x); return epsg_code; }
class class_name[name] begin[{] method[getEPSGCodefromUTS, return_type[type[int]], modifier[public static], parameter[refLonLat]] begin[{] local_variable[type[int], epsg_code] if[binary_operation[member[refLonLat.y], <, literal[0]]] begin[{] assign[member[.epsg_code], literal[100]] else begin[{] None end[}] assign[member[.epsg_code], call[.getUTMZoneForLongitude, parameter[member[refLonLat.x]]]] return[member[.epsg_code]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[int] identifier[getEPSGCodefromUTS] operator[SEP] identifier[Coordinate] identifier[refLonLat] operator[SEP] { Keyword[int] identifier[epsg_code] operator[=] Other[32600] operator[SEP] Keyword[if] operator[SEP] identifier[refLonLat] operator[SEP] identifier[y] operator[<] Other[0] operator[SEP] { identifier[epsg_code] operator[+=] Other[100] operator[SEP] } identifier[epsg_code] operator[+=] identifier[getUTMZoneForLongitude] operator[SEP] identifier[refLonLat] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[return] identifier[epsg_code] operator[SEP] }
@Override protected void setupHtmlData(final ActionRuntime runtime) { super.setupHtmlData(runtime); runtime.registerData("helpLink", systemHelper.getHelpLink(fessConfig.getOnlineHelpNameSuggest())); runtime.registerData("totalWordsNum", suggestHelper.getAllWordsNum()); runtime.registerData("documentWordsNum", suggestHelper.getDocumentWordsNum()); runtime.registerData("queryWordsNum", suggestHelper.getQueryWordsNum()); }
class class_name[name] begin[{] method[setupHtmlData, return_type[void], modifier[protected], parameter[runtime]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=runtime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setupHtmlData, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[runtime.registerData, parameter[literal["helpLink"], call[systemHelper.getHelpLink, parameter[call[fessConfig.getOnlineHelpNameSuggest, parameter[]]]]]] call[runtime.registerData, parameter[literal["totalWordsNum"], call[suggestHelper.getAllWordsNum, parameter[]]]] call[runtime.registerData, parameter[literal["documentWordsNum"], call[suggestHelper.getDocumentWordsNum, parameter[]]]] call[runtime.registerData, parameter[literal["queryWordsNum"], call[suggestHelper.getQueryWordsNum, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[setupHtmlData] operator[SEP] Keyword[final] identifier[ActionRuntime] identifier[runtime] operator[SEP] { Keyword[super] operator[SEP] identifier[setupHtmlData] operator[SEP] identifier[runtime] operator[SEP] operator[SEP] identifier[runtime] operator[SEP] identifier[registerData] operator[SEP] literal[String] , identifier[systemHelper] operator[SEP] identifier[getHelpLink] operator[SEP] identifier[fessConfig] operator[SEP] identifier[getOnlineHelpNameSuggest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[runtime] operator[SEP] identifier[registerData] operator[SEP] literal[String] , identifier[suggestHelper] operator[SEP] identifier[getAllWordsNum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[runtime] operator[SEP] identifier[registerData] operator[SEP] literal[String] , identifier[suggestHelper] operator[SEP] identifier[getDocumentWordsNum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[runtime] operator[SEP] identifier[registerData] operator[SEP] literal[String] , identifier[suggestHelper] operator[SEP] identifier[getQueryWordsNum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static synchronized JFileChooser getFileChooser() { // NOPMD if (fileChooser == null) { final String currentDirectory = System.getProperty("user.dir"); fileChooser = new JFileChooser(currentDirectory); } return fileChooser; }
class class_name[name] begin[{] method[getFileChooser, return_type[type[JFileChooser]], modifier[synchronized public static], parameter[]] begin[{] if[binary_operation[member[.fileChooser], ==, literal[null]]] begin[{] local_variable[type[String], currentDirectory] assign[member[.fileChooser], ClassCreator(arguments=[MemberReference(member=currentDirectory, 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=JFileChooser, sub_type=None))] else begin[{] None end[}] return[member[.fileChooser]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] identifier[JFileChooser] identifier[getFileChooser] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[fileChooser] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[currentDirectory] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[fileChooser] operator[=] Keyword[new] identifier[JFileChooser] operator[SEP] identifier[currentDirectory] operator[SEP] operator[SEP] } Keyword[return] identifier[fileChooser] operator[SEP] }
public void setSelection(int[] selectedIndicies) { for (int index : selectedIndicies) { if (index >= 0 && index < mSelection.length) { mSelection[index] = true; } else { throw new IllegalArgumentException("Index " + index + " is out of bounds."); } } refreshDisplayValue(); }
class class_name[name] begin[{] method[setSelection, return_type[void], modifier[public], parameter[selectedIndicies]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=mSelection, selectors=[]), operator=<), operator=&&), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Index "), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is out of bounds."), 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)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mSelection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=selectedIndicies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) call[.refreshDisplayValue, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSelection] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[selectedIndicies] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[:] identifier[selectedIndicies] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[>=] Other[0] operator[&&] identifier[index] operator[<] identifier[mSelection] operator[SEP] identifier[length] operator[SEP] { identifier[mSelection] operator[SEP] identifier[index] operator[SEP] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[index] operator[+] literal[String] operator[SEP] operator[SEP] } } identifier[refreshDisplayValue] operator[SEP] operator[SEP] operator[SEP] }
@Override public final FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException { if (delegatePostingsFormat != null) { return new MtasFieldsConsumer( delegatePostingsFormat.fieldsConsumer(state), state, getName(), delegatePostingsFormat.getName()); } else { PostingsFormat pf = Codec.forName(delegateCodecName).postingsFormat(); return pf.fieldsConsumer(state); } }
class class_name[name] begin[{] method[fieldsConsumer, return_type[type[FieldsConsumer]], modifier[final public], parameter[state]] begin[{] if[binary_operation[member[.delegatePostingsFormat], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fieldsConsumer, postfix_operators=[], prefix_operators=[], qualifier=delegatePostingsFormat, selectors=[], type_arguments=None), MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=delegatePostingsFormat, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MtasFieldsConsumer, sub_type=None))] else begin[{] local_variable[type[PostingsFormat], pf] return[call[pf.fieldsConsumer, parameter[member[.state]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[FieldsConsumer] identifier[fieldsConsumer] operator[SEP] identifier[SegmentWriteState] identifier[state] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[delegatePostingsFormat] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[MtasFieldsConsumer] operator[SEP] identifier[delegatePostingsFormat] operator[SEP] identifier[fieldsConsumer] operator[SEP] identifier[state] operator[SEP] , identifier[state] , identifier[getName] operator[SEP] operator[SEP] , identifier[delegatePostingsFormat] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[PostingsFormat] identifier[pf] operator[=] identifier[Codec] operator[SEP] identifier[forName] operator[SEP] identifier[delegateCodecName] operator[SEP] operator[SEP] identifier[postingsFormat] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[pf] operator[SEP] identifier[fieldsConsumer] operator[SEP] identifier[state] operator[SEP] operator[SEP] } }
public static AccessRequest createArRandomUuid(String admDom) { return new AccessRequest(java.util.UUID.randomUUID().toString(), admDom); }
class class_name[name] begin[{] method[createArRandomUuid, return_type[type[AccessRequest]], modifier[public static], parameter[admDom]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=randomUUID, postfix_operators=[], prefix_operators=[], qualifier=java.util.UUID, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=admDom, 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=AccessRequest, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AccessRequest] identifier[createArRandomUuid] operator[SEP] identifier[String] identifier[admDom] operator[SEP] { Keyword[return] Keyword[new] identifier[AccessRequest] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[UUID] operator[SEP] identifier[randomUUID] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[admDom] operator[SEP] operator[SEP] }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__VALUE: return value != null; case XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT: return element != null; } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XANNOTATION_ELEMENT_VALUE_PAIR__VALUE, postfix_operators=[], prefix_operators=[], qualifier=XAnnotationsPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)]), SwitchStatementCase(case=[MemberReference(member=XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, postfix_operators=[], prefix_operators=[], qualifier=XAnnotationsPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[XAnnotationsPackage] operator[SEP] identifier[XANNOTATION_ELEMENT_VALUE_PAIR__VALUE] operator[:] Keyword[return] identifier[value] operator[!=] Other[null] operator[SEP] Keyword[case] identifier[XAnnotationsPackage] operator[SEP] identifier[XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT] operator[:] Keyword[return] identifier[element] operator[!=] Other[null] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
private void construct(DerValue derVal) throws IOException { serialNum = derVal.getBigInteger(); if (derVal.data.available() != 0) { throw new IOException("Excess SerialNumber data"); } }
class class_name[name] begin[{] method[construct, return_type[void], modifier[private], parameter[derVal]] begin[{] assign[member[.serialNum], call[derVal.getBigInteger, parameter[]]] if[binary_operation[call[derVal.data.available, parameter[]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Excess SerialNumber data")], 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) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[construct] operator[SEP] identifier[DerValue] identifier[derVal] operator[SEP] Keyword[throws] identifier[IOException] { identifier[serialNum] operator[=] identifier[derVal] operator[SEP] identifier[getBigInteger] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[derVal] operator[SEP] identifier[data] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public Set getSIBDestinationLocalitySet(String busName, String uuid, boolean newCache) throws SIBExceptionBase, SIBExceptionDestinationNotFound { String thisMethodName = "getSIBDestinationLocalitySet"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, new Object[] { busName, uuid, new Boolean(newCache) }); } if (oldDestCache == null || newCache) { Set retVal = _bus.getDestinationCache().getSIBDestinationLocalitySet(busName, uuid); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getSIBDestinationLocalitySet", retVal); return retVal; } Set retVal = oldDestCache.getSIBDestinationLocalitySet(busName, uuid); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.exit(tc, thisMethodName, retVal); } return retVal; }
class class_name[name] begin[{] method[getSIBDestinationLocalitySet, return_type[type[Set]], modifier[public], parameter[busName, uuid, newCache]] begin[{] local_variable[type[String], thisMethodName] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], member[.thisMethodName], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=busName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=newCache, 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=Boolean, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.oldDestCache], ==, literal[null]], ||, member[.newCache]]] begin[{] local_variable[type[Set], retVal] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getSIBDestinationLocalitySet"], member[.retVal]]] else begin[{] None end[}] return[member[.retVal]] else begin[{] None end[}] local_variable[type[Set], retVal] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], member[.thisMethodName], member[.retVal]]] else begin[{] None end[}] return[member[.retVal]] end[}] END[}]
Keyword[public] identifier[Set] identifier[getSIBDestinationLocalitySet] operator[SEP] identifier[String] identifier[busName] , identifier[String] identifier[uuid] , Keyword[boolean] identifier[newCache] operator[SEP] Keyword[throws] identifier[SIBExceptionBase] , identifier[SIBExceptionDestinationNotFound] { identifier[String] identifier[thisMethodName] operator[=] literal[String] 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] , identifier[thisMethodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[busName] , identifier[uuid] , Keyword[new] identifier[Boolean] operator[SEP] identifier[newCache] operator[SEP] } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[oldDestCache] operator[==] Other[null] operator[||] identifier[newCache] operator[SEP] { identifier[Set] identifier[retVal] operator[=] identifier[_bus] operator[SEP] identifier[getDestinationCache] operator[SEP] operator[SEP] operator[SEP] identifier[getSIBDestinationLocalitySet] operator[SEP] identifier[busName] , identifier[uuid] 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] , identifier[retVal] operator[SEP] operator[SEP] Keyword[return] identifier[retVal] operator[SEP] } identifier[Set] identifier[retVal] operator[=] identifier[oldDestCache] operator[SEP] identifier[getSIBDestinationLocalitySet] operator[SEP] identifier[busName] , identifier[uuid] 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] , identifier[thisMethodName] , identifier[retVal] operator[SEP] operator[SEP] } Keyword[return] identifier[retVal] operator[SEP] }
private static void isPrimaryAlive(String zkRegistry) throws IOException { String parts[] = zkRegistry.split(":"); if (parts.length != 2) { throw new IllegalArgumentException("Invalid Address : " + zkRegistry); } String host = parts[0]; int port = Integer.parseInt(parts[1]); InetSocketAddress clientSocket = new InetSocketAddress(host, port); ServerSocket socket = new ServerSocket(); socket.bind(clientSocket); socket.close(); }
class class_name[name] begin[{] method[isPrimaryAlive, return_type[void], modifier[private static], parameter[zkRegistry]] begin[{] local_variable[type[String], parts] if[binary_operation[member[parts.length], !=, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid Address : "), operandr=MemberReference(member=zkRegistry, 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[String], host] local_variable[type[int], port] local_variable[type[InetSocketAddress], clientSocket] local_variable[type[ServerSocket], socket] call[socket.bind, parameter[member[.clientSocket]]] call[socket.close, parameter[]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[isPrimaryAlive] operator[SEP] identifier[String] identifier[zkRegistry] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[parts] operator[SEP] operator[SEP] operator[=] identifier[zkRegistry] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parts] operator[SEP] identifier[length] operator[!=] Other[2] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[zkRegistry] operator[SEP] operator[SEP] } identifier[String] identifier[host] operator[=] identifier[parts] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[port] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[parts] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[InetSocketAddress] identifier[clientSocket] operator[=] Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[host] , identifier[port] operator[SEP] operator[SEP] identifier[ServerSocket] identifier[socket] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] operator[SEP] operator[SEP] identifier[socket] operator[SEP] identifier[bind] operator[SEP] identifier[clientSocket] operator[SEP] operator[SEP] identifier[socket] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
@Override public Multimedia addMultimediaToPerson(final Person person, final String string) { if (person == null || string == null) { return new Multimedia(); } final Multimedia mm = new Multimedia(person, "Multimedia", string); person.insert(mm); return mm; }
class class_name[name] begin[{] method[addMultimediaToPerson, return_type[type[Multimedia]], modifier[public], parameter[person, string]] begin[{] if[binary_operation[binary_operation[member[.person], ==, literal[null]], ||, binary_operation[member[.string], ==, literal[null]]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Multimedia, sub_type=None))] else begin[{] None end[}] local_variable[type[Multimedia], mm] call[person.insert, parameter[member[.mm]]] return[member[.mm]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Multimedia] identifier[addMultimediaToPerson] operator[SEP] Keyword[final] identifier[Person] identifier[person] , Keyword[final] identifier[String] identifier[string] operator[SEP] { Keyword[if] operator[SEP] identifier[person] operator[==] Other[null] operator[||] identifier[string] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Multimedia] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[Multimedia] identifier[mm] operator[=] Keyword[new] identifier[Multimedia] operator[SEP] identifier[person] , literal[String] , identifier[string] operator[SEP] operator[SEP] identifier[person] operator[SEP] identifier[insert] operator[SEP] identifier[mm] operator[SEP] operator[SEP] Keyword[return] identifier[mm] operator[SEP] }
@Deprecated public void writeDataPage( int valueCount, int uncompressedPageSize, BytesInput bytes, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOException { state = state.write(); // We are unable to build indexes without rowCount so skip them for this column offsetIndexBuilder = OffsetIndexBuilder.getNoOpBuilder(); columnIndexBuilder = ColumnIndexBuilder.getNoOpBuilder(); long beforeHeader = out.getPos(); LOG.debug("{}: write data page: {} values", beforeHeader, valueCount); int compressedPageSize = (int)bytes.size(); metadataConverter.writeDataPageV1Header( uncompressedPageSize, compressedPageSize, valueCount, rlEncoding, dlEncoding, valuesEncoding, out); long headerSize = out.getPos() - beforeHeader; this.uncompressedLength += uncompressedPageSize + headerSize; this.compressedLength += compressedPageSize + headerSize; LOG.debug("{}: write data page content {}", out.getPos(), compressedPageSize); bytes.writeAllTo(out); encodingStatsBuilder.addDataEncoding(valuesEncoding); currentEncodings.add(rlEncoding); currentEncodings.add(dlEncoding); currentEncodings.add(valuesEncoding); }
class class_name[name] begin[{] method[writeDataPage, return_type[void], modifier[public], parameter[valueCount, uncompressedPageSize, bytes, rlEncoding, dlEncoding, valuesEncoding]] begin[{] assign[member[.state], call[state.write, parameter[]]] assign[member[.offsetIndexBuilder], call[OffsetIndexBuilder.getNoOpBuilder, parameter[]]] assign[member[.columnIndexBuilder], call[ColumnIndexBuilder.getNoOpBuilder, parameter[]]] local_variable[type[long], beforeHeader] call[LOG.debug, parameter[literal["{}: write data page: {} values"], member[.beforeHeader], member[.valueCount]]] local_variable[type[int], compressedPageSize] call[metadataConverter.writeDataPageV1Header, parameter[member[.uncompressedPageSize], member[.compressedPageSize], member[.valueCount], member[.rlEncoding], member[.dlEncoding], member[.valuesEncoding], member[.out]]] local_variable[type[long], headerSize] assign[THIS[member[None.uncompressedLength]], binary_operation[member[.uncompressedPageSize], +, member[.headerSize]]] assign[THIS[member[None.compressedLength]], binary_operation[member[.compressedPageSize], +, member[.headerSize]]] call[LOG.debug, parameter[literal["{}: write data page content {}"], call[out.getPos, parameter[]], member[.compressedPageSize]]] call[bytes.writeAllTo, parameter[member[.out]]] call[encodingStatsBuilder.addDataEncoding, parameter[member[.valuesEncoding]]] call[currentEncodings.add, parameter[member[.rlEncoding]]] call[currentEncodings.add, parameter[member[.dlEncoding]]] call[currentEncodings.add, parameter[member[.valuesEncoding]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[writeDataPage] operator[SEP] Keyword[int] identifier[valueCount] , Keyword[int] identifier[uncompressedPageSize] , identifier[BytesInput] identifier[bytes] , identifier[Encoding] identifier[rlEncoding] , identifier[Encoding] identifier[dlEncoding] , identifier[Encoding] identifier[valuesEncoding] operator[SEP] Keyword[throws] identifier[IOException] { identifier[state] operator[=] identifier[state] operator[SEP] identifier[write] operator[SEP] operator[SEP] operator[SEP] identifier[offsetIndexBuilder] operator[=] identifier[OffsetIndexBuilder] operator[SEP] identifier[getNoOpBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[columnIndexBuilder] operator[=] identifier[ColumnIndexBuilder] operator[SEP] identifier[getNoOpBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[beforeHeader] operator[=] identifier[out] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[beforeHeader] , identifier[valueCount] operator[SEP] operator[SEP] Keyword[int] identifier[compressedPageSize] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[bytes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[metadataConverter] operator[SEP] identifier[writeDataPageV1Header] operator[SEP] identifier[uncompressedPageSize] , identifier[compressedPageSize] , identifier[valueCount] , identifier[rlEncoding] , identifier[dlEncoding] , identifier[valuesEncoding] , identifier[out] operator[SEP] operator[SEP] Keyword[long] identifier[headerSize] operator[=] identifier[out] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[-] identifier[beforeHeader] operator[SEP] Keyword[this] operator[SEP] identifier[uncompressedLength] operator[+=] identifier[uncompressedPageSize] operator[+] identifier[headerSize] operator[SEP] Keyword[this] operator[SEP] identifier[compressedLength] operator[+=] identifier[compressedPageSize] operator[+] identifier[headerSize] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[out] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] , identifier[compressedPageSize] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] identifier[writeAllTo] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[encodingStatsBuilder] operator[SEP] identifier[addDataEncoding] operator[SEP] identifier[valuesEncoding] operator[SEP] operator[SEP] identifier[currentEncodings] operator[SEP] identifier[add] operator[SEP] identifier[rlEncoding] operator[SEP] operator[SEP] identifier[currentEncodings] operator[SEP] identifier[add] operator[SEP] identifier[dlEncoding] operator[SEP] operator[SEP] identifier[currentEncodings] operator[SEP] identifier[add] operator[SEP] identifier[valuesEncoding] operator[SEP] operator[SEP] }
public void parse(String str) { if (buffer.length() > 0) { str = buffer.toString().concat(str); buffer = new StringBuilder(); } Reader reader = new StringReader(str); try { try { parse(reader); } finally { reader.close(); } } catch (IOException ex) { /* ignore */ } }
class class_name[name] begin[{] method[parse, return_type[void], modifier[public], parameter[str]] begin[{] if[binary_operation[call[buffer.length, parameter[]], >, literal[0]]] begin[{] assign[member[.str], call[buffer.toString, parameter[]]] assign[member[.buffer], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))] else begin[{] None end[}] local_variable[type[Reader], reader] TryStatement(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[parse] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[str] operator[=] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[concat] operator[SEP] identifier[str] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] } identifier[Reader] identifier[reader] operator[=] Keyword[new] identifier[StringReader] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[try] { Keyword[try] { identifier[parse] operator[SEP] identifier[reader] operator[SEP] operator[SEP] } Keyword[finally] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { } }
public boolean queryAllowOasisXMLCatalogPI () { String allow = System.getProperty(pAllowPI); if (allow == null) { if (resources==null) readProperties(); if (resources==null) return defaultOasisXMLCatalogPI; try { allow = resources.getString("allow-oasis-xml-catalog-pi"); } catch (MissingResourceException e) { return defaultOasisXMLCatalogPI; } } if (allow == null) { return defaultOasisXMLCatalogPI; } return (allow.equalsIgnoreCase("true") || allow.equalsIgnoreCase("yes") || allow.equalsIgnoreCase("1")); }
class class_name[name] begin[{] method[queryAllowOasisXMLCatalogPI, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[String], allow] if[binary_operation[member[.allow], ==, literal[null]]] begin[{] if[binary_operation[member[.resources], ==, literal[null]]] begin[{] call[.readProperties, parameter[]] else begin[{] None end[}] if[binary_operation[member[.resources], ==, literal[null]]] begin[{] return[member[.defaultOasisXMLCatalogPI]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=allow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allow-oasis-xml-catalog-pi")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=defaultOasisXMLCatalogPI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.allow], ==, literal[null]]] begin[{] return[member[.defaultOasisXMLCatalogPI]] else begin[{] None end[}] return[binary_operation[binary_operation[call[allow.equalsIgnoreCase, parameter[literal["true"]]], ||, call[allow.equalsIgnoreCase, parameter[literal["yes"]]]], ||, call[allow.equalsIgnoreCase, parameter[literal["1"]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[queryAllowOasisXMLCatalogPI] operator[SEP] operator[SEP] { identifier[String] identifier[allow] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[pAllowPI] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[allow] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[resources] operator[==] Other[null] operator[SEP] identifier[readProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[==] Other[null] operator[SEP] Keyword[return] identifier[defaultOasisXMLCatalogPI] operator[SEP] Keyword[try] { identifier[allow] operator[=] identifier[resources] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { Keyword[return] identifier[defaultOasisXMLCatalogPI] operator[SEP] } } Keyword[if] operator[SEP] identifier[allow] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[defaultOasisXMLCatalogPI] operator[SEP] } Keyword[return] operator[SEP] identifier[allow] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[||] identifier[allow] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[||] identifier[allow] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
public synchronized void start() throws IOException { if (listenerThreads.size() == 0) { List<InetAddress> addresses = hostAddress == null ? NetworkUtil.getMulticastAddresses() : Arrays.asList(hostAddress); if (addresses.size() == 0) { logHandler.info("No suitable address found for listening on multicast discovery requests"); return; } // We start a thread for every address found for (InetAddress addr : addresses) { try { MulticastSocketListenerThread thread = new MulticastSocketListenerThread("JolokiaDiscoveryListenerThread-" + addr.getHostAddress(), addr, detailsHolder, restrictor, logHandler); thread.start(); listenerThreads.add(thread); } catch (IOException exp) { logHandler.info("Couldn't start discovery thread for " + addr + ": " + exp); } } } }
class class_name[name] begin[{] method[start, return_type[void], modifier[synchronized public], parameter[]] begin[{] if[binary_operation[call[listenerThreads.size, parameter[]], ==, literal[0]]] begin[{] local_variable[type[List], addresses] if[binary_operation[call[addresses.size, parameter[]], ==, literal[0]]] begin[{] call[logHandler.info, parameter[literal["No suitable address found for listening on multicast discovery requests"]]] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JolokiaDiscoveryListenerThread-"), operandr=MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=[], prefix_operators=[], qualifier=addr, selectors=[], type_arguments=None), operator=+), MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=detailsHolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=restrictor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logHandler, 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=MulticastSocketListenerThread, sub_type=None)), name=thread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MulticastSocketListenerThread, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=thread, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=thread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=listenerThreads, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Couldn't start discovery thread for "), operandr=MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MemberReference(member=exp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logHandler, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exp, types=['IOException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=addr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[listenerThreads] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[List] operator[<] identifier[InetAddress] operator[>] identifier[addresses] operator[=] identifier[hostAddress] operator[==] Other[null] operator[?] identifier[NetworkUtil] operator[SEP] identifier[getMulticastAddresses] operator[SEP] operator[SEP] operator[:] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[hostAddress] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[addresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[logHandler] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[for] operator[SEP] identifier[InetAddress] identifier[addr] operator[:] identifier[addresses] operator[SEP] { Keyword[try] { identifier[MulticastSocketListenerThread] identifier[thread] operator[=] Keyword[new] identifier[MulticastSocketListenerThread] operator[SEP] literal[String] operator[+] identifier[addr] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] , identifier[addr] , identifier[detailsHolder] , identifier[restrictor] , identifier[logHandler] operator[SEP] operator[SEP] identifier[thread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[listenerThreads] operator[SEP] identifier[add] operator[SEP] identifier[thread] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[exp] operator[SEP] { identifier[logHandler] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[addr] operator[+] literal[String] operator[+] identifier[exp] operator[SEP] operator[SEP] } } } }
private static String replaceBooleanStringByIntegerRepresentation(final String possibleBooleanString) { if (possibleBooleanString.equals(TRUE.toString())) { return "1"; } else if (possibleBooleanString.equals(FALSE.toString())) { return "0"; } return possibleBooleanString; }
class class_name[name] begin[{] method[replaceBooleanStringByIntegerRepresentation, return_type[type[String]], modifier[private static], parameter[possibleBooleanString]] begin[{] if[call[possibleBooleanString.equals, parameter[call[TRUE.toString, parameter[]]]]] begin[{] return[literal["1"]] else begin[{] if[call[possibleBooleanString.equals, parameter[call[FALSE.toString, parameter[]]]]] begin[{] return[literal["0"]] else begin[{] None end[}] end[}] return[member[.possibleBooleanString]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[replaceBooleanStringByIntegerRepresentation] operator[SEP] Keyword[final] identifier[String] identifier[possibleBooleanString] operator[SEP] { Keyword[if] operator[SEP] identifier[possibleBooleanString] operator[SEP] identifier[equals] operator[SEP] identifier[TRUE] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[possibleBooleanString] operator[SEP] identifier[equals] operator[SEP] identifier[FALSE] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[return] identifier[possibleBooleanString] operator[SEP] }
void prepare(Map stormConf, TopologyContext context, OutputCollector collector, KeyValueState<TaskStream, WindowState> windowState) { init(stormConf, context, collector, windowState); super.prepare(stormConf, context, collector); }
class class_name[name] begin[{] method[prepare, return_type[void], modifier[default], parameter[stormConf, context, collector, windowState]] begin[{] call[.init, parameter[member[.stormConf], member[.context], member[.collector], member[.windowState]]] SuperMethodInvocation(arguments=[MemberReference(member=stormConf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=collector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepare, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[void] identifier[prepare] operator[SEP] identifier[Map] identifier[stormConf] , identifier[TopologyContext] identifier[context] , identifier[OutputCollector] identifier[collector] , identifier[KeyValueState] operator[<] identifier[TaskStream] , identifier[WindowState] operator[>] identifier[windowState] operator[SEP] { identifier[init] operator[SEP] identifier[stormConf] , identifier[context] , identifier[collector] , identifier[windowState] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[prepare] operator[SEP] identifier[stormConf] , identifier[context] , identifier[collector] operator[SEP] operator[SEP] }
public Sheet pack(ArrayList files, int width, int height, int border, File out) throws IOException { ArrayList images = new ArrayList(); try { for (int i=0;i<files.size();i++) { File file = (File) files.get(i); Sprite sprite = new Sprite(file.getName(), ImageIO.read(file)); images.add(sprite); } } catch (Exception e) { e.printStackTrace(); } return packImages(images, width, height, border, out); }
class class_name[name] begin[{] method[pack, return_type[type[Sheet]], modifier[public], parameter[files, width, height, border, out]] begin[{] local_variable[type[ArrayList], images] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=files, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=ImageIO, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Sprite, sub_type=None)), name=sprite)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Sprite, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sprite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=images, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=files, 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)], 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) return[call[.packImages, parameter[member[.images], member[.width], member[.height], member[.border], member[.out]]]] end[}] END[}]
Keyword[public] identifier[Sheet] identifier[pack] operator[SEP] identifier[ArrayList] identifier[files] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , Keyword[int] identifier[border] , identifier[File] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ArrayList] identifier[images] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[files] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[File] identifier[file] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[files] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Sprite] identifier[sprite] operator[=] Keyword[new] identifier[Sprite] operator[SEP] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ImageIO] operator[SEP] identifier[read] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[images] operator[SEP] identifier[add] operator[SEP] identifier[sprite] 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] } Keyword[return] identifier[packImages] operator[SEP] identifier[images] , identifier[width] , identifier[height] , identifier[border] , identifier[out] operator[SEP] operator[SEP] }
public MockResponse handlePatch(String path, String s) { MockResponse response = new MockResponse(); String body = doGet(path); if (body == null) { response.setResponseCode(404); } else { try { JsonNode patch = context.getMapper().readTree(s); JsonNode source = context.getMapper().readTree(body); JsonNode updated = JsonPatch.apply(patch, source); String updatedAsString = context.getMapper().writeValueAsString(updated); AttributeSet features = AttributeSet.merge(attributeExtractor.fromPath(path), attributeExtractor.fromResource(updatedAsString)); map.put(features, updatedAsString); response.setResponseCode(202); response.setBody(updatedAsString); } catch (Exception e) { throw new RuntimeException(e); } } return response; }
class class_name[name] begin[{] method[handlePatch, return_type[type[MockResponse]], modifier[public], parameter[path, s]] begin[{] local_variable[type[MockResponse], response] local_variable[type[String], body] if[binary_operation[member[.body], ==, literal[null]]] begin[{] call[response.setResponseCode, parameter[literal[404]]] else begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMapper, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readTree, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=patch)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMapper, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[MemberReference(member=body, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readTree, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=source)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=patch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=JsonPatch, selectors=[], type_arguments=None), name=updated)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMapper, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[MemberReference(member=updated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeValueAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=updatedAsString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromPath, postfix_operators=[], prefix_operators=[], qualifier=attributeExtractor, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=updatedAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromResource, postfix_operators=[], prefix_operators=[], qualifier=attributeExtractor, selectors=[], type_arguments=None)], member=merge, postfix_operators=[], prefix_operators=[], qualifier=AttributeSet, selectors=[], type_arguments=None), name=features)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AttributeSet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=features, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=updatedAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=202)], member=setResponseCode, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=updatedAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBody, postfix_operators=[], prefix_operators=[], qualifier=response, 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) end[}] return[member[.response]] end[}] END[}]
Keyword[public] identifier[MockResponse] identifier[handlePatch] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[s] operator[SEP] { identifier[MockResponse] identifier[response] operator[=] Keyword[new] identifier[MockResponse] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[body] operator[=] identifier[doGet] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[body] operator[==] Other[null] operator[SEP] { identifier[response] operator[SEP] identifier[setResponseCode] operator[SEP] Other[404] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { identifier[JsonNode] identifier[patch] operator[=] identifier[context] operator[SEP] identifier[getMapper] operator[SEP] operator[SEP] operator[SEP] identifier[readTree] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[JsonNode] identifier[source] operator[=] identifier[context] operator[SEP] identifier[getMapper] operator[SEP] operator[SEP] operator[SEP] identifier[readTree] operator[SEP] identifier[body] operator[SEP] operator[SEP] identifier[JsonNode] identifier[updated] operator[=] identifier[JsonPatch] operator[SEP] identifier[apply] operator[SEP] identifier[patch] , identifier[source] operator[SEP] operator[SEP] identifier[String] identifier[updatedAsString] operator[=] identifier[context] operator[SEP] identifier[getMapper] operator[SEP] operator[SEP] operator[SEP] identifier[writeValueAsString] operator[SEP] identifier[updated] operator[SEP] operator[SEP] identifier[AttributeSet] identifier[features] operator[=] identifier[AttributeSet] operator[SEP] identifier[merge] operator[SEP] identifier[attributeExtractor] operator[SEP] identifier[fromPath] operator[SEP] identifier[path] operator[SEP] , identifier[attributeExtractor] operator[SEP] identifier[fromResource] operator[SEP] identifier[updatedAsString] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[features] , identifier[updatedAsString] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setResponseCode] operator[SEP] Other[202] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setBody] operator[SEP] identifier[updatedAsString] 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[response] operator[SEP] }
public <T extends HistoricalEntity<?>> List<T> getCurrent(Class<T> historicalEntityCls) { EntityManager entityManager = this.entityManagerProvider.get(); CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<T> criteriaQuery = builder.createQuery(historicalEntityCls); Root<T> root = criteriaQuery.from(historicalEntityCls); criteriaQuery.where(expiredAt(root, builder)); TypedQuery<T> typedQuery = entityManager.createQuery(criteriaQuery); return typedQuery.getResultList(); }
class class_name[name] begin[{] method[getCurrent, return_type[type[List]], modifier[public], parameter[historicalEntityCls]] begin[{] local_variable[type[EntityManager], entityManager] local_variable[type[CriteriaBuilder], builder] local_variable[type[CriteriaQuery], criteriaQuery] local_variable[type[Root], root] call[criteriaQuery.where, parameter[call[.expiredAt, parameter[member[.root], member[.builder]]]]] local_variable[type[TypedQuery], typedQuery] return[call[typedQuery.getResultList, parameter[]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[HistoricalEntity] operator[<] operator[?] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getCurrent] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[historicalEntityCls] operator[SEP] { identifier[EntityManager] identifier[entityManager] operator[=] Keyword[this] operator[SEP] identifier[entityManagerProvider] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[CriteriaBuilder] identifier[builder] operator[=] identifier[entityManager] operator[SEP] identifier[getCriteriaBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[CriteriaQuery] operator[<] identifier[T] operator[>] identifier[criteriaQuery] operator[=] identifier[builder] operator[SEP] identifier[createQuery] operator[SEP] identifier[historicalEntityCls] operator[SEP] operator[SEP] identifier[Root] operator[<] identifier[T] operator[>] identifier[root] operator[=] identifier[criteriaQuery] operator[SEP] identifier[from] operator[SEP] identifier[historicalEntityCls] operator[SEP] operator[SEP] identifier[criteriaQuery] operator[SEP] identifier[where] operator[SEP] identifier[expiredAt] operator[SEP] identifier[root] , identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[TypedQuery] operator[<] identifier[T] operator[>] identifier[typedQuery] operator[=] identifier[entityManager] operator[SEP] identifier[createQuery] operator[SEP] identifier[criteriaQuery] operator[SEP] operator[SEP] Keyword[return] identifier[typedQuery] operator[SEP] identifier[getResultList] operator[SEP] operator[SEP] operator[SEP] }
public List<TimeUnit> clearUnits() { List<TimeUnit> result = getUnits(); cachedUnits = null; units.clear(); return result; }
class class_name[name] begin[{] method[clearUnits, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], result] assign[member[.cachedUnits], literal[null]] call[units.clear, parameter[]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[TimeUnit] operator[>] identifier[clearUnits] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[TimeUnit] operator[>] identifier[result] operator[=] identifier[getUnits] operator[SEP] operator[SEP] operator[SEP] identifier[cachedUnits] operator[=] Other[null] operator[SEP] identifier[units] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@SuppressWarnings("WeakerAccess") public void registerFont(String fontName, InputStream fontStream) throws IOException { File fontFile = File.createTempFile("pdfboxgfx2dfont", ".ttf"); FileOutputStream out = new FileOutputStream(fontFile); try { IOUtils.copy(fontStream, out); } finally { out.close(); } fontFile.deleteOnExit(); tempFiles.add(fontFile); registerFont(fontName, fontFile); }
class class_name[name] begin[{] method[registerFont, return_type[void], modifier[public], parameter[fontName, fontStream]] begin[{] local_variable[type[File], fontFile] local_variable[type[FileOutputStream], out] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fontStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], label=None, resources=None) call[fontFile.deleteOnExit, parameter[]] call[tempFiles.add, parameter[member[.fontFile]]] call[.registerFont, parameter[member[.fontName], member[.fontFile]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[registerFont] operator[SEP] identifier[String] identifier[fontName] , identifier[InputStream] identifier[fontStream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[fontFile] operator[=] identifier[File] operator[SEP] identifier[createTempFile] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[FileOutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[fontFile] operator[SEP] operator[SEP] Keyword[try] { identifier[IOUtils] operator[SEP] identifier[copy] operator[SEP] identifier[fontStream] , identifier[out] operator[SEP] operator[SEP] } Keyword[finally] { identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[fontFile] operator[SEP] identifier[deleteOnExit] operator[SEP] operator[SEP] operator[SEP] identifier[tempFiles] operator[SEP] identifier[add] operator[SEP] identifier[fontFile] operator[SEP] operator[SEP] identifier[registerFont] operator[SEP] identifier[fontName] , identifier[fontFile] operator[SEP] operator[SEP] }
public MethodMetaArgs createinitMethod(HandlerMetaDef handlerMetaDef, EventModel em) { String p_methodName = handlerMetaDef.getInitMethod(); if (p_methodName == null) return null; return createCRUDMethodMetaArgs(p_methodName, em); }
class class_name[name] begin[{] method[createinitMethod, return_type[type[MethodMetaArgs]], modifier[public], parameter[handlerMetaDef, em]] begin[{] local_variable[type[String], p_methodName] if[binary_operation[member[.p_methodName], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[.createCRUDMethodMetaArgs, parameter[member[.p_methodName], member[.em]]]] end[}] END[}]
Keyword[public] identifier[MethodMetaArgs] identifier[createinitMethod] operator[SEP] identifier[HandlerMetaDef] identifier[handlerMetaDef] , identifier[EventModel] identifier[em] operator[SEP] { identifier[String] identifier[p_methodName] operator[=] identifier[handlerMetaDef] operator[SEP] identifier[getInitMethod] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p_methodName] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[createCRUDMethodMetaArgs] operator[SEP] identifier[p_methodName] , identifier[em] operator[SEP] operator[SEP] }
@Override public boolean shutdown() throws InterruptedException { // Prevent shutdown before the server has properly started managerLatch.await(); if (manager == null) return false; manager.shutdownFramework(); manager.waitForShutdown(); return true; }
class class_name[name] begin[{] method[shutdown, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[managerLatch.await, parameter[]] if[binary_operation[member[.manager], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] call[manager.shutdownFramework, parameter[]] call[manager.waitForShutdown, parameter[]] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[shutdown] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[managerLatch] operator[SEP] identifier[await] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[manager] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[manager] operator[SEP] identifier[shutdownFramework] operator[SEP] operator[SEP] operator[SEP] identifier[manager] operator[SEP] identifier[waitForShutdown] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static lbgroup get(nitro_service service, String name) throws Exception{ lbgroup obj = new lbgroup(); obj.set_name(name); lbgroup response = (lbgroup) obj.get_resource(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[lbgroup]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[lbgroup], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[lbgroup], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[lbgroup] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[lbgroup] identifier[obj] operator[=] Keyword[new] identifier[lbgroup] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[lbgroup] identifier[response] operator[=] operator[SEP] identifier[lbgroup] operator[SEP] identifier[obj] operator[SEP] identifier[get_resource] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public void set(String propName, Object value) { if (propName.equals(PROP_IDENTIFIER)) { setIdentifier(((IdentifierType) value)); } if (propName.equals(PROP_VIEW_IDENTIFIERS)) { getViewIdentifiers().add(((com.ibm.wsspi.security.wim.model.ViewIdentifierType) value)); } if (propName.equals(PROP_PARENT)) { setParent(((Entity) value)); } if (propName.equals(PROP_CHILDREN)) { getChildren().add(((com.ibm.wsspi.security.wim.model.Entity) value)); } if (propName.equals(PROP_GROUPS)) { getGroups().add(((com.ibm.wsspi.security.wim.model.Group) value)); } if (propName.equals(PROP_CREATE_TIMESTAMP)) { setCreateTimestamp(((Date) value)); } if (propName.equals(PROP_MODIFY_TIMESTAMP)) { setModifyTimestamp(((Date) value)); } if (propName.equals(PROP_ENTITLEMENT_INFO)) { setEntitlementInfo(((EntitlementInfoType) value)); } if (propName.equals(PROP_CHANGE_TYPE)) { setChangeType(((String) value)); } }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[propName, value]] begin[{] if[call[propName.equals, parameter[member[.PROP_IDENTIFIER]]]] begin[{] call[.setIdentifier, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IdentifierType, sub_type=None))]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_VIEW_IDENTIFIERS]]]] begin[{] call[.getViewIdentifiers, parameter[]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_PARENT]]]] begin[{] call[.setParent, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Entity, sub_type=None))]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_CHILDREN]]]] begin[{] call[.getChildren, parameter[]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_GROUPS]]]] begin[{] call[.getGroups, parameter[]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_CREATE_TIMESTAMP]]]] begin[{] call[.setCreateTimestamp, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_MODIFY_TIMESTAMP]]]] begin[{] call[.setModifyTimestamp, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_ENTITLEMENT_INFO]]]] begin[{] call[.setEntitlementInfo, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EntitlementInfoType, sub_type=None))]] else begin[{] None end[}] if[call[propName.equals, parameter[member[.PROP_CHANGE_TYPE]]]] begin[{] call[.setChangeType, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[String] identifier[propName] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_IDENTIFIER] operator[SEP] operator[SEP] { identifier[setIdentifier] operator[SEP] operator[SEP] operator[SEP] identifier[IdentifierType] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_VIEW_IDENTIFIERS] operator[SEP] operator[SEP] { identifier[getViewIdentifiers] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[wsspi] operator[SEP] identifier[security] operator[SEP] identifier[wim] operator[SEP] identifier[model] operator[SEP] identifier[ViewIdentifierType] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_PARENT] operator[SEP] operator[SEP] { identifier[setParent] operator[SEP] operator[SEP] operator[SEP] identifier[Entity] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_CHILDREN] operator[SEP] operator[SEP] { identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[wsspi] operator[SEP] identifier[security] operator[SEP] identifier[wim] operator[SEP] identifier[model] operator[SEP] identifier[Entity] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_GROUPS] operator[SEP] operator[SEP] { identifier[getGroups] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[wsspi] operator[SEP] identifier[security] operator[SEP] identifier[wim] operator[SEP] identifier[model] operator[SEP] identifier[Group] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_CREATE_TIMESTAMP] operator[SEP] operator[SEP] { identifier[setCreateTimestamp] operator[SEP] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_MODIFY_TIMESTAMP] operator[SEP] operator[SEP] { identifier[setModifyTimestamp] operator[SEP] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_ENTITLEMENT_INFO] operator[SEP] operator[SEP] { identifier[setEntitlementInfo] operator[SEP] operator[SEP] operator[SEP] identifier[EntitlementInfoType] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[equals] operator[SEP] identifier[PROP_CHANGE_TYPE] operator[SEP] operator[SEP] { identifier[setChangeType] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } }
public static SafariOptions fromCapabilities(Capabilities capabilities) throws WebDriverException { if (capabilities instanceof SafariOptions) { return (SafariOptions) capabilities; } Object cap = capabilities.getCapability(SafariOptions.CAPABILITY); if (cap instanceof SafariOptions) { return (SafariOptions) cap; } else if (cap instanceof Map) { return new SafariOptions(new MutableCapabilities(((Map<String, ?>) cap))); } else { return new SafariOptions(); } }
class class_name[name] begin[{] method[fromCapabilities, return_type[type[SafariOptions]], modifier[public static], parameter[capabilities]] begin[{] if[binary_operation[member[.capabilities], instanceof, type[SafariOptions]]] begin[{] return[Cast(expression=MemberReference(member=capabilities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SafariOptions, sub_type=None))] else begin[{] None end[}] local_variable[type[Object], cap] if[binary_operation[member[.cap], instanceof, type[SafariOptions]]] begin[{] return[Cast(expression=MemberReference(member=cap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SafariOptions, sub_type=None))] else begin[{] if[binary_operation[member[.cap], instanceof, type[Map]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(member=cap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=?, 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=MutableCapabilities, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SafariOptions, sub_type=None))] else begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SafariOptions, sub_type=None))] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[SafariOptions] identifier[fromCapabilities] operator[SEP] identifier[Capabilities] identifier[capabilities] operator[SEP] Keyword[throws] identifier[WebDriverException] { Keyword[if] operator[SEP] identifier[capabilities] Keyword[instanceof] identifier[SafariOptions] operator[SEP] { Keyword[return] operator[SEP] identifier[SafariOptions] operator[SEP] identifier[capabilities] operator[SEP] } identifier[Object] identifier[cap] operator[=] identifier[capabilities] operator[SEP] identifier[getCapability] operator[SEP] identifier[SafariOptions] operator[SEP] identifier[CAPABILITY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cap] Keyword[instanceof] identifier[SafariOptions] operator[SEP] { Keyword[return] operator[SEP] identifier[SafariOptions] operator[SEP] identifier[cap] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cap] Keyword[instanceof] identifier[Map] operator[SEP] { Keyword[return] Keyword[new] identifier[SafariOptions] operator[SEP] Keyword[new] identifier[MutableCapabilities] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] operator[SEP] identifier[cap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[SafariOptions] operator[SEP] operator[SEP] operator[SEP] } }
@SafeVarargs public static <T, U, R> BiFunction<T, U, Optional<R>> maybeFirstMatch(BinaryClause<T, U, R>... clauses) { final List<Clause<Pair<T, U>, R>> unaryClauses = Sequences.of(clauses).map(BinaryClause::tupled).toList(); return Pairs.untupled(new MaybeFirstMatchStrategy<>(unaryClauses)); }
class class_name[name] begin[{] method[maybeFirstMatch, return_type[type[BiFunction]], modifier[public static], parameter[clauses]] begin[{] local_variable[type[List], unaryClauses] return[call[Pairs.untupled, parameter[ClassCreator(arguments=[MemberReference(member=unaryClauses, 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=MaybeFirstMatchStrategy, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] identifier[BiFunction] operator[<] identifier[T] , identifier[U] , identifier[Optional] operator[<] identifier[R] operator[>] operator[>] identifier[maybeFirstMatch] operator[SEP] identifier[BinaryClause] operator[<] identifier[T] , identifier[U] , identifier[R] operator[>] operator[...] identifier[clauses] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Clause] operator[<] identifier[Pair] operator[<] identifier[T] , identifier[U] operator[>] , identifier[R] operator[>] operator[>] identifier[unaryClauses] operator[=] identifier[Sequences] operator[SEP] identifier[of] operator[SEP] identifier[clauses] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[BinaryClause] operator[::] identifier[tupled] operator[SEP] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Pairs] operator[SEP] identifier[untupled] operator[SEP] Keyword[new] identifier[MaybeFirstMatchStrategy] operator[<] operator[>] operator[SEP] identifier[unaryClauses] operator[SEP] operator[SEP] operator[SEP] }
@NotNull public static EnhancedMimeType create(@NotNull final String primary, @NotNull final String sub) { return create(primary, sub, null, null, null); }
class class_name[name] begin[{] method[create, return_type[type[EnhancedMimeType]], modifier[public static], parameter[primary, sub]] begin[{] return[call[.create, parameter[member[.primary], member[.sub], literal[null], literal[null], literal[null]]]] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[EnhancedMimeType] identifier[create] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[primary] , annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[sub] operator[SEP] { Keyword[return] identifier[create] operator[SEP] identifier[primary] , identifier[sub] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public Object querySingleResult(String sql, String[] args, int column, GeoPackageDataType dataType) { return db.querySingleResult(sql, args, column, dataType); }
class class_name[name] begin[{] method[querySingleResult, return_type[type[Object]], modifier[public], parameter[sql, args, column, dataType]] begin[{] return[call[db.querySingleResult, parameter[member[.sql], member[.args], member[.column], member[.dataType]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[querySingleResult] operator[SEP] identifier[String] identifier[sql] , identifier[String] operator[SEP] operator[SEP] identifier[args] , Keyword[int] identifier[column] , identifier[GeoPackageDataType] identifier[dataType] operator[SEP] { Keyword[return] identifier[db] operator[SEP] identifier[querySingleResult] operator[SEP] identifier[sql] , identifier[args] , identifier[column] , identifier[dataType] operator[SEP] operator[SEP] }
@Override public <T, C> T retrieveBean(String name, C criteria, T result, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException { Iterator<T> it = processSelectGroup(name, criteria, result, wheres, orderBy, nativeExpressions, true).iterator(); if (it.hasNext()) { return it.next(); } else { return null; } }
class class_name[name] begin[{] method[retrieveBean, return_type[type[T]], modifier[public], parameter[name, criteria, result, wheres, orderBy, nativeExpressions]] begin[{] local_variable[type[Iterator], it] if[call[it.hasNext, parameter[]]] begin[{] return[call[it.next, parameter[]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] , identifier[C] operator[>] identifier[T] identifier[retrieveBean] operator[SEP] identifier[String] identifier[name] , identifier[C] identifier[criteria] , identifier[T] identifier[result] , identifier[Collection] operator[<] identifier[CpoWhere] operator[>] identifier[wheres] , identifier[Collection] operator[<] identifier[CpoOrderBy] operator[>] identifier[orderBy] , identifier[Collection] operator[<] identifier[CpoNativeFunction] operator[>] identifier[nativeExpressions] operator[SEP] Keyword[throws] identifier[CpoException] { identifier[Iterator] operator[<] identifier[T] operator[>] identifier[it] operator[=] identifier[processSelectGroup] operator[SEP] identifier[name] , identifier[criteria] , identifier[result] , identifier[wheres] , identifier[orderBy] , identifier[nativeExpressions] , literal[boolean] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
@StaplerDispatchable public ExtensionList getExtensionList(String extensionType) throws ClassNotFoundException { return getExtensionList(pluginManager.uberClassLoader.loadClass(extensionType)); }
class class_name[name] begin[{] method[getExtensionList, return_type[type[ExtensionList]], modifier[public], parameter[extensionType]] begin[{] return[call[.getExtensionList, parameter[call[pluginManager.uberClassLoader.loadClass, parameter[member[.extensionType]]]]]] end[}] END[}]
annotation[@] identifier[StaplerDispatchable] Keyword[public] identifier[ExtensionList] identifier[getExtensionList] operator[SEP] identifier[String] identifier[extensionType] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { Keyword[return] identifier[getExtensionList] operator[SEP] identifier[pluginManager] operator[SEP] identifier[uberClassLoader] operator[SEP] identifier[loadClass] operator[SEP] identifier[extensionType] operator[SEP] operator[SEP] operator[SEP] }
public List<ApplicationInsightsComponentExportConfigurationInner> create(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { return createWithServiceResponseAsync(resourceGroupName, resourceName, exportProperties).toBlocking().single().body(); }
class class_name[name] begin[{] method[create, return_type[type[List]], modifier[public], parameter[resourceGroupName, resourceName, exportProperties]] begin[{] return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.exportProperties]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ApplicationInsightsComponentExportConfigurationInner] operator[>] identifier[create] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[ApplicationInsightsComponentExportRequest] identifier[exportProperties] operator[SEP] { Keyword[return] identifier[createWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[exportProperties] 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] }
@Override public Bulkhead bulkhead(String name, Supplier<BulkheadConfig> bulkheadConfigSupplier) { return computeIfAbsent(name, () -> Bulkhead.of(name, Objects.requireNonNull(Objects.requireNonNull(bulkheadConfigSupplier, SUPPLIER_MUST_NOT_BE_NULL).get(), CONFIG_MUST_NOT_BE_NULL))); }
class class_name[name] begin[{] method[bulkhead, return_type[type[Bulkhead]], modifier[public], parameter[name, bulkheadConfigSupplier]] begin[{] return[call[.computeIfAbsent, parameter[member[.name], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=bulkheadConfigSupplier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SUPPLIER_MUST_NOT_BE_NULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=CONFIG_MUST_NOT_BE_NULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Bulkhead, selectors=[], type_arguments=None), parameters=[])]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Bulkhead] identifier[bulkhead] operator[SEP] identifier[String] identifier[name] , identifier[Supplier] operator[<] identifier[BulkheadConfig] operator[>] identifier[bulkheadConfigSupplier] operator[SEP] { Keyword[return] identifier[computeIfAbsent] operator[SEP] identifier[name] , operator[SEP] operator[SEP] operator[->] identifier[Bulkhead] operator[SEP] identifier[of] operator[SEP] identifier[name] , identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[bulkheadConfigSupplier] , identifier[SUPPLIER_MUST_NOT_BE_NULL] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[CONFIG_MUST_NOT_BE_NULL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void writeTo(Path directory) throws IOException { checkArgument(Files.notExists(directory) || Files.isDirectory(directory), "path %s exists but is not a directory.", directory); Path outputDirectory = directory; if (!packageName.isEmpty()) { for (String packageComponent : packageName.split("\\.")) { outputDirectory = outputDirectory.resolve(packageComponent); } Files.createDirectories(outputDirectory); } Path outputPath = outputDirectory.resolve(typeSpec.name + ".java"); try (Writer writer = new OutputStreamWriter(Files.newOutputStream(outputPath), UTF_8)) { writeTo(writer); } }
class class_name[name] begin[{] method[writeTo, return_type[void], modifier[public], parameter[directory]] begin[{] call[.checkArgument, parameter[binary_operation[call[Files.notExists, parameter[member[.directory]]], ||, call[Files.isDirectory, parameter[member[.directory]]]], literal["path %s exists but is not a directory."], member[.directory]]] local_variable[type[Path], outputDirectory] if[call[packageName.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputDirectory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=packageComponent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=outputDirectory, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\.")], member=split, postfix_operators=[], prefix_operators=[], qualifier=packageName, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=packageComponent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[Files.createDirectories, parameter[member[.outputDirectory]]] else begin[{] None end[}] local_variable[type[Path], outputPath] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=writer, type=ReferenceType(arguments=None, dimensions=[], name=Writer, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=outputPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newOutputStream, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), 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=OutputStreamWriter, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[writeTo] operator[SEP] identifier[Path] identifier[directory] operator[SEP] Keyword[throws] identifier[IOException] { identifier[checkArgument] operator[SEP] identifier[Files] operator[SEP] identifier[notExists] operator[SEP] identifier[directory] operator[SEP] operator[||] identifier[Files] operator[SEP] identifier[isDirectory] operator[SEP] identifier[directory] operator[SEP] , literal[String] , identifier[directory] operator[SEP] operator[SEP] identifier[Path] identifier[outputDirectory] operator[=] identifier[directory] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[packageName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[packageComponent] operator[:] identifier[packageName] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[outputDirectory] operator[=] identifier[outputDirectory] operator[SEP] identifier[resolve] operator[SEP] identifier[packageComponent] operator[SEP] operator[SEP] } identifier[Files] operator[SEP] identifier[createDirectories] operator[SEP] identifier[outputDirectory] operator[SEP] operator[SEP] } identifier[Path] identifier[outputPath] operator[=] identifier[outputDirectory] operator[SEP] identifier[resolve] operator[SEP] identifier[typeSpec] operator[SEP] identifier[name] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Writer] identifier[writer] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[Files] operator[SEP] identifier[newOutputStream] operator[SEP] identifier[outputPath] operator[SEP] , identifier[UTF_8] operator[SEP] operator[SEP] { identifier[writeTo] operator[SEP] identifier[writer] operator[SEP] operator[SEP] } }
@CheckReturnValue public Flowable<E> flowable() { return new Flowable<E>() { @Override protected void subscribeActual(Subscriber<? super E> s) { s.onSubscribe(new QuerySubscription<>(ReactiveResult.this, s)); } }; }
class class_name[name] begin[{] method[flowable, return_type[type[Flowable]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=ReactiveResult, selectors=[]), MemberReference(member=s, 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=QuerySubscription, sub_type=None))], member=onSubscribe, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=subscribeActual, parameters=[FormalParameter(annotations=[], modifiers=set(), name=s, type=ReferenceType(arguments=[TypeArgument(pattern_type=super, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=[], name=Subscriber, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=Flowable, sub_type=None))] end[}] END[}]
annotation[@] identifier[CheckReturnValue] Keyword[public] identifier[Flowable] operator[<] identifier[E] operator[>] identifier[flowable] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Flowable] operator[<] identifier[E] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[subscribeActual] operator[SEP] identifier[Subscriber] operator[<] operator[?] Keyword[super] identifier[E] operator[>] identifier[s] operator[SEP] { identifier[s] operator[SEP] identifier[onSubscribe] operator[SEP] Keyword[new] identifier[QuerySubscription] operator[<] operator[>] operator[SEP] identifier[ReactiveResult] operator[SEP] Keyword[this] , identifier[s] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
private static Iterator<String> getBaseIterator(BufferedReader reader, boolean keepOrdering) { // The final iterator is how the stream will be tokenized after all the // tokenizing options have been applied. This value is iteratively set // as the options are applied Iterator<String> finalIterator = new WordIterator(reader); // STEP 1: APPLY TOKEN REPLACEMENT if (replacementMap != null) finalIterator = new WordReplacementIterator(finalIterator, replacementMap); // STEP 2: APPLY COMPOUND TOKENIZING if (compoundTokens != null) { // Because the initialization step for a CWI has some overhead, use // the reset to keep the same tokens. However, multiple threads may // be each using their own CWI, so keep Thread-local storage of what // CWI is being used to avoid resetting another thread's iterator. CompoundWordIterator cwi = compoundIterators.get(Thread.currentThread()); if (cwi == null) { cwi = new CompoundWordIterator(finalIterator, compoundTokens); compoundIterators.put(Thread.currentThread(), cwi); } else { // NOTE: if the underlying set of valid compound words is ever // changed, the iterator returned from the compoundIterators map // will have been updated by the setProperties() call, so this // method is guaranteed to pick up the latest set of compound // words cwi.reset(finalIterator); } finalIterator = cwi; } // STEP 3: APPLY TOKEN LIMITING if (wordLimit > 0) finalIterator = new LimitedIterator<String>( finalIterator, wordLimit); // STEP 4: APPLY TOKEN FILTERING if (filter != null) { finalIterator = (keepOrdering) ? new OrderPreservingFilteredIterator(finalIterator, filter) : new FilteredIterator(finalIterator, filter); } // STEP 5: APPLY STEMMING if (stemmer != null) finalIterator = new StemmingIterator(finalIterator, stemmer); return finalIterator; }
class class_name[name] begin[{] method[getBaseIterator, return_type[type[Iterator]], modifier[private static], parameter[reader, keepOrdering]] begin[{] local_variable[type[Iterator], finalIterator] if[binary_operation[member[.replacementMap], !=, literal[null]]] begin[{] assign[member[.finalIterator], ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=replacementMap, 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=WordReplacementIterator, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.compoundTokens], !=, literal[null]]] begin[{] local_variable[type[CompoundWordIterator], cwi] if[binary_operation[member[.cwi], ==, literal[null]]] begin[{] assign[member[.cwi], ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compoundTokens, 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=CompoundWordIterator, sub_type=None))] call[compoundIterators.put, parameter[call[Thread.currentThread, parameter[]], member[.cwi]]] else begin[{] call[cwi.reset, parameter[member[.finalIterator]]] end[}] assign[member[.finalIterator], member[.cwi]] else begin[{] None end[}] if[binary_operation[member[.wordLimit], >, literal[0]]] begin[{] assign[member[.finalIterator], ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=wordLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=LimitedIterator, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.filter], !=, literal[null]]] begin[{] assign[member[.finalIterator], TernaryExpression(condition=MemberReference(member=keepOrdering, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, 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=FilteredIterator, sub_type=None)), if_true=ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, 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=OrderPreservingFilteredIterator, sub_type=None)))] else begin[{] None end[}] if[binary_operation[member[.stemmer], !=, literal[null]]] begin[{] assign[member[.finalIterator], ClassCreator(arguments=[MemberReference(member=finalIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stemmer, 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=StemmingIterator, sub_type=None))] else begin[{] None end[}] return[member[.finalIterator]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[getBaseIterator] operator[SEP] identifier[BufferedReader] identifier[reader] , Keyword[boolean] identifier[keepOrdering] operator[SEP] { identifier[Iterator] operator[<] identifier[String] operator[>] identifier[finalIterator] operator[=] Keyword[new] identifier[WordIterator] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[replacementMap] operator[!=] Other[null] operator[SEP] identifier[finalIterator] operator[=] Keyword[new] identifier[WordReplacementIterator] operator[SEP] identifier[finalIterator] , identifier[replacementMap] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[compoundTokens] operator[!=] Other[null] operator[SEP] { identifier[CompoundWordIterator] identifier[cwi] operator[=] identifier[compoundIterators] operator[SEP] identifier[get] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cwi] operator[==] Other[null] operator[SEP] { identifier[cwi] operator[=] Keyword[new] identifier[CompoundWordIterator] operator[SEP] identifier[finalIterator] , identifier[compoundTokens] operator[SEP] operator[SEP] identifier[compoundIterators] operator[SEP] identifier[put] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] , identifier[cwi] operator[SEP] operator[SEP] } Keyword[else] { identifier[cwi] operator[SEP] identifier[reset] operator[SEP] identifier[finalIterator] operator[SEP] operator[SEP] } identifier[finalIterator] operator[=] identifier[cwi] operator[SEP] } Keyword[if] operator[SEP] identifier[wordLimit] operator[>] Other[0] operator[SEP] identifier[finalIterator] operator[=] Keyword[new] identifier[LimitedIterator] operator[<] identifier[String] operator[>] operator[SEP] identifier[finalIterator] , identifier[wordLimit] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP] { identifier[finalIterator] operator[=] operator[SEP] identifier[keepOrdering] operator[SEP] operator[?] Keyword[new] identifier[OrderPreservingFilteredIterator] operator[SEP] identifier[finalIterator] , identifier[filter] operator[SEP] operator[:] Keyword[new] identifier[FilteredIterator] operator[SEP] identifier[finalIterator] , identifier[filter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[stemmer] operator[!=] Other[null] operator[SEP] identifier[finalIterator] operator[=] Keyword[new] identifier[StemmingIterator] operator[SEP] identifier[finalIterator] , identifier[stemmer] operator[SEP] operator[SEP] Keyword[return] identifier[finalIterator] operator[SEP] }
protected void finishToken(boolean deferErrors) throws XMLStreamException { switch (mCurrToken) { case CDATA: if (mCfgCoalesceText) { readCoalescedText(mCurrToken, deferErrors); } else { if (readCDataSecondary(Integer.MAX_VALUE)) { mTokenState = TOKEN_FULL_SINGLE; } else { // can this ever happen? mTokenState = TOKEN_PARTIAL_SINGLE; } } return; case CHARACTERS: if (mCfgCoalesceText) { /* 21-Sep-2005, TSa: It is often possible to optimize * here: if we get '<' NOT followed by '!', it can not * be CDATA, and thus we are done. */ if (mTokenState == TOKEN_FULL_SINGLE && (mInputPtr + 1) < mInputEnd && mInputBuffer[mInputPtr+1] != '!') { mTokenState = TOKEN_FULL_COALESCED; return; } readCoalescedText(mCurrToken, deferErrors); } else { if (readTextSecondary(mShortestTextSegment, deferErrors)) { mTokenState = TOKEN_FULL_SINGLE; } else { mTokenState = TOKEN_PARTIAL_SINGLE; } } return; case SPACE: { /* Only need to ensure there's no non-whitespace text * when parsing 'real' ignorable white space (in validating * mode, but that's implicit here) */ boolean prolog = (mParseState != STATE_TREE); readSpaceSecondary(prolog); mTokenState = TOKEN_FULL_COALESCED; } return; case COMMENT: readComment(); mTokenState = TOKEN_FULL_COALESCED; return; case DTD: /* 05-Jan-2006, TSa: Although we shouldn't have to use finally * here, it's probably better to do that for robustness * (specifically, in case of a parsing problem, we don't want * to remain in 'DTD partially read' case -- it's better * to get in panic mode and skip the rest) */ try { finishDTD(true); } finally { mTokenState = TOKEN_FULL_COALESCED; } return; case PROCESSING_INSTRUCTION: readPI(); mTokenState = TOKEN_FULL_COALESCED; return; case START_ELEMENT: case END_ELEMENT: // these 2 should never end up in here... case ENTITY_REFERENCE: case ENTITY_DECLARATION: case NOTATION_DECLARATION: case START_DOCUMENT: case END_DOCUMENT: throw new IllegalStateException("finishToken() called when current token is "+tokenTypeDesc(mCurrToken)); case ATTRIBUTE: case NAMESPACE: // These two are never returned by this class default: } throw new IllegalStateException("Internal error: unexpected token "+tokenTypeDesc(mCurrToken)); }
class class_name[name] begin[{] method[finishToken, return_type[void], modifier[protected], parameter[deferErrors]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['CDATA'], statements=[IfStatement(condition=MemberReference(member=mCfgCoalesceText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=readCDataSecondary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_PARTIAL_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mCurrToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deferErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readCoalescedText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['CHARACTERS'], statements=[IfStatement(condition=MemberReference(member=mCfgCoalesceText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=mShortestTextSegment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deferErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readTextSecondary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_PARTIAL_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TOKEN_FULL_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mInputPtr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=mInputEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=mInputBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=mInputPtr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='!'), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_COALESCED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mCurrToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deferErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readCoalescedText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['SPACE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=mParseState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STATE_TREE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), name=prolog)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=prolog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readSpaceSecondary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_COALESCED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['COMMENT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=readComment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_COALESCED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['DTD'], statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=finishDTD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_COALESCED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, resources=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['PROCESSING_INSTRUCTION'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=readPI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mTokenState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=TOKEN_FULL_COALESCED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['START_ELEMENT', 'END_ELEMENT', 'ENTITY_REFERENCE', 'ENTITY_DECLARATION', 'NOTATION_DECLARATION', 'START_DOCUMENT', 'END_DOCUMENT'], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="finishToken() called when current token is "), operandr=MethodInvocation(arguments=[MemberReference(member=mCurrToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tokenTypeDesc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)]), SwitchStatementCase(case=['ATTRIBUTE', 'NAMESPACE'], statements=[])], expression=MemberReference(member=mCurrToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Internal error: unexpected token "), operandr=MethodInvocation(arguments=[MemberReference(member=mCurrToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tokenTypeDesc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[finishToken] operator[SEP] Keyword[boolean] identifier[deferErrors] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[switch] operator[SEP] identifier[mCurrToken] operator[SEP] { Keyword[case] identifier[CDATA] operator[:] Keyword[if] operator[SEP] identifier[mCfgCoalesceText] operator[SEP] { identifier[readCoalescedText] operator[SEP] identifier[mCurrToken] , identifier[deferErrors] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[readCDataSecondary] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] { identifier[mTokenState] operator[=] identifier[TOKEN_FULL_SINGLE] operator[SEP] } Keyword[else] { identifier[mTokenState] operator[=] identifier[TOKEN_PARTIAL_SINGLE] operator[SEP] } } Keyword[return] operator[SEP] Keyword[case] identifier[CHARACTERS] operator[:] Keyword[if] operator[SEP] identifier[mCfgCoalesceText] operator[SEP] { Keyword[if] operator[SEP] identifier[mTokenState] operator[==] identifier[TOKEN_FULL_SINGLE] operator[&&] operator[SEP] identifier[mInputPtr] operator[+] Other[1] operator[SEP] operator[<] identifier[mInputEnd] operator[&&] identifier[mInputBuffer] operator[SEP] identifier[mInputPtr] operator[+] Other[1] operator[SEP] operator[!=] literal[String] operator[SEP] { identifier[mTokenState] operator[=] identifier[TOKEN_FULL_COALESCED] operator[SEP] Keyword[return] operator[SEP] } identifier[readCoalescedText] operator[SEP] identifier[mCurrToken] , identifier[deferErrors] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[readTextSecondary] operator[SEP] identifier[mShortestTextSegment] , identifier[deferErrors] operator[SEP] operator[SEP] { identifier[mTokenState] operator[=] identifier[TOKEN_FULL_SINGLE] operator[SEP] } Keyword[else] { identifier[mTokenState] operator[=] identifier[TOKEN_PARTIAL_SINGLE] operator[SEP] } } Keyword[return] operator[SEP] Keyword[case] identifier[SPACE] operator[:] { Keyword[boolean] identifier[prolog] operator[=] operator[SEP] identifier[mParseState] operator[!=] identifier[STATE_TREE] operator[SEP] operator[SEP] identifier[readSpaceSecondary] operator[SEP] identifier[prolog] operator[SEP] operator[SEP] identifier[mTokenState] operator[=] identifier[TOKEN_FULL_COALESCED] operator[SEP] } Keyword[return] operator[SEP] Keyword[case] identifier[COMMENT] operator[:] identifier[readComment] operator[SEP] operator[SEP] operator[SEP] identifier[mTokenState] operator[=] identifier[TOKEN_FULL_COALESCED] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[DTD] operator[:] Keyword[try] { identifier[finishDTD] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[finally] { identifier[mTokenState] operator[=] identifier[TOKEN_FULL_COALESCED] operator[SEP] } Keyword[return] operator[SEP] Keyword[case] identifier[PROCESSING_INSTRUCTION] operator[:] identifier[readPI] operator[SEP] operator[SEP] operator[SEP] identifier[mTokenState] operator[=] identifier[TOKEN_FULL_COALESCED] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[START_ELEMENT] operator[:] Keyword[case] identifier[END_ELEMENT] operator[:] Keyword[case] identifier[ENTITY_REFERENCE] operator[:] Keyword[case] identifier[ENTITY_DECLARATION] operator[:] Keyword[case] identifier[NOTATION_DECLARATION] operator[:] Keyword[case] identifier[START_DOCUMENT] operator[:] Keyword[case] identifier[END_DOCUMENT] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[tokenTypeDesc] operator[SEP] identifier[mCurrToken] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[ATTRIBUTE] operator[:] Keyword[case] identifier[NAMESPACE] operator[:] Keyword[default] operator[:] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[tokenTypeDesc] operator[SEP] identifier[mCurrToken] operator[SEP] operator[SEP] operator[SEP] }
boolean get(int bitIndex) { int wordIndex = wordIndex(bitIndex); long bitMask = 1L << bitIndex; return (words[wordIndex] & bitMask) != 0; }
class class_name[name] begin[{] method[get, return_type[type[boolean]], modifier[default], parameter[bitIndex]] begin[{] local_variable[type[int], wordIndex] local_variable[type[long], bitMask] return[binary_operation[binary_operation[member[.words], &, member[.bitMask]], !=, literal[0]]] end[}] END[}]
Keyword[boolean] identifier[get] operator[SEP] Keyword[int] identifier[bitIndex] operator[SEP] { Keyword[int] identifier[wordIndex] operator[=] identifier[wordIndex] operator[SEP] identifier[bitIndex] operator[SEP] operator[SEP] Keyword[long] identifier[bitMask] operator[=] Other[1L] operator[<<] identifier[bitIndex] operator[SEP] Keyword[return] operator[SEP] identifier[words] operator[SEP] identifier[wordIndex] operator[SEP] operator[&] identifier[bitMask] operator[SEP] operator[!=] Other[0] operator[SEP] }
public CompositeHandler withQueryHandler(final QueryHandler handler) { if (handler == null) { throw new IllegalArgumentException(); } // end of if // --- return new CompositeHandler(this.queryDetection, handler, this.updateHandler); }
class class_name[name] begin[{] method[withQueryHandler, return_type[type[CompositeHandler]], modifier[public], parameter[handler]] begin[{] if[binary_operation[member[.handler], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=queryDetection, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=updateHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompositeHandler, sub_type=None))] end[}] END[}]
Keyword[public] identifier[CompositeHandler] identifier[withQueryHandler] operator[SEP] Keyword[final] identifier[QueryHandler] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[handler] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[CompositeHandler] operator[SEP] Keyword[this] operator[SEP] identifier[queryDetection] , identifier[handler] , Keyword[this] operator[SEP] identifier[updateHandler] operator[SEP] operator[SEP] }
public static StreamingOutput buildResponseOfDomLR(final IStorage pDatabase, final IBackendFactory pStorageFac, final IRevisioning pRevision) { final StreamingOutput sOutput = new StreamingOutput() { @Override public void write(final OutputStream output) throws IOException, WebApplicationException { Document document; try { document = createSurroundingXMLResp(); final Element resElement = RESTResponseHelper.createResultElement(document); List<Element> collections; try { collections = RESTResponseHelper.createCollectionElementDBs(pDatabase, document, pStorageFac, pRevision); } catch (final TTException exce) { throw new WebApplicationException(exce); } for (final Element resource : collections) { resElement.appendChild(resource); } document.appendChild(resElement); final DOMSource domSource = new DOMSource(document); final StreamResult streamResult = new StreamResult(output); final Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.transform(domSource, streamResult); } catch (final ParserConfigurationException exce) { throw new WebApplicationException(exce); } catch (final TransformerConfigurationException exce) { throw new WebApplicationException(exce); } catch (final TransformerFactoryConfigurationError exce) { throw new WebApplicationException(exce); } catch (final TransformerException exce) { throw new WebApplicationException(exce); } } }; return sOutput; }
class class_name[name] begin[{] method[buildResponseOfDomLR, return_type[type[StreamingOutput]], modifier[public static], parameter[pDatabase, pStorageFac, pRevision]] begin[{] local_variable[type[StreamingOutput], sOutput] return[member[.sOutput]] end[}] END[}]
Keyword[public] Keyword[static] identifier[StreamingOutput] identifier[buildResponseOfDomLR] operator[SEP] Keyword[final] identifier[IStorage] identifier[pDatabase] , Keyword[final] identifier[IBackendFactory] identifier[pStorageFac] , Keyword[final] identifier[IRevisioning] identifier[pRevision] operator[SEP] { Keyword[final] identifier[StreamingOutput] identifier[sOutput] operator[=] Keyword[new] identifier[StreamingOutput] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[OutputStream] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] , identifier[WebApplicationException] { identifier[Document] identifier[document] operator[SEP] Keyword[try] { identifier[document] operator[=] identifier[createSurroundingXMLResp] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Element] identifier[resElement] operator[=] identifier[RESTResponseHelper] operator[SEP] identifier[createResultElement] operator[SEP] identifier[document] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Element] operator[>] identifier[collections] operator[SEP] Keyword[try] { identifier[collections] operator[=] identifier[RESTResponseHelper] operator[SEP] identifier[createCollectionElementDBs] operator[SEP] identifier[pDatabase] , identifier[document] , identifier[pStorageFac] , identifier[pRevision] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[TTException] identifier[exce] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[exce] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[Element] identifier[resource] operator[:] identifier[collections] operator[SEP] { identifier[resElement] operator[SEP] identifier[appendChild] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } identifier[document] operator[SEP] identifier[appendChild] operator[SEP] identifier[resElement] operator[SEP] operator[SEP] Keyword[final] identifier[DOMSource] identifier[domSource] operator[=] Keyword[new] identifier[DOMSource] operator[SEP] identifier[document] operator[SEP] operator[SEP] Keyword[final] identifier[StreamResult] identifier[streamResult] operator[=] Keyword[new] identifier[StreamResult] operator[SEP] identifier[output] operator[SEP] operator[SEP] Keyword[final] identifier[Transformer] identifier[transformer] operator[=] identifier[TransformerFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[newTransformer] operator[SEP] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[transform] operator[SEP] identifier[domSource] , identifier[streamResult] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[ParserConfigurationException] identifier[exce] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[exce] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[TransformerConfigurationException] identifier[exce] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[exce] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[TransformerFactoryConfigurationError] identifier[exce] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[exce] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[TransformerException] identifier[exce] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[exce] operator[SEP] operator[SEP] } } } operator[SEP] Keyword[return] identifier[sOutput] operator[SEP] }
public Map<String, Context> getJndiContexts() { Map<String, Context> jndiContexts = new HashMap<>(); jndiContexts.putAll(additionalJndiContexts); jndiContexts.put("default", defaultJndiContext); return jndiContexts; }
class class_name[name] begin[{] method[getJndiContexts, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], jndiContexts] call[jndiContexts.putAll, parameter[member[.additionalJndiContexts]]] call[jndiContexts.put, parameter[literal["default"], member[.defaultJndiContext]]] return[member[.jndiContexts]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Context] operator[>] identifier[getJndiContexts] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Context] operator[>] identifier[jndiContexts] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[jndiContexts] operator[SEP] identifier[putAll] operator[SEP] identifier[additionalJndiContexts] operator[SEP] operator[SEP] identifier[jndiContexts] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[defaultJndiContext] operator[SEP] operator[SEP] Keyword[return] identifier[jndiContexts] operator[SEP] }
public static int calculateMod10CheckSum(int[] weights, StringNumber number) { int c = calculateChecksum(weights, number, true) % 10; return c == 0 ? 0 : 10 - c; }
class class_name[name] begin[{] method[calculateMod10CheckSum, return_type[type[int]], modifier[public static], parameter[weights, number]] begin[{] local_variable[type[int], c] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[calculateMod10CheckSum] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[weights] , identifier[StringNumber] identifier[number] operator[SEP] { Keyword[int] identifier[c] operator[=] identifier[calculateChecksum] operator[SEP] identifier[weights] , identifier[number] , literal[boolean] operator[SEP] operator[%] Other[10] operator[SEP] Keyword[return] identifier[c] operator[==] Other[0] operator[?] Other[0] operator[:] Other[10] operator[-] identifier[c] operator[SEP] }
public String getStreamHeader() { StringBuilder builder = new StringBuilder(); builder.append("GDAT").append(Constants.NEWLINE).append("VERSION:").append(VERSION).append(Constants.NEWLINE) .append("SCHEMALENGTH:"); String streamTree = getStreamParseTree(); int headerLength = streamTree.length(); builder.append(Integer.toString(headerLength)); builder.append(Constants.NEWLINE); builder.append(streamTree); return builder.toString(); }
class class_name[name] begin[{] method[getStreamHeader, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], builder] call[builder.append, parameter[literal["GDAT"]]] local_variable[type[String], streamTree] local_variable[type[int], headerLength] call[builder.append, parameter[call[Integer.toString, parameter[member[.headerLength]]]]] call[builder.append, parameter[member[Constants.NEWLINE]]] call[builder.append, parameter[member[.streamTree]]] return[call[builder.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getStreamHeader] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Constants] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[VERSION] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Constants] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[streamTree] operator[=] identifier[getStreamParseTree] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[headerLength] operator[=] identifier[streamTree] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[headerLength] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[Constants] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[streamTree] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private String selectRedirectionUrl(HttpServletRequest request) { final String defaultRedirect = request.getContextPath() + "/"; String rslt = null; // default // Get the person object associated with the request final IPerson person = this.personManager.getPerson(request); final String username = person != null ? person.getUserName() : "[unavailable]"; if (person != null) { // Analyze the user's authentication status final ISecurityContext securityContext = person.getSecurityContext(); if (securityContext.isAuthenticated() && StringUtils.isNotBlank(logoutRedirect)) { rslt = logoutRedirect; } } // Otherwise use a sensible default... rslt = rslt != null ? urlCustomizer.customizeUrl(request, rslt) : urlCustomizer.customizeUrl(request, defaultRedirect); logger.debug("Calculated redirectionURL='{}' for user='{}'", rslt, username); return rslt; }
class class_name[name] begin[{] method[selectRedirectionUrl, return_type[type[String]], modifier[private], parameter[request]] begin[{] local_variable[type[String], defaultRedirect] local_variable[type[String], rslt] local_variable[type[IPerson], person] local_variable[type[String], username] if[binary_operation[member[.person], !=, literal[null]]] begin[{] local_variable[type[ISecurityContext], securityContext] if[binary_operation[call[securityContext.isAuthenticated, parameter[]], &&, call[StringUtils.isNotBlank, parameter[member[.logoutRedirect]]]]] begin[{] assign[member[.rslt], member[.logoutRedirect]] else begin[{] None end[}] else begin[{] None end[}] assign[member[.rslt], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rslt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultRedirect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=customizeUrl, postfix_operators=[], prefix_operators=[], qualifier=urlCustomizer, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rslt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=customizeUrl, postfix_operators=[], prefix_operators=[], qualifier=urlCustomizer, selectors=[], type_arguments=None))] call[logger.debug, parameter[literal["Calculated redirectionURL='{}' for user='{}'"], member[.rslt], member[.username]]] return[member[.rslt]] end[}] END[}]
Keyword[private] identifier[String] identifier[selectRedirectionUrl] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { Keyword[final] identifier[String] identifier[defaultRedirect] operator[=] identifier[request] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[String] identifier[rslt] operator[=] Other[null] operator[SEP] Keyword[final] identifier[IPerson] identifier[person] operator[=] Keyword[this] operator[SEP] identifier[personManager] operator[SEP] identifier[getPerson] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[username] operator[=] identifier[person] operator[!=] Other[null] operator[?] identifier[person] operator[SEP] identifier[getUserName] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[person] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[ISecurityContext] identifier[securityContext] operator[=] identifier[person] operator[SEP] identifier[getSecurityContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[securityContext] operator[SEP] identifier[isAuthenticated] operator[SEP] operator[SEP] operator[&&] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[logoutRedirect] operator[SEP] operator[SEP] { identifier[rslt] operator[=] identifier[logoutRedirect] operator[SEP] } } identifier[rslt] operator[=] identifier[rslt] operator[!=] Other[null] operator[?] identifier[urlCustomizer] operator[SEP] identifier[customizeUrl] operator[SEP] identifier[request] , identifier[rslt] operator[SEP] operator[:] identifier[urlCustomizer] operator[SEP] identifier[customizeUrl] operator[SEP] identifier[request] , identifier[defaultRedirect] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[rslt] , identifier[username] operator[SEP] operator[SEP] Keyword[return] identifier[rslt] operator[SEP] }
@Override public CreateActivityResult createActivity(CreateActivityRequest request) { request = beforeClientExecution(request); return executeCreateActivity(request); }
class class_name[name] begin[{] method[createActivity, return_type[type[CreateActivityResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateActivity, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateActivityResult] identifier[createActivity] operator[SEP] identifier[CreateActivityRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateActivity] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public <T> T read(final Class<T> projectionInterface) throws IOException { try { Document document = projector.config().createDocumentBuilder().parse(file); return projector.projectDOMNode(document, projectionInterface); } catch (SAXException e) { throw new XBDocumentParsingException(e); } }
class class_name[name] begin[{] method[read, return_type[type[T]], modifier[public], parameter[projectionInterface]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=config, postfix_operators=[], prefix_operators=[], qualifier=projector, selectors=[MethodInvocation(arguments=[], member=createDocumentBuilder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=document)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=projectionInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=projectDOMNode, postfix_operators=[], prefix_operators=[], qualifier=projector, 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=XBDocumentParsingException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SAXException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[read] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[projectionInterface] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[Document] identifier[document] operator[=] identifier[projector] operator[SEP] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[createDocumentBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[return] identifier[projector] operator[SEP] identifier[projectDOMNode] operator[SEP] identifier[document] , identifier[projectionInterface] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SAXException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[XBDocumentParsingException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public void printOldGen(PrintStream tty, List<ClassStats> list, boolean orderByName, long minSize) { if (orderByName) { Collections.sort(list, ClassStats.NAME_COMPARATOR); } else { Collections.sort(list, ClassStats.OLD_SIZE_COMPARATOR); } tty.println("\nOldGen Object Histogram:\n"); tty.printf("%6s %7s %7s %s%n", "#num", "#count", "#bytes", "#class description"); tty.println("-----------------------------------------------------------------------------------"); Iterator<ClassStats> iterator = list.listIterator(); int num = 0; long totalOldCount = 0; long totalOldSize = 0; while (iterator.hasNext()) { ClassStats classStats = iterator.next(); if (classStats.getOldSize() > minSize) { totalOldCount = totalOldCount + classStats.getOldCount(); totalOldSize = totalOldSize + classStats.getOldSize(); num++; tty.printf("%5d: %7s %7s %s%n", num, classStats.getOldCount(), FormatUtils.toFloatUnit(classStats.getOldSize()), classStats.getDescription()); } } tty.printf(" Total: %7d %7s, minSize=%d%n", totalOldCount, FormatUtils.toFloatUnit(totalOldSize), minSize); }
class class_name[name] begin[{] method[printOldGen, return_type[void], modifier[public], parameter[tty, list, orderByName, minSize]] begin[{] if[member[.orderByName]] begin[{] call[Collections.sort, parameter[member[.list], member[ClassStats.NAME_COMPARATOR]]] else begin[{] call[Collections.sort, parameter[member[.list], member[ClassStats.OLD_SIZE_COMPARATOR]]] end[}] call[tty.println, parameter[literal["\nOldGen Object Histogram:\n"]]] call[tty.printf, parameter[literal["%6s %7s %7s %s%n"], literal["#num"], literal["#count"], literal["#bytes"], literal["#class description"]]] call[tty.println, parameter[literal["-----------------------------------------------------------------------------------"]]] local_variable[type[Iterator], iterator] local_variable[type[int], num] local_variable[type[long], totalOldCount] local_variable[type[long], totalOldSize] while[call[iterator.hasNext, parameter[]]] begin[{] local_variable[type[ClassStats], classStats] if[binary_operation[call[classStats.getOldSize, parameter[]], >, member[.minSize]]] begin[{] assign[member[.totalOldCount], binary_operation[member[.totalOldCount], +, call[classStats.getOldCount, parameter[]]]] assign[member[.totalOldSize], binary_operation[member[.totalOldSize], +, call[classStats.getOldSize, parameter[]]]] member[.num] call[tty.printf, parameter[literal["%5d: %7s %7s %s%n"], member[.num], call[classStats.getOldCount, parameter[]], call[FormatUtils.toFloatUnit, parameter[call[classStats.getOldSize, parameter[]]]], call[classStats.getDescription, parameter[]]]] else begin[{] None end[}] end[}] call[tty.printf, parameter[literal[" Total: %7d %7s, minSize=%d%n"], member[.totalOldCount], call[FormatUtils.toFloatUnit, parameter[member[.totalOldSize]]], member[.minSize]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[printOldGen] operator[SEP] identifier[PrintStream] identifier[tty] , identifier[List] operator[<] identifier[ClassStats] operator[>] identifier[list] , Keyword[boolean] identifier[orderByName] , Keyword[long] identifier[minSize] operator[SEP] { Keyword[if] operator[SEP] identifier[orderByName] operator[SEP] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[list] , identifier[ClassStats] operator[SEP] identifier[NAME_COMPARATOR] operator[SEP] operator[SEP] } Keyword[else] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[list] , identifier[ClassStats] operator[SEP] identifier[OLD_SIZE_COMPARATOR] operator[SEP] operator[SEP] } identifier[tty] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tty] operator[SEP] identifier[printf] operator[SEP] literal[String] , literal[String] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[tty] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[ClassStats] operator[>] identifier[iterator] operator[=] identifier[list] operator[SEP] identifier[listIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[num] operator[=] Other[0] operator[SEP] Keyword[long] identifier[totalOldCount] operator[=] Other[0] operator[SEP] Keyword[long] identifier[totalOldSize] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[ClassStats] identifier[classStats] operator[=] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[classStats] operator[SEP] identifier[getOldSize] operator[SEP] operator[SEP] operator[>] identifier[minSize] operator[SEP] { identifier[totalOldCount] operator[=] identifier[totalOldCount] operator[+] identifier[classStats] operator[SEP] identifier[getOldCount] operator[SEP] operator[SEP] operator[SEP] identifier[totalOldSize] operator[=] identifier[totalOldSize] operator[+] identifier[classStats] operator[SEP] identifier[getOldSize] operator[SEP] operator[SEP] operator[SEP] identifier[num] operator[++] operator[SEP] identifier[tty] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[num] , identifier[classStats] operator[SEP] identifier[getOldCount] operator[SEP] operator[SEP] , identifier[FormatUtils] operator[SEP] identifier[toFloatUnit] operator[SEP] identifier[classStats] operator[SEP] identifier[getOldSize] operator[SEP] operator[SEP] operator[SEP] , identifier[classStats] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[tty] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[totalOldCount] , identifier[FormatUtils] operator[SEP] identifier[toFloatUnit] operator[SEP] identifier[totalOldSize] operator[SEP] , identifier[minSize] operator[SEP] operator[SEP] }
protected final void firePropertyChange(String propertyName, double oldValue, double newValue) { firePropertyChange(propertyName, Double.valueOf(oldValue), Double.valueOf(newValue)); }
class class_name[name] begin[{] method[firePropertyChange, return_type[void], modifier[final protected], parameter[propertyName, oldValue, newValue]] begin[{] call[.firePropertyChange, parameter[member[.propertyName], call[Double.valueOf, parameter[member[.oldValue]]], call[Double.valueOf, parameter[member[.newValue]]]]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[firePropertyChange] operator[SEP] identifier[String] identifier[propertyName] , Keyword[double] identifier[oldValue] , Keyword[double] identifier[newValue] operator[SEP] { identifier[firePropertyChange] operator[SEP] identifier[propertyName] , identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[oldValue] operator[SEP] , identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] operator[SEP] }
public long[] allocNew(int nrClusters) throws IOException { final long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
class class_name[name] begin[{] method[allocNew, return_type[type[long]], modifier[public], parameter[nrClusters]] begin[{] local_variable[type[long], rc] assign[member[.rc], call[.allocNew, parameter[]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=allocAppend, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nrClusters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.rc]] end[}] END[}]
Keyword[public] Keyword[long] operator[SEP] operator[SEP] identifier[allocNew] operator[SEP] Keyword[int] identifier[nrClusters] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[long] identifier[rc] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[nrClusters] operator[SEP] operator[SEP] identifier[rc] operator[SEP] Other[0] operator[SEP] operator[=] identifier[allocNew] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[nrClusters] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[rc] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[allocAppend] operator[SEP] identifier[rc] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[rc] operator[SEP] }
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.google.api.ads.admanager.axis.v201811.ReconciliationOrderReportServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) { com.google.api.ads.admanager.axis.v201811.ReconciliationOrderReportServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201811.ReconciliationOrderReportServiceSoapBindingStub(new java.net.URL(ReconciliationOrderReportServiceInterfacePort_address), this); _stub.setPortName(getReconciliationOrderReportServiceInterfacePortWSDDServiceName()); return _stub; } } catch (java.lang.Throwable t) { throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); }
class class_name[name] begin[{] method[getPort, return_type[type[java]], modifier[public], parameter[serviceEndpointInterface]] begin[{] TryStatement(block=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=com.google.api.ads.admanager.axis.v201811, selectors=[MethodInvocation(arguments=[MemberReference(member=serviceEndpointInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ReconciliationOrderReportServiceInterface, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=ReconciliationOrderReportServiceInterfacePort_address, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=net, sub_type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None)))), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=api, sub_type=ReferenceType(arguments=None, dimensions=None, name=ads, sub_type=ReferenceType(arguments=None, dimensions=None, name=admanager, sub_type=ReferenceType(arguments=None, dimensions=None, name=axis, sub_type=ReferenceType(arguments=None, dimensions=None, name=v201811, sub_type=ReferenceType(arguments=None, dimensions=None, name=ReconciliationOrderReportServiceSoapBindingStub, sub_type=None))))))))), name=_stub)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=api, sub_type=ReferenceType(arguments=None, dimensions=None, name=ads, sub_type=ReferenceType(arguments=None, dimensions=None, name=admanager, sub_type=ReferenceType(arguments=None, dimensions=None, name=axis, sub_type=ReferenceType(arguments=None, dimensions=None, name=v201811, sub_type=ReferenceType(arguments=None, dimensions=None, name=ReconciliationOrderReportServiceSoapBindingStub, sub_type=None))))))))), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReconciliationOrderReportServiceInterfacePortWSDDServiceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setPortName, postfix_operators=[], prefix_operators=[], qualifier=_stub, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=_stub, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=t, 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=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=xml, sub_type=ReferenceType(arguments=None, dimensions=None, name=rpc, sub_type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None))))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['java.lang.Throwable']))], finally_block=None, label=None, resources=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="There is no stub implementation for the interface: "), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=serviceEndpointInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=serviceEndpointInterface, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="null")), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=xml, sub_type=ReferenceType(arguments=None, dimensions=None, name=rpc, sub_type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None))))), label=None) end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[Remote] identifier[getPort] operator[SEP] identifier[Class] identifier[serviceEndpointInterface] operator[SEP] Keyword[throws] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] { Keyword[try] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[ReconciliationOrderReportServiceInterface] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[serviceEndpointInterface] operator[SEP] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[ReconciliationOrderReportServiceSoapBindingStub] identifier[_stub] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[ReconciliationOrderReportServiceSoapBindingStub] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[URL] operator[SEP] identifier[ReconciliationOrderReportServiceInterfacePort_address] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] identifier[_stub] operator[SEP] identifier[setPortName] operator[SEP] identifier[getReconciliationOrderReportServiceInterfacePortWSDDServiceName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[_stub] operator[SEP] } } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] Keyword[new] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[serviceEndpointInterface] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[serviceEndpointInterface] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void setupTypes() { if (!cache2kConfigurationWasProvided) { cache2kConfiguration.setKeyType(config.getKeyType()); cache2kConfiguration.setValueType(config.getValueType()); } else { if (cache2kConfiguration.getKeyType() == null) { cache2kConfiguration.setKeyType(config.getKeyType()); } if (cache2kConfiguration.getValueType() == null) { cache2kConfiguration.setValueType(config.getValueType()); } } keyType = cache2kConfiguration.getKeyType(); valueType = cache2kConfiguration.getValueType(); if (!config.getKeyType().equals(Object.class) && !config.getKeyType().equals(keyType.getType())) { throw new IllegalArgumentException("Key type mismatch between JCache and cache2k configuration"); } if (!config.getValueType().equals(Object.class) && !config.getValueType().equals(valueType.getType())) { throw new IllegalArgumentException("Value type mismatch between JCache and cache2k configuration"); } }
class class_name[name] begin[{] method[setupTypes, return_type[void], modifier[private], parameter[]] begin[{] if[member[.cache2kConfigurationWasProvided]] begin[{] call[cache2kConfiguration.setKeyType, parameter[call[config.getKeyType, parameter[]]]] call[cache2kConfiguration.setValueType, parameter[call[config.getValueType, parameter[]]]] else begin[{] if[binary_operation[call[cache2kConfiguration.getKeyType, parameter[]], ==, literal[null]]] begin[{] call[cache2kConfiguration.setKeyType, parameter[call[config.getKeyType, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[cache2kConfiguration.getValueType, parameter[]], ==, literal[null]]] begin[{] call[cache2kConfiguration.setValueType, parameter[call[config.getValueType, parameter[]]]] else begin[{] None end[}] end[}] assign[member[.keyType], call[cache2kConfiguration.getKeyType, parameter[]]] assign[member[.valueType], call[cache2kConfiguration.getValueType, parameter[]]] if[binary_operation[call[config.getKeyType, parameter[]], &&, call[config.getKeyType, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Key type mismatch between JCache and cache2k configuration")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[config.getValueType, parameter[]], &&, call[config.getValueType, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Value type mismatch between JCache and cache2k configuration")], 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[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupTypes] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[cache2kConfigurationWasProvided] operator[SEP] { identifier[cache2kConfiguration] operator[SEP] identifier[setKeyType] operator[SEP] identifier[config] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cache2kConfiguration] operator[SEP] identifier[setValueType] operator[SEP] identifier[config] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[cache2kConfiguration] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[cache2kConfiguration] operator[SEP] identifier[setKeyType] operator[SEP] identifier[config] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cache2kConfiguration] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[cache2kConfiguration] operator[SEP] identifier[setValueType] operator[SEP] identifier[config] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[keyType] operator[=] identifier[cache2kConfiguration] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[SEP] identifier[valueType] operator[=] identifier[cache2kConfiguration] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[config] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[&&] operator[!] identifier[config] operator[SEP] identifier[getKeyType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[keyType] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[config] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[&&] operator[!] identifier[config] operator[SEP] identifier[getValueType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[valueType] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Override public ListT<W,T> distinct() { return (ListT<W,T>) FoldableTransformerSeq.super.distinct(); }
class class_name[name] begin[{] method[distinct, return_type[type[ListT]], modifier[public], parameter[]] begin[{] return[Cast(expression=MemberReference(member=FoldableTransformerSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[SuperMethodInvocation(arguments=[], member=distinct, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=W, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ListT, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListT] operator[<] identifier[W] , identifier[T] operator[>] identifier[distinct] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[ListT] operator[<] identifier[W] , identifier[T] operator[>] operator[SEP] identifier[FoldableTransformerSeq] operator[SEP] Keyword[super] operator[SEP] identifier[distinct] operator[SEP] operator[SEP] operator[SEP] }
public final AntlrDatatypeRuleToken ruleValidID() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token this_ID_0=null; Token kw=null; enterRule(); try { // InternalSARL.g:9830:2: ( (this_ID_0= RULE_ID | kw= 'create' | kw= 'annotation' | kw= 'AFTER' | kw= 'BEFORE' | kw= 'SEPARATOR' ) ) // InternalSARL.g:9831:2: (this_ID_0= RULE_ID | kw= 'create' | kw= 'annotation' | kw= 'AFTER' | kw= 'BEFORE' | kw= 'SEPARATOR' ) { // InternalSARL.g:9831:2: (this_ID_0= RULE_ID | kw= 'create' | kw= 'annotation' | kw= 'AFTER' | kw= 'BEFORE' | kw= 'SEPARATOR' ) int alt255=6; switch ( input.LA(1) ) { case RULE_ID: { alt255=1; } break; case 92: { alt255=2; } break; case 44: { alt255=3; } break; case 93: { alt255=4; } break; case 94: { alt255=5; } break; case 95: { alt255=6; } break; default: if (state.backtracking>0) {state.failed=true; return current;} NoViableAltException nvae = new NoViableAltException("", 255, 0, input); throw nvae; } switch (alt255) { case 1 : // InternalSARL.g:9832:3: this_ID_0= RULE_ID { this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(this_ID_0); } if ( state.backtracking==0 ) { newLeafNode(this_ID_0, grammarAccess.getValidIDAccess().getIDTerminalRuleCall_0()); } } break; case 2 : // InternalSARL.g:9840:3: kw= 'create' { kw=(Token)match(input,92,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getValidIDAccess().getCreateKeyword_1()); } } break; case 3 : // InternalSARL.g:9846:3: kw= 'annotation' { kw=(Token)match(input,44,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getValidIDAccess().getAnnotationKeyword_2()); } } break; case 4 : // InternalSARL.g:9852:3: kw= 'AFTER' { kw=(Token)match(input,93,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getValidIDAccess().getAFTERKeyword_3()); } } break; case 5 : // InternalSARL.g:9858:3: kw= 'BEFORE' { kw=(Token)match(input,94,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getValidIDAccess().getBEFOREKeyword_4()); } } break; case 6 : // InternalSARL.g:9864:3: kw= 'SEPARATOR' { kw=(Token)match(input,95,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getValidIDAccess().getSEPARATORKeyword_5()); } } break; } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleValidID, return_type[type[AntlrDatatypeRuleToken]], modifier[final public], parameter[]] begin[{] local_variable[type[AntlrDatatypeRuleToken], current] local_variable[type[Token], this_ID_0] local_variable[type[Token], kw] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), name=alt255)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=['RULE_ID'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=93)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=95)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=255), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, 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=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_ID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RULE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=this_ID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=this_ID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getIDTerminalRuleCall_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getCreateKeyword_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAnnotationKeyword_2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=93), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAFTERKeyword_3, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getBEFOREKeyword_4, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=95), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValidIDAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getSEPARATORKeyword_5, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt255, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[AntlrDatatypeRuleToken] identifier[ruleValidID] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[AntlrDatatypeRuleToken] identifier[current] operator[=] Keyword[new] identifier[AntlrDatatypeRuleToken] operator[SEP] operator[SEP] operator[SEP] identifier[Token] identifier[this_ID_0] operator[=] Other[null] operator[SEP] identifier[Token] identifier[kw] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[alt255] operator[=] Other[6] operator[SEP] Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[case] identifier[RULE_ID] operator[:] { identifier[alt255] operator[=] Other[1] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[92] operator[:] { identifier[alt255] operator[=] Other[2] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[44] operator[:] { identifier[alt255] operator[=] Other[3] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[93] operator[:] { identifier[alt255] operator[=] Other[4] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[94] operator[:] { identifier[alt255] operator[=] Other[5] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[95] operator[:] { identifier[alt255] operator[=] Other[6] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[255] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt255] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[this_ID_0] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[RULE_ID] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[this_ID_0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[this_ID_0] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getIDTerminalRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[92] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getCreateKeyword_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[44] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotationKeyword_2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[93] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAFTERKeyword_3] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[5] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[94] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getBEFOREKeyword_4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[6] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[95] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getValidIDAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getSEPARATORKeyword_5] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
@Override public void removeEdge(final KamEdge kamEdge) { // remove storage of kam edge idEdgeMap.remove(kamEdge.getId()); edgeIdMap.remove(kamEdge); // break edge association with source and target nodes nodeSourceMap.get(kamEdge.getSourceNode()).remove(kamEdge); nodeTargetMap.get(kamEdge.getTargetNode()).remove(kamEdge); // rebuild hashcode this.hashCode = generateHashCode(); }
class class_name[name] begin[{] method[removeEdge, return_type[void], modifier[public], parameter[kamEdge]] begin[{] call[idEdgeMap.remove, parameter[call[kamEdge.getId, parameter[]]]] call[edgeIdMap.remove, parameter[member[.kamEdge]]] call[nodeSourceMap.get, parameter[call[kamEdge.getSourceNode, parameter[]]]] call[nodeTargetMap.get, parameter[call[kamEdge.getTargetNode, parameter[]]]] assign[THIS[member[None.hashCode]], call[.generateHashCode, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeEdge] operator[SEP] Keyword[final] identifier[KamEdge] identifier[kamEdge] operator[SEP] { identifier[idEdgeMap] operator[SEP] identifier[remove] operator[SEP] identifier[kamEdge] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[edgeIdMap] operator[SEP] identifier[remove] operator[SEP] identifier[kamEdge] operator[SEP] operator[SEP] identifier[nodeSourceMap] operator[SEP] identifier[get] operator[SEP] identifier[kamEdge] operator[SEP] identifier[getSourceNode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[kamEdge] operator[SEP] operator[SEP] identifier[nodeTargetMap] operator[SEP] identifier[get] operator[SEP] identifier[kamEdge] operator[SEP] identifier[getTargetNode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[kamEdge] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[hashCode] operator[=] identifier[generateHashCode] operator[SEP] operator[SEP] operator[SEP] }
public void noChunks() throws MalformedURLException { URL url = null; InputStream stream = null; File file = null; // tag::no-chunks[] ok(new RenderableFile(file, false)); ok(new RenderableURL(url, false)); ok(new RenderableStream(stream, false)); // end::no-chunks[] }
class class_name[name] begin[{] method[noChunks, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[URL], url] local_variable[type[InputStream], stream] local_variable[type[File], file] call[.ok, parameter[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=None, dimensions=None, name=RenderableFile, sub_type=None))]] call[.ok, parameter[ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=None, dimensions=None, name=RenderableURL, sub_type=None))]] call[.ok, parameter[ClassCreator(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=None, dimensions=None, name=RenderableStream, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[noChunks] operator[SEP] operator[SEP] Keyword[throws] identifier[MalformedURLException] { identifier[URL] identifier[url] operator[=] Other[null] operator[SEP] identifier[InputStream] identifier[stream] operator[=] Other[null] operator[SEP] identifier[File] identifier[file] operator[=] Other[null] operator[SEP] identifier[ok] operator[SEP] Keyword[new] identifier[RenderableFile] operator[SEP] identifier[file] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[ok] operator[SEP] Keyword[new] identifier[RenderableURL] operator[SEP] identifier[url] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[ok] operator[SEP] Keyword[new] identifier[RenderableStream] operator[SEP] identifier[stream] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] }
public static String getChildText(Element parent, String name, boolean firstToLast) { Assert.isTrue(isDAVElement(parent)); Assert.isNotNull(name); Element child; if (firstToLast) child = getFirstChild(parent, name); else child = getLastChild(parent, name); if (child != null) return getText(child, firstToLast); return null; }
class class_name[name] begin[{] method[getChildText, return_type[type[String]], modifier[public static], parameter[parent, name, firstToLast]] begin[{] call[Assert.isTrue, parameter[call[.isDAVElement, parameter[member[.parent]]]]] call[Assert.isNotNull, parameter[member[.name]]] local_variable[type[Element], child] if[member[.firstToLast]] begin[{] assign[member[.child], call[.getFirstChild, parameter[member[.parent], member[.name]]]] else begin[{] assign[member[.child], call[.getLastChild, parameter[member[.parent], member[.name]]]] end[}] if[binary_operation[member[.child], !=, literal[null]]] begin[{] return[call[.getText, parameter[member[.child], member[.firstToLast]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getChildText] operator[SEP] identifier[Element] identifier[parent] , identifier[String] identifier[name] , Keyword[boolean] identifier[firstToLast] operator[SEP] { identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[isDAVElement] operator[SEP] identifier[parent] operator[SEP] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isNotNull] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[Element] identifier[child] operator[SEP] Keyword[if] operator[SEP] identifier[firstToLast] operator[SEP] identifier[child] operator[=] identifier[getFirstChild] operator[SEP] identifier[parent] , identifier[name] operator[SEP] operator[SEP] Keyword[else] identifier[child] operator[=] identifier[getLastChild] operator[SEP] identifier[parent] , identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[getText] operator[SEP] identifier[child] , identifier[firstToLast] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
private void updateEndPCsOnCatchRegScope(List<CatchInfo> infos, int pc, int seen) { if (lvt != null) { for (CatchInfo ci : infos) { if ((ci.getStart() == pc) && OpcodeUtils.isAStore(seen)) { int exReg = RegisterUtils.getAStoreReg(this, seen); LocalVariable lv = lvt.getLocalVariable(exReg, pc + 1); if (lv != null) { ci.setFinish(lv.getStartPC() + lv.getLength()); } break; } } } }
class class_name[name] begin[{] method[updateEndPCsOnCatchRegScope, return_type[void], modifier[private], parameter[infos, pc, seen]] begin[{] if[binary_operation[member[.lvt], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=ci, selectors=[], type_arguments=None), operandr=MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAStore, postfix_operators=[], prefix_operators=[], qualifier=OpcodeUtils, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAStoreReg, postfix_operators=[], prefix_operators=[], qualifier=RegisterUtils, selectors=[], type_arguments=None), name=exReg)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=exReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=getLocalVariable, postfix_operators=[], prefix_operators=[], qualifier=lvt, selectors=[], type_arguments=None), name=lv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalVariable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStartPC, postfix_operators=[], prefix_operators=[], qualifier=lv, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=lv, selectors=[], type_arguments=None), operator=+)], member=setFinish, postfix_operators=[], prefix_operators=[], qualifier=ci, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ci)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CatchInfo, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[updateEndPCsOnCatchRegScope] operator[SEP] identifier[List] operator[<] identifier[CatchInfo] operator[>] identifier[infos] , Keyword[int] identifier[pc] , Keyword[int] identifier[seen] operator[SEP] { Keyword[if] operator[SEP] identifier[lvt] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[CatchInfo] identifier[ci] operator[:] identifier[infos] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[ci] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[==] identifier[pc] operator[SEP] operator[&&] identifier[OpcodeUtils] operator[SEP] identifier[isAStore] operator[SEP] identifier[seen] operator[SEP] operator[SEP] { Keyword[int] identifier[exReg] operator[=] identifier[RegisterUtils] operator[SEP] identifier[getAStoreReg] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] identifier[LocalVariable] identifier[lv] operator[=] identifier[lvt] operator[SEP] identifier[getLocalVariable] operator[SEP] identifier[exReg] , identifier[pc] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lv] operator[!=] Other[null] operator[SEP] { identifier[ci] operator[SEP] identifier[setFinish] operator[SEP] identifier[lv] operator[SEP] identifier[getStartPC] operator[SEP] operator[SEP] operator[+] identifier[lv] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } } }
public SIMPRemoteQueuePointControllable getRemoteQueuePointControlByID(String id) throws SIMPInvalidRuntimeIDException, SIMPControllableNotFoundException, SIMPException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRemoteQueuePointControlByID", new Object[] { id }); SIMPRemoteQueuePointControllable rqp = null; // Extract the destination uuid and ME uuid from the id string String [] tokens = id.split(RuntimeControlConstants.REMOTE_QUEUE_ID_INSERT); DestinationHandler dest = null; if (tokens.length > 0) { // Locate the destination dest = destinationManager.getDestinationInternal(new SIBUuid12(tokens[0]), true); if (dest != null) { ControlAdapter control = dest.getControlAdapter(); if (control instanceof Queue) rqp = ((Queue) control).getRemoteQueuePointControlByMEUuid(tokens[1]); } } if (dest == null || rqp == null) { SIMPControllableNotFoundException finalE = new SIMPControllableNotFoundException( nls_cwsik.getFormattedMessage( "DESTINATION_NOT_FOUND_ERROR_CWSIP0341", new Object[] { id, messageProcessor.getMessagingEngineName() }, null)); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getRemoteQueuePointControlByID", finalE); throw finalE; } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getRemoteQueuePointControlByID"); return rqp; }
class class_name[name] begin[{] method[getRemoteQueuePointControlByID, return_type[type[SIMPRemoteQueuePointControllable]], modifier[public], parameter[id]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getRemoteQueuePointControlByID"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=id, 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[SIMPRemoteQueuePointControllable], rqp] local_variable[type[String], tokens] local_variable[type[DestinationHandler], dest] if[binary_operation[member[tokens.length], >, literal[0]]] begin[{] assign[member[.dest], call[destinationManager.getDestinationInternal, parameter[ClassCreator(arguments=[MemberReference(member=tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIBUuid12, sub_type=None)), literal[true]]]] if[binary_operation[member[.dest], !=, literal[null]]] begin[{] local_variable[type[ControlAdapter], control] if[binary_operation[member[.control], instanceof, type[Queue]]] begin[{] assign[member[.rqp], Cast(expression=MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Queue, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[member[.dest], ==, literal[null]], ||, binary_operation[member[.rqp], ==, literal[null]]]] begin[{] local_variable[type[SIMPControllableNotFoundException], finalE] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getRemoteQueuePointControlByID"], member[.finalE]]] else begin[{] None end[}] ThrowStatement(expression=MemberReference(member=finalE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getRemoteQueuePointControlByID"]]] else begin[{] None end[}] return[member[.rqp]] end[}] END[}]
Keyword[public] identifier[SIMPRemoteQueuePointControllable] identifier[getRemoteQueuePointControlByID] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[SIMPInvalidRuntimeIDException] , identifier[SIMPControllableNotFoundException] , identifier[SIMPException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[id] } operator[SEP] operator[SEP] identifier[SIMPRemoteQueuePointControllable] identifier[rqp] operator[=] Other[null] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[tokens] operator[=] identifier[id] operator[SEP] identifier[split] operator[SEP] identifier[RuntimeControlConstants] operator[SEP] identifier[REMOTE_QUEUE_ID_INSERT] operator[SEP] operator[SEP] identifier[DestinationHandler] identifier[dest] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[dest] operator[=] identifier[destinationManager] operator[SEP] identifier[getDestinationInternal] operator[SEP] Keyword[new] identifier[SIBUuid12] operator[SEP] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dest] operator[!=] Other[null] operator[SEP] { identifier[ControlAdapter] identifier[control] operator[=] identifier[dest] operator[SEP] identifier[getControlAdapter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[control] Keyword[instanceof] identifier[Queue] operator[SEP] identifier[rqp] operator[=] operator[SEP] operator[SEP] identifier[Queue] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[getRemoteQueuePointControlByMEUuid] operator[SEP] identifier[tokens] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[dest] operator[==] Other[null] operator[||] identifier[rqp] operator[==] Other[null] operator[SEP] { identifier[SIMPControllableNotFoundException] identifier[finalE] operator[=] Keyword[new] identifier[SIMPControllableNotFoundException] operator[SEP] identifier[nls_cwsik] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[id] , identifier[messageProcessor] operator[SEP] identifier[getMessagingEngineName] operator[SEP] operator[SEP] } , Other[null] 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] , identifier[finalE] operator[SEP] operator[SEP] Keyword[throw] identifier[finalE] 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] Keyword[return] identifier[rqp] operator[SEP] }
void printError(String type, SAXParseException e) { PrintWriter logger = new PrintWriter(System.out); logger.print(type); if (e.getLineNumber() >= 0) { logger.print(" at line " + e.getLineNumber()); if (e.getColumnNumber() >= 0) { logger.print(", column " + e.getColumnNumber()); } if (e.getSystemId() != null) { logger.print(" of " + e.getSystemId()); } } else { if (e.getSystemId() != null) { logger.print(" in " + e.getSystemId()); } } logger.println(":"); logger.println(" " + e.getMessage()); logger.flush(); }
class class_name[name] begin[{] method[printError, return_type[void], modifier[default], parameter[type, e]] begin[{] local_variable[type[PrintWriter], logger] call[logger.print, parameter[member[.type]]] if[binary_operation[call[e.getLineNumber, parameter[]], >=, literal[0]]] begin[{] call[logger.print, parameter[binary_operation[literal[" at line "], +, call[e.getLineNumber, parameter[]]]]] if[binary_operation[call[e.getColumnNumber, parameter[]], >=, literal[0]]] begin[{] call[logger.print, parameter[binary_operation[literal[", column "], +, call[e.getColumnNumber, parameter[]]]]] else begin[{] None end[}] if[binary_operation[call[e.getSystemId, parameter[]], !=, literal[null]]] begin[{] call[logger.print, parameter[binary_operation[literal[" of "], +, call[e.getSystemId, parameter[]]]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[e.getSystemId, parameter[]], !=, literal[null]]] begin[{] call[logger.print, parameter[binary_operation[literal[" in "], +, call[e.getSystemId, parameter[]]]]] else begin[{] None end[}] end[}] call[logger.println, parameter[literal[":"]]] call[logger.println, parameter[binary_operation[literal[" "], +, call[e.getMessage, parameter[]]]]] call[logger.flush, parameter[]] end[}] END[}]
Keyword[void] identifier[printError] operator[SEP] identifier[String] identifier[type] , identifier[SAXParseException] identifier[e] operator[SEP] { identifier[PrintWriter] identifier[logger] operator[=] Keyword[new] identifier[PrintWriter] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[print] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getLineNumber] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[logger] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getLineNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getColumnNumber] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[logger] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getColumnNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getSystemId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getSystemId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getSystemId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getSystemId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[logger] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
public Object propertyGet(String propertyName) { if (propertyExists(propertyName) == false) { throw new NoSuchElementException("Unknown property: " + propertyName); } return data.get(propertyName); }
class class_name[name] begin[{] method[propertyGet, return_type[type[Object]], modifier[public], parameter[propertyName]] begin[{] if[binary_operation[call[.propertyExists, parameter[member[.propertyName]]], ==, literal[false]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown property: "), operandr=MemberReference(member=propertyName, 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=NoSuchElementException, sub_type=None)), label=None) else begin[{] None end[}] return[call[data.get, parameter[member[.propertyName]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[propertyGet] operator[SEP] identifier[String] identifier[propertyName] operator[SEP] { Keyword[if] operator[SEP] identifier[propertyExists] operator[SEP] identifier[propertyName] operator[SEP] operator[==] literal[boolean] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchElementException] operator[SEP] literal[String] operator[+] identifier[propertyName] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] }
protected ActivityBehavior determineBehaviour(ActivityBehavior delegateInstance) { if (hasMultiInstanceCharacteristics()) { multiInstanceActivityBehavior.setInnerActivityBehavior((AbstractBpmnActivityBehavior) delegateInstance); return multiInstanceActivityBehavior; } return delegateInstance; }
class class_name[name] begin[{] method[determineBehaviour, return_type[type[ActivityBehavior]], modifier[protected], parameter[delegateInstance]] begin[{] if[call[.hasMultiInstanceCharacteristics, parameter[]]] begin[{] call[multiInstanceActivityBehavior.setInnerActivityBehavior, parameter[Cast(expression=MemberReference(member=delegateInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractBpmnActivityBehavior, sub_type=None))]] return[member[.multiInstanceActivityBehavior]] else begin[{] None end[}] return[member[.delegateInstance]] end[}] END[}]
Keyword[protected] identifier[ActivityBehavior] identifier[determineBehaviour] operator[SEP] identifier[ActivityBehavior] identifier[delegateInstance] operator[SEP] { Keyword[if] operator[SEP] identifier[hasMultiInstanceCharacteristics] operator[SEP] operator[SEP] operator[SEP] { identifier[multiInstanceActivityBehavior] operator[SEP] identifier[setInnerActivityBehavior] operator[SEP] operator[SEP] identifier[AbstractBpmnActivityBehavior] operator[SEP] identifier[delegateInstance] operator[SEP] operator[SEP] Keyword[return] identifier[multiInstanceActivityBehavior] operator[SEP] } Keyword[return] identifier[delegateInstance] operator[SEP] }
public Complex divide(Complex c) { Complex ret = new Complex(real, imag); ret.mutableDivide(c); return ret; }
class class_name[name] begin[{] method[divide, return_type[type[Complex]], modifier[public], parameter[c]] begin[{] local_variable[type[Complex], ret] call[ret.mutableDivide, parameter[member[.c]]] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[Complex] identifier[divide] operator[SEP] identifier[Complex] identifier[c] operator[SEP] { identifier[Complex] identifier[ret] operator[=] Keyword[new] identifier[Complex] operator[SEP] identifier[real] , identifier[imag] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[mutableDivide] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public final void mRULE_COMMENT_RICH_TEXT_INBETWEEN() throws RecognitionException { try { int _type = RULE_COMMENT_RICH_TEXT_INBETWEEN; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalSARL.g:48777:34: ( '\\uFFFD\\uFFFD' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' ( RULE_IN_RICH_STRING )* ( '\\'' ( '\\'' )? )? '\\uFFFD' )? ) // InternalSARL.g:48777:36: '\\uFFFD\\uFFFD' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' ( RULE_IN_RICH_STRING )* ( '\\'' ( '\\'' )? )? '\\uFFFD' )? { match("\uFFFD\uFFFD"); // InternalSARL.g:48777:51: (~ ( ( '\\n' | '\\r' ) ) )* loop22: do { int alt22=2; int LA22_0 = input.LA(1); if ( ((LA22_0>='\u0000' && LA22_0<='\t')||(LA22_0>='\u000B' && LA22_0<='\f')||(LA22_0>='\u000E' && LA22_0<='\uFFFF')) ) { alt22=1; } switch (alt22) { case 1 : // InternalSARL.g:48777:51: ~ ( ( '\\n' | '\\r' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : break loop22; } } while (true); // InternalSARL.g:48777:67: ( ( '\\r' )? '\\n' ( RULE_IN_RICH_STRING )* ( '\\'' ( '\\'' )? )? '\\uFFFD' )? int alt27=2; int LA27_0 = input.LA(1); if ( (LA27_0=='\n'||LA27_0=='\r') ) { alt27=1; } switch (alt27) { case 1 : // InternalSARL.g:48777:68: ( '\\r' )? '\\n' ( RULE_IN_RICH_STRING )* ( '\\'' ( '\\'' )? )? '\\uFFFD' { // InternalSARL.g:48777:68: ( '\\r' )? int alt23=2; int LA23_0 = input.LA(1); if ( (LA23_0=='\r') ) { alt23=1; } switch (alt23) { case 1 : // InternalSARL.g:48777:68: '\\r' { match('\r'); } break; } match('\n'); // InternalSARL.g:48777:79: ( RULE_IN_RICH_STRING )* loop24: do { int alt24=2; int LA24_0 = input.LA(1); if ( (LA24_0=='\'') ) { int LA24_1 = input.LA(2); if ( (LA24_1=='\'') ) { int LA24_4 = input.LA(3); if ( ((LA24_4>='\u0000' && LA24_4<='&')||(LA24_4>='(' && LA24_4<='\uFFFC')||(LA24_4>='\uFFFE' && LA24_4<='\uFFFF')) ) { alt24=1; } } else if ( ((LA24_1>='\u0000' && LA24_1<='&')||(LA24_1>='(' && LA24_1<='\uFFFC')||(LA24_1>='\uFFFE' && LA24_1<='\uFFFF')) ) { alt24=1; } } else if ( ((LA24_0>='\u0000' && LA24_0<='&')||(LA24_0>='(' && LA24_0<='\uFFFC')||(LA24_0>='\uFFFE' && LA24_0<='\uFFFF')) ) { alt24=1; } switch (alt24) { case 1 : // InternalSARL.g:48777:79: RULE_IN_RICH_STRING { mRULE_IN_RICH_STRING(); } break; default : break loop24; } } while (true); // InternalSARL.g:48777:100: ( '\\'' ( '\\'' )? )? int alt26=2; int LA26_0 = input.LA(1); if ( (LA26_0=='\'') ) { alt26=1; } switch (alt26) { case 1 : // InternalSARL.g:48777:101: '\\'' ( '\\'' )? { match('\''); // InternalSARL.g:48777:106: ( '\\'' )? int alt25=2; int LA25_0 = input.LA(1); if ( (LA25_0=='\'') ) { alt25=1; } switch (alt25) { case 1 : // InternalSARL.g:48777:106: '\\'' { match('\''); } break; } } break; } match('\uFFFD'); } break; } } state.type = _type; state.channel = _channel; } finally { } }
class class_name[name] begin[{] method[mRULE_COMMENT_RICH_TEXT_INBETWEEN, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=RULE_COMMENT_RICH_TEXT_INBETWEEN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="��")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt22)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA22_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt22, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=input, 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=MismatchedSetException, sub_type=None)), name=mse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MismatchedSetException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop22, label=None)])], expression=MemberReference(member=alt22, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop22), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt27)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA27_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA27_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), operandr=BinaryOperation(operandl=MemberReference(member=LA27_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt27, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt23)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA23_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA23_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt23, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt23, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt24)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA24_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='&'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￾'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt24, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA24_1)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='&'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￾'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt24, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA24_4)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='&'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￾'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA24_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt24, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mRULE_IN_RICH_STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop24, label=None)])], expression=MemberReference(member=alt24, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop24), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt26)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA26_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA26_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt26, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt25)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA25_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA25_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt25, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt25, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt26, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='�')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt27, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mRULE_COMMENT_RICH_TEXT_INBETWEEN] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[RULE_COMMENT_RICH_TEXT_INBETWEEN] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[loop22] operator[:] Keyword[do] { Keyword[int] identifier[alt22] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA22_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA22_0] operator[>=] literal[String] operator[&&] identifier[LA22_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA22_0] operator[>=] literal[String] operator[&&] identifier[LA22_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA22_0] operator[>=] literal[String] operator[&&] identifier[LA22_0] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt22] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt22] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[if] operator[SEP] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[MismatchedSetException] identifier[mse] operator[=] Keyword[new] identifier[MismatchedSetException] operator[SEP] Other[null] , identifier[input] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[mse] operator[SEP] operator[SEP] Keyword[throw] identifier[mse] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop22] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[int] identifier[alt27] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA27_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA27_0] operator[==] literal[String] operator[||] identifier[LA27_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt27] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt27] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[int] identifier[alt23] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA23_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA23_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt23] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt23] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[loop24] operator[:] Keyword[do] { Keyword[int] identifier[alt24] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA24_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA24_0] operator[==] literal[String] operator[SEP] operator[SEP] { Keyword[int] identifier[LA24_1] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA24_1] operator[==] literal[String] operator[SEP] operator[SEP] { Keyword[int] identifier[LA24_4] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA24_4] operator[>=] literal[String] operator[&&] identifier[LA24_4] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_4] operator[>=] literal[String] operator[&&] identifier[LA24_4] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_4] operator[>=] literal[String] operator[&&] identifier[LA24_4] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt24] operator[=] Other[1] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA24_1] operator[>=] literal[String] operator[&&] identifier[LA24_1] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_1] operator[>=] literal[String] operator[&&] identifier[LA24_1] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_1] operator[>=] literal[String] operator[&&] identifier[LA24_1] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt24] operator[=] Other[1] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA24_0] operator[>=] literal[String] operator[&&] identifier[LA24_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_0] operator[>=] literal[String] operator[&&] identifier[LA24_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA24_0] operator[>=] literal[String] operator[&&] identifier[LA24_0] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt24] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt24] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[mRULE_IN_RICH_STRING] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop24] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[int] identifier[alt26] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA26_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA26_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt26] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt26] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[alt25] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA25_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA25_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt25] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt25] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[break] operator[SEP] } identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }