code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static String prepareFileNameForEditor(CmsObject cms, CmsResource res, String pathWithMacros) { String subsite = OpenCms.getADEManager().getSubSiteRoot(cms, res.getRootPath()); CmsMacroResolver resolver = new CmsMacroResolver(); if (subsite != null) { resolver.addMacro("subsite", cms.getRequestContext().removeSiteRoot(subsite)); } resolver.addMacro("file", cms.getSitePath(res)); String path = resolver.resolveMacros(pathWithMacros).replaceAll("/+", "/"); return path; }
class class_name[name] begin[{] method[prepareFileNameForEditor, return_type[type[String]], modifier[public static], parameter[cms, res, pathWithMacros]] begin[{] local_variable[type[String], subsite] local_variable[type[CmsMacroResolver], resolver] if[binary_operation[member[.subsite], !=, literal[null]]] begin[{] call[resolver.addMacro, parameter[literal["subsite"], call[cms.getRequestContext, parameter[]]]] else begin[{] None end[}] call[resolver.addMacro, parameter[literal["file"], call[cms.getSitePath, parameter[member[.res]]]]] local_variable[type[String], path] return[member[.path]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[prepareFileNameForEditor] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[res] , identifier[String] identifier[pathWithMacros] operator[SEP] { identifier[String] identifier[subsite] operator[=] identifier[OpenCms] operator[SEP] identifier[getADEManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSubSiteRoot] operator[SEP] identifier[cms] , identifier[res] operator[SEP] identifier[getRootPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CmsMacroResolver] identifier[resolver] operator[=] Keyword[new] identifier[CmsMacroResolver] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[subsite] operator[!=] Other[null] operator[SEP] { identifier[resolver] operator[SEP] identifier[addMacro] operator[SEP] literal[String] , identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[removeSiteRoot] operator[SEP] identifier[subsite] operator[SEP] operator[SEP] operator[SEP] } identifier[resolver] operator[SEP] identifier[addMacro] operator[SEP] literal[String] , identifier[cms] operator[SEP] identifier[getSitePath] operator[SEP] identifier[res] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] identifier[resolver] operator[SEP] identifier[resolveMacros] operator[SEP] identifier[pathWithMacros] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[path] operator[SEP] }
@Override void addToCollection(final ClientCollection col) throws ProponoException { setCollection(col); final EntityEnclosingMethod method = new PostMethod(col.getHrefResolved()); getCollection().addAuthentication(method); try { final Content c = getContents().get(0); if (inputStream != null) { method.setRequestEntity(new InputStreamRequestEntity(inputStream)); } else { method.setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(getBytes()))); } method.setRequestHeader("Content-type", c.getType()); method.setRequestHeader("Title", getTitle()); method.setRequestHeader("Slug", getSlug()); getCollection().getHttpClient().executeMethod(method); if (inputStream != null) { inputStream.close(); } final InputStream is = method.getResponseBodyAsStream(); if (method.getStatusCode() == 200 || method.getStatusCode() == 201) { final Entry romeEntry = Atom10Parser.parseEntry(new InputStreamReader(is), col.getHrefResolved(), Locale.US); BeanUtils.copyProperties(this, romeEntry); } else { throw new ProponoException("ERROR HTTP status-code=" + method.getStatusCode() + " status-line: " + method.getStatusLine()); } } catch (final IOException ie) { throw new ProponoException("ERROR: saving media entry", ie); } catch (final JDOMException je) { throw new ProponoException("ERROR: saving media entry", je); } catch (final FeedException fe) { throw new ProponoException("ERROR: saving media entry", fe); } catch (final IllegalAccessException ae) { throw new ProponoException("ERROR: saving media entry", ae); } catch (final InvocationTargetException te) { throw new ProponoException("ERROR: saving media entry", te); } final Header locationHeader = method.getResponseHeader("Location"); if (locationHeader == null) { LOG.warn("WARNING added entry, but no location header returned"); } else if (getEditURI() == null) { final List<Link> links = getOtherLinks(); final Link link = new Link(); link.setHref(locationHeader.getValue()); link.setRel("edit"); links.add(link); setOtherLinks(links); } }
class class_name[name] begin[{] method[addToCollection, return_type[void], modifier[default], parameter[col]] begin[{] call[.setCollection, parameter[member[.col]]] local_variable[type[EntityEnclosingMethod], method] call[.getCollection, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=c)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Content, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamRequestEntity, sub_type=None))], member=setRequestEntity, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=inputStream, 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=InputStreamRequestEntity, sub_type=None))], member=setRequestEntity, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Content-type"), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=setRequestHeader, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Title"), MethodInvocation(arguments=[], member=getTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setRequestHeader, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Slug"), MethodInvocation(arguments=[], member=getSlug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setRequestHeader, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getHttpClient, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputStream, 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=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getResponseBodyAsStream, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), name=is)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=200), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=201), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR HTTP status-code="), operandr=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" status-line: "), operator=+), operandr=MethodInvocation(arguments=[], member=getStatusLine, postfix_operators=[], prefix_operators=[], qualifier=method, 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=ProponoException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=is, 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=InputStreamReader, sub_type=None)), MethodInvocation(arguments=[], member=getHrefResolved, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[], type_arguments=None), MemberReference(member=US, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=parseEntry, postfix_operators=[], prefix_operators=[], qualifier=Atom10Parser, selectors=[], type_arguments=None), name=romeEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=romeEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyProperties, postfix_operators=[], prefix_operators=[], qualifier=BeanUtils, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: saving media entry"), MemberReference(member=ie, 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=ProponoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ie, types=['IOException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: saving media entry"), MemberReference(member=je, 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=ProponoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=je, types=['JDOMException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: saving media entry"), MemberReference(member=fe, 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=ProponoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=fe, types=['FeedException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: saving media entry"), MemberReference(member=ae, 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=ProponoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ae, types=['IllegalAccessException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: saving media entry"), MemberReference(member=te, 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=ProponoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=te, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) local_variable[type[Header], locationHeader] if[binary_operation[member[.locationHeader], ==, literal[null]]] begin[{] call[LOG.warn, parameter[literal["WARNING added entry, but no location header returned"]]] else begin[{] if[binary_operation[call[.getEditURI, parameter[]], ==, literal[null]]] begin[{] local_variable[type[List], links] local_variable[type[Link], link] call[link.setHref, parameter[call[locationHeader.getValue, parameter[]]]] call[link.setRel, parameter[literal["edit"]]] call[links.add, parameter[member[.link]]] call[.setOtherLinks, parameter[member[.links]]] else begin[{] None end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[void] identifier[addToCollection] operator[SEP] Keyword[final] identifier[ClientCollection] identifier[col] operator[SEP] Keyword[throws] identifier[ProponoException] { identifier[setCollection] operator[SEP] identifier[col] operator[SEP] operator[SEP] Keyword[final] identifier[EntityEnclosingMethod] identifier[method] operator[=] Keyword[new] identifier[PostMethod] operator[SEP] identifier[col] operator[SEP] identifier[getHrefResolved] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getCollection] operator[SEP] operator[SEP] operator[SEP] identifier[addAuthentication] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Content] identifier[c] operator[=] identifier[getContents] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputStream] operator[!=] Other[null] operator[SEP] { identifier[method] operator[SEP] identifier[setRequestEntity] operator[SEP] Keyword[new] identifier[InputStreamRequestEntity] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[method] operator[SEP] identifier[setRequestEntity] operator[SEP] Keyword[new] identifier[InputStreamRequestEntity] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[method] operator[SEP] identifier[setRequestHeader] operator[SEP] literal[String] , identifier[c] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[setRequestHeader] operator[SEP] literal[String] , identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[setRequestHeader] operator[SEP] literal[String] , identifier[getSlug] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getCollection] operator[SEP] operator[SEP] operator[SEP] identifier[getHttpClient] operator[SEP] operator[SEP] operator[SEP] identifier[executeMethod] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputStream] operator[!=] Other[null] operator[SEP] { identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[InputStream] identifier[is] operator[=] identifier[method] operator[SEP] identifier[getResponseBodyAsStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[method] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[==] Other[200] operator[||] identifier[method] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[==] Other[201] operator[SEP] { Keyword[final] identifier[Entry] identifier[romeEntry] operator[=] identifier[Atom10Parser] operator[SEP] identifier[parseEntry] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[is] operator[SEP] , identifier[col] operator[SEP] identifier[getHrefResolved] operator[SEP] operator[SEP] , identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] identifier[BeanUtils] operator[SEP] identifier[copyProperties] operator[SEP] Keyword[this] , identifier[romeEntry] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] operator[+] identifier[method] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[method] operator[SEP] identifier[getStatusLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[ie] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] , identifier[ie] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[JDOMException] identifier[je] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] , identifier[je] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[FeedException] identifier[fe] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] , identifier[fe] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IllegalAccessException] identifier[ae] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] , identifier[ae] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[InvocationTargetException] identifier[te] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProponoException] operator[SEP] literal[String] , identifier[te] operator[SEP] operator[SEP] } Keyword[final] identifier[Header] identifier[locationHeader] operator[=] identifier[method] operator[SEP] identifier[getResponseHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[locationHeader] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[getEditURI] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Link] operator[>] identifier[links] operator[=] identifier[getOtherLinks] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Link] identifier[link] operator[=] Keyword[new] identifier[Link] operator[SEP] operator[SEP] operator[SEP] identifier[link] operator[SEP] identifier[setHref] operator[SEP] identifier[locationHeader] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[link] operator[SEP] identifier[setRel] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[links] operator[SEP] identifier[add] operator[SEP] identifier[link] operator[SEP] operator[SEP] identifier[setOtherLinks] operator[SEP] identifier[links] operator[SEP] operator[SEP] } }
@Override @SuppressWarnings("unchecked") public <T> T getOrBorn(String key, Borning<T> factory) { T t = (T) get(key); if (t == null) { t = factory.born(key); put(key, t); } return t; }
class class_name[name] begin[{] method[getOrBorn, return_type[type[T]], modifier[public], parameter[key, factory]] begin[{] local_variable[type[T], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] assign[member[.t], call[factory.born, parameter[member[.key]]]] call[.put, parameter[member[.key], member[.t]]] else begin[{] None end[}] return[member[.t]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getOrBorn] operator[SEP] identifier[String] identifier[key] , identifier[Borning] operator[<] identifier[T] operator[>] identifier[factory] operator[SEP] { identifier[T] identifier[t] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { identifier[t] operator[=] identifier[factory] operator[SEP] identifier[born] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[t] operator[SEP] operator[SEP] } Keyword[return] identifier[t] operator[SEP] }
public String getTypeDescriptor() { if (typeDescriptor == null) { StringBuilder buf = new StringBuilder(name.length() + parameters.length * 10); buf.append(returnType.getName()); buf.append(' '); buf.append(name); buf.append('('); for (int i = 0; i < parameters.length; i++) { if (i > 0) { buf.append(", "); } Parameter param = parameters[i]; buf.append(formatTypeName(param.getType())); } buf.append(')'); typeDescriptor = buf.toString(); } return typeDescriptor; }
class class_name[name] begin[{] method[getTypeDescriptor, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.typeDescriptor], ==, literal[null]]] begin[{] local_variable[type[StringBuilder], buf] call[buf.append, parameter[call[returnType.getName, parameter[]]]] call[buf.append, parameter[literal[' ']]] call[buf.append, parameter[member[.name]]] call[buf.append, parameter[literal['(']]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=formatTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[buf.append, parameter[literal[')']]] assign[member[.typeDescriptor], call[buf.toString, parameter[]]] else begin[{] None end[}] return[member[.typeDescriptor]] end[}] END[}]
Keyword[public] identifier[String] identifier[getTypeDescriptor] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[typeDescriptor] operator[==] Other[null] operator[SEP] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[parameters] operator[SEP] identifier[length] operator[*] Other[10] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[returnType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[parameters] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Parameter] identifier[param] operator[=] identifier[parameters] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[formatTypeName] operator[SEP] identifier[param] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[typeDescriptor] operator[=] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[typeDescriptor] operator[SEP] }
public void writeDouble(double value) throws IOException { int offset = _offset; byte[] buffer = _buffer; if (SIZE <= offset + 16) { flushBuffer(); offset = _offset; } int intValue = (int) value; if (intValue == value) { if (intValue == 0) { buffer[offset++] = (byte) BC_DOUBLE_ZERO; _offset = offset; return; } else if (intValue == 1) { buffer[offset++] = (byte) BC_DOUBLE_ONE; _offset = offset; return; } else if (-0x80 <= intValue && intValue < 0x80) { buffer[offset++] = (byte) BC_DOUBLE_BYTE; buffer[offset++] = (byte) intValue; _offset = offset; return; } else if (-0x8000 <= intValue && intValue < 0x8000) { buffer[offset + 0] = (byte) BC_DOUBLE_SHORT; buffer[offset + 1] = (byte) (intValue >> 8); buffer[offset + 2] = (byte) intValue; _offset = offset + 3; return; } } int mills = (int) (value * 1000); if (0.001 * mills == value) { buffer[offset + 0] = (byte) (BC_DOUBLE_MILL); buffer[offset + 1] = (byte) (mills >> 24); buffer[offset + 2] = (byte) (mills >> 16); buffer[offset + 3] = (byte) (mills >> 8); buffer[offset + 4] = (byte) (mills); _offset = offset + 5; return; } long bits = Double.doubleToLongBits(value); buffer[offset + 0] = (byte) 'D'; buffer[offset + 1] = (byte) (bits >> 56); buffer[offset + 2] = (byte) (bits >> 48); buffer[offset + 3] = (byte) (bits >> 40); buffer[offset + 4] = (byte) (bits >> 32); buffer[offset + 5] = (byte) (bits >> 24); buffer[offset + 6] = (byte) (bits >> 16); buffer[offset + 7] = (byte) (bits >> 8); buffer[offset + 8] = (byte) (bits); _offset = offset + 9; }
class class_name[name] begin[{] method[writeDouble, return_type[void], modifier[public], parameter[value]] begin[{] local_variable[type[int], offset] local_variable[type[byte], buffer] if[binary_operation[member[.SIZE], <=, binary_operation[member[.offset], +, literal[16]]]] begin[{] call[.flushBuffer, parameter[]] assign[member[.offset], member[._offset]] else begin[{] None end[}] local_variable[type[int], intValue] if[binary_operation[member[.intValue], ==, member[.value]]] begin[{] if[binary_operation[member[.intValue], ==, literal[0]]] begin[{] assign[member[.buffer], Cast(expression=MemberReference(member=BC_DOUBLE_ZERO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], member[.offset]] return[None] else begin[{] if[binary_operation[member[.intValue], ==, literal[1]]] begin[{] assign[member[.buffer], Cast(expression=MemberReference(member=BC_DOUBLE_ONE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], member[.offset]] return[None] else begin[{] if[binary_operation[binary_operation[literal[0x80], <=, member[.intValue]], &&, binary_operation[member[.intValue], <, literal[0x80]]]] begin[{] assign[member[.buffer], Cast(expression=MemberReference(member=BC_DOUBLE_BYTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=MemberReference(member=intValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], member[.offset]] return[None] else begin[{] if[binary_operation[binary_operation[literal[0x8000], <=, member[.intValue]], &&, binary_operation[member[.intValue], <, literal[0x8000]]]] begin[{] assign[member[.buffer], Cast(expression=MemberReference(member=BC_DOUBLE_SHORT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=intValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=MemberReference(member=intValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], binary_operation[member[.offset], +, literal[3]]] return[None] else begin[{] None end[}] end[}] end[}] end[}] else begin[{] None end[}] local_variable[type[int], mills] if[binary_operation[binary_operation[literal[0.001], *, member[.mills]], ==, member[.value]]] begin[{] assign[member[.buffer], Cast(expression=MemberReference(member=BC_DOUBLE_MILL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=mills, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=mills, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=mills, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=MemberReference(member=mills, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], binary_operation[member[.offset], +, literal[5]]] return[None] else begin[{] None end[}] local_variable[type[long], bits] assign[member[.buffer], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='D'), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=48), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), type=BasicType(dimensions=[], name=byte))] assign[member[.buffer], Cast(expression=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[._offset], binary_operation[member[.offset], +, literal[9]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeDouble] operator[SEP] Keyword[double] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[offset] operator[=] identifier[_offset] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] identifier[_buffer] operator[SEP] Keyword[if] operator[SEP] identifier[SIZE] operator[<=] identifier[offset] operator[+] Other[16] operator[SEP] { identifier[flushBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[offset] operator[=] identifier[_offset] operator[SEP] } Keyword[int] identifier[intValue] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[intValue] operator[==] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[intValue] operator[==] Other[0] operator[SEP] { identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[BC_DOUBLE_ZERO] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[SEP] Keyword[return] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[intValue] operator[==] Other[1] operator[SEP] { identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[BC_DOUBLE_ONE] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[SEP] Keyword[return] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[-] literal[Integer] operator[<=] identifier[intValue] operator[&&] identifier[intValue] operator[<] literal[Integer] operator[SEP] { identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[BC_DOUBLE_BYTE] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[intValue] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[SEP] Keyword[return] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[-] literal[Integer] operator[<=] identifier[intValue] operator[&&] identifier[intValue] operator[<] literal[Integer] operator[SEP] { identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[BC_DOUBLE_SHORT] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[intValue] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[intValue] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[+] Other[3] operator[SEP] Keyword[return] operator[SEP] } } Keyword[int] identifier[mills] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[value] operator[*] Other[1000] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[Float] operator[*] identifier[mills] operator[==] identifier[value] operator[SEP] { identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[BC_DOUBLE_MILL] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[mills] operator[>] operator[>] Other[24] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[mills] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[3] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[mills] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[4] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[mills] operator[SEP] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[+] Other[5] operator[SEP] Keyword[return] operator[SEP] } Keyword[long] identifier[bits] operator[=] identifier[Double] operator[SEP] identifier[doubleToLongBits] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[String] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[56] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[48] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[3] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[40] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[4] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[32] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[5] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[24] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[6] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[7] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[8] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bits] operator[SEP] operator[SEP] identifier[_offset] operator[=] identifier[offset] operator[+] Other[9] operator[SEP] }
private void checkEntry(long index, Segment segment, Segment compactSegment) { try (Entry entry = segment.get(index)) { // If an entry was found, only remove the entry from the segment if it's not a tombstone that has been released. if (entry != null) { checkEntry(index, entry, segment, compactSegment); } else { compactSegment.skip(1); } } }
class class_name[name] begin[{] method[checkEntry, return_type[void], modifier[private], parameter[index, segment, compactSegment]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=skip, postfix_operators=[], prefix_operators=[], qualifier=compactSegment, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compactSegment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=entry, type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=segment, selectors=[], type_arguments=None))]) end[}] END[}]
Keyword[private] Keyword[void] identifier[checkEntry] operator[SEP] Keyword[long] identifier[index] , identifier[Segment] identifier[segment] , identifier[Segment] identifier[compactSegment] operator[SEP] { Keyword[try] operator[SEP] identifier[Entry] identifier[entry] operator[=] identifier[segment] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] { identifier[checkEntry] operator[SEP] identifier[index] , identifier[entry] , identifier[segment] , identifier[compactSegment] operator[SEP] operator[SEP] } Keyword[else] { identifier[compactSegment] operator[SEP] identifier[skip] operator[SEP] Other[1] operator[SEP] operator[SEP] } } }
public void setProjectProperties(final Properties properties) { generateProjectPropertiesFile(getName(), propertyFile, true, properties, false, null, false); loadProperties(); }
class class_name[name] begin[{] method[setProjectProperties, return_type[void], modifier[public], parameter[properties]] begin[{] call[.generateProjectPropertiesFile, parameter[call[.getName, parameter[]], member[.propertyFile], literal[true], member[.properties], literal[false], literal[null], literal[false]]] call[.loadProperties, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setProjectProperties] operator[SEP] Keyword[final] identifier[Properties] identifier[properties] operator[SEP] { identifier[generateProjectPropertiesFile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[propertyFile] , literal[boolean] , identifier[properties] , literal[boolean] , Other[null] , literal[boolean] operator[SEP] operator[SEP] identifier[loadProperties] operator[SEP] operator[SEP] operator[SEP] }
public Metadata getMetadata(String templateName) { String scope = Metadata.scopeBasedOnType(templateName); return this.getMetadata(templateName, scope); }
class class_name[name] begin[{] method[getMetadata, return_type[type[Metadata]], modifier[public], parameter[templateName]] begin[{] local_variable[type[String], scope] return[THIS[call[None.getMetadata, parameter[member[.templateName], member[.scope]]]]] end[}] END[}]
Keyword[public] identifier[Metadata] identifier[getMetadata] operator[SEP] identifier[String] identifier[templateName] operator[SEP] { identifier[String] identifier[scope] operator[=] identifier[Metadata] operator[SEP] identifier[scopeBasedOnType] operator[SEP] identifier[templateName] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getMetadata] operator[SEP] identifier[templateName] , identifier[scope] operator[SEP] operator[SEP] }
public static SparseTensor diagonal(int[] dimensionNumbers, int[] dimensionSizes, double value) { int minDimensionSize = Ints.min(dimensionSizes); double[] values = new double[minDimensionSize]; Arrays.fill(values, value); return diagonal(dimensionNumbers, dimensionSizes, values); }
class class_name[name] begin[{] method[diagonal, return_type[type[SparseTensor]], modifier[public static], parameter[dimensionNumbers, dimensionSizes, value]] begin[{] local_variable[type[int], minDimensionSize] local_variable[type[double], values] call[Arrays.fill, parameter[member[.values], member[.value]]] return[call[.diagonal, parameter[member[.dimensionNumbers], member[.dimensionSizes], member[.values]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SparseTensor] identifier[diagonal] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[dimensionNumbers] , Keyword[int] operator[SEP] operator[SEP] identifier[dimensionSizes] , Keyword[double] identifier[value] operator[SEP] { Keyword[int] identifier[minDimensionSize] operator[=] identifier[Ints] operator[SEP] identifier[min] operator[SEP] identifier[dimensionSizes] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[values] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[minDimensionSize] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[fill] operator[SEP] identifier[values] , identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[diagonal] operator[SEP] identifier[dimensionNumbers] , identifier[dimensionSizes] , identifier[values] operator[SEP] operator[SEP] }
@Programmatic public PostalAddress findByAddress( final Object owner, final String placeId) { final List<CommunicationChannelOwnerLink> links = linkRepository.findByOwnerAndCommunicationChannelType(owner, CommunicationChannelType.POSTAL_ADDRESS); final Iterable<PostalAddress> postalAddresses = Iterables.transform( links, CommunicationChannelOwnerLink.Functions.communicationChannel(PostalAddress.class)); final Optional<PostalAddress> postalAddressIfFound = Iterables.tryFind(postalAddresses, input -> Objects.equals(placeId, input.getPlaceId())); return postalAddressIfFound.orNull(); }
class class_name[name] begin[{] method[findByAddress, return_type[type[PostalAddress]], modifier[public], parameter[owner, placeId]] begin[{] local_variable[type[List], links] local_variable[type[Iterable], postalAddresses] local_variable[type[Optional], postalAddressIfFound] return[call[postalAddressIfFound.orNull, parameter[]]] end[}] END[}]
annotation[@] identifier[Programmatic] Keyword[public] identifier[PostalAddress] identifier[findByAddress] operator[SEP] Keyword[final] identifier[Object] identifier[owner] , Keyword[final] identifier[String] identifier[placeId] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[CommunicationChannelOwnerLink] operator[>] identifier[links] operator[=] identifier[linkRepository] operator[SEP] identifier[findByOwnerAndCommunicationChannelType] operator[SEP] identifier[owner] , identifier[CommunicationChannelType] operator[SEP] identifier[POSTAL_ADDRESS] operator[SEP] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[PostalAddress] operator[>] identifier[postalAddresses] operator[=] identifier[Iterables] operator[SEP] identifier[transform] operator[SEP] identifier[links] , identifier[CommunicationChannelOwnerLink] operator[SEP] identifier[Functions] operator[SEP] identifier[communicationChannel] operator[SEP] identifier[PostalAddress] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Optional] operator[<] identifier[PostalAddress] operator[>] identifier[postalAddressIfFound] operator[=] identifier[Iterables] operator[SEP] identifier[tryFind] operator[SEP] identifier[postalAddresses] , identifier[input] operator[->] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[placeId] , identifier[input] operator[SEP] identifier[getPlaceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[postalAddressIfFound] operator[SEP] identifier[orNull] operator[SEP] operator[SEP] operator[SEP] }
public static AlipayFundCouponOperationQueryResponse fundCouponOperationQueryToResponse( AlipayFundCouponOperationQueryModel model) throws AlipayApiException { AlipayFundCouponOperationQueryRequest request = new AlipayFundCouponOperationQueryRequest(); request.setBizModel(model); return AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().execute(request); }
class class_name[name] begin[{] method[fundCouponOperationQueryToResponse, return_type[type[AlipayFundCouponOperationQueryResponse]], modifier[public static], parameter[model]] begin[{] local_variable[type[AlipayFundCouponOperationQueryRequest], request] call[request.setBizModel, parameter[member[.model]]] return[call[AliPayApiConfigKit.getAliPayApiConfig, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AlipayFundCouponOperationQueryResponse] identifier[fundCouponOperationQueryToResponse] operator[SEP] identifier[AlipayFundCouponOperationQueryModel] identifier[model] operator[SEP] Keyword[throws] identifier[AlipayApiException] { identifier[AlipayFundCouponOperationQueryRequest] identifier[request] operator[=] Keyword[new] identifier[AlipayFundCouponOperationQueryRequest] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setBizModel] operator[SEP] identifier[model] operator[SEP] operator[SEP] Keyword[return] identifier[AliPayApiConfigKit] operator[SEP] identifier[getAliPayApiConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getAlipayClient] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context, final String queueName, final T task, final int notificationId, final Notification notification) { // It may produce ClassNotFoundException when using custom Parcelable (for example via an AlarmManager). // As a workaround pack a Parcelable into an additional Bundle, then put that Bundle into Intent. // XXX http://code.google.com/p/android/issues/detail?id=6822 Bundle taskBundle = new Bundle(); taskBundle.putParcelable(EXTRA_TASK, task); Bundle notificationBundle = new Bundle(); notificationBundle.putParcelable(EXTRA_NOTIFICATION, notification); return new Intent(context, GoroService.class) .putExtra(EXTRA_TASK_BUNDLE, taskBundle) .putExtra(EXTRA_NOTIFICATION_BUNDLE, notificationBundle) .putExtra(EXTRA_QUEUE_NAME, queueName) .putExtra(EXTRA_NOTIFICATION_ID, notificationId); }
class class_name[name] begin[{] method[foregroundTaskIntent, return_type[type[Intent]], modifier[public static], parameter[context, queueName, task, notificationId, notification]] begin[{] local_variable[type[Bundle], taskBundle] call[taskBundle.putParcelable, parameter[member[.EXTRA_TASK], member[.task]]] local_variable[type[Bundle], notificationBundle] call[notificationBundle.putParcelable, parameter[member[.EXTRA_NOTIFICATION], member[.notification]]] return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoroService, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=EXTRA_TASK_BUNDLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=taskBundle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putExtra, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EXTRA_NOTIFICATION_BUNDLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=notificationBundle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putExtra, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EXTRA_QUEUE_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putExtra, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EXTRA_NOTIFICATION_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=notificationId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putExtra, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Intent, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Callable] operator[<] operator[?] operator[>] operator[&] identifier[Parcelable] operator[>] identifier[Intent] identifier[foregroundTaskIntent] operator[SEP] Keyword[final] identifier[Context] identifier[context] , Keyword[final] identifier[String] identifier[queueName] , Keyword[final] identifier[T] identifier[task] , Keyword[final] Keyword[int] identifier[notificationId] , Keyword[final] identifier[Notification] identifier[notification] operator[SEP] { identifier[Bundle] identifier[taskBundle] operator[=] Keyword[new] identifier[Bundle] operator[SEP] operator[SEP] operator[SEP] identifier[taskBundle] operator[SEP] identifier[putParcelable] operator[SEP] identifier[EXTRA_TASK] , identifier[task] operator[SEP] operator[SEP] identifier[Bundle] identifier[notificationBundle] operator[=] Keyword[new] identifier[Bundle] operator[SEP] operator[SEP] operator[SEP] identifier[notificationBundle] operator[SEP] identifier[putParcelable] operator[SEP] identifier[EXTRA_NOTIFICATION] , identifier[notification] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Intent] operator[SEP] identifier[context] , identifier[GoroService] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[putExtra] operator[SEP] identifier[EXTRA_TASK_BUNDLE] , identifier[taskBundle] operator[SEP] operator[SEP] identifier[putExtra] operator[SEP] identifier[EXTRA_NOTIFICATION_BUNDLE] , identifier[notificationBundle] operator[SEP] operator[SEP] identifier[putExtra] operator[SEP] identifier[EXTRA_QUEUE_NAME] , identifier[queueName] operator[SEP] operator[SEP] identifier[putExtra] operator[SEP] identifier[EXTRA_NOTIFICATION_ID] , identifier[notificationId] operator[SEP] operator[SEP] }
public Scriptable getBuiltinPrototype(Builtins type) { BaseFunction func = getBuiltinCtor(type); Object proto = func != null ? func.getPrototypeProperty() : null; return proto instanceof Scriptable ? (Scriptable) proto : null; }
class class_name[name] begin[{] method[getBuiltinPrototype, return_type[type[Scriptable]], modifier[public], parameter[type]] begin[{] local_variable[type[BaseFunction], func] local_variable[type[Object], proto] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=proto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Scriptable, sub_type=None), operator=instanceof), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=proto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Scriptable, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[Scriptable] identifier[getBuiltinPrototype] operator[SEP] identifier[Builtins] identifier[type] operator[SEP] { identifier[BaseFunction] identifier[func] operator[=] identifier[getBuiltinCtor] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[Object] identifier[proto] operator[=] identifier[func] operator[!=] Other[null] operator[?] identifier[func] operator[SEP] identifier[getPrototypeProperty] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[return] identifier[proto] Keyword[instanceof] identifier[Scriptable] operator[?] operator[SEP] identifier[Scriptable] operator[SEP] identifier[proto] operator[:] Other[null] operator[SEP] }
public void setValue(FieldContainer container, byte[] data) { if (data != null) { container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue); } }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[public], parameter[container, data]] begin[{] if[binary_operation[member[.data], !=, literal[null]]] begin[{] call[container.set, parameter[member[.m_type], TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m_offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=MPPUtility, selectors=[], type_arguments=None), operandr=MemberReference(member=m_mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MemberReference(member=m_nonZeroValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=m_zeroValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[FieldContainer] identifier[container] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[!=] Other[null] operator[SEP] { identifier[container] operator[SEP] identifier[set] operator[SEP] identifier[m_type] , operator[SEP] operator[SEP] identifier[MPPUtility] operator[SEP] identifier[getInt] operator[SEP] identifier[data] , identifier[m_offset] operator[SEP] operator[&] identifier[m_mask] operator[SEP] operator[==] Other[0] operator[SEP] operator[?] identifier[m_zeroValue] operator[:] identifier[m_nonZeroValue] operator[SEP] operator[SEP] } }
public static String classFilePathToClassname(String relativePath) { if (relativePath == null) return null; final int pos = relativePath.lastIndexOf(".class"); if (pos < 0 && relativePath.lastIndexOf(".java") < 0) throw new IllegalArgumentException("Not a .class/.java file path: " + relativePath); relativePath = FilenameUtils.separatorsToUnix(relativePath); if (relativePath.startsWith("/")) { relativePath = relativePath.substring(1); } if (relativePath.startsWith("src/main/java/")) { relativePath = relativePath.substring("src/main/java/".length()); } if (relativePath.startsWith("WEB-INF/classes/")) { relativePath = relativePath.substring("WEB-INF/classes/".length()); } if (relativePath.startsWith("WEB-INF/classes.jdk15/")) { relativePath = relativePath.substring("WEB-INF/classes.jdk15/".length()); } if (relativePath.endsWith(".class")) { relativePath = relativePath.substring(0, relativePath.length() - ".class".length()); } else if (relativePath.endsWith(".java")) { relativePath = relativePath.substring(0, relativePath.length() - ".java".length()); } String qualifiedName = relativePath.replace("/", "."); return qualifiedName; }
class class_name[name] begin[{] method[classFilePathToClassname, return_type[type[String]], modifier[public static], parameter[relativePath]] begin[{] if[binary_operation[member[.relativePath], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], pos] if[binary_operation[binary_operation[member[.pos], <, literal[0]], &&, binary_operation[call[relativePath.lastIndexOf, parameter[literal[".java"]]], <, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not a .class/.java file path: "), operandr=MemberReference(member=relativePath, 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[}] assign[member[.relativePath], call[FilenameUtils.separatorsToUnix, parameter[member[.relativePath]]]] if[call[relativePath.startsWith, parameter[literal["/"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal[1]]]] else begin[{] None end[}] if[call[relativePath.startsWith, parameter[literal["src/main/java/"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal["src/main/java/"]]]] else begin[{] None end[}] if[call[relativePath.startsWith, parameter[literal["WEB-INF/classes/"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal["WEB-INF/classes/"]]]] else begin[{] None end[}] if[call[relativePath.startsWith, parameter[literal["WEB-INF/classes.jdk15/"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal["WEB-INF/classes.jdk15/"]]]] else begin[{] None end[}] if[call[relativePath.endsWith, parameter[literal[".class"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal[0], binary_operation[call[relativePath.length, parameter[]], -, literal[".class"]]]]] else begin[{] if[call[relativePath.endsWith, parameter[literal[".java"]]]] begin[{] assign[member[.relativePath], call[relativePath.substring, parameter[literal[0], binary_operation[call[relativePath.length, parameter[]], -, literal[".java"]]]]] else begin[{] None end[}] end[}] local_variable[type[String], qualifiedName] return[member[.qualifiedName]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[classFilePathToClassname] operator[SEP] identifier[String] identifier[relativePath] operator[SEP] { Keyword[if] operator[SEP] identifier[relativePath] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[final] Keyword[int] identifier[pos] operator[=] identifier[relativePath] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[<] Other[0] operator[&&] identifier[relativePath] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[relativePath] operator[SEP] operator[SEP] identifier[relativePath] operator[=] identifier[FilenameUtils] operator[SEP] identifier[separatorsToUnix] operator[SEP] identifier[relativePath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[relativePath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[relativePath] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[relativePath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[qualifiedName] operator[=] identifier[relativePath] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[qualifiedName] operator[SEP] }
public CrawlerTargets withJdbcTargets(JdbcTarget... jdbcTargets) { if (this.jdbcTargets == null) { setJdbcTargets(new java.util.ArrayList<JdbcTarget>(jdbcTargets.length)); } for (JdbcTarget ele : jdbcTargets) { this.jdbcTargets.add(ele); } return this; }
class class_name[name] begin[{] method[withJdbcTargets, return_type[type[CrawlerTargets]], modifier[public], parameter[jdbcTargets]] begin[{] if[binary_operation[THIS[member[None.jdbcTargets]], ==, literal[null]]] begin[{] call[.setJdbcTargets, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=jdbcTargets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JdbcTarget, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jdbcTargets, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=jdbcTargets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JdbcTarget, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[CrawlerTargets] identifier[withJdbcTargets] operator[SEP] identifier[JdbcTarget] operator[...] identifier[jdbcTargets] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[jdbcTargets] operator[==] Other[null] operator[SEP] { identifier[setJdbcTargets] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[JdbcTarget] operator[>] operator[SEP] identifier[jdbcTargets] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[JdbcTarget] identifier[ele] operator[:] identifier[jdbcTargets] operator[SEP] { Keyword[this] operator[SEP] identifier[jdbcTargets] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
boolean validateCompatibilityReferenceConstraints() { boolean passed = true; String errorBuffer = new String(""); try { if (!this.component.isSlee11()) { // A 1.0 SBB must not reference or use a 1.1 Profile // Specification. This must be enforced by a 1.1 // JAIN SLEE. ServiceComponent specComponent = this.repository.getComponentByID(this.component.getServiceID()); if (specComponent == null) { // should not happen passed = false; errorBuffer = appendToBuffer("Referenced " + this.component.getServiceID() + " was not found in component repository, this should not happen since dependencies were already verified", "1.3", errorBuffer); } else { if (specComponent.isSlee11()) { passed = false; errorBuffer = appendToBuffer("Service is following 1.0 JSLEE contract, it must not reference 1.1 Sbb as root: " + this.component.getServiceID(), "1.3", errorBuffer); } } } } finally { if (!passed) { if (logger.isEnabledFor(Level.ERROR)) { logger.error(errorBuffer); } } } return passed; }
class class_name[name] begin[{] method[validateCompatibilityReferenceConstraints, return_type[type[boolean]], modifier[default], parameter[]] begin[{] local_variable[type[boolean], passed] local_variable[type[String], errorBuffer] TryStatement(block=[IfStatement(condition=This(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MemberReference(member=component, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=isSlee11, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=repository, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=component, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getServiceID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=getComponentByID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=specComponent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServiceComponent, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=specComponent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isSlee11, postfix_operators=[], prefix_operators=[], qualifier=specComponent, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=passed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Service is following 1.0 JSLEE contract, it must not reference 1.1 Sbb as root: "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=component, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getServiceID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1.3"), MemberReference(member=errorBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendToBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=passed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Referenced "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=component, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getServiceID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was not found in component repository, this should not happen since dependencies were already verified"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1.3"), MemberReference(member=errorBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendToBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]))], catches=None, finally_block=[IfStatement(condition=MemberReference(member=passed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isEnabledFor, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errorBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)]))]))], label=None, resources=None) return[member[.passed]] end[}] END[}]
Keyword[boolean] identifier[validateCompatibilityReferenceConstraints] operator[SEP] operator[SEP] { Keyword[boolean] identifier[passed] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[errorBuffer] operator[=] Keyword[new] identifier[String] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[component] operator[SEP] identifier[isSlee11] operator[SEP] operator[SEP] operator[SEP] { identifier[ServiceComponent] identifier[specComponent] operator[=] Keyword[this] operator[SEP] identifier[repository] operator[SEP] identifier[getComponentByID] operator[SEP] Keyword[this] operator[SEP] identifier[component] operator[SEP] identifier[getServiceID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[specComponent] operator[==] Other[null] operator[SEP] { identifier[passed] operator[=] literal[boolean] operator[SEP] identifier[errorBuffer] operator[=] identifier[appendToBuffer] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[component] operator[SEP] identifier[getServiceID] operator[SEP] operator[SEP] operator[+] literal[String] , literal[String] , identifier[errorBuffer] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[specComponent] operator[SEP] identifier[isSlee11] operator[SEP] operator[SEP] operator[SEP] { identifier[passed] operator[=] literal[boolean] operator[SEP] identifier[errorBuffer] operator[=] identifier[appendToBuffer] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[component] operator[SEP] identifier[getServiceID] operator[SEP] operator[SEP] , literal[String] , identifier[errorBuffer] operator[SEP] operator[SEP] } } } } Keyword[finally] { Keyword[if] operator[SEP] operator[!] identifier[passed] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isEnabledFor] operator[SEP] identifier[Level] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[errorBuffer] operator[SEP] operator[SEP] } } } Keyword[return] identifier[passed] operator[SEP] }
public static String concernStackString(BlockInfo blockInfo) { String result = ""; for (String stackEntry : blockInfo.threadStackEntries) { if (Character.isLetter(stackEntry.charAt(0))) { String[] lines = stackEntry.split(BlockInfo.SEPARATOR); for (String line : lines) { String keyStackString = concernStackString(line); if (keyStackString != null) { return keyStackString; } } return classSimpleName(lines[0]); } } return result; }
class class_name[name] begin[{] method[concernStackString, return_type[type[String]], modifier[public static], parameter[blockInfo]] begin[{] local_variable[type[String], result] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=stackEntry, selectors=[], type_arguments=None)], member=isLetter, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=BlockInfo, selectors=[])], member=split, postfix_operators=[], prefix_operators=[], qualifier=stackEntry, selectors=[], type_arguments=None), name=lines)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=concernStackString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=keyStackString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=keyStackString, 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=[ReturnStatement(expression=MemberReference(member=keyStackString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=lines, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=lines, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=classSimpleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=threadStackEntries, postfix_operators=[], prefix_operators=[], qualifier=blockInfo, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=stackEntry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[concernStackString] operator[SEP] identifier[BlockInfo] identifier[blockInfo] operator[SEP] { identifier[String] identifier[result] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[stackEntry] operator[:] identifier[blockInfo] operator[SEP] identifier[threadStackEntries] operator[SEP] { Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isLetter] operator[SEP] identifier[stackEntry] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[lines] operator[=] identifier[stackEntry] operator[SEP] identifier[split] operator[SEP] identifier[BlockInfo] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[line] operator[:] identifier[lines] operator[SEP] { identifier[String] identifier[keyStackString] operator[=] identifier[concernStackString] operator[SEP] identifier[line] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keyStackString] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[keyStackString] operator[SEP] } } Keyword[return] identifier[classSimpleName] operator[SEP] identifier[lines] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
protected synchronized SendRequest makeUnsignedChannelContract(Coin valueToMe) { Transaction tx = new Transaction(wallet.getParams()); if (!getTotalValue().subtract(valueToMe).equals(Coin.ZERO)) { tx.addOutput(getTotalValue().subtract(valueToMe), LegacyAddress.fromKey(wallet.getParams(), getClientKey())); } tx.addInput(contract.getOutput(0)); return SendRequest.forTx(tx); }
class class_name[name] begin[{] method[makeUnsignedChannelContract, return_type[type[SendRequest]], modifier[synchronized protected], parameter[valueToMe]] begin[{] local_variable[type[Transaction], tx] if[call[.getTotalValue, parameter[]]] begin[{] call[tx.addOutput, parameter[call[.getTotalValue, parameter[]], call[LegacyAddress.fromKey, parameter[call[wallet.getParams, parameter[]], call[.getClientKey, parameter[]]]]]] else begin[{] None end[}] call[tx.addInput, parameter[call[contract.getOutput, parameter[literal[0]]]]] return[call[SendRequest.forTx, parameter[member[.tx]]]] end[}] END[}]
Keyword[protected] Keyword[synchronized] identifier[SendRequest] identifier[makeUnsignedChannelContract] operator[SEP] identifier[Coin] identifier[valueToMe] operator[SEP] { identifier[Transaction] identifier[tx] operator[=] Keyword[new] identifier[Transaction] operator[SEP] identifier[wallet] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[getTotalValue] operator[SEP] operator[SEP] operator[SEP] identifier[subtract] operator[SEP] identifier[valueToMe] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Coin] operator[SEP] identifier[ZERO] operator[SEP] operator[SEP] { identifier[tx] operator[SEP] identifier[addOutput] operator[SEP] identifier[getTotalValue] operator[SEP] operator[SEP] operator[SEP] identifier[subtract] operator[SEP] identifier[valueToMe] operator[SEP] , identifier[LegacyAddress] operator[SEP] identifier[fromKey] operator[SEP] identifier[wallet] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] , identifier[getClientKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[tx] operator[SEP] identifier[addInput] operator[SEP] identifier[contract] operator[SEP] identifier[getOutput] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SendRequest] operator[SEP] identifier[forTx] operator[SEP] identifier[tx] operator[SEP] operator[SEP] }
public void optimizePathVisibility(float[] next, float pathOptimizationRange, NavMeshQuery navquery, QueryFilter filter) { // Clamp the ray to max distance. float dist = vDist2D(m_pos, next); // If too close to the goal, do not try to optimize. if (dist < 0.01f) { return; } // Overshoot a little. This helps to optimize open fields in tiled // meshes. dist = Math.min(dist + 0.01f, pathOptimizationRange); // Adjust ray length. float[] delta = vSub(next, m_pos); float[] goal = vMad(m_pos, delta, pathOptimizationRange / dist); Result<RaycastHit> rc = navquery.raycast(m_path.get(0), m_pos, goal, filter, 0, 0); if (rc.succeeded()) { if (rc.result.path.size() > 1 && rc.result.t > 0.99f) { m_path = mergeCorridorStartShortcut(m_path, rc.result.path); } } }
class class_name[name] begin[{] method[optimizePathVisibility, return_type[void], modifier[public], parameter[next, pathOptimizationRange, navquery, filter]] begin[{] local_variable[type[float], dist] if[binary_operation[member[.dist], <, literal[0.01f]]] begin[{] return[None] else begin[{] None end[}] assign[member[.dist], call[Math.min, parameter[binary_operation[member[.dist], +, literal[0.01f]], member[.pathOptimizationRange]]]] local_variable[type[float], delta] local_variable[type[float], goal] local_variable[type[Result], rc] if[call[rc.succeeded, parameter[]]] begin[{] if[binary_operation[binary_operation[call[rc.result.path.size, parameter[]], >, literal[1]], &&, binary_operation[member[rc.result.t], >, literal[0.99f]]]] begin[{] assign[member[.m_path], call[.mergeCorridorStartShortcut, parameter[member[.m_path], member[rc.result.path]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[optimizePathVisibility] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[next] , Keyword[float] identifier[pathOptimizationRange] , identifier[NavMeshQuery] identifier[navquery] , identifier[QueryFilter] identifier[filter] operator[SEP] { Keyword[float] identifier[dist] operator[=] identifier[vDist2D] operator[SEP] identifier[m_pos] , identifier[next] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dist] operator[<] literal[Float] operator[SEP] { Keyword[return] operator[SEP] } identifier[dist] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[dist] operator[+] literal[Float] , identifier[pathOptimizationRange] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[delta] operator[=] identifier[vSub] operator[SEP] identifier[next] , identifier[m_pos] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[goal] operator[=] identifier[vMad] operator[SEP] identifier[m_pos] , identifier[delta] , identifier[pathOptimizationRange] operator[/] identifier[dist] operator[SEP] operator[SEP] identifier[Result] operator[<] identifier[RaycastHit] operator[>] identifier[rc] operator[=] identifier[navquery] operator[SEP] identifier[raycast] operator[SEP] identifier[m_path] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[m_pos] , identifier[goal] , identifier[filter] , Other[0] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rc] operator[SEP] identifier[succeeded] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[rc] operator[SEP] identifier[result] operator[SEP] identifier[path] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[rc] operator[SEP] identifier[result] operator[SEP] identifier[t] operator[>] literal[Float] operator[SEP] { identifier[m_path] operator[=] identifier[mergeCorridorStartShortcut] operator[SEP] identifier[m_path] , identifier[rc] operator[SEP] identifier[result] operator[SEP] identifier[path] operator[SEP] operator[SEP] } } }
protected static Action findAction(EObject grammarComponent, String assignmentName) { for (final Action action : GrammarUtil.containedActions(grammarComponent)) { if (GrammarUtil.isAssignedAction(action)) { if (Objects.equals(assignmentName, action.getFeature())) { return action; } } } return null; }
class class_name[name] begin[{] method[findAction, return_type[type[Action]], modifier[static protected], parameter[grammarComponent, assignmentName]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignedAction, postfix_operators=[], prefix_operators=[], qualifier=GrammarUtil, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=assignmentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getFeature, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=grammarComponent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containedActions, postfix_operators=[], prefix_operators=[], qualifier=GrammarUtil, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=action)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Action, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[Action] identifier[findAction] operator[SEP] identifier[EObject] identifier[grammarComponent] , identifier[String] identifier[assignmentName] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Action] identifier[action] operator[:] identifier[GrammarUtil] operator[SEP] identifier[containedActions] operator[SEP] identifier[grammarComponent] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[GrammarUtil] operator[SEP] identifier[isAssignedAction] operator[SEP] identifier[action] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[assignmentName] , identifier[action] operator[SEP] identifier[getFeature] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[action] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public static Geometry scale(Geometry geom, double xFactor, double yFactor, double zFactor) { if (geom != null) { Geometry scaledGeom = geom.copy(); for (Coordinate c : scaledGeom.getCoordinates()) { c.setOrdinate(Coordinate.X, c.getOrdinate(Coordinate.X) * xFactor); c.setOrdinate(Coordinate.Y, c.getOrdinate(Coordinate.Y) * yFactor); c.setOrdinate(Coordinate.Z, c.getOrdinate(Coordinate.Z) * zFactor); } return scaledGeom; } else { return null; } }
class class_name[name] begin[{] method[scale, return_type[type[Geometry]], modifier[public static], parameter[geom, xFactor, yFactor, zFactor]] begin[{] if[binary_operation[member[.geom], !=, literal[null]]] begin[{] local_variable[type[Geometry], scaledGeom] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[])], member=getOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operandr=MemberReference(member=xFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=setOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=Y, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=Y, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[])], member=getOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operandr=MemberReference(member=yFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=setOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=Z, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=Z, postfix_operators=[], prefix_operators=[], qualifier=Coordinate, selectors=[])], member=getOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operandr=MemberReference(member=zFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=setOrdinate, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCoordinates, postfix_operators=[], prefix_operators=[], qualifier=scaledGeom, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Coordinate, sub_type=None))), label=None) return[member[.scaledGeom]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Geometry] identifier[scale] operator[SEP] identifier[Geometry] identifier[geom] , Keyword[double] identifier[xFactor] , Keyword[double] identifier[yFactor] , Keyword[double] identifier[zFactor] operator[SEP] { Keyword[if] operator[SEP] identifier[geom] operator[!=] Other[null] operator[SEP] { identifier[Geometry] identifier[scaledGeom] operator[=] identifier[geom] operator[SEP] identifier[copy] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Coordinate] identifier[c] operator[:] identifier[scaledGeom] operator[SEP] identifier[getCoordinates] operator[SEP] operator[SEP] operator[SEP] { identifier[c] operator[SEP] identifier[setOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[X] , identifier[c] operator[SEP] identifier[getOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[X] operator[SEP] operator[*] identifier[xFactor] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Y] , identifier[c] operator[SEP] identifier[getOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Y] operator[SEP] operator[*] identifier[yFactor] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Z] , identifier[c] operator[SEP] identifier[getOrdinate] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Z] operator[SEP] operator[*] identifier[zFactor] operator[SEP] operator[SEP] } Keyword[return] identifier[scaledGeom] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
@Override public final void onMessageSent(Session session, Object msg) { Command command = (Command) msg; command.setStatus(OperationStatus.SENT); // After message sent,we can set the buffer to be null for gc friendly. command.setIoBuffer(EMPTY_BUF); switch (command.getCommandType()) { case ADD: case APPEND: case SET: case SET_MANY: // After message sent,we can set the value to be null for gc // friendly. if (command instanceof StoreCommand) { ((StoreCommand) command).setValue(null); } break; } }
class class_name[name] begin[{] method[onMessageSent, return_type[void], modifier[final public], parameter[session, msg]] begin[{] local_variable[type[Command], command] call[command.setStatus, parameter[member[OperationStatus.SENT]]] call[command.setIoBuffer, parameter[member[.EMPTY_BUF]]] SwitchStatement(cases=[SwitchStatementCase(case=['ADD', 'APPEND', 'SET', 'SET_MANY'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=StoreCommand, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=StoreCommand, sub_type=None)), label=None)])), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getCommandType, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[], type_arguments=None), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[onMessageSent] operator[SEP] identifier[Session] identifier[session] , identifier[Object] identifier[msg] operator[SEP] { identifier[Command] identifier[command] operator[=] operator[SEP] identifier[Command] operator[SEP] identifier[msg] operator[SEP] identifier[command] operator[SEP] identifier[setStatus] operator[SEP] identifier[OperationStatus] operator[SEP] identifier[SENT] operator[SEP] operator[SEP] identifier[command] operator[SEP] identifier[setIoBuffer] operator[SEP] identifier[EMPTY_BUF] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[command] operator[SEP] identifier[getCommandType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[ADD] operator[:] Keyword[case] identifier[APPEND] operator[:] Keyword[case] identifier[SET] operator[:] Keyword[case] identifier[SET_MANY] operator[:] Keyword[if] operator[SEP] identifier[command] Keyword[instanceof] identifier[StoreCommand] operator[SEP] { operator[SEP] operator[SEP] identifier[StoreCommand] operator[SEP] identifier[command] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } }
private void processMap() throws DITAOTException { final URI in = job.tempDirURI.resolve(job.getFileInfo(fi -> fi.isInput).iterator().next().uri); final List<XMLFilter> pipe = getProcessingPipe(in); xmlUtils.transform(in, pipe); }
class class_name[name] begin[{] method[processMap, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[URI], in] local_variable[type[List], pipe] call[xmlUtils.transform, parameter[member[.in], member[.pipe]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[processMap] operator[SEP] operator[SEP] Keyword[throws] identifier[DITAOTException] { Keyword[final] identifier[URI] identifier[in] operator[=] identifier[job] operator[SEP] identifier[tempDirURI] operator[SEP] identifier[resolve] operator[SEP] identifier[job] operator[SEP] identifier[getFileInfo] operator[SEP] identifier[fi] operator[->] identifier[fi] operator[SEP] identifier[isInput] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[uri] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[XMLFilter] operator[>] identifier[pipe] operator[=] identifier[getProcessingPipe] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[xmlUtils] operator[SEP] identifier[transform] operator[SEP] identifier[in] , identifier[pipe] operator[SEP] operator[SEP] }
public String execute(String clientID, String name, long time, Level level, Object message, Throwable throwable){ return Thread.currentThread().getName(); }
class class_name[name] begin[{] method[execute, return_type[type[String]], modifier[public], parameter[clientID, name, time, level, message, throwable]] begin[{] return[call[Thread.currentThread, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[execute] operator[SEP] identifier[String] identifier[clientID] , identifier[String] identifier[name] , Keyword[long] identifier[time] , identifier[Level] identifier[level] , identifier[Object] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] { Keyword[return] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] }
public KieServerHttpRequest relativeRequest(String relativeUrlString, String httpMethod ) { relativeRequest(relativeUrlString); getRequestInfo().requestMethod = httpMethod; return this; }
class class_name[name] begin[{] method[relativeRequest, return_type[type[KieServerHttpRequest]], modifier[public], parameter[relativeUrlString, httpMethod]] begin[{] call[.relativeRequest, parameter[member[.relativeUrlString]]] assign[call[.getRequestInfo, parameter[]], member[.httpMethod]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[KieServerHttpRequest] identifier[relativeRequest] operator[SEP] identifier[String] identifier[relativeUrlString] , identifier[String] identifier[httpMethod] operator[SEP] { identifier[relativeRequest] operator[SEP] identifier[relativeUrlString] operator[SEP] operator[SEP] identifier[getRequestInfo] operator[SEP] operator[SEP] operator[SEP] identifier[requestMethod] operator[=] identifier[httpMethod] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static final SICoreConnectionFactory getSICoreConnectionFactory( FactoryType type) throws SIInsufficientDataForFactoryTypeException, SIIncorrectCallException, SIResourceException { if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) { SibTr.entry(_tc, "getSICoreConnectionFactory", type); } SICoreConnectionFactory factory = null; try { // Call the other method with an empty map. factory = getSICoreConnectionFactory(type, Collections.EMPTY_MAP); } // Catch and rethrow this exception type. catch (SIIncorrectCallException e) { com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.wsspi.sib.core.selector.SICoreConnectionFactorySelector.getSICoreConnectionFactory", "126"); if (TraceComponent.isAnyTracingEnabled() && _tc.isEventEnabled()) { SibTr.event(_tc, "rethrowing", e); } if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) { SibTr.exit(_tc, "getSICoreConnectionFactory"); } throw e; } // Catch and rethrow this exception type. catch (SIResourceException e) { com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.wsspi.sib.core.selector.SICoreConnectionFactorySelector.getSICoreConnectionFactory", "143"); if (TraceComponent.isAnyTracingEnabled() && _tc.isEventEnabled()) { SibTr.event(_tc, "rethrowing", e); } if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) { SibTr.exit(_tc, "getSICoreConnectionFactory"); } throw e; } if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) { SibTr.exit(_tc, "getSICoreConnectionFactory", factory); } return factory; }
class class_name[name] begin[{] method[getSICoreConnectionFactory, return_type[type[SICoreConnectionFactory]], modifier[final public static], parameter[type]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[_tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[._tc], literal["getSICoreConnectionFactory"], member[.type]]] else begin[{] None end[}] local_variable[type[SICoreConnectionFactory], factory] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EMPTY_MAP, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[])], member=getSICoreConnectionFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.wsspi.sib.core.selector.SICoreConnectionFactorySelector.getSICoreConnectionFactory"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="126")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=_tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rethrowing"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=event, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=_tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getSICoreConnectionFactory")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIIncorrectCallException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.wsspi.sib.core.selector.SICoreConnectionFactorySelector.getSICoreConnectionFactory"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="143")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=_tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rethrowing"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=event, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=_tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getSICoreConnectionFactory")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIResourceException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[_tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[._tc], literal["getSICoreConnectionFactory"], member[.factory]]] else begin[{] None end[}] return[member[.factory]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[SICoreConnectionFactory] identifier[getSICoreConnectionFactory] operator[SEP] identifier[FactoryType] identifier[type] operator[SEP] Keyword[throws] identifier[SIInsufficientDataForFactoryTypeException] , identifier[SIIncorrectCallException] , identifier[SIResourceException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[_tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[_tc] , literal[String] , identifier[type] operator[SEP] operator[SEP] } identifier[SICoreConnectionFactory] identifier[factory] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[factory] operator[=] identifier[getSICoreConnectionFactory] operator[SEP] identifier[type] , identifier[Collections] operator[SEP] identifier[EMPTY_MAP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIIncorrectCallException] identifier[e] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[_tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[event] operator[SEP] identifier[_tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[_tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[_tc] , literal[String] operator[SEP] operator[SEP] } Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIResourceException] identifier[e] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[_tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[event] operator[SEP] identifier[_tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[_tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[_tc] , literal[String] operator[SEP] operator[SEP] } Keyword[throw] identifier[e] 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[factory] operator[SEP] operator[SEP] } Keyword[return] identifier[factory] operator[SEP] }
public List<Function> getFunctions(final String catalog, final String schemaPattern, final String functionNamePattern) throws SQLException { final List<Function> list = new ArrayList<>(); try (ResultSet results = databaseMetadata.getFunctions(catalog, schemaPattern, functionNamePattern)) { if (results != null) { bind(results, Function.class, list); } } return list; }
class class_name[name] begin[{] method[getFunctions, return_type[type[List]], modifier[public], parameter[catalog, schemaPattern, functionNamePattern]] begin[{] local_variable[type[List], list] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Function, sub_type=None)), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=results, type=ReferenceType(arguments=None, dimensions=[], name=ResultSet, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=catalog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schemaPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=functionNamePattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFunctions, postfix_operators=[], prefix_operators=[], qualifier=databaseMetadata, selectors=[], type_arguments=None))]) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Function] operator[>] identifier[getFunctions] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schemaPattern] , Keyword[final] identifier[String] identifier[functionNamePattern] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[final] identifier[List] operator[<] identifier[Function] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[ResultSet] identifier[results] operator[=] identifier[databaseMetadata] operator[SEP] identifier[getFunctions] operator[SEP] identifier[catalog] , identifier[schemaPattern] , identifier[functionNamePattern] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[SEP] { identifier[bind] operator[SEP] identifier[results] , identifier[Function] operator[SEP] Keyword[class] , identifier[list] operator[SEP] operator[SEP] } } Keyword[return] identifier[list] operator[SEP] }
public <K, V> MapPath<K, V, PathBuilder<V>> getMap(String property, Class<K> key, Class<V> value) { return this.<K, V, PathBuilder<V>>getMap(property, key, value, PathBuilder.class); }
class class_name[name] begin[{] method[getMap, return_type[type[MapPath]], modifier[public], parameter[property, key, value]] begin[{] return[THIS[call[None.getMap, parameter[member[.property], member[.key], member[.value], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PathBuilder, sub_type=None))]]]] end[}] END[}]
Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[MapPath] operator[<] identifier[K] , identifier[V] , identifier[PathBuilder] operator[<] identifier[V] operator[>] operator[>] identifier[getMap] operator[SEP] identifier[String] identifier[property] , identifier[Class] operator[<] identifier[K] operator[>] identifier[key] , identifier[Class] operator[<] identifier[V] operator[>] identifier[value] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] operator[<] identifier[K] , identifier[V] , identifier[PathBuilder] operator[<] identifier[V] operator[>] operator[>] identifier[getMap] operator[SEP] identifier[property] , identifier[key] , identifier[value] , identifier[PathBuilder] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public Deferred<String> getNameAsync(final byte[] id) { if (id.length != id_width) { throw new IllegalArgumentException("Wrong id.length = " + id.length + " which is != " + id_width + " required for '" + kind() + '\''); } final String name = getNameFromCache(id); if (name != null) { incrementCacheHits(); return Deferred.fromResult(name); } incrementCacheMiss(); class GetNameCB implements Callback<String, String> { public String call(final String name) { if (name == null) { throw new NoSuchUniqueId(kind(), id); } if (use_mode) { switch(mode) { case READONLY: addNameToCache(id, name); break; case WRITEONLY: break; default: addNameToCache(id, name); addIdToCache(name, id); } } else { addNameToCache(id, name); addIdToCache(name, id); } return name; } } return getNameFromHBase(id).addCallback(new GetNameCB()); }
class class_name[name] begin[{] method[getNameAsync, return_type[type[Deferred]], modifier[public], parameter[id]] begin[{] if[binary_operation[member[id.length], !=, member[.id_width]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Wrong id.length = "), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" which is != "), operator=+), operandr=MemberReference(member=id_width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" required for '"), operator=+), operandr=MethodInvocation(arguments=[], member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], name] if[binary_operation[member[.name], !=, literal[null]]] begin[{] call[.incrementCacheHits, parameter[]] return[call[Deferred.fromResult, parameter[member[.name]]]] else begin[{] None end[}] call[.incrementCacheMiss, parameter[]] class class_name[GetNameCB] begin[{] method[call, return_type[type[String]], modifier[public], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=id, 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=NoSuchUniqueId, sub_type=None)), label=None) else begin[{] None end[}] if[member[.use_mode]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['READONLY'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addNameToCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['WRITEONLY'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addNameToCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addIdToCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] call[.addNameToCache, parameter[member[.id], member[.name]]] call[.addIdToCache, parameter[member[.name], member[.id]]] end[}] return[member[.name]] end[}] END[}] return[call[.getNameFromHBase, parameter[member[.id]]]] end[}] END[}]
Keyword[public] identifier[Deferred] operator[<] identifier[String] operator[>] identifier[getNameAsync] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[id] operator[SEP] identifier[length] operator[!=] identifier[id_width] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[id] operator[SEP] identifier[length] operator[+] literal[String] operator[+] identifier[id_width] operator[+] literal[String] operator[+] identifier[kind] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[name] operator[=] identifier[getNameFromCache] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] { identifier[incrementCacheHits] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Deferred] operator[SEP] identifier[fromResult] operator[SEP] identifier[name] operator[SEP] operator[SEP] } identifier[incrementCacheMiss] operator[SEP] operator[SEP] operator[SEP] Keyword[class] identifier[GetNameCB] Keyword[implements] identifier[Callback] operator[<] identifier[String] , identifier[String] operator[>] { Keyword[public] identifier[String] identifier[call] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchUniqueId] operator[SEP] identifier[kind] operator[SEP] operator[SEP] , identifier[id] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[use_mode] operator[SEP] { Keyword[switch] operator[SEP] identifier[mode] operator[SEP] { Keyword[case] identifier[READONLY] operator[:] identifier[addNameToCache] operator[SEP] identifier[id] , identifier[name] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[WRITEONLY] operator[:] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[addNameToCache] operator[SEP] identifier[id] , identifier[name] operator[SEP] operator[SEP] identifier[addIdToCache] operator[SEP] identifier[name] , identifier[id] operator[SEP] operator[SEP] } } Keyword[else] { identifier[addNameToCache] operator[SEP] identifier[id] , identifier[name] operator[SEP] operator[SEP] identifier[addIdToCache] operator[SEP] identifier[name] , identifier[id] operator[SEP] operator[SEP] } Keyword[return] identifier[name] operator[SEP] } } Keyword[return] identifier[getNameFromHBase] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[addCallback] operator[SEP] Keyword[new] identifier[GetNameCB] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void restoreAllMockVpc(final Collection<MockVpc> vpcs) { allMockVpcInstances.clear(); if (null != vpcs) { for (MockVpc instance : vpcs) { allMockVpcInstances.put(instance.getVpcId(), instance); } } }
class class_name[name] begin[{] method[restoreAllMockVpc, return_type[void], modifier[public], parameter[vpcs]] begin[{] call[allMockVpcInstances.clear, parameter[]] if[binary_operation[literal[null], !=, member[.vpcs]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVpcId, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[], type_arguments=None), MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=allMockVpcInstances, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=vpcs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=instance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MockVpc, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[restoreAllMockVpc] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[MockVpc] operator[>] identifier[vpcs] operator[SEP] { identifier[allMockVpcInstances] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[vpcs] operator[SEP] { Keyword[for] operator[SEP] identifier[MockVpc] identifier[instance] operator[:] identifier[vpcs] operator[SEP] { identifier[allMockVpcInstances] operator[SEP] identifier[put] operator[SEP] identifier[instance] operator[SEP] identifier[getVpcId] operator[SEP] operator[SEP] , identifier[instance] operator[SEP] operator[SEP] } } }
public void marshall(DeleteConfigurationAggregatorRequest deleteConfigurationAggregatorRequest, ProtocolMarshaller protocolMarshaller) { if (deleteConfigurationAggregatorRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteConfigurationAggregatorRequest.getConfigurationAggregatorName(), CONFIGURATIONAGGREGATORNAME_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[deleteConfigurationAggregatorRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteConfigurationAggregatorRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConfigurationAggregatorName, postfix_operators=[], prefix_operators=[], qualifier=deleteConfigurationAggregatorRequest, selectors=[], type_arguments=None), MemberReference(member=CONFIGURATIONAGGREGATORNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], 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[DeleteConfigurationAggregatorRequest] identifier[deleteConfigurationAggregatorRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteConfigurationAggregatorRequest] 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[deleteConfigurationAggregatorRequest] operator[SEP] identifier[getConfigurationAggregatorName] operator[SEP] operator[SEP] , identifier[CONFIGURATIONAGGREGATORNAME_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] } }
Map<String, Integer> getPrefixesIds(String field, List<String> prefixes) { LinkedHashMap<String, Long> refs = getPrefixRefs(field); if (refs != null) { List<String> list = new ArrayList<>(refs.keySet()); Map<String, Integer> result = new HashMap<>(); for (String prefix : prefixes) { int id = list.indexOf(prefix); if (id >= 0) { result.put(prefix, id + 1); } } return result; } else { return null; } }
class class_name[name] begin[{] method[getPrefixesIds, return_type[type[Map]], modifier[default], parameter[field, prefixes]] begin[{] local_variable[type[LinkedHashMap], refs] if[binary_operation[member[.refs], !=, literal[null]]] begin[{] local_variable[type[List], list] local_variable[type[Map], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), name=id)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=prefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=prefix)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.result]] else begin[{] return[literal[null]] end[}] end[}] END[}]
identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[getPrefixesIds] operator[SEP] identifier[String] identifier[field] , identifier[List] operator[<] identifier[String] operator[>] identifier[prefixes] operator[SEP] { identifier[LinkedHashMap] operator[<] identifier[String] , identifier[Long] operator[>] identifier[refs] operator[=] identifier[getPrefixRefs] operator[SEP] identifier[field] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[refs] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[refs] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[prefix] operator[:] identifier[prefixes] operator[SEP] { Keyword[int] identifier[id] operator[=] identifier[list] operator[SEP] identifier[indexOf] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[>=] Other[0] operator[SEP] { identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[prefix] , identifier[id] operator[+] Other[1] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
private String readAndClose(final InputStream stream) throws IOException { String contents = null; if (stream != null) { contents = CharStreams.toString(new InputStreamReader(new BufferedInputStream(stream), "UTF-8")); stream.close(); } return contents; }
class class_name[name] begin[{] method[readAndClose, return_type[type[String]], modifier[private], parameter[stream]] begin[{] local_variable[type[String], contents] if[binary_operation[member[.stream], !=, literal[null]]] begin[{] assign[member[.contents], call[CharStreams.toString, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=stream, 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=BufferedInputStream, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))]]] call[stream.close, parameter[]] else begin[{] None end[}] return[member[.contents]] end[}] END[}]
Keyword[private] identifier[String] identifier[readAndClose] operator[SEP] Keyword[final] identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[contents] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[stream] operator[!=] Other[null] operator[SEP] { identifier[contents] operator[=] identifier[CharStreams] operator[SEP] identifier[toString] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[BufferedInputStream] operator[SEP] identifier[stream] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[contents] operator[SEP] }
@Override public void collect(IT record) { numRecordsIn.inc(); try { if (base == null) { base = serializer.copy(record); } else { base = objectReuseEnabled ? reducer.reduce(base, record) : serializer.copy(reducer.reduce(base, record)); } } catch (Exception e) { throw new ExceptionInChainedStubException(taskName, e); } }
class class_name[name] begin[{] method[collect, return_type[void], modifier[public], parameter[record]] begin[{] call[numRecordsIn.inc, parameter[]] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MemberReference(member=objectReuseEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reduce, postfix_operators=[], prefix_operators=[], qualifier=reducer, selectors=[], type_arguments=None)], member=copy, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reduce, postfix_operators=[], prefix_operators=[], qualifier=reducer, selectors=[], type_arguments=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=taskName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExceptionInChainedStubException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[collect] operator[SEP] identifier[IT] identifier[record] operator[SEP] { identifier[numRecordsIn] operator[SEP] identifier[inc] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[base] operator[==] Other[null] operator[SEP] { identifier[base] operator[=] identifier[serializer] operator[SEP] identifier[copy] operator[SEP] identifier[record] operator[SEP] operator[SEP] } Keyword[else] { identifier[base] operator[=] identifier[objectReuseEnabled] operator[?] identifier[reducer] operator[SEP] identifier[reduce] operator[SEP] identifier[base] , identifier[record] operator[SEP] operator[:] identifier[serializer] operator[SEP] identifier[copy] operator[SEP] identifier[reducer] operator[SEP] identifier[reduce] operator[SEP] identifier[base] , identifier[record] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ExceptionInChainedStubException] operator[SEP] identifier[taskName] , identifier[e] operator[SEP] operator[SEP] } }
@VisibleForTesting static MetricKind createMetricKind(Type type) { if (type == Type.GAUGE_INT64 || type == Type.GAUGE_DOUBLE) { return MetricKind.GAUGE; } else if (type == Type.CUMULATIVE_INT64 || type == Type.CUMULATIVE_DOUBLE || type == Type.CUMULATIVE_DISTRIBUTION) { return MetricKind.CUMULATIVE; } return MetricKind.UNRECOGNIZED; }
class class_name[name] begin[{] method[createMetricKind, return_type[type[MetricKind]], modifier[static], parameter[type]] begin[{] if[binary_operation[binary_operation[member[.type], ==, member[Type.GAUGE_INT64]], ||, binary_operation[member[.type], ==, member[Type.GAUGE_DOUBLE]]]] begin[{] return[member[MetricKind.GAUGE]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.type], ==, member[Type.CUMULATIVE_INT64]], ||, binary_operation[member[.type], ==, member[Type.CUMULATIVE_DOUBLE]]], ||, binary_operation[member[.type], ==, member[Type.CUMULATIVE_DISTRIBUTION]]]] begin[{] return[member[MetricKind.CUMULATIVE]] else begin[{] None end[}] end[}] return[member[MetricKind.UNRECOGNIZED]] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[static] identifier[MetricKind] identifier[createMetricKind] operator[SEP] identifier[Type] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Type] operator[SEP] identifier[GAUGE_INT64] operator[||] identifier[type] operator[==] identifier[Type] operator[SEP] identifier[GAUGE_DOUBLE] operator[SEP] { Keyword[return] identifier[MetricKind] operator[SEP] identifier[GAUGE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Type] operator[SEP] identifier[CUMULATIVE_INT64] operator[||] identifier[type] operator[==] identifier[Type] operator[SEP] identifier[CUMULATIVE_DOUBLE] operator[||] identifier[type] operator[==] identifier[Type] operator[SEP] identifier[CUMULATIVE_DISTRIBUTION] operator[SEP] { Keyword[return] identifier[MetricKind] operator[SEP] identifier[CUMULATIVE] operator[SEP] } Keyword[return] identifier[MetricKind] operator[SEP] identifier[UNRECOGNIZED] operator[SEP] }
private void initialize(Handler callbackHandler, int threadPoolSize) { mDownloadDispatchers = new DownloadDispatcher[threadPoolSize]; mDelivery = new CallBackDelivery(callbackHandler); }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[private], parameter[callbackHandler, threadPoolSize]] begin[{] assign[member[.mDownloadDispatchers], ArrayCreator(dimensions=[MemberReference(member=threadPoolSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DownloadDispatcher, sub_type=None))] assign[member[.mDelivery], ClassCreator(arguments=[MemberReference(member=callbackHandler, 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=CallBackDelivery, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[void] identifier[initialize] operator[SEP] identifier[Handler] identifier[callbackHandler] , Keyword[int] identifier[threadPoolSize] operator[SEP] { identifier[mDownloadDispatchers] operator[=] Keyword[new] identifier[DownloadDispatcher] operator[SEP] identifier[threadPoolSize] operator[SEP] operator[SEP] identifier[mDelivery] operator[=] Keyword[new] identifier[CallBackDelivery] operator[SEP] identifier[callbackHandler] operator[SEP] operator[SEP] }
private void completedTask(TaskAttemptID taskId, TaskStatus.State finalTaskState) { TaskStatus status = taskStatuses.get(taskId); status.setRunState(finalTaskState); activeTasks.remove(taskId); }
class class_name[name] begin[{] method[completedTask, return_type[void], modifier[private], parameter[taskId, finalTaskState]] begin[{] local_variable[type[TaskStatus], status] call[status.setRunState, parameter[member[.finalTaskState]]] call[activeTasks.remove, parameter[member[.taskId]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[completedTask] operator[SEP] identifier[TaskAttemptID] identifier[taskId] , identifier[TaskStatus] operator[SEP] identifier[State] identifier[finalTaskState] operator[SEP] { identifier[TaskStatus] identifier[status] operator[=] identifier[taskStatuses] operator[SEP] identifier[get] operator[SEP] identifier[taskId] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setRunState] operator[SEP] identifier[finalTaskState] operator[SEP] operator[SEP] identifier[activeTasks] operator[SEP] identifier[remove] operator[SEP] identifier[taskId] operator[SEP] operator[SEP] }
protected void updateContent(CmsSitemapClipboardData data) { if (data == null) { return; } m_modified.clearList(); boolean hasElements = false; for (CmsClientSitemapEntry entry : data.getModifications().values()) { m_modified.insertItem(createModifiedItem(entry), 0); hasElements = true; } m_clipboardButton.enableClearModified(hasElements); m_deleted.clearList(); hasElements = false; for (CmsClientSitemapEntry entry : data.getDeletions().values()) { m_deleted.insertItem(createDeletedItem(entry), 0); hasElements = true; } m_clipboardButton.enableClearDeleted(hasElements); }
class class_name[name] begin[{] method[updateContent, return_type[void], modifier[protected], parameter[data]] begin[{] if[binary_operation[member[.data], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[m_modified.clearList, parameter[]] local_variable[type[boolean], hasElements] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createModifiedItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=insertItem, postfix_operators=[], prefix_operators=[], qualifier=m_modified, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getModifications, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsClientSitemapEntry, sub_type=None))), label=None) call[m_clipboardButton.enableClearModified, parameter[member[.hasElements]]] call[m_deleted.clearList, parameter[]] assign[member[.hasElements], literal[false]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createDeletedItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=insertItem, postfix_operators=[], prefix_operators=[], qualifier=m_deleted, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeletions, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsClientSitemapEntry, sub_type=None))), label=None) call[m_clipboardButton.enableClearDeleted, parameter[member[.hasElements]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[updateContent] operator[SEP] identifier[CmsSitemapClipboardData] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[m_modified] operator[SEP] identifier[clearList] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[hasElements] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[CmsClientSitemapEntry] identifier[entry] operator[:] identifier[data] operator[SEP] identifier[getModifications] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[m_modified] operator[SEP] identifier[insertItem] operator[SEP] identifier[createModifiedItem] operator[SEP] identifier[entry] operator[SEP] , Other[0] operator[SEP] operator[SEP] identifier[hasElements] operator[=] literal[boolean] operator[SEP] } identifier[m_clipboardButton] operator[SEP] identifier[enableClearModified] operator[SEP] identifier[hasElements] operator[SEP] operator[SEP] identifier[m_deleted] operator[SEP] identifier[clearList] operator[SEP] operator[SEP] operator[SEP] identifier[hasElements] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[CmsClientSitemapEntry] identifier[entry] operator[:] identifier[data] operator[SEP] identifier[getDeletions] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[m_deleted] operator[SEP] identifier[insertItem] operator[SEP] identifier[createDeletedItem] operator[SEP] identifier[entry] operator[SEP] , Other[0] operator[SEP] operator[SEP] identifier[hasElements] operator[=] literal[boolean] operator[SEP] } identifier[m_clipboardButton] operator[SEP] identifier[enableClearDeleted] operator[SEP] identifier[hasElements] operator[SEP] operator[SEP] }
@Nullable public <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { return store.getFileAttributeView(lookup, type); }
class class_name[name] begin[{] method[getFileAttributeView, return_type[type[V]], modifier[public], parameter[lookup, type]] begin[{] return[call[store.getFileAttributeView, parameter[member[.lookup], member[.type]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] operator[<] identifier[V] Keyword[extends] identifier[FileAttributeView] operator[>] identifier[V] identifier[getFileAttributeView] operator[SEP] identifier[FileLookup] identifier[lookup] , identifier[Class] operator[<] identifier[V] operator[>] identifier[type] operator[SEP] { Keyword[return] identifier[store] operator[SEP] identifier[getFileAttributeView] operator[SEP] identifier[lookup] , identifier[type] operator[SEP] operator[SEP] }
private void ensureTableIfNecessary(ClassDescriptorDef classDef, String checkLevel) { if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_OJB_PERSISTENT, false)) { if (!classDef.hasProperty(PropertyHelper.OJB_PROPERTY_TABLE)) { classDef.setProperty(PropertyHelper.OJB_PROPERTY_TABLE, classDef.getDefaultTableName()); } } }
class class_name[name] begin[{] method[ensureTableIfNecessary, return_type[void], modifier[private], parameter[classDef, checkLevel]] begin[{] if[call[classDef.getBooleanProperty, parameter[member[PropertyHelper.OJB_PROPERTY_OJB_PERSISTENT], literal[false]]]] begin[{] if[call[classDef.hasProperty, parameter[member[PropertyHelper.OJB_PROPERTY_TABLE]]]] begin[{] call[classDef.setProperty, parameter[member[PropertyHelper.OJB_PROPERTY_TABLE], call[classDef.getDefaultTableName, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[ensureTableIfNecessary] operator[SEP] identifier[ClassDescriptorDef] identifier[classDef] , identifier[String] identifier[checkLevel] operator[SEP] { Keyword[if] operator[SEP] identifier[classDef] operator[SEP] identifier[getBooleanProperty] operator[SEP] identifier[PropertyHelper] operator[SEP] identifier[OJB_PROPERTY_OJB_PERSISTENT] , literal[boolean] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[classDef] operator[SEP] identifier[hasProperty] operator[SEP] identifier[PropertyHelper] operator[SEP] identifier[OJB_PROPERTY_TABLE] operator[SEP] operator[SEP] { identifier[classDef] operator[SEP] identifier[setProperty] operator[SEP] identifier[PropertyHelper] operator[SEP] identifier[OJB_PROPERTY_TABLE] , identifier[classDef] operator[SEP] identifier[getDefaultTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public static String cutOffDoubleQuotes(String variable) { if (StringUtils.hasText(variable) && variable.length() > 1 && variable.charAt(0) == '"' && variable.charAt(variable.length() - 1) == '"') { return variable.substring(1, variable.length() - 1); } return variable; }
class class_name[name] begin[{] method[cutOffDoubleQuotes, return_type[type[String]], modifier[public static], parameter[variable]] begin[{] if[binary_operation[binary_operation[binary_operation[call[StringUtils.hasText, parameter[member[.variable]]], &&, binary_operation[call[variable.length, parameter[]], >, literal[1]]], &&, binary_operation[call[variable.charAt, parameter[literal[0]]], ==, literal['"']]], &&, binary_operation[call[variable.charAt, parameter[binary_operation[call[variable.length, parameter[]], -, literal[1]]]], ==, literal['"']]]] begin[{] return[call[variable.substring, parameter[literal[1], binary_operation[call[variable.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] return[member[.variable]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[cutOffDoubleQuotes] operator[SEP] identifier[String] identifier[variable] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[variable] operator[SEP] operator[&&] identifier[variable] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[variable] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[&&] identifier[variable] operator[SEP] identifier[charAt] operator[SEP] identifier[variable] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[return] identifier[variable] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[variable] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[variable] operator[SEP] }
public String[] buildColumnsAs(String[] columns, String value) { String[] values = new String[columns.length]; for (int i = 0; i < columns.length; i++) { values[i] = value; } return buildColumnsAs(columns, values); }
class class_name[name] begin[{] method[buildColumnsAs, return_type[type[String]], modifier[public], parameter[columns, value]] begin[{] local_variable[type[String], values] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=columns, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[.buildColumnsAs, parameter[member[.columns], member[.values]]]] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[buildColumnsAs] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[columns] , identifier[String] identifier[value] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[values] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[columns] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[columns] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[values] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[value] operator[SEP] } Keyword[return] identifier[buildColumnsAs] operator[SEP] identifier[columns] , identifier[values] operator[SEP] operator[SEP] }
public LookupInBuilder exists(String path, SubdocOptionsBuilder optionsBuilder) { this.async.exists(path, optionsBuilder); return this; }
class class_name[name] begin[{] method[exists, return_type[type[LookupInBuilder]], modifier[public], parameter[path, optionsBuilder]] begin[{] THIS[member[None.async]call[None.exists, parameter[member[.path], member[.optionsBuilder]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[LookupInBuilder] identifier[exists] operator[SEP] identifier[String] identifier[path] , identifier[SubdocOptionsBuilder] identifier[optionsBuilder] operator[SEP] { Keyword[this] operator[SEP] identifier[async] operator[SEP] identifier[exists] operator[SEP] identifier[path] , identifier[optionsBuilder] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private static Map<String, String> asMap(final Iterable<String> args) { final Map<String, String> map = new HashMap<>(0); final Pattern ptn = Pattern.compile("--([a-z\\-]+)(=.+)?"); for (final String arg : args) { final Matcher matcher = ptn.matcher(arg); if (!matcher.matches()) { throw new IllegalStateException( String.format("can't parse this argument: '%s'", arg) ); } final String value = matcher.group(2); if (value == null) { map.put(matcher.group(1), ""); } else { map.put(matcher.group(1), value.substring(1)); } } return map; }
class class_name[name] begin[{] method[asMap, return_type[type[Map]], modifier[private static], parameter[args]] begin[{] local_variable[type[Map], map] local_variable[type[Pattern], ptn] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=ptn, selectors=[], type_arguments=None), name=matcher)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=matches, postfix_operators=[], prefix_operators=['!'], qualifier=matcher, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="can't parse this argument: '%s'"), MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), 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=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=arg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.map]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[asMap] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[args] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Pattern] identifier[ptn] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[arg] operator[:] identifier[args] operator[SEP] { Keyword[final] identifier[Matcher] identifier[matcher] operator[=] identifier[ptn] operator[SEP] identifier[matcher] operator[SEP] identifier[arg] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[arg] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[value] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] , identifier[value] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[map] operator[SEP] }
@Override public MethodDescriptor<String> getServiceDescriptor(String key) { Preconditions.checkNotNull(key, "Key cannot be null"); return serviceRegistry.getServiceDescriptorByKey(key); }
class class_name[name] begin[{] method[getServiceDescriptor, return_type[type[MethodDescriptor]], modifier[public], parameter[key]] begin[{] call[Preconditions.checkNotNull, parameter[member[.key], literal["Key cannot be null"]]] return[call[serviceRegistry.getServiceDescriptorByKey, parameter[member[.key]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[MethodDescriptor] operator[<] identifier[String] operator[>] identifier[getServiceDescriptor] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[key] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[serviceRegistry] operator[SEP] identifier[getServiceDescriptorByKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
public Match<E> lookingAt(List<E> tokens, int start) { return auto.lookingAt(tokens, start); }
class class_name[name] begin[{] method[lookingAt, return_type[type[Match]], modifier[public], parameter[tokens, start]] begin[{] return[call[auto.lookingAt, parameter[member[.tokens], member[.start]]]] end[}] END[}]
Keyword[public] identifier[Match] operator[<] identifier[E] operator[>] identifier[lookingAt] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[tokens] , Keyword[int] identifier[start] operator[SEP] { Keyword[return] identifier[auto] operator[SEP] identifier[lookingAt] operator[SEP] identifier[tokens] , identifier[start] operator[SEP] operator[SEP] }
public void marshall(DescribedUser describedUser, ProtocolMarshaller protocolMarshaller) { if (describedUser == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describedUser.getArn(), ARN_BINDING); protocolMarshaller.marshall(describedUser.getHomeDirectory(), HOMEDIRECTORY_BINDING); protocolMarshaller.marshall(describedUser.getPolicy(), POLICY_BINDING); protocolMarshaller.marshall(describedUser.getRole(), ROLE_BINDING); protocolMarshaller.marshall(describedUser.getSshPublicKeys(), SSHPUBLICKEYS_BINDING); protocolMarshaller.marshall(describedUser.getTags(), TAGS_BINDING); protocolMarshaller.marshall(describedUser.getUserName(), USERNAME_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[describedUser, protocolMarshaller]] begin[{] if[binary_operation[member[.describedUser], ==, 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=getArn, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=ARN_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=getHomeDirectory, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=HOMEDIRECTORY_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=getPolicy, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=POLICY_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=getRole, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=ROLE_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=getSshPublicKeys, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=SSHPUBLICKEYS_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=getTags, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=TAGS_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=getUserName, postfix_operators=[], prefix_operators=[], qualifier=describedUser, selectors=[], type_arguments=None), MemberReference(member=USERNAME_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[DescribedUser] identifier[describedUser] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describedUser] 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[describedUser] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getHomeDirectory] operator[SEP] operator[SEP] , identifier[HOMEDIRECTORY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getPolicy] operator[SEP] operator[SEP] , identifier[POLICY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getRole] operator[SEP] operator[SEP] , identifier[ROLE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getSshPublicKeys] operator[SEP] operator[SEP] , identifier[SSHPUBLICKEYS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[TAGS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describedUser] operator[SEP] identifier[getUserName] operator[SEP] operator[SEP] , identifier[USERNAME_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 StructuredType checkIsStructuredType(Type type) { if (!isStructuredType(type)) { throw new ODataSystemException("A structured type is required, but '" + type.getFullyQualifiedName() + "' is not a structured type: " + type.getMetaType()); } return (StructuredType) type; }
class class_name[name] begin[{] method[checkIsStructuredType, return_type[type[StructuredType]], modifier[public static], parameter[type]] begin[{] if[call[.isStructuredType, parameter[member[.type]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A structured type is required, but '"), operandr=MethodInvocation(arguments=[], member=getFullyQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a structured type: "), operator=+), operandr=MethodInvocation(arguments=[], member=getMetaType, postfix_operators=[], prefix_operators=[], qualifier=type, 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=ODataSystemException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=StructuredType, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[StructuredType] identifier[checkIsStructuredType] operator[SEP] identifier[Type] identifier[type] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isStructuredType] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ODataSystemException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[type] operator[SEP] identifier[getMetaType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[StructuredType] operator[SEP] identifier[type] operator[SEP] }
public void setComparator(Column<T, ?> column, Comparator<T> comparator) { columnSortHandler.setComparator(column, comparator); }
class class_name[name] begin[{] method[setComparator, return_type[void], modifier[public], parameter[column, comparator]] begin[{] call[columnSortHandler.setComparator, parameter[member[.column], member[.comparator]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setComparator] operator[SEP] identifier[Column] operator[<] identifier[T] , operator[?] operator[>] identifier[column] , identifier[Comparator] operator[<] identifier[T] operator[>] identifier[comparator] operator[SEP] { identifier[columnSortHandler] operator[SEP] identifier[setComparator] operator[SEP] identifier[column] , identifier[comparator] operator[SEP] operator[SEP] }
public synchronized AdView getAdForIndex(int adPos) { if(adPos >= 0 && mPrefetchedAds.size() > adPos) return mPrefetchedAds.get(adPos); return null; }
class class_name[name] begin[{] method[getAdForIndex, return_type[type[AdView]], modifier[synchronized public], parameter[adPos]] begin[{] if[binary_operation[binary_operation[member[.adPos], >=, literal[0]], &&, binary_operation[call[mPrefetchedAds.size, parameter[]], >, member[.adPos]]]] begin[{] return[call[mPrefetchedAds.get, parameter[member[.adPos]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[AdView] identifier[getAdForIndex] operator[SEP] Keyword[int] identifier[adPos] operator[SEP] { Keyword[if] operator[SEP] identifier[adPos] operator[>=] Other[0] operator[&&] identifier[mPrefetchedAds] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[adPos] operator[SEP] Keyword[return] identifier[mPrefetchedAds] operator[SEP] identifier[get] operator[SEP] identifier[adPos] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public final void set(boolean isNegative, long source, int maximumDigits) { this.isNegative = isNegative; // This method does not expect a negative number. However, // "source" can be a Long.MIN_VALUE (-9223372036854775808), // if the number being formatted is a Long.MIN_VALUE. In that // case, it will be formatted as -Long.MIN_VALUE, a number // which is outside the legal range of a long, but which can // be represented by DigitList. if (source <= 0) { if (source == Long.MIN_VALUE) { decimalAt = count = MAX_COUNT; System.arraycopy(LONG_MIN_REP, 0, digits, 0, count); } else { decimalAt = count = 0; // Values <= 0 format as zero } } else { // Rewritten to improve performance. I used to call // Long.toString(), which was about 4x slower than this code. int left = MAX_COUNT; int right; while (source > 0) { digits[--left] = (char)('0' + (source % 10)); source /= 10; } decimalAt = MAX_COUNT - left; // Don't copy trailing zeros. We are guaranteed that there is at // least one non-zero digit, so we don't have to check lower bounds. for (right = MAX_COUNT - 1; digits[right] == '0'; --right) ; count = right - left + 1; System.arraycopy(digits, left, digits, 0, count); } if (maximumDigits > 0) round(maximumDigits); }
class class_name[name] begin[{] method[set, return_type[void], modifier[final public], parameter[isNegative, source, maximumDigits]] begin[{] assign[THIS[member[None.isNegative]], member[.isNegative]] if[binary_operation[member[.source], <=, literal[0]]] begin[{] if[binary_operation[member[.source], ==, member[Long.MIN_VALUE]]] begin[{] assign[member[.decimalAt], assign[member[.count], member[.MAX_COUNT]]] call[System.arraycopy, parameter[member[.LONG_MIN_REP], literal[0], member[.digits], literal[0], member[.count]]] else begin[{] assign[member[.decimalAt], assign[member[.count], literal[0]]] end[}] else begin[{] local_variable[type[int], left] local_variable[type[int], right] while[binary_operation[member[.source], >, literal[0]]] begin[{] assign[member[.digits], Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operandr=BinaryOperation(operandl=MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=%), operator=+), type=BasicType(dimensions=[], name=char))] assign[member[.source], literal[10]] end[}] assign[member[.decimalAt], binary_operation[member[.MAX_COUNT], -, member[.left]]] ForStatement(body=Statement(label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=digits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operator===), init=[Assignment(expressionl=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=MAX_COUNT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=right, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[])]), label=None) assign[member[.count], binary_operation[binary_operation[member[.right], -, member[.left]], +, literal[1]]] call[System.arraycopy, parameter[member[.digits], member[.left], member[.digits], literal[0], member[.count]]] end[}] if[binary_operation[member[.maximumDigits], >, literal[0]]] begin[{] call[.round, parameter[member[.maximumDigits]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[set] operator[SEP] Keyword[boolean] identifier[isNegative] , Keyword[long] identifier[source] , Keyword[int] identifier[maximumDigits] operator[SEP] { Keyword[this] operator[SEP] identifier[isNegative] operator[=] identifier[isNegative] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[<=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[source] operator[==] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[SEP] { identifier[decimalAt] operator[=] identifier[count] operator[=] identifier[MAX_COUNT] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[LONG_MIN_REP] , Other[0] , identifier[digits] , Other[0] , identifier[count] operator[SEP] operator[SEP] } Keyword[else] { identifier[decimalAt] operator[=] identifier[count] operator[=] Other[0] operator[SEP] } } Keyword[else] { Keyword[int] identifier[left] operator[=] identifier[MAX_COUNT] operator[SEP] Keyword[int] identifier[right] operator[SEP] Keyword[while] operator[SEP] identifier[source] operator[>] Other[0] operator[SEP] { identifier[digits] operator[SEP] operator[--] identifier[left] operator[SEP] operator[=] operator[SEP] Keyword[char] operator[SEP] operator[SEP] literal[String] operator[+] operator[SEP] identifier[source] operator[%] Other[10] operator[SEP] operator[SEP] operator[SEP] identifier[source] operator[/=] Other[10] operator[SEP] } identifier[decimalAt] operator[=] identifier[MAX_COUNT] operator[-] identifier[left] operator[SEP] Keyword[for] operator[SEP] identifier[right] operator[=] identifier[MAX_COUNT] operator[-] Other[1] operator[SEP] identifier[digits] operator[SEP] identifier[right] operator[SEP] operator[==] literal[String] operator[SEP] operator[--] identifier[right] operator[SEP] operator[SEP] identifier[count] operator[=] identifier[right] operator[-] identifier[left] operator[+] Other[1] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[digits] , identifier[left] , identifier[digits] , Other[0] , identifier[count] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[maximumDigits] operator[>] Other[0] operator[SEP] identifier[round] operator[SEP] identifier[maximumDigits] operator[SEP] operator[SEP] }
@SuppressWarnings("rawtypes") public Columns columns(Row row) { ColumnFamily columnFamily = row.cf; Columns columns = new Columns(); // Get row's columns iterator skipping clustering column Iterator<Cell> cellIterator = columnFamily.iterator(); cellIterator.next(); // Stuff for grouping collection columns (sets, lists and maps) String name; CollectionType collectionType; while (cellIterator.hasNext()) { Cell cell = cellIterator.next(); CellName cellName = cell.name(); ColumnDefinition columnDefinition = metadata.getColumnDefinition(cellName); if (columnDefinition == null) { continue; } AbstractType<?> valueType = columnDefinition.type; ByteBuffer cellValue = cell.value(); name = cellName.cql3ColumnName(metadata).toString(); if (valueType.isCollection()) { collectionType = (CollectionType<?>) valueType; switch (collectionType.kind) { case SET: { AbstractType<?> type = collectionType.nameComparator(); ByteBuffer value = cellName.collectionElement(); columns.add(Column.fromDecomposed(name, value, type)); break; } case LIST: { AbstractType<?> type = collectionType.valueComparator(); columns.add(Column.fromDecomposed(name, cellValue, type)); break; } case MAP: { AbstractType<?> type = collectionType.valueComparator(); ByteBuffer keyValue = cellName.collectionElement(); AbstractType<?> keyType = collectionType.nameComparator(); String nameSufix = keyType.compose(keyValue).toString(); columns.add(Column.fromDecomposed(name, nameSufix, cellValue, type)); break; } } } else { columns.add(Column.fromDecomposed(name, cellValue, valueType)); } } return columns; }
class class_name[name] begin[{] method[columns, return_type[type[Columns]], modifier[public], parameter[row]] begin[{] local_variable[type[ColumnFamily], columnFamily] local_variable[type[Columns], columns] local_variable[type[Iterator], cellIterator] call[cellIterator.next, parameter[]] local_variable[type[String], name] local_variable[type[CollectionType], collectionType] while[call[cellIterator.hasNext, parameter[]]] begin[{] local_variable[type[Cell], cell] local_variable[type[CellName], cellName] local_variable[type[ColumnDefinition], columnDefinition] if[binary_operation[member[.columnDefinition], ==, literal[null]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[AbstractType], valueType] local_variable[type[ByteBuffer], cellValue] assign[member[.name], call[cellName.cql3ColumnName, parameter[member[.metadata]]]] if[call[valueType.isCollection, parameter[]]] begin[{] assign[member[.collectionType], Cast(expression=MemberReference(member=valueType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=CollectionType, sub_type=None))] SwitchStatement(cases=[SwitchStatementCase(case=['SET'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nameComparator, postfix_operators=[], prefix_operators=[], qualifier=collectionType, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=collectionElement, postfix_operators=[], prefix_operators=[], qualifier=cellName, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromDecomposed, postfix_operators=[], prefix_operators=[], qualifier=Column, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=columns, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['LIST'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=valueComparator, postfix_operators=[], prefix_operators=[], qualifier=collectionType, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cellValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromDecomposed, postfix_operators=[], prefix_operators=[], qualifier=Column, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=columns, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['MAP'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=valueComparator, postfix_operators=[], prefix_operators=[], qualifier=collectionType, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=collectionElement, postfix_operators=[], prefix_operators=[], qualifier=cellName, selectors=[], type_arguments=None), name=keyValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteBuffer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nameComparator, postfix_operators=[], prefix_operators=[], qualifier=collectionType, selectors=[], type_arguments=None), name=keyType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=keyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compose, postfix_operators=[], prefix_operators=[], qualifier=keyType, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=nameSufix)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nameSufix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cellValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromDecomposed, postfix_operators=[], prefix_operators=[], qualifier=Column, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=columns, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])])], expression=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=collectionType, selectors=[]), label=None) else begin[{] call[columns.add, parameter[call[Column.fromDecomposed, parameter[member[.name], member[.cellValue], member[.valueType]]]]] end[}] end[}] return[member[.columns]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Columns] identifier[columns] operator[SEP] identifier[Row] identifier[row] operator[SEP] { identifier[ColumnFamily] identifier[columnFamily] operator[=] identifier[row] operator[SEP] identifier[cf] operator[SEP] identifier[Columns] identifier[columns] operator[=] Keyword[new] identifier[Columns] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Cell] operator[>] identifier[cellIterator] operator[=] identifier[columnFamily] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[cellIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[SEP] identifier[CollectionType] identifier[collectionType] operator[SEP] Keyword[while] operator[SEP] identifier[cellIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Cell] identifier[cell] operator[=] identifier[cellIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[CellName] identifier[cellName] operator[=] identifier[cell] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[ColumnDefinition] identifier[columnDefinition] operator[=] identifier[metadata] operator[SEP] identifier[getColumnDefinition] operator[SEP] identifier[cellName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[columnDefinition] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[AbstractType] operator[<] operator[?] operator[>] identifier[valueType] operator[=] identifier[columnDefinition] operator[SEP] identifier[type] operator[SEP] identifier[ByteBuffer] identifier[cellValue] operator[=] identifier[cell] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[cellName] operator[SEP] identifier[cql3ColumnName] operator[SEP] identifier[metadata] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueType] operator[SEP] identifier[isCollection] operator[SEP] operator[SEP] operator[SEP] { identifier[collectionType] operator[=] operator[SEP] identifier[CollectionType] operator[<] operator[?] operator[>] operator[SEP] identifier[valueType] operator[SEP] Keyword[switch] operator[SEP] identifier[collectionType] operator[SEP] identifier[kind] operator[SEP] { Keyword[case] identifier[SET] operator[:] { identifier[AbstractType] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[collectionType] operator[SEP] identifier[nameComparator] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[value] operator[=] identifier[cellName] operator[SEP] identifier[collectionElement] operator[SEP] operator[SEP] operator[SEP] identifier[columns] operator[SEP] identifier[add] operator[SEP] identifier[Column] operator[SEP] identifier[fromDecomposed] operator[SEP] identifier[name] , identifier[value] , identifier[type] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[LIST] operator[:] { identifier[AbstractType] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[collectionType] operator[SEP] identifier[valueComparator] operator[SEP] operator[SEP] operator[SEP] identifier[columns] operator[SEP] identifier[add] operator[SEP] identifier[Column] operator[SEP] identifier[fromDecomposed] operator[SEP] identifier[name] , identifier[cellValue] , identifier[type] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[MAP] operator[:] { identifier[AbstractType] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[collectionType] operator[SEP] identifier[valueComparator] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[keyValue] operator[=] identifier[cellName] operator[SEP] identifier[collectionElement] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractType] operator[<] operator[?] operator[>] identifier[keyType] operator[=] identifier[collectionType] operator[SEP] identifier[nameComparator] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[nameSufix] operator[=] identifier[keyType] operator[SEP] identifier[compose] operator[SEP] identifier[keyValue] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[columns] operator[SEP] identifier[add] operator[SEP] identifier[Column] operator[SEP] identifier[fromDecomposed] operator[SEP] identifier[name] , identifier[nameSufix] , identifier[cellValue] , identifier[type] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[else] { identifier[columns] operator[SEP] identifier[add] operator[SEP] identifier[Column] operator[SEP] identifier[fromDecomposed] operator[SEP] identifier[name] , identifier[cellValue] , identifier[valueType] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[columns] operator[SEP] }
public static Mapping getMapping(PersistentEntity domainClass) { return domainClass == null ? null : MAPPING_CACHE.get(domainClass.getJavaClass()); }
class class_name[name] begin[{] method[getMapping, return_type[type[Mapping]], modifier[public static], parameter[domainClass]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=domainClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJavaClass, postfix_operators=[], prefix_operators=[], qualifier=domainClass, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=MAPPING_CACHE, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Mapping] identifier[getMapping] operator[SEP] identifier[PersistentEntity] identifier[domainClass] operator[SEP] { Keyword[return] identifier[domainClass] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[MAPPING_CACHE] operator[SEP] identifier[get] operator[SEP] identifier[domainClass] operator[SEP] identifier[getJavaClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest request) { request = beforeClientExecution(request); return executeCreateConfigurationSetEventDestination(request); }
class class_name[name] begin[{] method[createConfigurationSetEventDestination, return_type[type[CreateConfigurationSetEventDestinationResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateConfigurationSetEventDestination, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateConfigurationSetEventDestinationResult] identifier[createConfigurationSetEventDestination] operator[SEP] identifier[CreateConfigurationSetEventDestinationRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateConfigurationSetEventDestination] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public boolean includePath(String path) { if (path.startsWith("/hawkular/apm")) { return false; } int dotPos = path.lastIndexOf('.'); int slashPos = path.lastIndexOf('/'); if (dotPos <= slashPos) { return true; } if (!fileExtensionWhitelist.isEmpty()) { String extension = path.substring(dotPos + 1); if (fileExtensionWhitelist.contains(extension)) { if (log.isLoggable(Level.FINER)) { log.finer("Path " + path + " not skipped, because of whitelist"); } return true; } } if (log.isLoggable(Level.FINER)) { log.finer("Path " + path + " skipped"); } return false; }
class class_name[name] begin[{] method[includePath, return_type[type[boolean]], modifier[public], parameter[path]] begin[{] if[call[path.startsWith, parameter[literal["/hawkular/apm"]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], dotPos] local_variable[type[int], slashPos] if[binary_operation[member[.dotPos], <=, member[.slashPos]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[fileExtensionWhitelist.isEmpty, parameter[]]] begin[{] local_variable[type[String], extension] if[call[fileExtensionWhitelist.contains, parameter[member[.extension]]]] begin[{] if[call[log.isLoggable, parameter[member[Level.FINER]]]] begin[{] call[log.finer, parameter[binary_operation[binary_operation[literal["Path "], +, member[.path]], +, literal[" not skipped, because of whitelist"]]]] else begin[{] None end[}] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] if[call[log.isLoggable, parameter[member[Level.FINER]]]] begin[{] call[log.finer, parameter[binary_operation[binary_operation[literal["Path "], +, member[.path]], +, literal[" skipped"]]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[includePath] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[dotPos] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[slashPos] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dotPos] operator[<=] identifier[slashPos] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[fileExtensionWhitelist] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[extension] operator[=] identifier[path] operator[SEP] identifier[substring] operator[SEP] identifier[dotPos] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fileExtensionWhitelist] operator[SEP] identifier[contains] operator[SEP] identifier[extension] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[finer] operator[SEP] literal[String] operator[+] identifier[path] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[finer] operator[SEP] literal[String] operator[+] identifier[path] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static <T extends ImageGray<T>> ImageFunctionSparse<T> createLaplacian( Class<T> imageType , ImageBorder<T> border ) { if( border == null ) { border = FactoryImageBorder.single(imageType, BorderType.EXTENDED); } if( GeneralizedImageOps.isFloatingPoint(imageType)) { ImageConvolveSparse<GrayF32, Kernel2D_F32> r = FactoryConvolveSparse.convolve2D(GrayF32.class, DerivativeLaplacian.kernel_F32); r.setImageBorder((ImageBorder_F32)border); return (ImageFunctionSparse<T>)r; } else { ImageConvolveSparse r = FactoryConvolveSparse.convolve2D(GrayI.class, DerivativeLaplacian.kernel_I32); r.setImageBorder(border); return (ImageFunctionSparse<T>)r; } }
class class_name[name] begin[{] method[createLaplacian, return_type[type[ImageFunctionSparse]], modifier[public static], parameter[imageType, border]] begin[{] if[binary_operation[member[.border], ==, literal[null]]] begin[{] assign[member[.border], call[FactoryImageBorder.single, parameter[member[.imageType], member[BorderType.EXTENDED]]]] else begin[{] None end[}] if[call[GeneralizedImageOps.isFloatingPoint, parameter[member[.imageType]]]] begin[{] local_variable[type[ImageConvolveSparse], r] call[r.setImageBorder, parameter[Cast(expression=MemberReference(member=border, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ImageBorder_F32, sub_type=None))]] return[Cast(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ImageFunctionSparse, sub_type=None))] else begin[{] local_variable[type[ImageConvolveSparse], r] call[r.setImageBorder, parameter[member[.border]]] return[Cast(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ImageFunctionSparse, sub_type=None))] end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ImageGray] operator[<] identifier[T] operator[>] operator[>] identifier[ImageFunctionSparse] operator[<] identifier[T] operator[>] identifier[createLaplacian] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[imageType] , identifier[ImageBorder] operator[<] identifier[T] operator[>] identifier[border] operator[SEP] { Keyword[if] operator[SEP] identifier[border] operator[==] Other[null] operator[SEP] { identifier[border] operator[=] identifier[FactoryImageBorder] operator[SEP] identifier[single] operator[SEP] identifier[imageType] , identifier[BorderType] operator[SEP] identifier[EXTENDED] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[GeneralizedImageOps] operator[SEP] identifier[isFloatingPoint] operator[SEP] identifier[imageType] operator[SEP] operator[SEP] { identifier[ImageConvolveSparse] operator[<] identifier[GrayF32] , identifier[Kernel2D_F32] operator[>] identifier[r] operator[=] identifier[FactoryConvolveSparse] operator[SEP] identifier[convolve2D] operator[SEP] identifier[GrayF32] operator[SEP] Keyword[class] , identifier[DerivativeLaplacian] operator[SEP] identifier[kernel_F32] operator[SEP] operator[SEP] identifier[r] operator[SEP] identifier[setImageBorder] operator[SEP] operator[SEP] identifier[ImageBorder_F32] operator[SEP] identifier[border] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[ImageFunctionSparse] operator[<] identifier[T] operator[>] operator[SEP] identifier[r] operator[SEP] } Keyword[else] { identifier[ImageConvolveSparse] identifier[r] operator[=] identifier[FactoryConvolveSparse] operator[SEP] identifier[convolve2D] operator[SEP] identifier[GrayI] operator[SEP] Keyword[class] , identifier[DerivativeLaplacian] operator[SEP] identifier[kernel_I32] operator[SEP] operator[SEP] identifier[r] operator[SEP] identifier[setImageBorder] operator[SEP] identifier[border] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[ImageFunctionSparse] operator[<] identifier[T] operator[>] operator[SEP] identifier[r] operator[SEP] } }
public void deleteAllAlerts() { for(int i = 0; i < getChildCount(); i++) { ((SiteNode) getChildAt(i)).deleteAllAlerts(); } if (!alerts.isEmpty()) { alerts.clear(); highestAlert = null; calculateHighestAlert = false; if (this.siteMap != null) { // Deleting alert might affect the nodes visibility in a filtered tree siteMap.applyFilter(this); } nodeChanged(); } }
class class_name[name] begin[{] method[deleteAllAlerts, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SiteNode, sub_type=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getChildCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[call[alerts.isEmpty, parameter[]]] begin[{] call[alerts.clear, parameter[]] assign[member[.highestAlert], literal[null]] assign[member[.calculateHighestAlert], literal[false]] if[binary_operation[THIS[member[None.siteMap]], !=, literal[null]]] begin[{] call[siteMap.applyFilter, parameter[THIS[]]] else begin[{] None end[}] call[.nodeChanged, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteAllAlerts] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { operator[SEP] operator[SEP] identifier[SiteNode] operator[SEP] identifier[getChildAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[deleteAllAlerts] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[alerts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[alerts] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[highestAlert] operator[=] Other[null] operator[SEP] identifier[calculateHighestAlert] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[siteMap] operator[!=] Other[null] operator[SEP] { identifier[siteMap] operator[SEP] identifier[applyFilter] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } identifier[nodeChanged] operator[SEP] operator[SEP] operator[SEP] } }
public void destroy() { if (inputStream != null) { try { inputStream.close(); } catch (Throwable t) { LOG.warn("Error closing input stream", t); } inputStream = null; } if (outputStream != null) { try { outputStream.close(); } catch (Throwable t) { LOG.warn("Error closing output stream", t); } outputStream = null; } if (errorStream != null) { try { errorStream.close(); } catch (Throwable t) { LOG.warn("Error closing error stream", t); } errorStream = null; } if (ffmpeg != null) { ffmpeg.destroy(); ffmpeg = null; } if (ffmpegKiller != null) { Runtime runtime = Runtime.getRuntime(); runtime.removeShutdownHook(ffmpegKiller); ffmpegKiller = null; } }
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.inputStream], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error closing input stream"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) assign[member[.inputStream], literal[null]] else begin[{] None end[}] if[binary_operation[member[.outputStream], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=outputStream, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error closing output stream"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) assign[member[.outputStream], literal[null]] else begin[{] None end[}] if[binary_operation[member[.errorStream], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=errorStream, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error closing error stream"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) assign[member[.errorStream], literal[null]] else begin[{] None end[}] if[binary_operation[member[.ffmpeg], !=, literal[null]]] begin[{] call[ffmpeg.destroy, parameter[]] assign[member[.ffmpeg], literal[null]] else begin[{] None end[}] if[binary_operation[member[.ffmpegKiller], !=, literal[null]]] begin[{] local_variable[type[Runtime], runtime] call[runtime.removeShutdownHook, parameter[member[.ffmpegKiller]]] assign[member[.ffmpegKiller], literal[null]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inputStream] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } identifier[inputStream] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[outputStream] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[outputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } identifier[outputStream] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[errorStream] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[errorStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } identifier[errorStream] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[ffmpeg] operator[!=] Other[null] operator[SEP] { identifier[ffmpeg] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] identifier[ffmpeg] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[ffmpegKiller] operator[!=] Other[null] operator[SEP] { identifier[Runtime] identifier[runtime] operator[=] identifier[Runtime] operator[SEP] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[runtime] operator[SEP] identifier[removeShutdownHook] operator[SEP] identifier[ffmpegKiller] operator[SEP] operator[SEP] identifier[ffmpegKiller] operator[=] Other[null] operator[SEP] } }
private void cullDisabledPaths() throws Exception { ArrayList<EndpointOverride> removePaths = new ArrayList<EndpointOverride>(); RequestInformation requestInfo = requestInformation.get(); for (EndpointOverride selectedPath : requestInfo.selectedResponsePaths) { // check repeat count on selectedPath // -1 is unlimited if (selectedPath != null && selectedPath.getRepeatNumber() == 0) { // skip removePaths.add(selectedPath); } else if (selectedPath != null && selectedPath.getRepeatNumber() != -1) { // need to decrement the # selectedPath.updateRepeatNumber(selectedPath.getRepeatNumber() - 1); } } // remove paths if we need to for (EndpointOverride removePath : removePaths) { requestInfo.selectedResponsePaths.remove(removePath); } }
class class_name[name] begin[{] method[cullDisabledPaths, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[ArrayList], removePaths] local_variable[type[RequestInformation], requestInfo] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=selectedPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRepeatNumber, postfix_operators=[], prefix_operators=[], qualifier=selectedPath, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=selectedPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRepeatNumber, postfix_operators=[], prefix_operators=[], qualifier=selectedPath, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRepeatNumber, postfix_operators=[], prefix_operators=[], qualifier=selectedPath, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=updateRepeatNumber, postfix_operators=[], prefix_operators=[], qualifier=selectedPath, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selectedPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=removePaths, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=selectedResponsePaths, postfix_operators=[], prefix_operators=[], qualifier=requestInfo, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=selectedPath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EndpointOverride, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=removePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=requestInfo.selectedResponsePaths, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=removePaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=removePath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EndpointOverride, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[cullDisabledPaths] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ArrayList] operator[<] identifier[EndpointOverride] operator[>] identifier[removePaths] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EndpointOverride] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[RequestInformation] identifier[requestInfo] operator[=] identifier[requestInformation] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EndpointOverride] identifier[selectedPath] operator[:] identifier[requestInfo] operator[SEP] identifier[selectedResponsePaths] operator[SEP] { Keyword[if] operator[SEP] identifier[selectedPath] operator[!=] Other[null] operator[&&] identifier[selectedPath] operator[SEP] identifier[getRepeatNumber] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[removePaths] operator[SEP] identifier[add] operator[SEP] identifier[selectedPath] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[selectedPath] operator[!=] Other[null] operator[&&] identifier[selectedPath] operator[SEP] identifier[getRepeatNumber] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[selectedPath] operator[SEP] identifier[updateRepeatNumber] operator[SEP] identifier[selectedPath] operator[SEP] identifier[getRepeatNumber] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[EndpointOverride] identifier[removePath] operator[:] identifier[removePaths] operator[SEP] { identifier[requestInfo] operator[SEP] identifier[selectedResponsePaths] operator[SEP] identifier[remove] operator[SEP] identifier[removePath] operator[SEP] operator[SEP] } }
@Override public FieldDescriptor findOperandInScope(String scope, String operand) { ObjectDescriptor currentScope = m_classes.get(scope); StringTokenizer st = new StringTokenizer(operand,"."); FieldDescriptor ret = null; while(st.hasMoreTokens()) { if (currentScope == null) { return null; } String token = st.nextToken(); ret = currentScope.get(token); if (ret == null) { if (currentScope.getParent() != null) { return findOperandInScope(currentScope.getParent(),operand); } return null; } currentScope = m_classes.get(ret.getType()); } return ret; }
class class_name[name] begin[{] method[findOperandInScope, return_type[type[FieldDescriptor]], modifier[public], parameter[scope, operand]] begin[{] local_variable[type[ObjectDescriptor], currentScope] local_variable[type[StringTokenizer], st] local_variable[type[FieldDescriptor], ret] while[call[st.hasMoreTokens, parameter[]]] begin[{] if[binary_operation[member[.currentScope], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], token] assign[member[.ret], call[currentScope.get, parameter[member[.token]]]] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] if[binary_operation[call[currentScope.getParent, parameter[]], !=, literal[null]]] begin[{] return[call[.findOperandInScope, parameter[call[currentScope.getParent, parameter[]], member[.operand]]]] else begin[{] None end[}] return[literal[null]] else begin[{] None end[}] assign[member[.currentScope], call[m_classes.get, parameter[call[ret.getType, parameter[]]]]] end[}] return[member[.ret]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[FieldDescriptor] identifier[findOperandInScope] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[operand] operator[SEP] { identifier[ObjectDescriptor] identifier[currentScope] operator[=] identifier[m_classes] operator[SEP] identifier[get] operator[SEP] identifier[scope] operator[SEP] operator[SEP] identifier[StringTokenizer] identifier[st] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[operand] , literal[String] operator[SEP] operator[SEP] identifier[FieldDescriptor] identifier[ret] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[st] operator[SEP] identifier[hasMoreTokens] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[currentScope] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[token] operator[=] identifier[st] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[ret] operator[=] identifier[currentScope] operator[SEP] identifier[get] operator[SEP] identifier[token] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[currentScope] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[findOperandInScope] operator[SEP] identifier[currentScope] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] , identifier[operand] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } identifier[currentScope] operator[=] identifier[m_classes] operator[SEP] identifier[get] operator[SEP] identifier[ret] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
protected boolean termCompare(Term term) { if (transform == TRANSFORM_NONE) { if (term.field() == field && term.text().startsWith(prefix)) { input.setBase(term.text()); return pattern.reset().matches(); } endEnum = true; return false; } else { // pre filtered, no need to check return true; } }
class class_name[name] begin[{] method[termCompare, return_type[type[boolean]], modifier[protected], parameter[term]] begin[{] if[binary_operation[member[.transform], ==, member[.TRANSFORM_NONE]]] begin[{] if[binary_operation[binary_operation[call[term.field, parameter[]], ==, member[.field]], &&, call[term.text, parameter[]]]] begin[{] call[input.setBase, parameter[call[term.text, parameter[]]]] return[call[pattern.reset, parameter[]]] else begin[{] None end[}] assign[member[.endEnum], literal[true]] return[literal[false]] else begin[{] return[literal[true]] end[}] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[termCompare] operator[SEP] identifier[Term] identifier[term] operator[SEP] { Keyword[if] operator[SEP] identifier[transform] operator[==] identifier[TRANSFORM_NONE] operator[SEP] { Keyword[if] operator[SEP] identifier[term] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[==] identifier[field] operator[&&] identifier[term] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[setBase] operator[SEP] identifier[term] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[pattern] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] } identifier[endEnum] operator[=] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public void marshall(DescribeSubscriptionFiltersRequest describeSubscriptionFiltersRequest, ProtocolMarshaller protocolMarshaller) { if (describeSubscriptionFiltersRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeSubscriptionFiltersRequest.getLogGroupName(), LOGGROUPNAME_BINDING); protocolMarshaller.marshall(describeSubscriptionFiltersRequest.getFilterNamePrefix(), FILTERNAMEPREFIX_BINDING); protocolMarshaller.marshall(describeSubscriptionFiltersRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(describeSubscriptionFiltersRequest.getLimit(), LIMIT_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[describeSubscriptionFiltersRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeSubscriptionFiltersRequest], ==, 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=getLogGroupName, postfix_operators=[], prefix_operators=[], qualifier=describeSubscriptionFiltersRequest, selectors=[], type_arguments=None), MemberReference(member=LOGGROUPNAME_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=getFilterNamePrefix, postfix_operators=[], prefix_operators=[], qualifier=describeSubscriptionFiltersRequest, selectors=[], type_arguments=None), MemberReference(member=FILTERNAMEPREFIX_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=describeSubscriptionFiltersRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLimit, postfix_operators=[], prefix_operators=[], qualifier=describeSubscriptionFiltersRequest, selectors=[], type_arguments=None), MemberReference(member=LIMIT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], 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[DescribeSubscriptionFiltersRequest] identifier[describeSubscriptionFiltersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeSubscriptionFiltersRequest] 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[describeSubscriptionFiltersRequest] operator[SEP] identifier[getLogGroupName] operator[SEP] operator[SEP] , identifier[LOGGROUPNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeSubscriptionFiltersRequest] operator[SEP] identifier[getFilterNamePrefix] operator[SEP] operator[SEP] , identifier[FILTERNAMEPREFIX_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeSubscriptionFiltersRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeSubscriptionFiltersRequest] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] , identifier[LIMIT_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] } }
private boolean locationAwareLog(int level_int, String msgTemplate, Object[] arguments) { return locationAwareLog(level_int, null, msgTemplate, arguments); }
class class_name[name] begin[{] method[locationAwareLog, return_type[type[boolean]], modifier[private], parameter[level_int, msgTemplate, arguments]] begin[{] return[call[.locationAwareLog, parameter[member[.level_int], literal[null], member[.msgTemplate], member[.arguments]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[locationAwareLog] operator[SEP] Keyword[int] identifier[level_int] , identifier[String] identifier[msgTemplate] , identifier[Object] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] { Keyword[return] identifier[locationAwareLog] operator[SEP] identifier[level_int] , Other[null] , identifier[msgTemplate] , identifier[arguments] operator[SEP] operator[SEP] }
public void marshall(DescribeDocumentPermissionRequest describeDocumentPermissionRequest, ProtocolMarshaller protocolMarshaller) { if (describeDocumentPermissionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeDocumentPermissionRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(describeDocumentPermissionRequest.getPermissionType(), PERMISSIONTYPE_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[describeDocumentPermissionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeDocumentPermissionRequest], ==, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=describeDocumentPermissionRequest, selectors=[], type_arguments=None), MemberReference(member=NAME_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=getPermissionType, postfix_operators=[], prefix_operators=[], qualifier=describeDocumentPermissionRequest, selectors=[], type_arguments=None), MemberReference(member=PERMISSIONTYPE_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[DescribeDocumentPermissionRequest] identifier[describeDocumentPermissionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeDocumentPermissionRequest] 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[describeDocumentPermissionRequest] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeDocumentPermissionRequest] operator[SEP] identifier[getPermissionType] operator[SEP] operator[SEP] , identifier[PERMISSIONTYPE_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 Value putIfAbsent(T key, long expiry_time) { if(key == null) key=NULL_KEY; Value val=map.get(key); if(val == null) { val=new Value(); Value existing=map.putIfAbsent(key, val); if(existing == null) return val; val=existing; } // key already exists if(val.update().age() > expiry_time) { map.remove(key); map.putIfAbsent(key, new Value()); return val; } return null; }
class class_name[name] begin[{] method[putIfAbsent, return_type[type[Value]], modifier[public], parameter[key, expiry_time]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] assign[member[.key], member[.NULL_KEY]] else begin[{] None end[}] local_variable[type[Value], val] if[binary_operation[member[.val], ==, literal[null]]] begin[{] assign[member[.val], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Value, sub_type=None))] local_variable[type[Value], existing] if[binary_operation[member[.existing], ==, literal[null]]] begin[{] return[member[.val]] else begin[{] None end[}] assign[member[.val], member[.existing]] else begin[{] None end[}] if[binary_operation[call[val.update, parameter[]], >, member[.expiry_time]]] begin[{] call[map.remove, parameter[member[.key]]] call[map.putIfAbsent, parameter[member[.key], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Value, sub_type=None))]] return[member[.val]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Value] identifier[putIfAbsent] operator[SEP] identifier[T] identifier[key] , Keyword[long] identifier[expiry_time] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] identifier[key] operator[=] identifier[NULL_KEY] operator[SEP] identifier[Value] identifier[val] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] { identifier[val] operator[=] Keyword[new] identifier[Value] operator[SEP] operator[SEP] operator[SEP] identifier[Value] identifier[existing] operator[=] identifier[map] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[key] , identifier[val] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existing] operator[==] Other[null] operator[SEP] Keyword[return] identifier[val] operator[SEP] identifier[val] operator[=] identifier[existing] operator[SEP] } Keyword[if] operator[SEP] identifier[val] operator[SEP] identifier[update] operator[SEP] operator[SEP] operator[SEP] identifier[age] operator[SEP] operator[SEP] operator[>] identifier[expiry_time] operator[SEP] { identifier[map] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[key] , Keyword[new] identifier[Value] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[val] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static ResolvableType forClass(Class<?> sourceClass, Class<?> implementationClass) { LettuceAssert.notNull(sourceClass, "Source class must not be null"); ResolvableType asType = forType(implementationClass).as(sourceClass); return (asType == NONE ? forType(sourceClass) : asType); }
class class_name[name] begin[{] method[forClass, return_type[type[ResolvableType]], modifier[public static], parameter[sourceClass, implementationClass]] begin[{] call[LettuceAssert.notNull, parameter[member[.sourceClass], literal["Source class must not be null"]]] local_variable[type[ResolvableType], asType] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=asType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NONE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), if_false=MemberReference(member=asType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=sourceClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ResolvableType] identifier[forClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[sourceClass] , identifier[Class] operator[<] operator[?] operator[>] identifier[implementationClass] operator[SEP] { identifier[LettuceAssert] operator[SEP] identifier[notNull] operator[SEP] identifier[sourceClass] , literal[String] operator[SEP] operator[SEP] identifier[ResolvableType] identifier[asType] operator[=] identifier[forType] operator[SEP] identifier[implementationClass] operator[SEP] operator[SEP] identifier[as] operator[SEP] identifier[sourceClass] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[asType] operator[==] identifier[NONE] operator[?] identifier[forType] operator[SEP] identifier[sourceClass] operator[SEP] operator[:] identifier[asType] operator[SEP] operator[SEP] }
public String convertLineDataObjectPositionMigrationTempOrientToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertLineDataObjectPositionMigrationTempOrientToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertLineDataObjectPositionMigrationTempOrientToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void insertRowAttribute(AttributeSet attributes, int r) { attributeGrid.insertRowAttribute(attributes, r); updateListenersOnAttributeChange(-1, r); }
class class_name[name] begin[{] method[insertRowAttribute, return_type[void], modifier[public], parameter[attributes, r]] begin[{] call[attributeGrid.insertRowAttribute, parameter[member[.attributes], member[.r]]] call[.updateListenersOnAttributeChange, parameter[literal[1], member[.r]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[insertRowAttribute] operator[SEP] identifier[AttributeSet] identifier[attributes] , Keyword[int] identifier[r] operator[SEP] { identifier[attributeGrid] operator[SEP] identifier[insertRowAttribute] operator[SEP] identifier[attributes] , identifier[r] operator[SEP] operator[SEP] identifier[updateListenersOnAttributeChange] operator[SEP] operator[-] Other[1] , identifier[r] operator[SEP] operator[SEP] }
public static ItemStack copy(ItemStack itemStack) { //we need to make sure the itemStack is not empty before copying int originalSize = itemStack.getCount(); itemStack.setCount(1); ItemStack copy = itemStack.copy(); //set the size back copy.setCount(originalSize); itemStack.setCount(originalSize); return copy; }
class class_name[name] begin[{] method[copy, return_type[type[ItemStack]], modifier[public static], parameter[itemStack]] begin[{] local_variable[type[int], originalSize] call[itemStack.setCount, parameter[literal[1]]] local_variable[type[ItemStack], copy] call[copy.setCount, parameter[member[.originalSize]]] call[itemStack.setCount, parameter[member[.originalSize]]] return[member[.copy]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ItemStack] identifier[copy] operator[SEP] identifier[ItemStack] identifier[itemStack] operator[SEP] { Keyword[int] identifier[originalSize] operator[=] identifier[itemStack] operator[SEP] identifier[getCount] operator[SEP] operator[SEP] operator[SEP] identifier[itemStack] operator[SEP] identifier[setCount] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[ItemStack] identifier[copy] operator[=] identifier[itemStack] operator[SEP] identifier[copy] operator[SEP] operator[SEP] operator[SEP] identifier[copy] operator[SEP] identifier[setCount] operator[SEP] identifier[originalSize] operator[SEP] operator[SEP] identifier[itemStack] operator[SEP] identifier[setCount] operator[SEP] identifier[originalSize] operator[SEP] operator[SEP] Keyword[return] identifier[copy] operator[SEP] }
public void extractFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { if (fieldConfigs == null) { fieldTypes = extractFieldTypes(databaseType, dataClass, tableName); } else { fieldTypes = convertFieldConfigs(databaseType, tableName, fieldConfigs); } } }
class class_name[name] begin[{] method[extractFieldTypes, return_type[void], modifier[public], parameter[databaseType]] begin[{] if[binary_operation[member[.fieldTypes], ==, literal[null]]] begin[{] if[binary_operation[member[.fieldConfigs], ==, literal[null]]] begin[{] assign[member[.fieldTypes], call[.extractFieldTypes, parameter[member[.databaseType], member[.dataClass], member[.tableName]]]] else begin[{] assign[member[.fieldTypes], call[.convertFieldConfigs, parameter[member[.databaseType], member[.tableName], member[.fieldConfigs]]]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[extractFieldTypes] operator[SEP] identifier[DatabaseType] identifier[databaseType] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[fieldTypes] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldConfigs] operator[==] Other[null] operator[SEP] { identifier[fieldTypes] operator[=] identifier[extractFieldTypes] operator[SEP] identifier[databaseType] , identifier[dataClass] , identifier[tableName] operator[SEP] operator[SEP] } Keyword[else] { identifier[fieldTypes] operator[=] identifier[convertFieldConfigs] operator[SEP] identifier[databaseType] , identifier[tableName] , identifier[fieldConfigs] operator[SEP] operator[SEP] } } }
public static DnsAddressEndpointGroup of(String hostname, int port) { return new DnsAddressEndpointGroupBuilder(hostname).port(port).build(); }
class class_name[name] begin[{] method[of, return_type[type[DnsAddressEndpointGroup]], modifier[public static], parameter[hostname, port]] begin[{] return[ClassCreator(arguments=[MemberReference(member=hostname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=port, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DnsAddressEndpointGroupBuilder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[DnsAddressEndpointGroup] identifier[of] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[port] operator[SEP] { Keyword[return] Keyword[new] identifier[DnsAddressEndpointGroupBuilder] operator[SEP] identifier[hostname] operator[SEP] operator[SEP] identifier[port] operator[SEP] identifier[port] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Override public EntityIdentifier[] searchForGroups(String query, SearchMethod method, Class leaftype) throws GroupsException { if (isTreeRefreshRequired()) { refreshTree(); } log.debug( "Invoking searchForGroups(): query={}, method={}, leaftype=", query, method, leaftype.getName()); // We only match the IPerson leaf type... final IEntityGroup root = getRootGroup(); if (!leaftype.equals(root.getLeafType())) { return new EntityIdentifier[0]; } // We need to escape regex special characters that appear in the query string... final String[][] specials = new String[][] { /* backslash must come first! */ new String[] {"\\", "\\\\"}, new String[] {"[", "\\["}, /* closing ']' isn't needed b/c it's a normal character w/o a preceding '[' */ new String[] {"{", "\\{"}, /* closing '}' isn't needed b/c it's a normal character w/o a preceding '{' */ new String[] {"^", "\\^"}, new String[] {"$", "\\$"}, new String[] {".", "\\."}, new String[] {"|", "\\|"}, new String[] {"?", "\\?"}, new String[] {"*", "\\*"}, new String[] {"+", "\\+"}, new String[] {"(", "\\("}, new String[] {")", "\\)"} }; for (String[] s : specials) { query = query.replace(s[0], s[1]); } // Establish the regex pattern to match on... String regex; switch (method) { case DISCRETE: case DISCRETE_CI: regex = query.toUpperCase(); break; case STARTS_WITH: case STARTS_WITH_CI: regex = query.toUpperCase() + ".*"; break; case ENDS_WITH: case ENDS_WITH_CI: regex = ".*" + query.toUpperCase(); break; case CONTAINS: case CONTAINS_CI: regex = ".*" + query.toUpperCase() + ".*"; break; default: String msg = "Unsupported search method: " + method; throw new GroupsException(msg); } List<EntityIdentifier> rslt = new ArrayList<>(); for (Map.Entry<String, List<String>> y : groupsTree.getKeysByUpperCaseName().entrySet()) { if (y.getKey().matches(regex)) { List<String> keys = y.getValue(); for (String k : keys) { rslt.add(new EntityIdentifier(k, IEntityGroup.class)); } } } return rslt.toArray(new EntityIdentifier[rslt.size()]); }
class class_name[name] begin[{] method[searchForGroups, return_type[type[EntityIdentifier]], modifier[public], parameter[query, method, leaftype]] begin[{] if[call[.isTreeRefreshRequired, parameter[]]] begin[{] call[.refreshTree, parameter[]] else begin[{] None end[}] call[log.debug, parameter[literal["Invoking searchForGroups(): query={}, method={}, leaftype="], member[.query], member[.method], call[leaftype.getName, parameter[]]]] local_variable[type[IEntityGroup], root] if[call[leaftype.equals, parameter[call[root.getLeafType, parameter[]]]]] begin[{] return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntityIdentifier, sub_type=None))] else begin[{] None end[}] local_variable[type[String], specials] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=specials, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None))), label=None) local_variable[type[String], regex] SwitchStatement(cases=[SwitchStatementCase(case=['DISCRETE', 'DISCRETE_CI'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STARTS_WITH', 'STARTS_WITH_CI'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*"), operator=+)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ENDS_WITH', 'ENDS_WITH_CI'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*"), operandr=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), operator=+)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CONTAINS', 'CONTAINS_CI'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*"), operandr=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*"), operator=+)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported search method: "), operandr=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroupsException, sub_type=None)), label=None)])], expression=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[List], rslt] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=y, selectors=[MethodInvocation(arguments=[MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=y, selectors=[], type_arguments=None), name=keys)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IEntityGroup, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntityIdentifier, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rslt, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=k)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getKeysByUpperCaseName, postfix_operators=[], prefix_operators=[], qualifier=groupsTree, selectors=[MethodInvocation(arguments=[], member=entrySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=y)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[call[rslt.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=rslt, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntityIdentifier, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EntityIdentifier] operator[SEP] operator[SEP] identifier[searchForGroups] operator[SEP] identifier[String] identifier[query] , identifier[SearchMethod] identifier[method] , identifier[Class] identifier[leaftype] operator[SEP] Keyword[throws] identifier[GroupsException] { Keyword[if] operator[SEP] identifier[isTreeRefreshRequired] operator[SEP] operator[SEP] operator[SEP] { identifier[refreshTree] operator[SEP] operator[SEP] operator[SEP] } identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[query] , identifier[method] , identifier[leaftype] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[IEntityGroup] identifier[root] operator[=] identifier[getRootGroup] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[leaftype] operator[SEP] identifier[equals] operator[SEP] identifier[root] operator[SEP] identifier[getLeafType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[EntityIdentifier] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[final] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[specials] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } } operator[SEP] Keyword[for] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[s] operator[:] identifier[specials] operator[SEP] { identifier[query] operator[=] identifier[query] operator[SEP] identifier[replace] operator[SEP] identifier[s] operator[SEP] Other[0] operator[SEP] , identifier[s] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[regex] operator[SEP] Keyword[switch] operator[SEP] identifier[method] operator[SEP] { Keyword[case] identifier[DISCRETE] operator[:] Keyword[case] identifier[DISCRETE_CI] operator[:] identifier[regex] operator[=] identifier[query] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[STARTS_WITH] operator[:] Keyword[case] identifier[STARTS_WITH_CI] operator[:] identifier[regex] operator[=] identifier[query] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ENDS_WITH] operator[:] Keyword[case] identifier[ENDS_WITH_CI] operator[:] identifier[regex] operator[=] literal[String] operator[+] identifier[query] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CONTAINS] operator[:] Keyword[case] identifier[CONTAINS_CI] operator[:] identifier[regex] operator[=] literal[String] operator[+] identifier[query] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[method] operator[SEP] Keyword[throw] Keyword[new] identifier[GroupsException] operator[SEP] identifier[msg] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[EntityIdentifier] operator[>] identifier[rslt] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[y] operator[:] identifier[groupsTree] operator[SEP] identifier[getKeysByUpperCaseName] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[y] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] identifier[regex] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[keys] operator[=] identifier[y] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[k] operator[:] identifier[keys] operator[SEP] { identifier[rslt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[EntityIdentifier] operator[SEP] identifier[k] , identifier[IEntityGroup] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[rslt] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[EntityIdentifier] operator[SEP] identifier[rslt] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static MatrixFunction asMulFunction(final double arg) { return new MatrixFunction() { @Override public double evaluate(int i, int j, double value) { return value * arg; } }; }
class class_name[name] begin[{] method[asMulFunction, return_type[type[MatrixFunction]], modifier[public static], parameter[arg]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), label=None)], documentation=None, modifiers={'public'}, name=evaluate, parameters=[FormalParameter(annotations=[], modifiers=set(), name=i, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=j, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=value, type=BasicType(dimensions=[], name=double), varargs=False)], return_type=BasicType(dimensions=[], name=double), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MatrixFunction, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MatrixFunction] identifier[asMulFunction] operator[SEP] Keyword[final] Keyword[double] identifier[arg] operator[SEP] { Keyword[return] Keyword[new] identifier[MatrixFunction] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[evaluate] operator[SEP] Keyword[int] identifier[i] , Keyword[int] identifier[j] , Keyword[double] identifier[value] operator[SEP] { Keyword[return] identifier[value] operator[*] identifier[arg] operator[SEP] } } operator[SEP] }
@SuppressWarnings("unchecked") public void addFieldMsg(String key, String value) { if (key == null) { return; } Map<String, String> fieldMsgs = null; // 字段错误信息 if (!this.statusInfo.containsKey(WebResponseConstant.MESSAGE_FIELD)) { fieldMsgs = new HashMap<String, String>(); this.statusInfo.put(WebResponseConstant.MESSAGE_FIELD, fieldMsgs); } fieldMsgs = (Map<String, String>) (this.statusInfo.get(WebResponseConstant.MESSAGE_FIELD)); fieldMsgs.put(key, value); }
class class_name[name] begin[{] method[addFieldMsg, return_type[void], modifier[public], parameter[key, value]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Map], fieldMsgs] if[THIS[member[None.statusInfo]call[None.containsKey, parameter[member[WebResponseConstant.MESSAGE_FIELD]]]]] begin[{] assign[member[.fieldMsgs], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] THIS[member[None.statusInfo]call[None.put, parameter[member[WebResponseConstant.MESSAGE_FIELD], member[.fieldMsgs]]]] else begin[{] None end[}] assign[member[.fieldMsgs], Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))] call[fieldMsgs.put, parameter[member[.key], member[.value]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[addFieldMsg] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[fieldMsgs] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[statusInfo] operator[SEP] identifier[containsKey] operator[SEP] identifier[WebResponseConstant] operator[SEP] identifier[MESSAGE_FIELD] operator[SEP] operator[SEP] { identifier[fieldMsgs] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[statusInfo] operator[SEP] identifier[put] operator[SEP] identifier[WebResponseConstant] operator[SEP] identifier[MESSAGE_FIELD] , identifier[fieldMsgs] operator[SEP] operator[SEP] } identifier[fieldMsgs] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[statusInfo] operator[SEP] identifier[get] operator[SEP] identifier[WebResponseConstant] operator[SEP] identifier[MESSAGE_FIELD] operator[SEP] operator[SEP] operator[SEP] identifier[fieldMsgs] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] }
public List<Fighter> getFightersWithCompleteData() { return dryFighters.stream() .map(f -> { try { return sherdog.getFighter(f.getSherdogUrl()); } catch (IOException | ParseException | SherdogParserException e) { return null; } }) .filter(Objects::nonNull) .collect(Collectors.toList()); }
class class_name[name] begin[{] method[getFightersWithCompleteData, return_type[type[List]], modifier[public], parameter[]] begin[{] return[call[dryFighters.stream, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Fighter] operator[>] identifier[getFightersWithCompleteData] operator[SEP] operator[SEP] { Keyword[return] identifier[dryFighters] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[f] operator[->] { Keyword[try] { Keyword[return] identifier[sherdog] operator[SEP] identifier[getFighter] operator[SEP] identifier[f] operator[SEP] identifier[getSherdogUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] operator[|] identifier[ParseException] operator[|] identifier[SherdogParserException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Objects] operator[::] identifier[nonNull] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void stopDrag() { mPhysicsDragger.stopDrag(); mPhysicsContext.runOnPhysicsThread(new Runnable() { @Override public void run() { if (mRigidBodyDragMe != null) { NativePhysics3DWorld.stopDrag(getNative()); mRigidBodyDragMe = null; } } }); }
class class_name[name] begin[{] method[stopDrag, return_type[void], modifier[public], parameter[]] begin[{] call[mPhysicsDragger.stopDrag, parameter[]] call[mPhysicsContext.runOnPhysicsThread, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mRigidBodyDragMe, 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=[MethodInvocation(arguments=[], member=getNative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=stopDrag, postfix_operators=[], prefix_operators=[], qualifier=NativePhysics3DWorld, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mRigidBodyDragMe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopDrag] operator[SEP] operator[SEP] { identifier[mPhysicsDragger] operator[SEP] identifier[stopDrag] operator[SEP] operator[SEP] operator[SEP] identifier[mPhysicsContext] operator[SEP] identifier[runOnPhysicsThread] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mRigidBodyDragMe] operator[!=] Other[null] operator[SEP] { identifier[NativePhysics3DWorld] operator[SEP] identifier[stopDrag] operator[SEP] identifier[getNative] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mRigidBodyDragMe] operator[=] Other[null] operator[SEP] } } } operator[SEP] operator[SEP] }
public boolean canView(Space space) { List<String> permTypes = new ArrayList<String>(); permTypes.add(SpacePermission.VIEWSPACE_PERMISSION); return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, space); }
class class_name[name] begin[{] method[canView, return_type[type[boolean]], modifier[public], parameter[space]] begin[{] local_variable[type[List], permTypes] call[permTypes.add, parameter[member[SpacePermission.VIEWSPACE_PERMISSION]]] return[call[.getSpacePermissionManager, parameter[]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[canView] operator[SEP] identifier[Space] identifier[space] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[permTypes] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[permTypes] operator[SEP] identifier[add] operator[SEP] identifier[SpacePermission] operator[SEP] identifier[VIEWSPACE_PERMISSION] operator[SEP] operator[SEP] Keyword[return] identifier[getSpacePermissionManager] operator[SEP] operator[SEP] operator[SEP] identifier[hasPermissionForSpace] operator[SEP] identifier[getRemoteUser] operator[SEP] operator[SEP] , identifier[permTypes] , identifier[space] operator[SEP] operator[SEP] }
public void set(Property.Builder prop, Map<String, String> channelPropertyMap) { wrappedSubmit(new SetProperty(prop.toXml(), channelPropertyMap)); }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[prop, channelPropertyMap]] begin[{] call[.wrappedSubmit, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toXml, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[], type_arguments=None), MemberReference(member=channelPropertyMap, 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=SetProperty, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[Property] operator[SEP] identifier[Builder] identifier[prop] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[channelPropertyMap] operator[SEP] { identifier[wrappedSubmit] operator[SEP] Keyword[new] identifier[SetProperty] operator[SEP] identifier[prop] operator[SEP] identifier[toXml] operator[SEP] operator[SEP] , identifier[channelPropertyMap] operator[SEP] operator[SEP] operator[SEP] }
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Set nodeID this.nodeID = broker.getNodeID(); // Set components ServiceBrokerConfig cfg = broker.getConfig(); this.strategy = cfg.getStrategyFactory(); this.transporter = cfg.getTransporter(); this.executor = cfg.getExecutor(); }
class class_name[name] begin[{] method[started, return_type[void], modifier[public], parameter[broker]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=broker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=started, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[THIS[member[None.nodeID]], call[broker.getNodeID, parameter[]]] local_variable[type[ServiceBrokerConfig], cfg] assign[THIS[member[None.strategy]], call[cfg.getStrategyFactory, parameter[]]] assign[THIS[member[None.transporter]], call[cfg.getTransporter, parameter[]]] assign[THIS[member[None.executor]], call[cfg.getExecutor, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[started] operator[SEP] identifier[ServiceBroker] identifier[broker] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[started] operator[SEP] identifier[broker] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[nodeID] operator[=] identifier[broker] operator[SEP] identifier[getNodeID] operator[SEP] operator[SEP] operator[SEP] identifier[ServiceBrokerConfig] identifier[cfg] operator[=] identifier[broker] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[strategy] operator[=] identifier[cfg] operator[SEP] identifier[getStrategyFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transporter] operator[=] identifier[cfg] operator[SEP] identifier[getTransporter] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[executor] operator[=] identifier[cfg] operator[SEP] identifier[getExecutor] operator[SEP] operator[SEP] operator[SEP] }
public static LocalDateTime parse(final LocalDateTime type, CharSequence text, String pattern) { return LocalDateTime.parse(text, DateTimeFormatter.ofPattern(pattern)); }
class class_name[name] begin[{] method[parse, return_type[type[LocalDateTime]], modifier[public static], parameter[type, text, pattern]] begin[{] return[call[LocalDateTime.parse, parameter[member[.text], call[DateTimeFormatter.ofPattern, parameter[member[.pattern]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[LocalDateTime] identifier[parse] operator[SEP] Keyword[final] identifier[LocalDateTime] identifier[type] , identifier[CharSequence] identifier[text] , identifier[String] identifier[pattern] operator[SEP] { Keyword[return] identifier[LocalDateTime] operator[SEP] identifier[parse] operator[SEP] identifier[text] , identifier[DateTimeFormatter] operator[SEP] identifier[ofPattern] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] operator[SEP] }
private void handleServerChannel(JsonNode jsonChannel) { long channelId = jsonChannel.get("id").asLong(); long guildId = jsonChannel.get("guild_id").asLong(); ServerImpl server = api.getPossiblyUnreadyServerById(guildId).map(ServerImpl.class::cast).orElse(null); if (server == null) { return; } ServerChannelImpl channel = server.getChannelById(channelId).map(ServerChannelImpl.class::cast).orElse(null); if (channel == null) { return; } String oldName = channel.getName(); String newName = jsonChannel.get("name").asText(); if (!Objects.deepEquals(oldName, newName)) { channel.setName(newName); ServerChannelChangeNameEvent event = new ServerChannelChangeNameEventImpl(channel, newName, oldName); if (server.isReady()) { api.getEventDispatcher().dispatchServerChannelChangeNameEvent( (DispatchQueueSelector) channel.getServer(), channel.getServer(), channel, event); } } final AtomicBoolean areYouAffected = new AtomicBoolean(false); ChannelCategory oldCategory = channel.asCategorizable().flatMap(Categorizable::getCategory).orElse(null); ChannelCategory newCategory = jsonChannel.hasNonNull("parent_id") ? channel.getServer().getChannelCategoryById(jsonChannel.get("parent_id").asLong(-1)).orElse(null) : null; int oldRawPosition = channel.getRawPosition(); int newRawPosition = jsonChannel.get("position").asInt(); if (oldRawPosition != newRawPosition || !Objects.deepEquals(oldCategory, newCategory)) { int oldPosition = channel.getPosition(); if (channel instanceof ServerTextChannelImpl) { ((ServerTextChannelImpl) channel).setParentId(newCategory == null ? -1 : newCategory.getId()); } else if (channel instanceof ServerVoiceChannelImpl) { ((ServerVoiceChannelImpl) channel).setParentId(newCategory == null ? -1 : newCategory.getId()); } channel.setPosition(newRawPosition); int newPosition = channel.getPosition(); ServerChannelChangePositionEvent event = new ServerChannelChangePositionEventImpl( channel, newPosition, oldPosition, newRawPosition, oldRawPosition, newCategory, oldCategory); if (server.isReady()) { api.getEventDispatcher().dispatchServerChannelChangePositionEvent( (DispatchQueueSelector) channel.getServer(), channel.getServer(), channel, event); } } Collection<Long> rolesWithOverwrittenPermissions = new HashSet<>(); Collection<Long> usersWithOverwrittenPermissions = new HashSet<>(); if (jsonChannel.has("permission_overwrites") && !jsonChannel.get("permission_overwrites").isNull()) { for (JsonNode permissionOverwriteJson : jsonChannel.get("permission_overwrites")) { Permissions oldOverwrittenPermissions; DiscordEntity entity; ConcurrentHashMap<Long, Permissions> overwrittenPermissions = null; switch (permissionOverwriteJson.get("type").asText()) { case "role": entity = server.getRoleById(permissionOverwriteJson.get("id").asText()).orElseThrow(() -> new IllegalStateException("Received channel update event with unknown role!")); oldOverwrittenPermissions = channel.getOverwrittenPermissions((Role) entity); overwrittenPermissions = channel.getInternalOverwrittenRolePermissions(); rolesWithOverwrittenPermissions.add(entity.getId()); break; case "member": entity = api.getCachedUserById(permissionOverwriteJson.get("id").asText()).orElseThrow(() -> new IllegalStateException("Received channel update event with unknown user!")); oldOverwrittenPermissions = channel.getOverwrittenPermissions((User) entity); overwrittenPermissions = channel.getInternalOverwrittenUserPermissions(); usersWithOverwrittenPermissions.add(entity.getId()); break; default: throw new IllegalStateException("Permission overwrite object with unknown type: " + permissionOverwriteJson.toString()); } int allow = permissionOverwriteJson.get("allow").asInt(0); int deny = permissionOverwriteJson.get("deny").asInt(0); Permissions newOverwrittenPermissions = new PermissionsImpl(allow, deny); if (!newOverwrittenPermissions.equals(oldOverwrittenPermissions)) { overwrittenPermissions.put(entity.getId(), newOverwrittenPermissions); if (server.isReady()) { dispatchServerChannelChangeOverwrittenPermissionsEvent( channel, newOverwrittenPermissions, oldOverwrittenPermissions, entity); areYouAffected.compareAndSet(false, entity instanceof User && ((User) entity).isYourself()); areYouAffected.compareAndSet(false, entity instanceof Role && ((Role) entity).getUsers().stream().anyMatch(User::isYourself)); } } } } ConcurrentHashMap<Long, Permissions> overwrittenRolePermissions = null; ConcurrentHashMap<Long, Permissions> overwrittenUserPermissions = null; overwrittenRolePermissions = channel.getInternalOverwrittenRolePermissions(); overwrittenUserPermissions = channel.getInternalOverwrittenUserPermissions(); Iterator<Map.Entry<Long, Permissions>> userIt = overwrittenUserPermissions.entrySet().iterator(); while (userIt.hasNext()) { Map.Entry<Long, Permissions> entry = userIt.next(); if (usersWithOverwrittenPermissions.contains(entry.getKey())) { continue; } api.getCachedUserById(entry.getKey()).ifPresent(user -> { Permissions oldPermissions = entry.getValue(); userIt.remove(); if (server.isReady()) { dispatchServerChannelChangeOverwrittenPermissionsEvent( channel, PermissionsImpl.EMPTY_PERMISSIONS, oldPermissions, user); areYouAffected.compareAndSet(false, user.isYourself()); } }); } Iterator<Map.Entry<Long, Permissions>> roleIt = overwrittenRolePermissions.entrySet().iterator(); while (roleIt.hasNext()) { Map.Entry<Long, Permissions> entry = roleIt.next(); if (rolesWithOverwrittenPermissions.contains(entry.getKey())) { continue; } api.getRoleById(entry.getKey()).ifPresent(role -> { Permissions oldPermissions = entry.getValue(); roleIt.remove(); if (server.isReady()) { dispatchServerChannelChangeOverwrittenPermissionsEvent( channel, PermissionsImpl.EMPTY_PERMISSIONS, oldPermissions, role); areYouAffected.compareAndSet(false, role.getUsers().stream().anyMatch(User::isYourself)); } }); } if (areYouAffected.get() && !channel.canYouSee()) { api.forEachCachedMessageWhere( msg -> msg.getChannel().getId() == channelId, msg -> api.removeMessageFromCache(msg.getId()) ); } }
class class_name[name] begin[{] method[handleServerChannel, return_type[void], modifier[private], parameter[jsonChannel]] begin[{] local_variable[type[long], channelId] local_variable[type[long], guildId] local_variable[type[ServerImpl], server] if[binary_operation[member[.server], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ServerChannelImpl], channel] if[binary_operation[member[.channel], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], oldName] local_variable[type[String], newName] if[call[Objects.deepEquals, parameter[member[.oldName], member[.newName]]]] begin[{] call[channel.setName, parameter[member[.newName]]] local_variable[type[ServerChannelChangeNameEvent], event] if[call[server.isReady, parameter[]]] begin[{] call[api.getEventDispatcher, parameter[]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[AtomicBoolean], areYouAffected] local_variable[type[ChannelCategory], oldCategory] local_variable[type[ChannelCategory], newCategory] local_variable[type[int], oldRawPosition] local_variable[type[int], newRawPosition] if[binary_operation[binary_operation[member[.oldRawPosition], !=, member[.newRawPosition]], ||, call[Objects.deepEquals, parameter[member[.oldCategory], member[.newCategory]]]]] begin[{] local_variable[type[int], oldPosition] if[binary_operation[member[.channel], instanceof, type[ServerTextChannelImpl]]] begin[{] Cast(expression=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ServerTextChannelImpl, sub_type=None)) else begin[{] if[binary_operation[member[.channel], instanceof, type[ServerVoiceChannelImpl]]] begin[{] Cast(expression=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ServerVoiceChannelImpl, sub_type=None)) else begin[{] None end[}] end[}] call[channel.setPosition, parameter[member[.newRawPosition]]] local_variable[type[int], newPosition] local_variable[type[ServerChannelChangePositionEvent], event] if[call[server.isReady, parameter[]]] begin[{] call[api.getEventDispatcher, parameter[]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Collection], rolesWithOverwrittenPermissions] local_variable[type[Collection], usersWithOverwrittenPermissions] if[binary_operation[call[jsonChannel.has, parameter[literal["permission_overwrites"]]], &&, call[jsonChannel.get, parameter[literal["permission_overwrites"]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=oldOverwrittenPermissions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Permissions, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=entity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DiscordEntity, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=overwrittenPermissions)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Permissions, sub_type=None))], dimensions=[], name=ConcurrentHashMap, sub_type=None)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="role")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="id")], member=get, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, selectors=[MethodInvocation(arguments=[], member=asText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getRoleById, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[MethodInvocation(arguments=[LambdaExpression(body=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Received channel update event with unknown role!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), parameters=[])], member=orElseThrow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=oldOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Role, sub_type=None))], member=getOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=overwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInternalOverwrittenRolePermissions, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=rolesWithOverwrittenPermissions, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="member")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="id")], member=get, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, selectors=[MethodInvocation(arguments=[], member=asText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getCachedUserById, postfix_operators=[], prefix_operators=[], qualifier=api, selectors=[MethodInvocation(arguments=[LambdaExpression(body=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Received channel update event with unknown user!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), parameters=[])], member=orElseThrow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=oldOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=User, sub_type=None))], member=getOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=overwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInternalOverwrittenUserPermissions, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=usersWithOverwrittenPermissions, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Permission overwrite object with unknown type: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, 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)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="type")], member=get, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, selectors=[MethodInvocation(arguments=[], member=asText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allow")], member=get, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=asInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=allow)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="deny")], member=get, postfix_operators=[], prefix_operators=[], qualifier=permissionOverwriteJson, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=asInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=deny)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=allow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deny, 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=PermissionsImpl, sub_type=None)), name=newOverwrittenPermissions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Permissions, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=oldOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=newOverwrittenPermissions, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None), MemberReference(member=newOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=overwrittenPermissions, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isReady, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oldOverwrittenPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dispatchServerChannelChangeOverwrittenPermissionsEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=User, sub_type=None), operator=instanceof), operandr=Cast(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=User, sub_type=None)), operator=&&)], member=compareAndSet, postfix_operators=[], prefix_operators=[], qualifier=areYouAffected, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Role, sub_type=None), operator=instanceof), operandr=Cast(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Role, sub_type=None)), operator=&&)], member=compareAndSet, postfix_operators=[], prefix_operators=[], qualifier=areYouAffected, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="permission_overwrites")], member=get, postfix_operators=[], prefix_operators=[], qualifier=jsonChannel, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=permissionOverwriteJson)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[ConcurrentHashMap], overwrittenRolePermissions] local_variable[type[ConcurrentHashMap], overwrittenUserPermissions] assign[member[.overwrittenRolePermissions], call[channel.getInternalOverwrittenRolePermissions, parameter[]]] assign[member[.overwrittenUserPermissions], call[channel.getInternalOverwrittenUserPermissions, parameter[]]] local_variable[type[Iterator], userIt] while[call[userIt.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] if[call[usersWithOverwrittenPermissions.contains, parameter[call[entry.getKey, parameter[]]]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] call[api.getCachedUserById, parameter[call[entry.getKey, parameter[]]]] end[}] local_variable[type[Iterator], roleIt] while[call[roleIt.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] if[call[rolesWithOverwrittenPermissions.contains, parameter[call[entry.getKey, parameter[]]]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] call[api.getRoleById, parameter[call[entry.getKey, parameter[]]]] end[}] if[binary_operation[call[areYouAffected.get, parameter[]], &&, call[channel.canYouSee, parameter[]]]] begin[{] call[api.forEachCachedMessageWhere, parameter[LambdaExpression(body=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getChannel, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=channelId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), parameters=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], member=removeMessageFromCache, postfix_operators=[], prefix_operators=[], qualifier=api, selectors=[], type_arguments=None), parameters=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[handleServerChannel] operator[SEP] identifier[JsonNode] identifier[jsonChannel] operator[SEP] { Keyword[long] identifier[channelId] operator[=] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asLong] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[guildId] operator[=] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asLong] operator[SEP] operator[SEP] operator[SEP] identifier[ServerImpl] identifier[server] operator[=] identifier[api] operator[SEP] identifier[getPossiblyUnreadyServerById] operator[SEP] identifier[guildId] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[ServerImpl] operator[SEP] Keyword[class] operator[::] identifier[cast] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[ServerChannelImpl] identifier[channel] operator[=] identifier[server] operator[SEP] identifier[getChannelById] operator[SEP] identifier[channelId] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[ServerChannelImpl] operator[SEP] Keyword[class] operator[::] identifier[cast] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channel] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[String] identifier[oldName] operator[=] identifier[channel] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[newName] operator[=] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[deepEquals] operator[SEP] identifier[oldName] , identifier[newName] operator[SEP] operator[SEP] { identifier[channel] operator[SEP] identifier[setName] operator[SEP] identifier[newName] operator[SEP] operator[SEP] identifier[ServerChannelChangeNameEvent] identifier[event] operator[=] Keyword[new] identifier[ServerChannelChangeNameEventImpl] operator[SEP] identifier[channel] , identifier[newName] , identifier[oldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { identifier[api] operator[SEP] identifier[getEventDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[dispatchServerChannelChangeNameEvent] operator[SEP] operator[SEP] identifier[DispatchQueueSelector] operator[SEP] identifier[channel] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] , identifier[channel] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] , identifier[channel] , identifier[event] operator[SEP] operator[SEP] } } Keyword[final] identifier[AtomicBoolean] identifier[areYouAffected] operator[=] Keyword[new] identifier[AtomicBoolean] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ChannelCategory] identifier[oldCategory] operator[=] identifier[channel] operator[SEP] identifier[asCategorizable] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] identifier[Categorizable] operator[::] identifier[getCategory] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[ChannelCategory] identifier[newCategory] operator[=] identifier[jsonChannel] operator[SEP] identifier[hasNonNull] operator[SEP] literal[String] operator[SEP] operator[?] identifier[channel] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] operator[SEP] identifier[getChannelCategoryById] operator[SEP] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asLong] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[int] identifier[oldRawPosition] operator[=] identifier[channel] operator[SEP] identifier[getRawPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[newRawPosition] operator[=] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldRawPosition] operator[!=] identifier[newRawPosition] operator[||] operator[!] identifier[Objects] operator[SEP] identifier[deepEquals] operator[SEP] identifier[oldCategory] , identifier[newCategory] operator[SEP] operator[SEP] { Keyword[int] identifier[oldPosition] operator[=] identifier[channel] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channel] Keyword[instanceof] identifier[ServerTextChannelImpl] operator[SEP] { operator[SEP] operator[SEP] identifier[ServerTextChannelImpl] operator[SEP] identifier[channel] operator[SEP] operator[SEP] identifier[setParentId] operator[SEP] identifier[newCategory] operator[==] Other[null] operator[?] operator[-] Other[1] operator[:] identifier[newCategory] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[channel] Keyword[instanceof] identifier[ServerVoiceChannelImpl] operator[SEP] { operator[SEP] operator[SEP] identifier[ServerVoiceChannelImpl] operator[SEP] identifier[channel] operator[SEP] operator[SEP] identifier[setParentId] operator[SEP] identifier[newCategory] operator[==] Other[null] operator[?] operator[-] Other[1] operator[:] identifier[newCategory] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[channel] operator[SEP] identifier[setPosition] operator[SEP] identifier[newRawPosition] operator[SEP] operator[SEP] Keyword[int] identifier[newPosition] operator[=] identifier[channel] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[SEP] identifier[ServerChannelChangePositionEvent] identifier[event] operator[=] Keyword[new] identifier[ServerChannelChangePositionEventImpl] operator[SEP] identifier[channel] , identifier[newPosition] , identifier[oldPosition] , identifier[newRawPosition] , identifier[oldRawPosition] , identifier[newCategory] , identifier[oldCategory] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { identifier[api] operator[SEP] identifier[getEventDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[dispatchServerChannelChangePositionEvent] operator[SEP] operator[SEP] identifier[DispatchQueueSelector] operator[SEP] identifier[channel] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] , identifier[channel] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] , identifier[channel] , identifier[event] operator[SEP] operator[SEP] } } identifier[Collection] operator[<] identifier[Long] operator[>] identifier[rolesWithOverwrittenPermissions] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Long] operator[>] identifier[usersWithOverwrittenPermissions] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jsonChannel] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[isNull] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[JsonNode] identifier[permissionOverwriteJson] operator[:] identifier[jsonChannel] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[Permissions] identifier[oldOverwrittenPermissions] operator[SEP] identifier[DiscordEntity] identifier[entity] operator[SEP] identifier[ConcurrentHashMap] operator[<] identifier[Long] , identifier[Permissions] operator[>] identifier[overwrittenPermissions] operator[=] Other[null] operator[SEP] Keyword[switch] operator[SEP] identifier[permissionOverwriteJson] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[entity] operator[=] identifier[server] operator[SEP] identifier[getRoleById] operator[SEP] identifier[permissionOverwriteJson] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[orElseThrow] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[oldOverwrittenPermissions] operator[=] identifier[channel] operator[SEP] identifier[getOverwrittenPermissions] operator[SEP] operator[SEP] identifier[Role] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[overwrittenPermissions] operator[=] identifier[channel] operator[SEP] identifier[getInternalOverwrittenRolePermissions] operator[SEP] operator[SEP] operator[SEP] identifier[rolesWithOverwrittenPermissions] operator[SEP] identifier[add] operator[SEP] identifier[entity] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[entity] operator[=] identifier[api] operator[SEP] identifier[getCachedUserById] operator[SEP] identifier[permissionOverwriteJson] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[orElseThrow] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[oldOverwrittenPermissions] operator[=] identifier[channel] operator[SEP] identifier[getOverwrittenPermissions] operator[SEP] operator[SEP] identifier[User] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[overwrittenPermissions] operator[=] identifier[channel] operator[SEP] identifier[getInternalOverwrittenUserPermissions] operator[SEP] operator[SEP] operator[SEP] identifier[usersWithOverwrittenPermissions] operator[SEP] identifier[add] operator[SEP] identifier[entity] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[permissionOverwriteJson] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[allow] operator[=] identifier[permissionOverwriteJson] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[deny] operator[=] identifier[permissionOverwriteJson] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Permissions] identifier[newOverwrittenPermissions] operator[=] Keyword[new] identifier[PermissionsImpl] operator[SEP] identifier[allow] , identifier[deny] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[newOverwrittenPermissions] operator[SEP] identifier[equals] operator[SEP] identifier[oldOverwrittenPermissions] operator[SEP] operator[SEP] { identifier[overwrittenPermissions] operator[SEP] identifier[put] operator[SEP] identifier[entity] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[newOverwrittenPermissions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { identifier[dispatchServerChannelChangeOverwrittenPermissionsEvent] operator[SEP] identifier[channel] , identifier[newOverwrittenPermissions] , identifier[oldOverwrittenPermissions] , identifier[entity] operator[SEP] operator[SEP] identifier[areYouAffected] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , identifier[entity] Keyword[instanceof] identifier[User] operator[&&] operator[SEP] operator[SEP] identifier[User] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[isYourself] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[areYouAffected] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , identifier[entity] Keyword[instanceof] identifier[Role] operator[&&] operator[SEP] operator[SEP] identifier[Role] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[getUsers] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[anyMatch] operator[SEP] identifier[User] operator[::] identifier[isYourself] operator[SEP] operator[SEP] operator[SEP] } } } } identifier[ConcurrentHashMap] operator[<] identifier[Long] , identifier[Permissions] operator[>] identifier[overwrittenRolePermissions] operator[=] Other[null] operator[SEP] identifier[ConcurrentHashMap] operator[<] identifier[Long] , identifier[Permissions] operator[>] identifier[overwrittenUserPermissions] operator[=] Other[null] operator[SEP] identifier[overwrittenRolePermissions] operator[=] identifier[channel] operator[SEP] identifier[getInternalOverwrittenRolePermissions] operator[SEP] operator[SEP] operator[SEP] identifier[overwrittenUserPermissions] operator[=] identifier[channel] operator[SEP] identifier[getInternalOverwrittenUserPermissions] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[Permissions] operator[>] operator[>] identifier[userIt] operator[=] identifier[overwrittenUserPermissions] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[userIt] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[Permissions] operator[>] identifier[entry] operator[=] identifier[userIt] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[usersWithOverwrittenPermissions] operator[SEP] identifier[contains] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[api] operator[SEP] identifier[getCachedUserById] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[user] operator[->] { identifier[Permissions] identifier[oldPermissions] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[userIt] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { identifier[dispatchServerChannelChangeOverwrittenPermissionsEvent] operator[SEP] identifier[channel] , identifier[PermissionsImpl] operator[SEP] identifier[EMPTY_PERMISSIONS] , identifier[oldPermissions] , identifier[user] operator[SEP] operator[SEP] identifier[areYouAffected] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , identifier[user] operator[SEP] identifier[isYourself] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[Permissions] operator[>] operator[>] identifier[roleIt] operator[=] identifier[overwrittenRolePermissions] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[roleIt] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[Permissions] operator[>] identifier[entry] operator[=] identifier[roleIt] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rolesWithOverwrittenPermissions] operator[SEP] identifier[contains] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[api] operator[SEP] identifier[getRoleById] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[role] operator[->] { identifier[Permissions] identifier[oldPermissions] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[roleIt] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { identifier[dispatchServerChannelChangeOverwrittenPermissionsEvent] operator[SEP] identifier[channel] , identifier[PermissionsImpl] operator[SEP] identifier[EMPTY_PERMISSIONS] , identifier[oldPermissions] , identifier[role] operator[SEP] operator[SEP] identifier[areYouAffected] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , identifier[role] operator[SEP] identifier[getUsers] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[anyMatch] operator[SEP] identifier[User] operator[::] identifier[isYourself] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[areYouAffected] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[channel] operator[SEP] identifier[canYouSee] operator[SEP] operator[SEP] operator[SEP] { identifier[api] operator[SEP] identifier[forEachCachedMessageWhere] operator[SEP] identifier[msg] operator[->] identifier[msg] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[==] identifier[channelId] , identifier[msg] operator[->] identifier[api] operator[SEP] identifier[removeMessageFromCache] operator[SEP] identifier[msg] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static BucketsSample sampleBuckets(Stopwatch stopwatch) { final Buckets buckets = getBuckets(stopwatch); return buckets == null ? null : buckets.sample(); }
class class_name[name] begin[{] method[sampleBuckets, return_type[type[BucketsSample]], modifier[public static], parameter[stopwatch]] begin[{] local_variable[type[Buckets], buckets] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=buckets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=sample, postfix_operators=[], prefix_operators=[], qualifier=buckets, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BucketsSample] identifier[sampleBuckets] operator[SEP] identifier[Stopwatch] identifier[stopwatch] operator[SEP] { Keyword[final] identifier[Buckets] identifier[buckets] operator[=] identifier[getBuckets] operator[SEP] identifier[stopwatch] operator[SEP] operator[SEP] Keyword[return] identifier[buckets] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[buckets] operator[SEP] identifier[sample] operator[SEP] operator[SEP] operator[SEP] }
public String getText(String key) throws MissingResourceException { initBundles(); if (docletBundle.containsKey(key)) return docletBundle.getString(key); return commonBundle.getString(key); }
class class_name[name] begin[{] method[getText, return_type[type[String]], modifier[public], parameter[key]] begin[{] call[.initBundles, parameter[]] if[call[docletBundle.containsKey, parameter[member[.key]]]] begin[{] return[call[docletBundle.getString, parameter[member[.key]]]] else begin[{] None end[}] return[call[commonBundle.getString, parameter[member[.key]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getText] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[MissingResourceException] { identifier[initBundles] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[docletBundle] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[docletBundle] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[commonBundle] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
private void writeAssocBeanConstructor() { writer.append(" public Q%s(String name, R root) {", shortName).eol(); writer.append(" super(name, root);").eol(); writer.append(" }").eol(); }
class class_name[name] begin[{] method[writeAssocBeanConstructor, return_type[void], modifier[private], parameter[]] begin[{] call[writer.append, parameter[literal[" public Q%s(String name, R root) {"], member[.shortName]]] call[writer.append, parameter[literal[" super(name, root);"]]] call[writer.append, parameter[literal[" }"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[writeAssocBeanConstructor] operator[SEP] operator[SEP] { identifier[writer] operator[SEP] identifier[append] operator[SEP] literal[String] , identifier[shortName] operator[SEP] operator[SEP] identifier[eol] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eol] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eol] operator[SEP] operator[SEP] operator[SEP] }
protected void memberEnter(JCTree tree, Env<AttrContext> env) { Env<AttrContext> prevEnv = this.env; try { this.env = env; tree.accept(this); } catch (CompletionFailure ex) { chk.completionError(tree.pos(), ex); } finally { this.env = prevEnv; } }
class class_name[name] begin[{] method[memberEnter, return_type[void], modifier[protected], parameter[tree, env]] begin[{] local_variable[type[Env], prevEnv] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=env, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=env, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=pos, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=completionError, postfix_operators=[], prefix_operators=[], qualifier=chk, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['CompletionFailure']))], finally_block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=env, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=prevEnv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[memberEnter] operator[SEP] identifier[JCTree] identifier[tree] , identifier[Env] operator[<] identifier[AttrContext] operator[>] identifier[env] operator[SEP] { identifier[Env] operator[<] identifier[AttrContext] operator[>] identifier[prevEnv] operator[=] Keyword[this] operator[SEP] identifier[env] operator[SEP] Keyword[try] { Keyword[this] operator[SEP] identifier[env] operator[=] identifier[env] operator[SEP] identifier[tree] operator[SEP] identifier[accept] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CompletionFailure] identifier[ex] operator[SEP] { identifier[chk] operator[SEP] identifier[completionError] operator[SEP] identifier[tree] operator[SEP] identifier[pos] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[env] operator[=] identifier[prevEnv] operator[SEP] } }
public void setParameterOverrides(java.util.Collection<Parameter> parameterOverrides) { if (parameterOverrides == null) { this.parameterOverrides = null; return; } this.parameterOverrides = new com.amazonaws.internal.SdkInternalList<Parameter>(parameterOverrides); }
class class_name[name] begin[{] method[setParameterOverrides, return_type[void], modifier[public], parameter[parameterOverrides]] begin[{] if[binary_operation[member[.parameterOverrides], ==, literal[null]]] begin[{] assign[THIS[member[None.parameterOverrides]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.parameterOverrides]], ClassCreator(arguments=[MemberReference(member=parameterOverrides, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setParameterOverrides] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Parameter] operator[>] identifier[parameterOverrides] operator[SEP] { Keyword[if] operator[SEP] identifier[parameterOverrides] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[parameterOverrides] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[parameterOverrides] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[Parameter] operator[>] operator[SEP] identifier[parameterOverrides] operator[SEP] operator[SEP] }
public void print(Printable painter) { printer.setPrintable(painter); if (printer.printDialog(printAttributes)) { try { printer.print(printAttributes); } catch (PrinterException ex) { logger.error("Failed to print", ex); JOptionPane.showMessageDialog(null, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } }
class class_name[name] begin[{] method[print, return_type[void], modifier[public], parameter[painter]] begin[{] call[printer.setPrintable, parameter[member[.painter]]] if[call[printer.printDialog, parameter[member[.printAttributes]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=printAttributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=print, postfix_operators=[], prefix_operators=[], qualifier=printer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to print"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error"), MemberReference(member=ERROR_MESSAGE, postfix_operators=[], prefix_operators=[], qualifier=JOptionPane, selectors=[])], member=showMessageDialog, postfix_operators=[], prefix_operators=[], qualifier=JOptionPane, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['PrinterException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[print] operator[SEP] identifier[Printable] identifier[painter] operator[SEP] { identifier[printer] operator[SEP] identifier[setPrintable] operator[SEP] identifier[painter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[printer] operator[SEP] identifier[printDialog] operator[SEP] identifier[printAttributes] operator[SEP] operator[SEP] { Keyword[try] { identifier[printer] operator[SEP] identifier[print] operator[SEP] identifier[printAttributes] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PrinterException] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] identifier[JOptionPane] operator[SEP] identifier[showMessageDialog] operator[SEP] Other[null] , identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , literal[String] , identifier[JOptionPane] operator[SEP] identifier[ERROR_MESSAGE] operator[SEP] operator[SEP] } } }
private static void combineParameters(List<Parameter> parameters, List<Parameter> otherParameters) { if (otherParameters != null && otherParameters.size() > 0) { Map<String, Parameter> map = new HashMap<>(); for (Parameter parameter : parameters) { map.put(parameter.getName(), parameter); } for (Parameter otherParameter : otherParameters) { String name = otherParameter.getName(); Parameter original = map.get(name); if (original == null) { parameters.add(otherParameter); } else { if (StringUtils.isNotBlank(original.getValue())) { original.setValue(otherParameter.getValue()); } } } } }
class class_name[name] begin[{] method[combineParameters, return_type[void], modifier[private static], parameter[parameters, otherParameters]] begin[{] if[binary_operation[binary_operation[member[.otherParameters], !=, literal[null]], &&, binary_operation[call[otherParameters.size, parameter[]], >, literal[0]]]] begin[{] local_variable[type[Map], map] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=parameter, selectors=[], type_arguments=None), MemberReference(member=parameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parameter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=otherParameter, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), name=original)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=original, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=original, selectors=[], type_arguments=None)], member=isNotBlank, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=otherParameter, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=original, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherParameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=otherParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=otherParameter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[combineParameters] operator[SEP] identifier[List] operator[<] identifier[Parameter] operator[>] identifier[parameters] , identifier[List] operator[<] identifier[Parameter] operator[>] identifier[otherParameters] operator[SEP] { Keyword[if] operator[SEP] identifier[otherParameters] operator[!=] Other[null] operator[&&] identifier[otherParameters] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Parameter] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Parameter] identifier[parameter] operator[:] identifier[parameters] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[parameter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[parameter] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Parameter] identifier[otherParameter] operator[:] identifier[otherParameters] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[otherParameter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Parameter] identifier[original] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[original] operator[==] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[add] operator[SEP] identifier[otherParameter] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[original] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[original] operator[SEP] identifier[setValue] operator[SEP] identifier[otherParameter] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } }
private void readLinks2DMTypes() throws CacheReloadException { Connection con = null; try { final List<Long> values = new ArrayList<>(); con = Context.getConnection(); PreparedStatement stmt = null; try { stmt = con.prepareStatement(AccessSet.SQL_SET2DMTYPE); stmt.setObject(1, getId()); final ResultSet rs = stmt.executeQuery(); while (rs.next()) { values.add(rs.getLong(1)); } rs.close(); } finally { if (stmt != null) { stmt.close(); } } con.commit(); for (final Long dataModelTypeId : values) { final Type dataModelType = Type.get(dataModelTypeId); if (dataModelType == null) { AccessSet.LOG.error("could not found data model type with id " + "'" + dataModelTypeId + "'"); } else { AccessSet.LOG.debug( "read link from AccessSet '{}' (id = {}, uuid = {}) to DataModelType '{}' (id = {} uuid = {})", getName(), getId(), getUUID(), dataModelType.getName(), dataModelType.getId(), dataModelType.getUUID()); this.dataModelTypes.add(dataModelType.getId()); dataModelType.addAccessSet(this); } } } catch (final SQLException e) { throw new CacheReloadException("could not read roles", e); } catch (final EFapsException e) { throw new CacheReloadException("could not read roles", e); } finally { try { if (con != null && !con.isClosed()) { con.close(); } } catch (final SQLException e) { throw new CacheReloadException("Cannot read a type for an attribute.", e); } } }
class class_name[name] begin[{] method[readLinks2DMTypes, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Connection], con] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=values)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=con, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=stmt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PreparedStatement, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=SQL_SET2DMTYPE, postfix_operators=[], prefix_operators=[], qualifier=AccessSet, selectors=[])], member=prepareStatement, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setObject, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=executeQuery, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), name=rs)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ResultSet, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stmt, 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=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=commit, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=dataModelTypeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[], type_arguments=None), name=dataModelType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dataModelType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="read link from AccessSet '{}' (id = {}, uuid = {}) to DataModelType '{}' (id = {} uuid = {})"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUUID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=dataModelType, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=dataModelType, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUUID, postfix_operators=[], prefix_operators=[], qualifier=dataModelType, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=AccessSet.LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=dataModelTypes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=dataModelType, selectors=[], type_arguments=None)], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addAccessSet, postfix_operators=[], prefix_operators=[], qualifier=dataModelType, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not found data model type with id "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), operandr=MemberReference(member=dataModelTypeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=AccessSet.LOG, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dataModelTypeId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not read roles"), 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=CacheReloadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not read roles"), 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=CacheReloadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EFapsException']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=con, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isClosed, postfix_operators=[], prefix_operators=['!'], qualifier=con, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot read a type for an attribute."), 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=CacheReloadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readLinks2DMTypes] operator[SEP] operator[SEP] Keyword[throws] identifier[CacheReloadException] { identifier[Connection] identifier[con] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[final] identifier[List] operator[<] identifier[Long] operator[>] identifier[values] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[con] operator[=] identifier[Context] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[PreparedStatement] identifier[stmt] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[stmt] operator[=] identifier[con] operator[SEP] identifier[prepareStatement] operator[SEP] identifier[AccessSet] operator[SEP] identifier[SQL_SET2DMTYPE] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[setObject] operator[SEP] Other[1] , identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ResultSet] identifier[rs] operator[=] identifier[stmt] operator[SEP] identifier[executeQuery] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[rs] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[rs] operator[SEP] identifier[getLong] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } identifier[rs] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[stmt] operator[!=] Other[null] operator[SEP] { identifier[stmt] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } identifier[con] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Long] identifier[dataModelTypeId] operator[:] identifier[values] operator[SEP] { Keyword[final] identifier[Type] identifier[dataModelType] operator[=] identifier[Type] operator[SEP] identifier[get] operator[SEP] identifier[dataModelTypeId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataModelType] operator[==] Other[null] operator[SEP] { identifier[AccessSet] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[dataModelTypeId] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[AccessSet] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[getName] operator[SEP] operator[SEP] , identifier[getId] operator[SEP] operator[SEP] , identifier[getUUID] operator[SEP] operator[SEP] , identifier[dataModelType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[dataModelType] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[dataModelType] operator[SEP] identifier[getUUID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[dataModelTypes] operator[SEP] identifier[add] operator[SEP] identifier[dataModelType] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dataModelType] operator[SEP] identifier[addAccessSet] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] Keyword[final] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheReloadException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[EFapsException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheReloadException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[con] operator[!=] Other[null] operator[&&] operator[!] identifier[con] operator[SEP] identifier[isClosed] operator[SEP] operator[SEP] operator[SEP] { identifier[con] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheReloadException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
public boolean handleNext() { AJP13RequestPacket packet=null; HttpRequest request=getRequest(); HttpResponse response=getResponse(); HttpContext context=null; boolean gotRequest=false; _persistent=true; _keepAlive=true; try { try { packet=null; packet=_ajpIn.nextPacket(); if (packet==null) return false; if (packet.getDataSize()==0) return true; } catch (IOException e) { LogSupport.ignore(log,e); return false; } int type=packet.getByte(); if (log.isDebugEnabled()) log.debug("AJP13 type="+type+" size="+packet.unconsumedData()); switch (type) { case AJP13Packet.__FORWARD_REQUEST: request.setTimeStamp(System.currentTimeMillis()); request.setState(HttpMessage.__MSG_EDITABLE); request.setMethod(packet.getMethod()); request.setVersion(packet.getString()); String version=packet.getString(); try { request.setVersion(version); } catch(Exception e) { log.warn("Bad version"+version,e); log.warn(packet.toString()); } String path=packet.getString(); int sc=path.lastIndexOf(";"); if (sc<0) request.setPath(URI.encodePath(path)); else request.setPath(URI.encodePath(path.substring(0,sc))+path.substring(sc)); _remoteAddr=packet.getString(); _remoteHost=packet.getString(); _serverName=packet.getString(); _serverPort=packet.getInt(); _isSSL=packet.getBoolean(); // Check keep alive _keepAlive=request.getDotVersion()>=1; // Headers int h=packet.getInt(); for (int i=0; i<h; i++) { String hdr=packet.getHeader(); String val=packet.getString(); request.addField(hdr,val); if (!_keepAlive&&hdr.equalsIgnoreCase(HttpFields.__Connection)&&val.equalsIgnoreCase(HttpFields.__KeepAlive)) _keepAlive=true; } // Handler other attributes byte attr=packet.getByte(); while ((0xFF&attr)!=0xFF) { String value=(attr==11)?null:packet.getString(); switch (attr) { case 11: // key size request.setAttribute("javax.servlet.request.key_size",new Integer(packet.getInt())); break; case 10: // request attribute request.setAttribute(value,packet.getString()); break; case 9: // SSL session request.setAttribute("javax.servlet.request.ssl_session",value); break; case 8: // SSL cipher request.setAttribute("javax.servlet.request.cipher_suite",value); break; case 7: // SSL cert // request.setAttribute("javax.servlet.request.X509Certificate",value); CertificateFactory cf=CertificateFactory.getInstance("X.509"); InputStream certstream=new ByteArrayInputStream(value.getBytes()); X509Certificate cert=(X509Certificate)cf.generateCertificate(certstream); X509Certificate certs[]= { cert }; request.setAttribute("javax.servlet.request.X509Certificate",certs); break; case 6: // JVM Route request.setAttribute("org.browsermob.proxy.jetty.http.ajp.JVMRoute",value); break; case 5: // Query String request.setQuery(value); break; case 4: // AuthType request.setAuthType(value); break; case 3: // Remote User request.setAuthUser(value); break; case 2: // servlet path not implemented case 1: // _context not implemented default: log.warn("Unknown attr: "+attr+"="+value); } attr=packet.getByte(); } _listener.customizeRequest(this,request); gotRequest=true; statsRequestStart(); request.setState(HttpMessage.__MSG_RECEIVED); // Complete response if (request.getContentLength()==0&&request.getField(HttpFields.__TransferEncoding)==null) _ajpIn.close(); // Prepare response response.setState(HttpMessage.__MSG_EDITABLE); response.setVersion(HttpMessage.__HTTP_1_1); response.setDateField(HttpFields.__Date,_request.getTimeStamp()); if (!Version.isParanoid()) response.setField(HttpFields.__Server,Version.getDetail()); // Service request if (log.isDebugEnabled()) log.debug("REQUEST:\n"+request); context=service(request,response); if (log.isDebugEnabled()) log.debug("RESPONSE:\n"+response); break; default: if (log.isDebugEnabled()) log.debug("Ignored: "+packet); _persistent=false; } } catch (SocketException e) { LogSupport.ignore(log,e); _persistent=false; } catch (Exception e) { log.warn(LogSupport.EXCEPTION,e); _persistent=false; try { if (gotRequest) _ajpOut.close(); } catch (IOException e2) { LogSupport.ignore(log,e2); } } finally { // abort if nothing received. if (packet==null||!gotRequest) return false; // flush and end the output try { // Consume unread input. // while(_ajpIn.skip(4096)>0 || _ajpIn.read()>=0); // end response getOutputStream().close(); if (!_persistent) _ajpOut.end(); // Close the outout _ajpOut.close(); // reset streams getOutputStream().resetStream(); getOutputStream().addObserver(this); getInputStream().resetStream(); _ajpIn.resetStream(); _ajpOut.resetStream(); } catch (Exception e) { log.debug(LogSupport.EXCEPTION,e); _persistent=false; } finally { statsRequestEnd(); if (context!=null) context.log(request,response,-1); } } return _persistent; }
class class_name[name] begin[{] method[handleNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[AJP13RequestPacket], packet] local_variable[type[HttpRequest], request] local_variable[type[HttpResponse], response] local_variable[type[HttpContext], context] local_variable[type[boolean], gotRequest] assign[member[._persistent], literal[true]] assign[member[._keepAlive], literal[true]] TryStatement(block=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextPacket, postfix_operators=[], prefix_operators=[], qualifier=_ajpIn, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=packet, 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=false), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDataSize, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getByte, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AJP13 type="), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" size="), operator=+), operandr=MethodInvocation(arguments=[], member=unconsumedData, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=__FORWARD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=AJP13Packet, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], member=setTimeStamp, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__MSG_EDITABLE, postfix_operators=[], prefix_operators=[], qualifier=HttpMessage, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)], member=setMethod, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)], member=setVersion, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=version)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVersion, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bad version"), operandr=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None), name=sc)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], member=encodePath, postfix_operators=[], prefix_operators=[], qualifier=URI, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None), operator=+)], member=setPath, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodePath, postfix_operators=[], prefix_operators=[], qualifier=URI, selectors=[], type_arguments=None)], member=setPath, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_serverPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_isSSL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBoolean, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_keepAlive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDotVersion, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=h)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHeader, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=hdr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=val)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hdr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addField, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_keepAlive, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=__Connection, postfix_operators=[], prefix_operators=[], qualifier=HttpFields, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=hdr, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=__KeepAlive, postfix_operators=[], prefix_operators=[], qualifier=HttpFields, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=val, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=_keepAlive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getByte, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), name=attr)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11), operator===), if_false=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.servlet.request.key_size"), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.servlet.request.ssl_session"), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.servlet.request.cipher_suite"), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7)], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="X.509")], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=CertificateFactory, selectors=[], type_arguments=None), name=cf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CertificateFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBytes, 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=ByteArrayInputStream, sub_type=None)), name=certstream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=certstream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateCertificate, postfix_operators=[], prefix_operators=[], qualifier=cf, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), name=cert)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=cert, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), name=certs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.servlet.request.X509Certificate"), MemberReference(member=certs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.browsermob.proxy.jetty.http.ajp.JVMRoute"), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setQuery, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAuthType, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAuthUser, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown attr: "), operandr=MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), operator=+), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getByte, postfix_operators=[], prefix_operators=[], qualifier=packet, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operandr=MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=!=), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=customizeRequest, postfix_operators=[], prefix_operators=[], qualifier=_listener, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gotRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=statsRequestStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__MSG_RECEIVED, postfix_operators=[], prefix_operators=[], qualifier=HttpMessage, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getContentLength, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=__TransferEncoding, postfix_operators=[], prefix_operators=[], qualifier=HttpFields, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=_ajpIn, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__MSG_EDITABLE, postfix_operators=[], prefix_operators=[], qualifier=HttpMessage, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__HTTP_1_1, postfix_operators=[], prefix_operators=[], qualifier=HttpMessage, selectors=[])], member=setVersion, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__Date, postfix_operators=[], prefix_operators=[], qualifier=HttpFields, selectors=[]), MethodInvocation(arguments=[], member=getTimeStamp, postfix_operators=[], prefix_operators=[], qualifier=_request, selectors=[], type_arguments=None)], member=setDateField, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isParanoid, postfix_operators=[], prefix_operators=['!'], qualifier=Version, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__Server, postfix_operators=[], prefix_operators=[], qualifier=HttpFields, selectors=[]), MethodInvocation(arguments=[], member=getDetail, postfix_operators=[], prefix_operators=[], qualifier=Version, selectors=[], type_arguments=None)], member=setField, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="REQUEST:\n"), operandr=MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RESPONSE:\n"), operandr=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Ignored: "), operandr=MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_persistent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_persistent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SocketException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EXCEPTION, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_persistent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), TryStatement(block=[IfStatement(condition=MemberReference(member=gotRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=_ajpOut, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e2, types=['IOException']))], finally_block=None, label=None, resources=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MemberReference(member=gotRequest, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=close, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=_persistent, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=end, postfix_operators=[], prefix_operators=[], qualifier=_ajpOut, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=_ajpOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=resetStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addObserver, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=resetStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=resetStream, postfix_operators=[], prefix_operators=[], qualifier=_ajpIn, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=resetStream, postfix_operators=[], prefix_operators=[], qualifier=_ajpOut, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EXCEPTION, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_persistent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=statsRequestEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=log, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), label=None))], label=None, resources=None)], label=None, resources=None) return[member[._persistent]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[handleNext] operator[SEP] operator[SEP] { identifier[AJP13RequestPacket] identifier[packet] operator[=] Other[null] operator[SEP] identifier[HttpRequest] identifier[request] operator[=] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[HttpResponse] identifier[response] operator[=] identifier[getResponse] operator[SEP] operator[SEP] operator[SEP] identifier[HttpContext] identifier[context] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[gotRequest] operator[=] literal[boolean] operator[SEP] identifier[_persistent] operator[=] literal[boolean] operator[SEP] identifier[_keepAlive] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[try] { identifier[packet] operator[=] Other[null] operator[SEP] identifier[packet] operator[=] identifier[_ajpIn] operator[SEP] identifier[nextPacket] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[packet] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[packet] operator[SEP] identifier[getDataSize] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LogSupport] operator[SEP] identifier[ignore] operator[SEP] identifier[log] , identifier[e] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[type] operator[=] identifier[packet] operator[SEP] identifier[getByte] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[+] identifier[packet] operator[SEP] identifier[unconsumedData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[AJP13Packet] operator[SEP] identifier[__FORWARD_REQUEST] operator[:] identifier[request] operator[SEP] identifier[setTimeStamp] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setState] operator[SEP] identifier[HttpMessage] operator[SEP] identifier[__MSG_EDITABLE] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setMethod] operator[SEP] identifier[packet] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setVersion] operator[SEP] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[version] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[request] operator[SEP] identifier[setVersion] operator[SEP] identifier[version] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[version] , identifier[e] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[warn] operator[SEP] identifier[packet] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[path] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[sc] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sc] operator[<] Other[0] operator[SEP] identifier[request] operator[SEP] identifier[setPath] operator[SEP] identifier[URI] operator[SEP] identifier[encodePath] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[request] operator[SEP] identifier[setPath] operator[SEP] identifier[URI] operator[SEP] identifier[encodePath] operator[SEP] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[sc] operator[SEP] operator[SEP] operator[+] identifier[path] operator[SEP] identifier[substring] operator[SEP] identifier[sc] operator[SEP] operator[SEP] operator[SEP] identifier[_remoteAddr] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[_remoteHost] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[_serverName] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[_serverPort] operator[=] identifier[packet] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] identifier[_isSSL] operator[=] identifier[packet] operator[SEP] identifier[getBoolean] operator[SEP] operator[SEP] operator[SEP] identifier[_keepAlive] operator[=] identifier[request] operator[SEP] identifier[getDotVersion] operator[SEP] operator[SEP] operator[>=] Other[1] operator[SEP] Keyword[int] identifier[h] operator[=] identifier[packet] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[h] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[hdr] operator[=] identifier[packet] operator[SEP] identifier[getHeader] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[val] operator[=] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addField] operator[SEP] identifier[hdr] , identifier[val] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_keepAlive] operator[&&] identifier[hdr] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[HttpFields] operator[SEP] identifier[__Connection] operator[SEP] operator[&&] identifier[val] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[HttpFields] operator[SEP] identifier[__KeepAlive] operator[SEP] operator[SEP] identifier[_keepAlive] operator[=] literal[boolean] operator[SEP] } Keyword[byte] identifier[attr] operator[=] identifier[packet] operator[SEP] identifier[getByte] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[attr] operator[SEP] operator[!=] literal[Integer] operator[SEP] { identifier[String] identifier[value] operator[=] operator[SEP] identifier[attr] operator[==] Other[11] operator[SEP] operator[?] Other[null] operator[:] identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[attr] operator[SEP] { Keyword[case] Other[11] operator[:] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , Keyword[new] identifier[Integer] operator[SEP] identifier[packet] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[10] operator[:] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] identifier[value] , identifier[packet] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[9] operator[:] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[8] operator[:] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[7] operator[:] identifier[CertificateFactory] identifier[cf] operator[=] identifier[CertificateFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[InputStream] identifier[certstream] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[value] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[X509Certificate] identifier[cert] operator[=] operator[SEP] identifier[X509Certificate] operator[SEP] identifier[cf] operator[SEP] identifier[generateCertificate] operator[SEP] identifier[certstream] operator[SEP] operator[SEP] identifier[X509Certificate] identifier[certs] operator[SEP] operator[SEP] operator[=] { identifier[cert] } operator[SEP] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[certs] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[6] operator[:] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[5] operator[:] identifier[request] operator[SEP] identifier[setQuery] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] identifier[request] operator[SEP] identifier[setAuthType] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] identifier[request] operator[SEP] identifier[setAuthUser] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] Keyword[case] Other[1] operator[:] Keyword[default] operator[:] identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[attr] operator[+] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } identifier[attr] operator[=] identifier[packet] operator[SEP] identifier[getByte] operator[SEP] operator[SEP] operator[SEP] } identifier[_listener] operator[SEP] identifier[customizeRequest] operator[SEP] Keyword[this] , identifier[request] operator[SEP] operator[SEP] identifier[gotRequest] operator[=] literal[boolean] operator[SEP] identifier[statsRequestStart] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setState] operator[SEP] identifier[HttpMessage] operator[SEP] identifier[__MSG_RECEIVED] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[request] operator[SEP] identifier[getContentLength] operator[SEP] operator[SEP] operator[==] Other[0] operator[&&] identifier[request] operator[SEP] identifier[getField] operator[SEP] identifier[HttpFields] operator[SEP] identifier[__TransferEncoding] operator[SEP] operator[==] Other[null] operator[SEP] identifier[_ajpIn] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setState] operator[SEP] identifier[HttpMessage] operator[SEP] identifier[__MSG_EDITABLE] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setVersion] operator[SEP] identifier[HttpMessage] operator[SEP] identifier[__HTTP_1_1] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setDateField] operator[SEP] identifier[HttpFields] operator[SEP] identifier[__Date] , identifier[_request] operator[SEP] identifier[getTimeStamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Version] operator[SEP] identifier[isParanoid] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setField] operator[SEP] identifier[HttpFields] operator[SEP] identifier[__Server] , identifier[Version] operator[SEP] identifier[getDetail] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[request] operator[SEP] operator[SEP] identifier[context] operator[=] identifier[service] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[response] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[packet] operator[SEP] operator[SEP] identifier[_persistent] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SocketException] identifier[e] operator[SEP] { identifier[LogSupport] operator[SEP] identifier[ignore] operator[SEP] identifier[log] , identifier[e] operator[SEP] operator[SEP] identifier[_persistent] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] identifier[LogSupport] operator[SEP] identifier[EXCEPTION] , identifier[e] operator[SEP] operator[SEP] identifier[_persistent] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[gotRequest] operator[SEP] identifier[_ajpOut] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e2] operator[SEP] { identifier[LogSupport] operator[SEP] identifier[ignore] operator[SEP] identifier[log] , identifier[e2] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[packet] operator[==] Other[null] operator[||] operator[!] identifier[gotRequest] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[try] { identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_persistent] operator[SEP] identifier[_ajpOut] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] identifier[_ajpOut] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[resetStream] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[addObserver] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[resetStream] operator[SEP] operator[SEP] operator[SEP] identifier[_ajpIn] operator[SEP] identifier[resetStream] operator[SEP] operator[SEP] operator[SEP] identifier[_ajpOut] operator[SEP] identifier[resetStream] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[LogSupport] operator[SEP] identifier[EXCEPTION] , identifier[e] operator[SEP] operator[SEP] identifier[_persistent] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { identifier[statsRequestEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] identifier[context] operator[SEP] identifier[log] operator[SEP] identifier[request] , identifier[response] , operator[-] Other[1] operator[SEP] operator[SEP] } } Keyword[return] identifier[_persistent] operator[SEP] }
@Override public <U> ListT<W,U> scanRight(final U identity, final BiFunction<? super T, ? super U, ? extends U> combiner) { return (ListT<W,U>) FoldableTransformerSeq.super.scanRight(identity, combiner); }
class class_name[name] begin[{] method[scanRight, return_type[type[ListT]], modifier[public], parameter[identity, combiner]] begin[{] return[Cast(expression=MemberReference(member=FoldableTransformerSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[SuperMethodInvocation(arguments=[MemberReference(member=identity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=combiner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scanRight, 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=U, sub_type=None))], dimensions=[], name=ListT, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[U] operator[>] identifier[ListT] operator[<] identifier[W] , identifier[U] operator[>] identifier[scanRight] operator[SEP] Keyword[final] identifier[U] identifier[identity] , Keyword[final] identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[U] , operator[?] Keyword[extends] identifier[U] operator[>] identifier[combiner] operator[SEP] { Keyword[return] operator[SEP] identifier[ListT] operator[<] identifier[W] , identifier[U] operator[>] operator[SEP] identifier[FoldableTransformerSeq] operator[SEP] Keyword[super] operator[SEP] identifier[scanRight] operator[SEP] identifier[identity] , identifier[combiner] operator[SEP] operator[SEP] }
public static Class<?> getMapValueFieldType(Field mapField, int nestingLevel) { return getGenericFieldType(mapField, Map.class, 1, null, nestingLevel); }
class class_name[name] begin[{] method[getMapValueFieldType, return_type[type[Class]], modifier[public static], parameter[mapField, nestingLevel]] begin[{] return[call[.getGenericFieldType, parameter[member[.mapField], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None)), literal[1], literal[null], member[.nestingLevel]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getMapValueFieldType] operator[SEP] identifier[Field] identifier[mapField] , Keyword[int] identifier[nestingLevel] operator[SEP] { Keyword[return] identifier[getGenericFieldType] operator[SEP] identifier[mapField] , identifier[Map] operator[SEP] Keyword[class] , Other[1] , Other[null] , identifier[nestingLevel] operator[SEP] operator[SEP] }
public final void setDgpsid(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTDGPSID] = Integer.parseInt(contentBuffer.toString()); }
class class_name[name] begin[{] method[setDgpsid, return_type[void], modifier[final public], parameter[contentBuffer]] begin[{] assign[member[.ptValues], call[Integer.parseInt, parameter[call[contentBuffer.toString, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setDgpsid] operator[SEP] identifier[StringBuilder] identifier[contentBuffer] operator[SEP] { identifier[ptValues] operator[SEP] identifier[GpxMetadata] operator[SEP] identifier[PTDGPSID] operator[SEP] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[contentBuffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected static Country parse(String line) throws IOException { try { int pos = line.indexOf(' '); if (pos < 0) throw new IOException("Invalid format, could not parse 2 char code"); String code2 = line.substring(0, pos); int pos2 = line.indexOf(' ', pos+1); if (pos2 < 0) throw new IOException("Invalid format, could not parse 3 char code"); String code3 = line.substring(pos+1, pos2); int pos3 = line.indexOf(' ', pos2+1); if (pos3 < 0) throw new IOException("Invalid format, could not parse 3 char digit code"); String num3 = line.substring(pos2+1, pos3); // rest of line is the long name String longName = line.substring(pos3+1).trim(); // was there a name? if (longName == null || longName.equals("")) { throw new IOException("Country name was null or empty"); } // parse long name into its short name (strip anything after the last comma) String name = longName; int pos4 = longName.lastIndexOf(','); if (pos4 > 0) { // strip out the final part such as ", Republic of" from something like "Nigeria, Republic Of" name = longName.substring(0, pos4); } // create the new country return new Country(code2, name, longName); } catch (Exception e) { throw new IOException("Failed while parsing country for line: " + line, e); } }
class class_name[name] begin[{] method[parse, return_type[type[Country]], modifier[static protected], parameter[line]] begin[{] TryStatement(block=[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=pos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid format, could not parse 2 char code")], 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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=code2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=pos2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pos2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid format, could not parse 3 char code")], 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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=pos2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=code3)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), BinaryOperation(operandl=MemberReference(member=pos2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=pos3)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pos3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid format, could not parse 3 char digit code")], 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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=pos2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=pos3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=num3)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=pos3, 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), name=longName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=longName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=longName, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Country name was null or empty")], 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)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=longName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=',')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=longName, selectors=[], type_arguments=None), name=pos4)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pos4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=pos4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=longName, selectors=[], type_arguments=None)), label=None)])), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=code2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=longName, 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=Country, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed while parsing country for line: "), operandr=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=IOException, 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[protected] Keyword[static] identifier[Country] identifier[parse] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[int] identifier[pos] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[code2] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos] operator[SEP] operator[SEP] Keyword[int] identifier[pos2] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[pos] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos2] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[code3] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[pos] operator[+] Other[1] , identifier[pos2] operator[SEP] operator[SEP] Keyword[int] identifier[pos3] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[pos2] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos3] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[num3] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[pos2] operator[+] Other[1] , identifier[pos3] operator[SEP] operator[SEP] identifier[String] identifier[longName] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[pos3] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[longName] operator[==] Other[null] operator[||] identifier[longName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[name] operator[=] identifier[longName] operator[SEP] Keyword[int] identifier[pos4] operator[=] identifier[longName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos4] operator[>] Other[0] operator[SEP] { identifier[name] operator[=] identifier[longName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos4] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Country] operator[SEP] identifier[code2] , identifier[name] , identifier[longName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[line] , identifier[e] operator[SEP] operator[SEP] } }
private boolean isCompleteLine(String[] line) { // If the last string starts with a quote, but doesnt't end with one // then it must be a linefeed in the middle of a data field String lastStr = line[line.length-1]; boolean isPartial = lastStr != null && (lastStr.equals("\"") || line.length == 1 || (lastStr.startsWith("\"") && !lastStr.endsWith("\""))); return !isPartial; }
class class_name[name] begin[{] method[isCompleteLine, return_type[type[boolean]], modifier[private], parameter[line]] begin[{] local_variable[type[String], lastStr] local_variable[type[boolean], isPartial] return[member[.isPartial]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isCompleteLine] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[line] operator[SEP] { identifier[String] identifier[lastStr] operator[=] identifier[line] operator[SEP] identifier[line] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[boolean] identifier[isPartial] operator[=] identifier[lastStr] operator[!=] Other[null] operator[&&] operator[SEP] identifier[lastStr] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[line] operator[SEP] identifier[length] operator[==] Other[1] operator[||] operator[SEP] identifier[lastStr] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[lastStr] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[!] identifier[isPartial] operator[SEP] }
public String preview() { OqlBuilder<Menu> query = OqlBuilder.from(Menu.class, "menu"); populateConditions(query); query.orderBy("menu.indexno asc"); put("menus", entityDao.search(query)); query.clearOrders(); query.select("max(length(menu.indexno)/2)"); List<?> rs = entityDao.search(query); put("depth", rs.get(0)); return forward(); }
class class_name[name] begin[{] method[preview, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[OqlBuilder], query] call[.populateConditions, parameter[member[.query]]] call[query.orderBy, parameter[literal["menu.indexno asc"]]] call[.put, parameter[literal["menus"], call[entityDao.search, parameter[member[.query]]]]] call[query.clearOrders, parameter[]] call[query.select, parameter[literal["max(length(menu.indexno)/2)"]]] local_variable[type[List], rs] call[.put, parameter[literal["depth"], call[rs.get, parameter[literal[0]]]]] return[call[.forward, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[preview] operator[SEP] operator[SEP] { identifier[OqlBuilder] operator[<] identifier[Menu] operator[>] identifier[query] operator[=] identifier[OqlBuilder] operator[SEP] identifier[from] operator[SEP] identifier[Menu] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[populateConditions] operator[SEP] identifier[query] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[orderBy] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entityDao] operator[SEP] identifier[search] operator[SEP] identifier[query] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[clearOrders] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[select] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] operator[?] operator[>] identifier[rs] operator[=] identifier[entityDao] operator[SEP] identifier[search] operator[SEP] identifier[query] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rs] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[forward] operator[SEP] operator[SEP] operator[SEP] }
public void setActiveScan(ActiveScan scan) { this.scan = scan; if (scan == null) { return; } getHostSelect().removeAll(); for (HostProcess hp : scan.getHostProcesses()) { getHostSelect().addItem(hp.getHostAndPort()); } Thread thread = new Thread() { @Override public void run() { while (!stopThread) { SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { updateProgress(); }}); try { sleep(200); } catch (InterruptedException e) { // Ignore } } } }; thread.start(); }
class class_name[name] begin[{] method[setActiveScan, return_type[void], modifier[public], parameter[scan]] begin[{] assign[THIS[member[None.scan]], member[.scan]] if[binary_operation[member[.scan], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[.getHostSelect, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getHostSelect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHostAndPort, postfix_operators=[], prefix_operators=[], qualifier=hp, selectors=[], type_arguments=None)], member=addItem, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getHostProcesses, postfix_operators=[], prefix_operators=[], qualifier=scan, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=hp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HostProcess, sub_type=None))), label=None) local_variable[type[Thread], thread] call[thread.start, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setActiveScan] operator[SEP] identifier[ActiveScan] identifier[scan] operator[SEP] { Keyword[this] operator[SEP] identifier[scan] operator[=] identifier[scan] operator[SEP] Keyword[if] operator[SEP] identifier[scan] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[getHostSelect] operator[SEP] operator[SEP] operator[SEP] identifier[removeAll] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[HostProcess] identifier[hp] operator[:] identifier[scan] operator[SEP] identifier[getHostProcesses] operator[SEP] operator[SEP] operator[SEP] { identifier[getHostSelect] operator[SEP] operator[SEP] operator[SEP] identifier[addItem] operator[SEP] identifier[hp] operator[SEP] identifier[getHostAndPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Thread] identifier[thread] operator[=] Keyword[new] identifier[Thread] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] operator[!] identifier[stopThread] operator[SEP] { identifier[SwingUtilities] operator[SEP] identifier[invokeLater] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[updateProgress] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[try] { identifier[sleep] operator[SEP] Other[200] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { } } } } operator[SEP] identifier[thread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
public static long convolveSparse(GrayS64 integral , IntegralKernel kernel , int x , int y ) { return ImplIntegralImageOps.convolveSparse(integral,kernel,x,y); }
class class_name[name] begin[{] method[convolveSparse, return_type[type[long]], modifier[public static], parameter[integral, kernel, x, y]] begin[{] return[call[ImplIntegralImageOps.convolveSparse, parameter[member[.integral], member[.kernel], member[.x], member[.y]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[convolveSparse] operator[SEP] identifier[GrayS64] identifier[integral] , identifier[IntegralKernel] identifier[kernel] , Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] { Keyword[return] identifier[ImplIntegralImageOps] operator[SEP] identifier[convolveSparse] operator[SEP] identifier[integral] , identifier[kernel] , identifier[x] , identifier[y] operator[SEP] operator[SEP] }
private List<Short> selectInitializedPartitions(int clusterPartitions, List<Short> partitions) { List<Short> initializedPartitions = new ArrayList<>(); SessionState state = sessionState(); for (short partition : partitions) { PartitionState ps = state.get(partition); if (ps != null) { if (MathUtils.lessThanUnsigned(ps.getStartSeqno(), ps.getEndSeqno())) { initializedPartitions.add(partition); } else { LOGGER.debug("Skipping partition {}, because startSeqno({}) >= endSeqno({})", partition, ps.getStartSeqno(), ps.getEndSeqno()); } } else { LOGGER.debug("Skipping partition {}, because its state is null", partition); } } if (initializedPartitions.size() > clusterPartitions) { throw new IllegalStateException("Session State has " + initializedPartitions + " partitions while the cluster has " + clusterPartitions + "!"); } return initializedPartitions; }
class class_name[name] begin[{] method[selectInitializedPartitions, return_type[type[List]], modifier[private], parameter[clusterPartitions, partitions]] begin[{] local_variable[type[List], initializedPartitions] local_variable[type[SessionState], state] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=partition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), name=ps)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PartitionState, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipping partition {}, because its state is null"), MemberReference(member=partition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStartSeqno, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getEndSeqno, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None)], member=lessThanUnsigned, postfix_operators=[], prefix_operators=[], qualifier=MathUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipping partition {}, because startSeqno({}) >= endSeqno({})"), MemberReference(member=partition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getStartSeqno, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getEndSeqno, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=partition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=initializedPartitions, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=partitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=partition)], modifiers=set(), type=BasicType(dimensions=[], name=short))), label=None) if[binary_operation[call[initializedPartitions.size, parameter[]], >, member[.clusterPartitions]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Session State has "), operandr=MemberReference(member=initializedPartitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" partitions while the cluster has "), operator=+), operandr=MemberReference(member=clusterPartitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.initializedPartitions]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[Short] operator[>] identifier[selectInitializedPartitions] operator[SEP] Keyword[int] identifier[clusterPartitions] , identifier[List] operator[<] identifier[Short] operator[>] identifier[partitions] operator[SEP] { identifier[List] operator[<] identifier[Short] operator[>] identifier[initializedPartitions] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[SessionState] identifier[state] operator[=] identifier[sessionState] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[short] identifier[partition] operator[:] identifier[partitions] operator[SEP] { identifier[PartitionState] identifier[ps] operator[=] identifier[state] operator[SEP] identifier[get] operator[SEP] identifier[partition] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ps] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[MathUtils] operator[SEP] identifier[lessThanUnsigned] operator[SEP] identifier[ps] operator[SEP] identifier[getStartSeqno] operator[SEP] operator[SEP] , identifier[ps] operator[SEP] identifier[getEndSeqno] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[initializedPartitions] operator[SEP] identifier[add] operator[SEP] identifier[partition] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[partition] , identifier[ps] operator[SEP] identifier[getStartSeqno] operator[SEP] operator[SEP] , identifier[ps] operator[SEP] identifier[getEndSeqno] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[partition] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[initializedPartitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[clusterPartitions] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[initializedPartitions] operator[+] literal[String] operator[+] identifier[clusterPartitions] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[initializedPartitions] operator[SEP] }