code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean has(String key){ LazyNode child=root.child; while(child!=null){ if(keyMatch(key,child)){ return true; } child=child.next; } return false; }
class class_name[name] begin[{] method[has, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] local_variable[type[LazyNode], child] while[binary_operation[member[.child], !=, literal[null]]] begin[{] if[call[.keyMatch, parameter[member[.key], member[.child]]]] begin[{] return[literal[true]] else begin[{] None end[}] assign[member[.child], member[child.next]] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[has] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[LazyNode] identifier[child] operator[=] identifier[root] operator[SEP] identifier[child] operator[SEP] Keyword[while] operator[SEP] identifier[child] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[keyMatch] operator[SEP] identifier[key] , identifier[child] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[child] operator[=] identifier[child] operator[SEP] identifier[next] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static CheckSum compute(String valueToChecksum) { return new CheckSum(MD5Util.computeMD5( //remove "Unknown" unicode char 65533 Normalizer.normalize( StringUtil.standardizeLineEndings(valueToChecksum) .replace("\uFFFD", "") , Normalizer.Form.NFC) ), getCurrentVersion()); }
class class_name[name] begin[{] method[compute, return_type[type[CheckSum]], modifier[public static], parameter[valueToChecksum]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=valueToChecksum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=standardizeLineEndings, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="�"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=NFC, postfix_operators=[], prefix_operators=[], qualifier=Normalizer.Form, selectors=[])], member=normalize, postfix_operators=[], prefix_operators=[], qualifier=Normalizer, selectors=[], type_arguments=None)], member=computeMD5, postfix_operators=[], prefix_operators=[], qualifier=MD5Util, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCurrentVersion, 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=CheckSum, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CheckSum] identifier[compute] operator[SEP] identifier[String] identifier[valueToChecksum] operator[SEP] { Keyword[return] Keyword[new] identifier[CheckSum] operator[SEP] identifier[MD5Util] operator[SEP] identifier[computeMD5] operator[SEP] identifier[Normalizer] operator[SEP] identifier[normalize] operator[SEP] identifier[StringUtil] operator[SEP] identifier[standardizeLineEndings] operator[SEP] identifier[valueToChecksum] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] , identifier[Normalizer] operator[SEP] identifier[Form] operator[SEP] identifier[NFC] operator[SEP] operator[SEP] , identifier[getCurrentVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static List<Class<?>> rs2class(String pkg, List<NutResource> list) { Set<Class<?>> re = new LinkedHashSet<Class<?>>(list.size()); if (!list.isEmpty()) { for (NutResource nr : list) { if (!nr.getName().endsWith(".class") || nr.getName().endsWith("package-info.class")) { continue; } // Class快速载入 String className = pkg + "." + nr.getName().substring(0, nr.getName().length() - 6).replaceAll("[/\\\\]", "."); try { Class<?> klass = Lang.loadClass(className); re.add(klass); continue; } catch (Throwable e) {} // 失败了? 尝试终极方法,当然了,慢多了 InputStream in = null; try { in = nr.getInputStream(); className = ClassTools.getClassName(in); if (className == null) { if (log.isInfoEnabled()) log.infof("Resource can't map to Class, Resource %s", nr); continue; } Class<?> klass = Lang.loadClass(className); re.add(klass); } catch (Throwable e) { if (log.isInfoEnabled()) log.info("Resource can't map to Class, Resource " + nr.getName()); } finally { Streams.safeClose(in); } } } return new ArrayList<Class<?>>(re); }
class class_name[name] begin[{] method[rs2class, return_type[type[List]], modifier[private static], parameter[pkg, list]] begin[{] local_variable[type[Set], re] if[call[list.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=['!'], qualifier=nr, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".class")], member=endsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=nr, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="package-info.class")], member=endsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pkg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=nr, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=nr, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=-)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[/\\\\]"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=replaceAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), name=className)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=Lang, selectors=[], type_arguments=None), name=klass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=re, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=nr, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassName, postfix_operators=[], prefix_operators=[], qualifier=ClassTools, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=className, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource can't map to Class, Resource %s"), MemberReference(member=nr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=infof, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=Lang, selectors=[], type_arguments=None), name=klass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=re, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, 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="Resource can't map to Class, Resource "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=nr, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeClose, postfix_operators=[], prefix_operators=[], qualifier=Streams, selectors=[], type_arguments=None), label=None)], label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=nr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NutResource, sub_type=None))), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[rs2class] operator[SEP] identifier[String] identifier[pkg] , identifier[List] operator[<] identifier[NutResource] operator[>] identifier[list] operator[SEP] { identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[re] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[NutResource] identifier[nr] operator[:] identifier[list] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[nr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[nr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[className] operator[=] identifier[pkg] operator[+] literal[String] operator[+] identifier[nr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[nr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[6] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[klass] operator[=] identifier[Lang] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[re] operator[SEP] identifier[add] operator[SEP] identifier[klass] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { } identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[in] operator[=] identifier[nr] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[className] operator[=] identifier[ClassTools] operator[SEP] identifier[getClassName] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[className] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[infof] operator[SEP] literal[String] , identifier[nr] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[Class] operator[<] operator[?] operator[>] identifier[klass] operator[=] identifier[Lang] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[re] operator[SEP] identifier[add] operator[SEP] identifier[klass] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[nr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[Streams] operator[SEP] identifier[safeClose] operator[SEP] identifier[in] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[new] identifier[ArrayList] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] identifier[re] operator[SEP] operator[SEP] }
public List<String> getPeers() { final URI uri = createURI("/peers"); final HttpRequestBuilder httpRequestBuilder = RequestUtils .getHttpRequestBuilder(null, null, RequestOptions.BLANK, ""); final HTTP.Response httpResponse = HTTP.getResponse(uri + "?" + httpRequestBuilder.paramString()); if (httpResponse.code() != 200) { die("Unable to get the peers", uri, httpResponse.code(), httpResponse.body()); } return fromJsonArray(httpResponse.body(), String.class); }
class class_name[name] begin[{] method[getPeers, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[URI], uri] local_variable[type[HttpRequestBuilder], httpRequestBuilder] local_variable[type[HTTP], httpResponse] if[binary_operation[call[httpResponse.code, parameter[]], !=, literal[200]]] begin[{] call[.die, parameter[literal["Unable to get the peers"], member[.uri], call[httpResponse.code, parameter[]], call[httpResponse.body, parameter[]]]] else begin[{] None end[}] return[call[.fromJsonArray, parameter[call[httpResponse.body, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getPeers] operator[SEP] operator[SEP] { Keyword[final] identifier[URI] identifier[uri] operator[=] identifier[createURI] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[HttpRequestBuilder] identifier[httpRequestBuilder] operator[=] identifier[RequestUtils] operator[SEP] identifier[getHttpRequestBuilder] operator[SEP] Other[null] , Other[null] , identifier[RequestOptions] operator[SEP] identifier[BLANK] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[HTTP] operator[SEP] identifier[Response] identifier[httpResponse] operator[=] identifier[HTTP] operator[SEP] identifier[getResponse] operator[SEP] identifier[uri] operator[+] literal[String] operator[+] identifier[httpRequestBuilder] operator[SEP] identifier[paramString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[httpResponse] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[!=] Other[200] operator[SEP] { identifier[die] operator[SEP] literal[String] , identifier[uri] , identifier[httpResponse] operator[SEP] identifier[code] operator[SEP] operator[SEP] , identifier[httpResponse] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[fromJsonArray] operator[SEP] identifier[httpResponse] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public int getInteger(final int index) { try { return statement.getInt(index); } catch (SQLException sex) { throw newGetParamError(index, sex); } }
class class_name[name] begin[{] method[getInteger, return_type[type[int]], modifier[public], parameter[index]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=statement, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newGetParamError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=sex, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[int] identifier[getInteger] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] { Keyword[try] { Keyword[return] identifier[statement] operator[SEP] identifier[getInt] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[sex] operator[SEP] { Keyword[throw] identifier[newGetParamError] operator[SEP] identifier[index] , identifier[sex] operator[SEP] operator[SEP] } }
public List<ChangeSetStatus> getStatuses() { ArrayList<ChangeSetStatus> returnList = new ArrayList<>(); for (RanChangeSet changeSet : ranChangeSets) { ChangeSetStatus status = new ChangeSetStatus(new ChangeSet(changeSet.getId(), changeSet.getAuthor(), false, false, changeSet.getChangeLog(), null, null, null)); status.setPreviouslyRan(true); status.setDateLastExecuted(changeSet.getDateExecuted()); status.setStoredCheckSum(changeSet.getLastCheckSum()); status.setComments(changeSet.getComments()); status.setDescription(changeSet.getDescription()); status.setWillRun(false); status.setFilterResults(new HashSet<>(Arrays.asList(new ChangeSetFilterResult(false, "Change set is not in change log", NotInChangeLogChangeSetFilter.class)))); status.setRanChangeSet(changeSet); returnList.add(status); } returnList.addAll(changeSetStatuses.values()); return returnList; }
class class_name[name] begin[{] method[getStatuses, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[ArrayList], returnList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAuthor, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MethodInvocation(arguments=[], member=getChangeLog, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChangeSet, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChangeSetStatus, sub_type=None)), name=status)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChangeSetStatus, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setPreviouslyRan, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDateExecuted, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None)], member=setDateLastExecuted, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastCheckSum, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None)], member=setStoredCheckSum, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getComments, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None)], member=setComments, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=changeSet, selectors=[], type_arguments=None)], member=setDescription, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setWillRun, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Change set is not in change log"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotInChangeLogChangeSetFilter, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChangeSetFilterResult, sub_type=None))], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashSet, sub_type=None))], member=setFilterResults, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=changeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRanChangeSet, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=returnList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=ranChangeSets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=changeSet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RanChangeSet, sub_type=None))), label=None) call[returnList.addAll, parameter[call[changeSetStatuses.values, parameter[]]]] return[member[.returnList]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ChangeSetStatus] operator[>] identifier[getStatuses] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[ChangeSetStatus] operator[>] identifier[returnList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[RanChangeSet] identifier[changeSet] operator[:] identifier[ranChangeSets] operator[SEP] { identifier[ChangeSetStatus] identifier[status] operator[=] Keyword[new] identifier[ChangeSetStatus] operator[SEP] Keyword[new] identifier[ChangeSet] operator[SEP] identifier[changeSet] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[changeSet] operator[SEP] identifier[getAuthor] operator[SEP] operator[SEP] , literal[boolean] , literal[boolean] , identifier[changeSet] operator[SEP] identifier[getChangeLog] operator[SEP] operator[SEP] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setPreviouslyRan] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setDateLastExecuted] operator[SEP] identifier[changeSet] operator[SEP] identifier[getDateExecuted] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setStoredCheckSum] operator[SEP] identifier[changeSet] operator[SEP] identifier[getLastCheckSum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setComments] operator[SEP] identifier[changeSet] operator[SEP] identifier[getComments] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setDescription] operator[SEP] identifier[changeSet] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setWillRun] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setFilterResults] operator[SEP] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] Keyword[new] identifier[ChangeSetFilterResult] operator[SEP] literal[boolean] , literal[String] , identifier[NotInChangeLogChangeSetFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setRanChangeSet] operator[SEP] identifier[changeSet] operator[SEP] operator[SEP] identifier[returnList] operator[SEP] identifier[add] operator[SEP] identifier[status] operator[SEP] operator[SEP] } identifier[returnList] operator[SEP] identifier[addAll] operator[SEP] identifier[changeSetStatuses] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[returnList] operator[SEP] }
public WorkbookInner update(String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { return updateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).toBlocking().single().body(); }
class class_name[name] begin[{] method[update, return_type[type[WorkbookInner]], modifier[public], parameter[resourceGroupName, resourceName, workbookProperties]] begin[{] return[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.workbookProperties]]]] end[}] END[}]
Keyword[public] identifier[WorkbookInner] identifier[update] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[WorkbookInner] identifier[workbookProperties] operator[SEP] { Keyword[return] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[workbookProperties] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
@Pure public static boolean epsilonEqualsDistance(double value1, double value2) { return value1 >= (value2 - distancePrecision) && value1 <= (value2 + distancePrecision); }
class class_name[name] begin[{] method[epsilonEqualsDistance, return_type[type[boolean]], modifier[public static], parameter[value1, value2]] begin[{] return[binary_operation[binary_operation[member[.value1], >=, binary_operation[member[.value2], -, member[.distancePrecision]]], &&, binary_operation[member[.value1], <=, binary_operation[member[.value2], +, member[.distancePrecision]]]]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[boolean] identifier[epsilonEqualsDistance] operator[SEP] Keyword[double] identifier[value1] , Keyword[double] identifier[value2] operator[SEP] { Keyword[return] identifier[value1] operator[>=] operator[SEP] identifier[value2] operator[-] identifier[distancePrecision] operator[SEP] operator[&&] identifier[value1] operator[<=] operator[SEP] identifier[value2] operator[+] identifier[distancePrecision] operator[SEP] operator[SEP] }
public DatePickerShortYearCutOff getShortYearCutoff() { IComplexOption shortYearCutoff = getComplexOption("shortYearCutoff"); if (shortYearCutoff != null && shortYearCutoff instanceof DatePickerShortYearCutOff) { return (DatePickerShortYearCutOff) shortYearCutoff; } return new DatePickerShortYearCutOff("+10"); }
class class_name[name] begin[{] method[getShortYearCutoff, return_type[type[DatePickerShortYearCutOff]], modifier[public], parameter[]] begin[{] local_variable[type[IComplexOption], shortYearCutoff] if[binary_operation[binary_operation[member[.shortYearCutoff], !=, literal[null]], &&, binary_operation[member[.shortYearCutoff], instanceof, type[DatePickerShortYearCutOff]]]] begin[{] return[Cast(expression=MemberReference(member=shortYearCutoff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DatePickerShortYearCutOff, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="+10")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatePickerShortYearCutOff, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DatePickerShortYearCutOff] identifier[getShortYearCutoff] operator[SEP] operator[SEP] { identifier[IComplexOption] identifier[shortYearCutoff] operator[=] identifier[getComplexOption] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[shortYearCutoff] operator[!=] Other[null] operator[&&] identifier[shortYearCutoff] Keyword[instanceof] identifier[DatePickerShortYearCutOff] operator[SEP] { Keyword[return] operator[SEP] identifier[DatePickerShortYearCutOff] operator[SEP] identifier[shortYearCutoff] operator[SEP] } Keyword[return] Keyword[new] identifier[DatePickerShortYearCutOff] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public String encryptPassword(String plain) { Preconditions.checkArgument(this.encryptors.size() > 0, "A master password needs to be provided for encrypting passwords."); try { return this.encryptors.get(0).encrypt(plain); } catch (Exception e) { throw new RuntimeException("Failed to encrypt password", e); } }
class class_name[name] begin[{] method[encryptPassword, return_type[type[String]], modifier[public], parameter[plain]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[THIS[member[None.encryptors]call[None.size, parameter[]]], >, literal[0]], literal["A master password needs to be provided for encrypting passwords."]]] TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=encryptors, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), 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), MethodInvocation(arguments=[MemberReference(member=plain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encrypt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to encrypt password"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[String] identifier[encryptPassword] operator[SEP] identifier[String] identifier[plain] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] Keyword[this] operator[SEP] identifier[encryptors] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] , literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[this] operator[SEP] identifier[encryptors] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[encrypt] operator[SEP] identifier[plain] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
@Override public CProduct getCProductByUuidAndGroupId(String uuid, long groupId) throws PortalException { return cProductPersistence.findByUUID_G(uuid, groupId); }
class class_name[name] begin[{] method[getCProductByUuidAndGroupId, return_type[type[CProduct]], modifier[public], parameter[uuid, groupId]] begin[{] return[call[cProductPersistence.findByUUID_G, parameter[member[.uuid], member[.groupId]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CProduct] identifier[getCProductByUuidAndGroupId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] Keyword[throws] identifier[PortalException] { Keyword[return] identifier[cProductPersistence] operator[SEP] identifier[findByUUID_G] operator[SEP] identifier[uuid] , identifier[groupId] operator[SEP] operator[SEP] }
public byte[] sign(byte[] data) { lock.lock(); try { signature.initSign(this.privateKey); signature.update(data); return signature.sign(); } catch (Exception e) { throw new CryptoException(e); } finally { lock.unlock(); } }
class class_name[name] begin[{] method[sign, return_type[type[byte]], modifier[public], parameter[data]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=privateKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=initSign, postfix_operators=[], prefix_operators=[], qualifier=signature, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=update, postfix_operators=[], prefix_operators=[], qualifier=signature, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=sign, postfix_operators=[], prefix_operators=[], qualifier=signature, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CryptoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[sign] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[signature] operator[SEP] identifier[initSign] operator[SEP] Keyword[this] operator[SEP] identifier[privateKey] operator[SEP] operator[SEP] identifier[signature] operator[SEP] identifier[update] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[return] identifier[signature] operator[SEP] identifier[sign] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CryptoException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public static <K> double estimatePenalty(double l1, double l2, Map<K, Double> weights) { double penalty = 0.0; penalty += L2Regularizer.estimatePenalty(l2, weights); penalty += L1Regularizer.estimatePenalty(l1, weights); return penalty; }
class class_name[name] begin[{] method[estimatePenalty, return_type[type[double]], modifier[public static], parameter[l1, l2, weights]] begin[{] local_variable[type[double], penalty] assign[member[.penalty], call[L2Regularizer.estimatePenalty, parameter[member[.l2], member[.weights]]]] assign[member[.penalty], call[L1Regularizer.estimatePenalty, parameter[member[.l1], member[.weights]]]] return[member[.penalty]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] operator[>] Keyword[double] identifier[estimatePenalty] operator[SEP] Keyword[double] identifier[l1] , Keyword[double] identifier[l2] , identifier[Map] operator[<] identifier[K] , identifier[Double] operator[>] identifier[weights] operator[SEP] { Keyword[double] identifier[penalty] operator[=] literal[Float] operator[SEP] identifier[penalty] operator[+=] identifier[L2Regularizer] operator[SEP] identifier[estimatePenalty] operator[SEP] identifier[l2] , identifier[weights] operator[SEP] operator[SEP] identifier[penalty] operator[+=] identifier[L1Regularizer] operator[SEP] identifier[estimatePenalty] operator[SEP] identifier[l1] , identifier[weights] operator[SEP] operator[SEP] Keyword[return] identifier[penalty] operator[SEP] }
private void convertStoragePathValue( final Map<String, String> data, final StorageTree storageTree, final String name, final String propValue, final Map<String, Object> renderingOptions ) throws ConfigurationException { //a storage path property String root = null; if (null != renderingOptions.get( StringRenderingConstants.STORAGE_PATH_ROOT_KEY)) { root = renderingOptions.get(StringRenderingConstants.STORAGE_PATH_ROOT_KEY).toString(); } String filter = null; if (null != renderingOptions.get(StringRenderingConstants.STORAGE_FILE_META_FILTER_KEY)) { filter = renderingOptions.get(StringRenderingConstants.STORAGE_FILE_META_FILTER_KEY).toString(); } boolean clearValue = isValueConversionFailureRemove(renderingOptions); if (null != root && !PathUtil.hasRoot(propValue, root)) { if(clearValue) { data.remove(name); } return; } try { Resource<ResourceMeta> resource = storageTree.getResource(propValue); ResourceMeta contents = resource.getContents(); //test filter if (filter != null) { String[] filterComponents = filter.split("=", 2); if (filterComponents.length == 2) { String key = filterComponents[0]; String test = filterComponents[1]; Map<String, String> meta = contents.getMeta(); if (meta == null || !test.equals(meta.get(key))) { if(clearValue) { data.remove(name); } return; } } } //finally load storage contents into a string ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); contents.writeContent(byteArrayOutputStream); data.put(name, new String(byteArrayOutputStream.toByteArray())); } catch (StorageException | IOException e) { if(clearValue) { data.remove(name); return; } throw new ConfigurationException("Unable to load configuration key '" + name + "' value from storage path: " + propValue, e); } }
class class_name[name] begin[{] method[convertStoragePathValue, return_type[void], modifier[private], parameter[data, storageTree, name, propValue, renderingOptions]] begin[{] local_variable[type[String], root] if[binary_operation[literal[null], !=, call[renderingOptions.get, parameter[member[StringRenderingConstants.STORAGE_PATH_ROOT_KEY]]]]] begin[{] assign[member[.root], call[renderingOptions.get, parameter[member[StringRenderingConstants.STORAGE_PATH_ROOT_KEY]]]] else begin[{] None end[}] local_variable[type[String], filter] if[binary_operation[literal[null], !=, call[renderingOptions.get, parameter[member[StringRenderingConstants.STORAGE_FILE_META_FILTER_KEY]]]]] begin[{] assign[member[.filter], call[renderingOptions.get, parameter[member[StringRenderingConstants.STORAGE_FILE_META_FILTER_KEY]]]] else begin[{] None end[}] local_variable[type[boolean], clearValue] if[binary_operation[binary_operation[literal[null], !=, member[.root]], &&, call[PathUtil.hasRoot, parameter[member[.propValue], member[.root]]]]] begin[{] if[member[.clearValue]] begin[{] call[data.remove, parameter[member[.name]]] else begin[{] None end[}] return[None] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=propValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=storageTree, selectors=[], type_arguments=None), name=resource)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResourceMeta, sub_type=None))], dimensions=[], name=Resource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContents, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), name=contents)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceMeta, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=split, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), name=filterComponents)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=filterComponents, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=filterComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=filterComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), name=test)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMeta, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), name=meta)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=meta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=meta, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=test, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=clearValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)]))]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None)), name=byteArrayOutputStream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=byteArrayOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeContent, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=byteArrayOutputStream, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=clearValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load configuration key '"), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' value from storage path: "), operator=+), operandr=MemberReference(member=propValue, 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=ConfigurationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StorageException', 'IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[convertStoragePathValue] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[data] , Keyword[final] identifier[StorageTree] identifier[storageTree] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[propValue] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[renderingOptions] operator[SEP] Keyword[throws] identifier[ConfigurationException] { identifier[String] identifier[root] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[renderingOptions] operator[SEP] identifier[get] operator[SEP] identifier[StringRenderingConstants] operator[SEP] identifier[STORAGE_PATH_ROOT_KEY] operator[SEP] operator[SEP] { identifier[root] operator[=] identifier[renderingOptions] operator[SEP] identifier[get] operator[SEP] identifier[StringRenderingConstants] operator[SEP] identifier[STORAGE_PATH_ROOT_KEY] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[filter] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[renderingOptions] operator[SEP] identifier[get] operator[SEP] identifier[StringRenderingConstants] operator[SEP] identifier[STORAGE_FILE_META_FILTER_KEY] operator[SEP] operator[SEP] { identifier[filter] operator[=] identifier[renderingOptions] operator[SEP] identifier[get] operator[SEP] identifier[StringRenderingConstants] operator[SEP] identifier[STORAGE_FILE_META_FILTER_KEY] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[boolean] identifier[clearValue] operator[=] identifier[isValueConversionFailureRemove] operator[SEP] identifier[renderingOptions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[root] operator[&&] operator[!] identifier[PathUtil] operator[SEP] identifier[hasRoot] operator[SEP] identifier[propValue] , identifier[root] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[clearValue] operator[SEP] { identifier[data] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[try] { identifier[Resource] operator[<] identifier[ResourceMeta] operator[>] identifier[resource] operator[=] identifier[storageTree] operator[SEP] identifier[getResource] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] identifier[ResourceMeta] identifier[contents] operator[=] identifier[resource] operator[SEP] identifier[getContents] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[filterComponents] operator[=] identifier[filter] operator[SEP] identifier[split] operator[SEP] literal[String] , Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filterComponents] operator[SEP] identifier[length] operator[==] Other[2] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[filterComponents] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] identifier[test] operator[=] identifier[filterComponents] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[meta] operator[=] identifier[contents] operator[SEP] identifier[getMeta] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[meta] operator[==] Other[null] operator[||] operator[!] identifier[test] operator[SEP] identifier[equals] operator[SEP] identifier[meta] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[clearValue] operator[SEP] { identifier[data] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } } } identifier[ByteArrayOutputStream] identifier[byteArrayOutputStream] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[contents] operator[SEP] identifier[writeContent] operator[SEP] identifier[byteArrayOutputStream] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[put] operator[SEP] identifier[name] , Keyword[new] identifier[String] operator[SEP] identifier[byteArrayOutputStream] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[StorageException] operator[|] identifier[IOException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[clearValue] operator[SEP] { identifier[data] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[throw] Keyword[new] identifier[ConfigurationException] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[propValue] , identifier[e] operator[SEP] operator[SEP] } }
public void addCohort(Cohort cohort, String studyId) { // Sanity check if (cohort == null || StringUtils.isEmpty(cohort.getId())) { logger.error("Cohort (or its ID) is null or empty."); return; } VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId); if (variantStudyMetadata == null) { logger.error("Study not found. Check your study ID: '{}'", studyId); return; } if (variantStudyMetadata.getCohorts() == null) { variantStudyMetadata.setCohorts(new ArrayList<>()); } for (Cohort coho: variantStudyMetadata.getCohorts()) { if (coho.getId() != null && coho.getId().equals(cohort.getId())) { logger.error("Cohort with id '{}' already exists in study '{}'", cohort.getId(), studyId); return; } } variantStudyMetadata.getCohorts().add(cohort); }
class class_name[name] begin[{] method[addCohort, return_type[void], modifier[public], parameter[cohort, studyId]] begin[{] if[binary_operation[binary_operation[member[.cohort], ==, literal[null]], ||, call[StringUtils.isEmpty, parameter[call[cohort.getId, parameter[]]]]]] begin[{] call[logger.error, parameter[literal["Cohort (or its ID) is null or empty."]]] return[None] else begin[{] None end[}] local_variable[type[VariantStudyMetadata], variantStudyMetadata] if[binary_operation[member[.variantStudyMetadata], ==, literal[null]]] begin[{] call[logger.error, parameter[literal["Study not found. Check your study ID: '{}'"], member[.studyId]]] return[None] else begin[{] None end[}] if[binary_operation[call[variantStudyMetadata.getCohorts, parameter[]], ==, literal[null]]] begin[{] call[variantStudyMetadata.setCohorts, parameter[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))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=coho, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=coho, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=cohort, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), 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="Cohort with id '{}' already exists in study '{}'"), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=cohort, selectors=[], type_arguments=None), MemberReference(member=studyId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCohorts, postfix_operators=[], prefix_operators=[], qualifier=variantStudyMetadata, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=coho)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cohort, sub_type=None))), label=None) call[variantStudyMetadata.getCohorts, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addCohort] operator[SEP] identifier[Cohort] identifier[cohort] , identifier[String] identifier[studyId] operator[SEP] { Keyword[if] operator[SEP] identifier[cohort] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[cohort] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[VariantStudyMetadata] identifier[variantStudyMetadata] operator[=] identifier[getVariantStudyMetadata] operator[SEP] identifier[studyId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variantStudyMetadata] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[studyId] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[variantStudyMetadata] operator[SEP] identifier[getCohorts] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[variantStudyMetadata] operator[SEP] identifier[setCohorts] operator[SEP] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Cohort] identifier[coho] operator[:] identifier[variantStudyMetadata] operator[SEP] identifier[getCohorts] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[coho] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[coho] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[cohort] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[cohort] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[studyId] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } identifier[variantStudyMetadata] operator[SEP] identifier[getCohorts] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[cohort] operator[SEP] operator[SEP] }
private synchronized void processConfig(boolean updateSSLConfigManager) { if (componentContext == null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Not yet activated, can not process config"); } return; } if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Processing configuration " + updateSSLConfigManager); } boolean isServer = locSvc.resolveString(WsLocationConstants.SYMBOL_PROCESS_TYPE).equals(WsLocationConstants.LOC_PROCESS_TYPE_SERVER); Dictionary<String, Object> serviceProps = new Hashtable<String, Object>(config); serviceProps.put(REPERTOIRE_IDS, repertoireMap.keySet().toArray(new String[repertoireMap.size()])); serviceProps.put(KEYSTORE_IDS, keystoreIdMap.keySet().toArray(new String[keystoreIdMap.size()])); serviceProps.put(REPERTOIRE_PIDS, repertoirePIDMap.keySet().toArray(new String[repertoirePIDMap.size()])); if (updateSSLConfigManager) { try { // pass reinitialize=true to redo config SSLConfigManager.getInstance().initializeSSL(getGlobalProps(), true, isServer, transportSecurityEnabled, repertoirePIDMap); } catch (SSLException e) { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Exception processing SSL configuration; " + e); } } } if (!repertoireMap.isEmpty() && !keystoreIdMap.isEmpty()) { serviceProps.put(SSL_SUPPORT_KEY, SSL_SUPPORT_VALUE_ACTIVE); } this.componentContext.setServiceProperties(serviceProps); }
class class_name[name] begin[{] method[processConfig, return_type[void], modifier[synchronized private], parameter[updateSSLConfigManager]] begin[{] if[binary_operation[member[.componentContext], ==, literal[null]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["Not yet activated, can not process config"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{] call[Tr.event, parameter[member[.tc], binary_operation[literal["Processing configuration "], +, member[.updateSSLConfigManager]]]] else begin[{] None end[}] local_variable[type[boolean], isServer] local_variable[type[Dictionary], serviceProps] call[serviceProps.put, parameter[member[.REPERTOIRE_IDS], call[repertoireMap.keySet, parameter[]]]] call[serviceProps.put, parameter[member[.KEYSTORE_IDS], call[keystoreIdMap.keySet, parameter[]]]] call[serviceProps.put, parameter[member[.REPERTOIRE_PIDS], call[repertoirePIDMap.keySet, parameter[]]]] if[member[.updateSSLConfigManager]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=SSLConfigManager, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGlobalProps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=isServer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=transportSecurityEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=repertoirePIDMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initializeSSL, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[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=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception processing SSL configuration; "), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SSLException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[call[repertoireMap.isEmpty, parameter[]], &&, call[keystoreIdMap.isEmpty, parameter[]]]] begin[{] call[serviceProps.put, parameter[member[.SSL_SUPPORT_KEY], member[.SSL_SUPPORT_VALUE_ACTIVE]]] else begin[{] None end[}] THIS[member[None.componentContext]call[None.setServiceProperties, parameter[member[.serviceProps]]]] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[void] identifier[processConfig] operator[SEP] Keyword[boolean] identifier[updateSSLConfigManager] operator[SEP] { Keyword[if] operator[SEP] identifier[componentContext] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] 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[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[updateSSLConfigManager] operator[SEP] operator[SEP] } Keyword[boolean] identifier[isServer] operator[=] identifier[locSvc] operator[SEP] identifier[resolveString] operator[SEP] identifier[WsLocationConstants] operator[SEP] identifier[SYMBOL_PROCESS_TYPE] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[WsLocationConstants] operator[SEP] identifier[LOC_PROCESS_TYPE_SERVER] operator[SEP] operator[SEP] identifier[Dictionary] operator[<] identifier[String] , identifier[Object] operator[>] identifier[serviceProps] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[serviceProps] operator[SEP] identifier[put] operator[SEP] identifier[REPERTOIRE_IDS] , identifier[repertoireMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[repertoireMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[serviceProps] operator[SEP] identifier[put] operator[SEP] identifier[KEYSTORE_IDS] , identifier[keystoreIdMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[keystoreIdMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[serviceProps] operator[SEP] identifier[put] operator[SEP] identifier[REPERTOIRE_PIDS] , identifier[repertoirePIDMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[repertoirePIDMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[updateSSLConfigManager] operator[SEP] { Keyword[try] { identifier[SSLConfigManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[initializeSSL] operator[SEP] identifier[getGlobalProps] operator[SEP] operator[SEP] , literal[boolean] , identifier[isServer] , identifier[transportSecurityEnabled] , identifier[repertoirePIDMap] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SSLException] identifier[e] 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[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[e] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[repertoireMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[keystoreIdMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[serviceProps] operator[SEP] identifier[put] operator[SEP] identifier[SSL_SUPPORT_KEY] , identifier[SSL_SUPPORT_VALUE_ACTIVE] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[componentContext] operator[SEP] identifier[setServiceProperties] operator[SEP] identifier[serviceProps] operator[SEP] operator[SEP] }
public Stream<TreeItem> getTreeStream(Object projectIdOrPath, String filePath, String refName, Boolean recursive) throws GitLabApiException { return (getTree(projectIdOrPath, filePath, refName, recursive, getDefaultPerPage()).stream()); }
class class_name[name] begin[{] method[getTreeStream, return_type[type[Stream]], modifier[public], parameter[projectIdOrPath, filePath, refName, recursive]] begin[{] return[call[.getTree, parameter[member[.projectIdOrPath], member[.filePath], member[.refName], member[.recursive], call[.getDefaultPerPage, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Stream] operator[<] identifier[TreeItem] operator[>] identifier[getTreeStream] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[String] identifier[filePath] , identifier[String] identifier[refName] , identifier[Boolean] identifier[recursive] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] operator[SEP] identifier[getTree] operator[SEP] identifier[projectIdOrPath] , identifier[filePath] , identifier[refName] , identifier[recursive] , identifier[getDefaultPerPage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void removeByUuid(String uuid) { for (CommerceAvailabilityEstimate commerceAvailabilityEstimate : findByUuid( uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceAvailabilityEstimate); } }
class class_name[name] begin[{] method[removeByUuid, return_type[void], modifier[public], parameter[uuid]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceAvailabilityEstimate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commerceAvailabilityEstimate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommerceAvailabilityEstimate, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid] operator[SEP] identifier[String] identifier[uuid] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceAvailabilityEstimate] identifier[commerceAvailabilityEstimate] operator[:] identifier[findByUuid] operator[SEP] identifier[uuid] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[commerceAvailabilityEstimate] operator[SEP] operator[SEP] } }
public String convertIfcChillerTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcChillerTypeEnumToString, 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[convertIfcChillerTypeEnumToString] 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] }
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<ImportDataOperationResponse, ImportDataOperationMetadata> importDataAsync(ImportDataRequest request) { return importDataOperationCallable().futureCall(request); }
class class_name[name] begin[{] method[importDataAsync, return_type[type[OperationFuture]], modifier[final public], parameter[request]] begin[{] return[call[.importDataOperationCallable, parameter[]]] end[}] END[}]
annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[ImportDataOperationResponse] , identifier[ImportDataOperationMetadata] operator[>] identifier[importDataAsync] operator[SEP] identifier[ImportDataRequest] identifier[request] operator[SEP] { Keyword[return] identifier[importDataOperationCallable] operator[SEP] operator[SEP] operator[SEP] identifier[futureCall] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Nonnull public CollectionReference collection(@Nonnull String collectionPath) { return new CollectionReference(firestore, path.append(collectionPath)); }
class class_name[name] begin[{] method[collection, return_type[type[CollectionReference]], modifier[public], parameter[collectionPath]] begin[{] return[ClassCreator(arguments=[MemberReference(member=firestore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=collectionPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CollectionReference, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[CollectionReference] identifier[collection] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[collectionPath] operator[SEP] { Keyword[return] Keyword[new] identifier[CollectionReference] operator[SEP] identifier[firestore] , identifier[path] operator[SEP] identifier[append] operator[SEP] identifier[collectionPath] operator[SEP] operator[SEP] operator[SEP] }
public void click() { assertElementNotStale(); assertElementDisplayed(); parent.getScopeServices().captureOperaIdle(); if (getTagName().equals("OPTION")) { callMethod("return " + OperaAtom.CLICK + "(locator)"); } else { parent.getMouse().click(getCoordinates()); } try { parent.waitForLoadToComplete(); } catch (ResponseNotReceivedException e) { // This might be expected logger.fine("Response not received, returning control to user"); } }
class class_name[name] begin[{] method[click, return_type[void], modifier[public], parameter[]] begin[{] call[.assertElementNotStale, parameter[]] call[.assertElementDisplayed, parameter[]] call[parent.getScopeServices, parameter[]] if[call[.getTagName, parameter[]]] begin[{] call[.callMethod, parameter[binary_operation[binary_operation[literal["return "], +, member[OperaAtom.CLICK]], +, literal["(locator)"]]]] else begin[{] call[parent.getMouse, parameter[]] end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=waitForLoadToComplete, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Response not received, returning control to user")], member=fine, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ResponseNotReceivedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[click] operator[SEP] operator[SEP] { identifier[assertElementNotStale] operator[SEP] operator[SEP] operator[SEP] identifier[assertElementDisplayed] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[getScopeServices] operator[SEP] operator[SEP] operator[SEP] identifier[captureOperaIdle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getTagName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[callMethod] operator[SEP] literal[String] operator[+] identifier[OperaAtom] operator[SEP] identifier[CLICK] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[parent] operator[SEP] identifier[getMouse] operator[SEP] operator[SEP] operator[SEP] identifier[click] operator[SEP] identifier[getCoordinates] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[parent] operator[SEP] identifier[waitForLoadToComplete] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ResponseNotReceivedException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public void addAudioPayloadTypes(final List<PayloadType.Audio> pts) { synchronized (payloads) { Iterator<PayloadType.Audio> ptIter = pts.iterator(); while (ptIter.hasNext()) { PayloadType.Audio pt = ptIter.next(); addJinglePayloadType(new JinglePayloadType.Audio(pt)); } } }
class class_name[name] begin[{] method[addAudioPayloadTypes, return_type[void], modifier[public], parameter[pts]] begin[{] SYNCHRONIZED[member[.payloads]] BEGIN[{] local_variable[type[Iterator], ptIter] while[call[ptIter.hasNext, parameter[]]] begin[{] local_variable[type[PayloadType], pt] call[.addJinglePayloadType, parameter[ClassCreator(arguments=[MemberReference(member=pt, 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=JinglePayloadType, sub_type=ReferenceType(arguments=None, dimensions=None, name=Audio, sub_type=None)))]] end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAudioPayloadTypes] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[PayloadType] operator[SEP] identifier[Audio] operator[>] identifier[pts] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[payloads] operator[SEP] { identifier[Iterator] operator[<] identifier[PayloadType] operator[SEP] identifier[Audio] operator[>] identifier[ptIter] operator[=] identifier[pts] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[ptIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[PayloadType] operator[SEP] identifier[Audio] identifier[pt] operator[=] identifier[ptIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[addJinglePayloadType] operator[SEP] Keyword[new] identifier[JinglePayloadType] operator[SEP] identifier[Audio] operator[SEP] identifier[pt] operator[SEP] operator[SEP] operator[SEP] } } }
private static String unescapeString(String str){ if(str.startsWith("\"") && str.endsWith("\"")){ String s = str.replaceAll("\\\\\"", "\""); return s.substring(1, s.length() -1); } return null; }
class class_name[name] begin[{] method[unescapeString, return_type[type[String]], modifier[private static], parameter[str]] begin[{] if[binary_operation[call[str.startsWith, parameter[literal["\""]]], &&, call[str.endsWith, parameter[literal["\""]]]]] begin[{] local_variable[type[String], s] return[call[s.substring, parameter[literal[1], binary_operation[call[s.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[unescapeString] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[str] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[str] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
static SearchBuilder fromJson(String json) { try { return JsonSerializer.fromString(json, SearchBuilderLegacy.class).builder; } catch (IOException e) { throw new IndexException(e, "Unparseable JSON search: {}", json); } }
class class_name[name] begin[{] method[fromJson, return_type[type[SearchBuilder]], modifier[static], parameter[json]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SearchBuilderLegacy, sub_type=None))], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=JsonSerializer, selectors=[MemberReference(member=builder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unparseable JSON search: {}"), MemberReference(member=json, 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=IndexException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] identifier[SearchBuilder] identifier[fromJson] operator[SEP] identifier[String] identifier[json] operator[SEP] { Keyword[try] { Keyword[return] identifier[JsonSerializer] operator[SEP] identifier[fromString] operator[SEP] identifier[json] , identifier[SearchBuilderLegacy] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[builder] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IndexException] operator[SEP] identifier[e] , literal[String] , identifier[json] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") @Override public EList<IfcPcurve> getAssociatedGeometry() { return (EList<IfcPcurve>) eGet(Ifc4Package.Literals.IFC_SURFACE_CURVE__ASSOCIATED_GEOMETRY, true); }
class class_name[name] begin[{] method[getAssociatedGeometry, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_SURFACE_CURVE__ASSOCIATED_GEOMETRY, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcPcurve, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcPcurve] operator[>] identifier[getAssociatedGeometry] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcPcurve] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_SURFACE_CURVE__ASSOCIATED_GEOMETRY] , literal[boolean] operator[SEP] operator[SEP] }
private String getFieldAccessorName(TypeToken<?> recordType, String fieldName) { return String.format("%s$%s", normalizeTypeName(recordType), fieldName); }
class class_name[name] begin[{] method[getFieldAccessorName, return_type[type[String]], modifier[private], parameter[recordType, fieldName]] begin[{] return[call[String.format, parameter[literal["%s$%s"], call[.normalizeTypeName, parameter[member[.recordType]]], member[.fieldName]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getFieldAccessorName] operator[SEP] identifier[TypeToken] operator[<] operator[?] operator[>] identifier[recordType] , identifier[String] identifier[fieldName] operator[SEP] { Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[normalizeTypeName] operator[SEP] identifier[recordType] operator[SEP] , identifier[fieldName] operator[SEP] operator[SEP] }
private void readNextBlock() throws IOException { lastReadInputCheckpoint = input.getCheckpoint(); int control = input.read(); if (control == -1) { throw new OrcCorruptionException(input.getOrcDataSourceId(), "Read past end of buffer RLE byte"); } offset = 0; // if byte high bit is not set, this is a repetition; otherwise it is a literal sequence if ((control & 0x80) == 0) { length = control + MIN_REPEAT_SIZE; // read the repeated value int value = input.read(); if (value == -1) { throw new OrcCorruptionException(input.getOrcDataSourceId(), "Reading RLE byte got EOF"); } // fill buffer with the value Arrays.fill(buffer, 0, length, (byte) value); } else { // length is 2's complement of byte length = 0x100 - control; // read the literals into the buffer input.readFully(buffer, 0, length); } }
class class_name[name] begin[{] method[readNextBlock, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.lastReadInputCheckpoint], call[input.getCheckpoint, parameter[]]] local_variable[type[int], control] if[binary_operation[member[.control], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOrcDataSourceId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Read past end of buffer RLE byte")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcCorruptionException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.offset], literal[0]] if[binary_operation[binary_operation[member[.control], &, literal[0x80]], ==, literal[0]]] begin[{] assign[member[.length], binary_operation[member[.control], +, member[.MIN_REPEAT_SIZE]]] local_variable[type[int], value] if[binary_operation[member[.value], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOrcDataSourceId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Reading RLE byte got EOF")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcCorruptionException, sub_type=None)), label=None) else begin[{] None end[}] call[Arrays.fill, parameter[member[.buffer], literal[0], member[.length], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))]] else begin[{] assign[member[.length], binary_operation[literal[0x100], -, member[.control]]] call[input.readFully, parameter[member[.buffer], literal[0], member[.length]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[readNextBlock] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[lastReadInputCheckpoint] operator[=] identifier[input] operator[SEP] identifier[getCheckpoint] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[control] operator[=] identifier[input] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[control] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[OrcCorruptionException] operator[SEP] identifier[input] operator[SEP] identifier[getOrcDataSourceId] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[offset] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[control] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[length] operator[=] identifier[control] operator[+] identifier[MIN_REPEAT_SIZE] operator[SEP] Keyword[int] identifier[value] operator[=] identifier[input] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[OrcCorruptionException] operator[SEP] identifier[input] operator[SEP] identifier[getOrcDataSourceId] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[Arrays] operator[SEP] identifier[fill] operator[SEP] identifier[buffer] , Other[0] , identifier[length] , operator[SEP] Keyword[byte] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[length] operator[=] literal[Integer] operator[-] identifier[control] operator[SEP] identifier[input] operator[SEP] identifier[readFully] operator[SEP] identifier[buffer] , Other[0] , identifier[length] operator[SEP] operator[SEP] } }
public final void ruleDisjunction() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXtext.g:633:2: ( ( ( rule__Disjunction__Group__0 ) ) ) // InternalXtext.g:634:2: ( ( rule__Disjunction__Group__0 ) ) { // InternalXtext.g:634:2: ( ( rule__Disjunction__Group__0 ) ) // InternalXtext.g:635:3: ( rule__Disjunction__Group__0 ) { before(grammarAccess.getDisjunctionAccess().getGroup()); // InternalXtext.g:636:3: ( rule__Disjunction__Group__0 ) // InternalXtext.g:636:4: rule__Disjunction__Group__0 { pushFollow(FollowSets000.FOLLOW_2); rule__Disjunction__Group__0(); state._fsp--; } after(grammarAccess.getDisjunctionAccess().getGroup()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
class class_name[name] begin[{] method[ruleDisjunction, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[int], stackSize] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDisjunctionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getGroup, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=rule__Disjunction__Group__0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None)]), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDisjunctionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getGroup, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=restoreStackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[ruleDisjunction] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[stackSize] operator[=] identifier[keepStackSize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getDisjunctionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[rule__Disjunction__Group__0] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] } identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getDisjunctionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { identifier[restoreStackSize] operator[SEP] identifier[stackSize] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] }
private FatType fatTypeFromDevice() throws IOException { final long sizeInMb = device.getSize() / (1024 * 1024); if (sizeInMb < 5) { return FatType.FAT12; } else if (sizeInMb < 512) { return FatType.FAT16; } else { return FatType.FAT32; } }
class class_name[name] begin[{] method[fatTypeFromDevice, return_type[type[FatType]], modifier[private], parameter[]] begin[{] local_variable[type[long], sizeInMb] if[binary_operation[member[.sizeInMb], <, literal[5]]] begin[{] return[member[FatType.FAT12]] else begin[{] if[binary_operation[member[.sizeInMb], <, literal[512]]] begin[{] return[member[FatType.FAT16]] else begin[{] return[member[FatType.FAT32]] end[}] end[}] end[}] END[}]
Keyword[private] identifier[FatType] identifier[fatTypeFromDevice] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[long] identifier[sizeInMb] operator[=] identifier[device] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[/] operator[SEP] Other[1024] operator[*] Other[1024] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sizeInMb] operator[<] Other[5] operator[SEP] { Keyword[return] identifier[FatType] operator[SEP] identifier[FAT12] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sizeInMb] operator[<] Other[512] operator[SEP] { Keyword[return] identifier[FatType] operator[SEP] identifier[FAT16] operator[SEP] } Keyword[else] { Keyword[return] identifier[FatType] operator[SEP] identifier[FAT32] operator[SEP] } }
public static Date plusYears(Date date, int years) { return plus(date, years, DateTimeField.YEAR); }
class class_name[name] begin[{] method[plusYears, return_type[type[Date]], modifier[public static], parameter[date, years]] begin[{] return[call[.plus, parameter[member[.date], member[.years], member[DateTimeField.YEAR]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[plusYears] operator[SEP] identifier[Date] identifier[date] , Keyword[int] identifier[years] operator[SEP] { Keyword[return] identifier[plus] operator[SEP] identifier[date] , identifier[years] , identifier[DateTimeField] operator[SEP] identifier[YEAR] operator[SEP] operator[SEP] }
protected void reconnect(Session session) { if (this.hsClient.isStarted()) { if (log.isDebugEnabled()) { log.debug("Add reconnectRequest to connector " + session.getRemoteSocketAddress()); } HandlerSocketSession hSession = (HandlerSocketSession) session; InetSocketAddress addr = hSession.getRemoteSocketAddress(); this.hsClient.getConnector().addToWatingQueue( new ReconnectRequest(addr, 0, this.hsClient .getHealConnectionInterval())); } }
class class_name[name] begin[{] method[reconnect, return_type[void], modifier[protected], parameter[session]] begin[{] if[THIS[member[None.hsClient]call[None.isStarted, parameter[]]]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[literal["Add reconnectRequest to connector "], +, call[session.getRemoteSocketAddress, parameter[]]]]] else begin[{] None end[}] local_variable[type[HandlerSocketSession], hSession] local_variable[type[InetSocketAddress], addr] THIS[member[None.hsClient]call[None.getConnector, parameter[]]call[None.addToWatingQueue, parameter[ClassCreator(arguments=[MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=hsClient, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getHealConnectionInterval, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReconnectRequest, sub_type=None))]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[reconnect] operator[SEP] identifier[Session] identifier[session] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hsClient] operator[SEP] identifier[isStarted] 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[session] operator[SEP] identifier[getRemoteSocketAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[HandlerSocketSession] identifier[hSession] operator[=] operator[SEP] identifier[HandlerSocketSession] operator[SEP] identifier[session] operator[SEP] identifier[InetSocketAddress] identifier[addr] operator[=] identifier[hSession] operator[SEP] identifier[getRemoteSocketAddress] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[hsClient] operator[SEP] identifier[getConnector] operator[SEP] operator[SEP] operator[SEP] identifier[addToWatingQueue] operator[SEP] Keyword[new] identifier[ReconnectRequest] operator[SEP] identifier[addr] , Other[0] , Keyword[this] operator[SEP] identifier[hsClient] operator[SEP] identifier[getHealConnectionInterval] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void start(BundleContext bc) throws Exception { /* * The pax-web-war service can take a little longer to start, we can't * say how much it will take, so we do need to sit down a while and wait * it's availability in order to use it's reference. * * This is a MUST, it's really important - mostly when using the * config.ini file (Equinox). * * Anaximandro April 19, 2010. */ int counter = 0; boolean started = false; while (!started) { webContainerRef = bc.getServiceReference(WebContainer.class); started = webContainerRef != null; if (started) { final WebContainer webContainer = (WebContainer) bc .getService(webContainerRef); if (webContainer != null) { httpContext = webContainer .createDefaultHttpContext(); // set a session timeout of 10 minutes webContainer.setSessionTimeout(10, httpContext); // register the hello world servlet for filtering with url // pattern final Dictionary<String, Object> initParamsServlet = new Hashtable<>(); initParamsServlet.put("from", "WebContainer"); helloWorldServlet = new HelloWorldServlet(); webContainer.registerServlet(helloWorldServlet, // registered // servlet new String[]{"/helloworld/wc"}, // url patterns initParamsServlet, // init params httpContext // http context ); // register the hello world filter based on url paterns final Dictionary<String, Object> initParamsFilter = new Hashtable<>(); initParamsFilter.put("title", "Hello World (url pattern)"); helloWorldFilter = new HelloWorldFilter(); webContainer.registerFilter(helloWorldFilter, // registered // filter new String[]{"/helloworld/wc"}, // url patterns null, // servlet names initParamsFilter, // init params httpContext // http context ); worldServlet = new HelloWorldServlet(); webContainer.registerServlet(worldServlet, // registered // servlet "HelloWorld", // servlet name new String[]{"/helloworld/wc/sn"}, // url // patterns initParamsServlet, // init params httpContext // http context ); // register the hello world filter based on servlet name initParamsFilter.put("title", "Hello World (servlet name)"); webContainer.registerFilter(new HelloWorldFilter(), // registered // filter null, // url patterns new String[]{"HelloWorld"}, // servlet names initParamsFilter, // init params httpContext // http context ); helloWorldListener = new HelloWorldListener(); webContainer.registerEventListener( helloWorldListener, // registered request // listener httpContext // http context ); sessionListener = new HelloWorldSessionListener(); webContainer.registerEventListener( sessionListener, // registered // session // listener httpContext // http context ); // register images as resources webContainer.registerResources("/images", "/images", httpContext); // register a welcome file - should be used for ALL resource servlets // - default and non default webContainer.registerWelcomeFiles( new String[] { "index.html" }, true, httpContext); // register static htmls webContainer.registerResources("/html", "/html", httpContext); errorServlet = new HelloWorldErrorServlet(); webContainer.registerServlet(errorServlet, // registered // servlet new String[]{"/helloworld/wc/error"}, // url // patterns null, // no init params httpContext // http context ); errorMakerServlet = new HelloWorldErrorMakerServlet(); webContainer.registerServlet( errorMakerServlet, // registered // servlet new String[]{"/helloworld/wc/error/create"}, // url // patterns null, // no init params httpContext // http context ); // register error page for any Exception webContainer.registerErrorPage("java.lang.Exception", // fully // qualified // name "/helloworld/wc/error", // path to error servlet httpContext // http context ); // register error page for 404 (Page not found) webContainer.registerErrorPage("404", // error code "/helloworld/wc/error", // path to error servlet httpContext // http context ); webContainer.end(httpContext); } } else { // wait, throw exception after 5 retries. if (counter > 10) { throw new Exception( "Could not start the helloworld-wc service, WebContainer service not started or not available."); } else { counter++; Thread.sleep(counter * 1000); } } } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[bc]] begin[{] local_variable[type[int], counter] local_variable[type[boolean], started] while[member[.started]] begin[{] assign[member[.webContainerRef], call[bc.getServiceReference, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebContainer, sub_type=None))]]] assign[member[.started], binary_operation[member[.webContainerRef], !=, literal[null]]] if[member[.started]] begin[{] local_variable[type[WebContainer], webContainer] if[binary_operation[member[.webContainer], !=, literal[null]]] begin[{] assign[member[.httpContext], call[webContainer.createDefaultHttpContext, parameter[]]] call[webContainer.setSessionTimeout, parameter[literal[10], member[.httpContext]]] local_variable[type[Dictionary], initParamsServlet] call[initParamsServlet.put, parameter[literal["from"], literal["WebContainer"]]] assign[member[.helloWorldServlet], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldServlet, sub_type=None))] call[webContainer.registerServlet, parameter[member[.helloWorldServlet], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/helloworld/wc")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), member[.initParamsServlet], member[.httpContext]]] local_variable[type[Dictionary], initParamsFilter] call[initParamsFilter.put, parameter[literal["title"], literal["Hello World (url pattern)"]]] assign[member[.helloWorldFilter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldFilter, sub_type=None))] call[webContainer.registerFilter, parameter[member[.helloWorldFilter], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/helloworld/wc")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), literal[null], member[.initParamsFilter], member[.httpContext]]] assign[member[.worldServlet], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldServlet, sub_type=None))] call[webContainer.registerServlet, parameter[member[.worldServlet], literal["HelloWorld"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/helloworld/wc/sn")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), member[.initParamsServlet], member[.httpContext]]] call[initParamsFilter.put, parameter[literal["title"], literal["Hello World (servlet name)"]]] call[webContainer.registerFilter, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldFilter, sub_type=None)), literal[null], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HelloWorld")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), member[.initParamsFilter], member[.httpContext]]] assign[member[.helloWorldListener], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldListener, sub_type=None))] call[webContainer.registerEventListener, parameter[member[.helloWorldListener], member[.httpContext]]] assign[member[.sessionListener], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldSessionListener, sub_type=None))] call[webContainer.registerEventListener, parameter[member[.sessionListener], member[.httpContext]]] call[webContainer.registerResources, parameter[literal["/images"], literal["/images"], member[.httpContext]]] call[webContainer.registerWelcomeFiles, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="index.html")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), literal[true], member[.httpContext]]] call[webContainer.registerResources, parameter[literal["/html"], literal["/html"], member[.httpContext]]] assign[member[.errorServlet], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldErrorServlet, sub_type=None))] call[webContainer.registerServlet, parameter[member[.errorServlet], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/helloworld/wc/error")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), literal[null], member[.httpContext]]] assign[member[.errorMakerServlet], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HelloWorldErrorMakerServlet, sub_type=None))] call[webContainer.registerServlet, parameter[member[.errorMakerServlet], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/helloworld/wc/error/create")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), literal[null], member[.httpContext]]] call[webContainer.registerErrorPage, parameter[literal["java.lang.Exception"], literal["/helloworld/wc/error"], member[.httpContext]]] call[webContainer.registerErrorPage, parameter[literal["404"], literal["/helloworld/wc/error"], member[.httpContext]]] call[webContainer.end, parameter[member[.httpContext]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[.counter], >, literal[10]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not start the helloworld-wc service, WebContainer service not started or not available.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] member[.counter] call[Thread.sleep, parameter[binary_operation[member[.counter], *, literal[1000]]]] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[BundleContext] identifier[bc] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[counter] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[started] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[started] operator[SEP] { identifier[webContainerRef] operator[=] identifier[bc] operator[SEP] identifier[getServiceReference] operator[SEP] identifier[WebContainer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[started] operator[=] identifier[webContainerRef] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[started] operator[SEP] { Keyword[final] identifier[WebContainer] identifier[webContainer] operator[=] operator[SEP] identifier[WebContainer] operator[SEP] identifier[bc] operator[SEP] identifier[getService] operator[SEP] identifier[webContainerRef] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[webContainer] operator[!=] Other[null] operator[SEP] { identifier[httpContext] operator[=] identifier[webContainer] operator[SEP] identifier[createDefaultHttpContext] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[setSessionTimeout] operator[SEP] Other[10] , identifier[httpContext] operator[SEP] operator[SEP] Keyword[final] identifier[Dictionary] operator[<] identifier[String] , identifier[Object] operator[>] identifier[initParamsServlet] operator[=] Keyword[new] identifier[Hashtable] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[initParamsServlet] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[helloWorldServlet] operator[=] Keyword[new] identifier[HelloWorldServlet] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerServlet] operator[SEP] identifier[helloWorldServlet] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , identifier[initParamsServlet] , identifier[httpContext] operator[SEP] operator[SEP] Keyword[final] identifier[Dictionary] operator[<] identifier[String] , identifier[Object] operator[>] identifier[initParamsFilter] operator[=] Keyword[new] identifier[Hashtable] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[initParamsFilter] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[helloWorldFilter] operator[=] Keyword[new] identifier[HelloWorldFilter] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerFilter] operator[SEP] identifier[helloWorldFilter] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , Other[null] , identifier[initParamsFilter] , identifier[httpContext] operator[SEP] operator[SEP] identifier[worldServlet] operator[=] Keyword[new] identifier[HelloWorldServlet] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerServlet] operator[SEP] identifier[worldServlet] , literal[String] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , identifier[initParamsServlet] , identifier[httpContext] operator[SEP] operator[SEP] identifier[initParamsFilter] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerFilter] operator[SEP] Keyword[new] identifier[HelloWorldFilter] operator[SEP] operator[SEP] , Other[null] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , identifier[initParamsFilter] , identifier[httpContext] operator[SEP] operator[SEP] identifier[helloWorldListener] operator[=] Keyword[new] identifier[HelloWorldListener] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerEventListener] operator[SEP] identifier[helloWorldListener] , identifier[httpContext] operator[SEP] operator[SEP] identifier[sessionListener] operator[=] Keyword[new] identifier[HelloWorldSessionListener] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerEventListener] operator[SEP] identifier[sessionListener] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerResources] operator[SEP] literal[String] , literal[String] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerWelcomeFiles] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , literal[boolean] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerResources] operator[SEP] literal[String] , literal[String] , identifier[httpContext] operator[SEP] operator[SEP] identifier[errorServlet] operator[=] Keyword[new] identifier[HelloWorldErrorServlet] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerServlet] operator[SEP] identifier[errorServlet] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , Other[null] , identifier[httpContext] operator[SEP] operator[SEP] identifier[errorMakerServlet] operator[=] Keyword[new] identifier[HelloWorldErrorMakerServlet] operator[SEP] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerServlet] operator[SEP] identifier[errorMakerServlet] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , Other[null] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerErrorPage] operator[SEP] literal[String] , literal[String] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[registerErrorPage] operator[SEP] literal[String] , literal[String] , identifier[httpContext] operator[SEP] operator[SEP] identifier[webContainer] operator[SEP] identifier[end] operator[SEP] identifier[httpContext] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[counter] operator[>] Other[10] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[counter] operator[++] operator[SEP] identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[counter] operator[*] Other[1000] operator[SEP] operator[SEP] } } } }
public static InitialValueFinder newInstance(final FieldNode variable, final Initialisers initialisers, final EnhancedClassNode enhancedClassNode) { return new InitialValueFinder(checkNotNull(variable), checkNotNull(initialisers), checkNotNull(enhancedClassNode)); }
class class_name[name] begin[{] method[newInstance, return_type[type[InitialValueFinder]], modifier[public static], parameter[variable, initialisers, enhancedClassNode]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=variable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=initialisers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=enhancedClassNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, 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=InitialValueFinder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[InitialValueFinder] identifier[newInstance] operator[SEP] Keyword[final] identifier[FieldNode] identifier[variable] , Keyword[final] identifier[Initialisers] identifier[initialisers] , Keyword[final] identifier[EnhancedClassNode] identifier[enhancedClassNode] operator[SEP] { Keyword[return] Keyword[new] identifier[InitialValueFinder] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[variable] operator[SEP] , identifier[checkNotNull] operator[SEP] identifier[initialisers] operator[SEP] , identifier[checkNotNull] operator[SEP] identifier[enhancedClassNode] operator[SEP] operator[SEP] operator[SEP] }
static List<String> parseForSummarise(final Reader input, final CsvMapper inputMapper, final CsvSchema inputSchema, final JDefaultDict<String, AtomicInteger> emptyCounts, final JDefaultDict<String, AtomicInteger> nonEmptyCounts, final JDefaultDict<String, AtomicBoolean> possibleIntegerFields, final JDefaultDict<String, AtomicBoolean> possibleDoubleFields, final JDefaultDict<String, JDefaultDict<String, AtomicInteger>> valueCounts, final AtomicInteger rowCount, final List<String> overrideHeaders, final int headerLineCount, List<String> defaultValues) throws IOException, CSVStreamException { final long startTime = System.currentTimeMillis(); final BiFunction<List<String>, List<String>, List<String>> summariseFunction = getSummaryFunctionWithStartTime( emptyCounts, nonEmptyCounts, possibleIntegerFields, possibleDoubleFields, valueCounts, rowCount, startTime); return parseForSummarise(input, inputMapper, inputSchema, overrideHeaders, headerLineCount, defaultValues, summariseFunction); }
class class_name[name] begin[{] method[parseForSummarise, return_type[type[List]], modifier[static], parameter[input, inputMapper, inputSchema, emptyCounts, nonEmptyCounts, possibleIntegerFields, possibleDoubleFields, valueCounts, rowCount, overrideHeaders, headerLineCount, defaultValues]] begin[{] local_variable[type[long], startTime] local_variable[type[BiFunction], summariseFunction] return[call[.parseForSummarise, parameter[member[.input], member[.inputMapper], member[.inputSchema], member[.overrideHeaders], member[.headerLineCount], member[.defaultValues], member[.summariseFunction]]]] end[}] END[}]
Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[parseForSummarise] operator[SEP] Keyword[final] identifier[Reader] identifier[input] , Keyword[final] identifier[CsvMapper] identifier[inputMapper] , Keyword[final] identifier[CsvSchema] identifier[inputSchema] , Keyword[final] identifier[JDefaultDict] operator[<] identifier[String] , identifier[AtomicInteger] operator[>] identifier[emptyCounts] , Keyword[final] identifier[JDefaultDict] operator[<] identifier[String] , identifier[AtomicInteger] operator[>] identifier[nonEmptyCounts] , Keyword[final] identifier[JDefaultDict] operator[<] identifier[String] , identifier[AtomicBoolean] operator[>] identifier[possibleIntegerFields] , Keyword[final] identifier[JDefaultDict] operator[<] identifier[String] , identifier[AtomicBoolean] operator[>] identifier[possibleDoubleFields] , Keyword[final] identifier[JDefaultDict] operator[<] identifier[String] , identifier[JDefaultDict] operator[<] identifier[String] , identifier[AtomicInteger] operator[>] operator[>] identifier[valueCounts] , Keyword[final] identifier[AtomicInteger] identifier[rowCount] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[overrideHeaders] , Keyword[final] Keyword[int] identifier[headerLineCount] , identifier[List] operator[<] identifier[String] operator[>] identifier[defaultValues] operator[SEP] Keyword[throws] identifier[IOException] , identifier[CSVStreamException] { Keyword[final] Keyword[long] identifier[startTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[BiFunction] operator[<] identifier[List] operator[<] identifier[String] operator[>] , identifier[List] operator[<] identifier[String] operator[>] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[summariseFunction] operator[=] identifier[getSummaryFunctionWithStartTime] operator[SEP] identifier[emptyCounts] , identifier[nonEmptyCounts] , identifier[possibleIntegerFields] , identifier[possibleDoubleFields] , identifier[valueCounts] , identifier[rowCount] , identifier[startTime] operator[SEP] operator[SEP] Keyword[return] identifier[parseForSummarise] operator[SEP] identifier[input] , identifier[inputMapper] , identifier[inputSchema] , identifier[overrideHeaders] , identifier[headerLineCount] , identifier[defaultValues] , identifier[summariseFunction] operator[SEP] operator[SEP] }
public void bindUpTo(Phase phase) { checkUnbound(); source.addObservableListener(sourceListener); target.addObservableListener(targetListener); boundPhase = phase; // push to synchronize values initially pushUpTo(phase); }
class class_name[name] begin[{] method[bindUpTo, return_type[void], modifier[public], parameter[phase]] begin[{] call[.checkUnbound, parameter[]] call[source.addObservableListener, parameter[member[.sourceListener]]] call[target.addObservableListener, parameter[member[.targetListener]]] assign[member[.boundPhase], member[.phase]] call[.pushUpTo, parameter[member[.phase]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[bindUpTo] operator[SEP] identifier[Phase] identifier[phase] operator[SEP] { identifier[checkUnbound] operator[SEP] operator[SEP] operator[SEP] identifier[source] operator[SEP] identifier[addObservableListener] operator[SEP] identifier[sourceListener] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[addObservableListener] operator[SEP] identifier[targetListener] operator[SEP] operator[SEP] identifier[boundPhase] operator[=] identifier[phase] operator[SEP] identifier[pushUpTo] operator[SEP] identifier[phase] operator[SEP] operator[SEP] }
private static Map<TypeVariable<?>, Type> getTypeArguments(final Type type, final Class<?> toClass, final Map<TypeVariable<?>, Type> subtypeVarAssigns) { if (type instanceof Class<?>) { return getTypeArguments((Class<?>) type, toClass, subtypeVarAssigns); } if (type instanceof ParameterizedType) { return getTypeArguments((ParameterizedType) type, toClass, subtypeVarAssigns); } if (type instanceof GenericArrayType) { return getTypeArguments(((GenericArrayType) type).getGenericComponentType(), toClass .isArray() ? toClass.getComponentType() : toClass, subtypeVarAssigns); } // since wildcard types are not assignable to classes, should this just // return null? if (type instanceof WildcardType) { for (final Type bound : getImplicitUpperBounds((WildcardType) type)) { // find the first bound that is assignable to the target class if (isAssignable(bound, toClass)) { return getTypeArguments(bound, toClass, subtypeVarAssigns); } } return null; } if (type instanceof TypeVariable<?>) { for (final Type bound : getImplicitBounds((TypeVariable<?>) type)) { // find the first bound that is assignable to the target class if (isAssignable(bound, toClass)) { return getTypeArguments(bound, toClass, subtypeVarAssigns); } } return null; } throw new IllegalStateException("found an unhandled type: " + type); }
class class_name[name] begin[{] method[getTypeArguments, return_type[type[Map]], modifier[private static], parameter[type, toClass, subtypeVarAssigns]] begin[{] if[binary_operation[member[.type], instanceof, type[Class]]] begin[{] return[call[.getTypeArguments, parameter[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), member[.toClass], member[.subtypeVarAssigns]]]] else begin[{] None end[}] if[binary_operation[member[.type], instanceof, type[ParameterizedType]]] begin[{] return[call[.getTypeArguments, parameter[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedType, sub_type=None)), member[.toClass], member[.subtypeVarAssigns]]]] else begin[{] None end[}] if[binary_operation[member[.type], instanceof, type[GenericArrayType]]] begin[{] return[call[.getTypeArguments, parameter[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GenericArrayType, sub_type=None)), TernaryExpression(condition=MethodInvocation(arguments=[], member=isArray, postfix_operators=[], prefix_operators=[], qualifier=toClass, selectors=[], type_arguments=None), if_false=MemberReference(member=toClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getComponentType, postfix_operators=[], prefix_operators=[], qualifier=toClass, selectors=[], type_arguments=None)), member[.subtypeVarAssigns]]]] else begin[{] None end[}] if[binary_operation[member[.type], instanceof, type[WildcardType]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subtypeVarAssigns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WildcardType, sub_type=None))], member=getImplicitUpperBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bound)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None) return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.type], instanceof, type[TypeVariable]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subtypeVarAssigns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=TypeVariable, sub_type=None))], member=getImplicitBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bound)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None) return[literal[null]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="found an unhandled type: "), operandr=MemberReference(member=type, 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=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[TypeVariable] operator[<] operator[?] operator[>] , identifier[Type] operator[>] identifier[getTypeArguments] operator[SEP] Keyword[final] identifier[Type] identifier[type] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[toClass] , Keyword[final] identifier[Map] operator[<] identifier[TypeVariable] operator[<] operator[?] operator[>] , identifier[Type] operator[>] identifier[subtypeVarAssigns] operator[SEP] { Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] { Keyword[return] identifier[getTypeArguments] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] identifier[type] , identifier[toClass] , identifier[subtypeVarAssigns] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[ParameterizedType] operator[SEP] { Keyword[return] identifier[getTypeArguments] operator[SEP] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[type] , identifier[toClass] , identifier[subtypeVarAssigns] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[GenericArrayType] operator[SEP] { Keyword[return] identifier[getTypeArguments] operator[SEP] operator[SEP] operator[SEP] identifier[GenericArrayType] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[getGenericComponentType] operator[SEP] operator[SEP] , identifier[toClass] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[?] identifier[toClass] operator[SEP] identifier[getComponentType] operator[SEP] operator[SEP] operator[:] identifier[toClass] , identifier[subtypeVarAssigns] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[WildcardType] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Type] identifier[bound] operator[:] identifier[getImplicitUpperBounds] operator[SEP] operator[SEP] identifier[WildcardType] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isAssignable] operator[SEP] identifier[bound] , identifier[toClass] operator[SEP] operator[SEP] { Keyword[return] identifier[getTypeArguments] operator[SEP] identifier[bound] , identifier[toClass] , identifier[subtypeVarAssigns] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[TypeVariable] operator[<] operator[?] operator[>] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Type] identifier[bound] operator[:] identifier[getImplicitBounds] operator[SEP] operator[SEP] identifier[TypeVariable] operator[<] operator[?] operator[>] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isAssignable] operator[SEP] identifier[bound] , identifier[toClass] operator[SEP] operator[SEP] { Keyword[return] identifier[getTypeArguments] operator[SEP] identifier[bound] , identifier[toClass] , identifier[subtypeVarAssigns] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] }
private SipServletRequest createSipServletRequest( SipApplicationSession sipAppSession, String method, Address from, Address to, String handler, String originalCallId, String fromTagToUse) throws ServletParseException { MobicentsSipApplicationSession mobicentsSipApplicationSession = (MobicentsSipApplicationSession) sipAppSession; // the request object with method, request URI, and From, To, Call-ID, // CSeq, Route headers filled in. Request requestToWrap = null; ContactHeader contactHeader = null; ToHeader toHeader = null; FromHeader fromHeader = null; CSeqHeader cseqHeader = null; CallIdHeader callIdHeader = null; MaxForwardsHeader maxForwardsHeader = null; // FIXME: Is this nough? // We need address from which this will be sent, also this one will be // default for contact and via String transport = ListeningPoint.UDP; // LETS CREATE OUR HEADERS javax.sip.address.Address fromAddress = null; try { // Issue 676 : Any component of the from and to URIs not allowed in the context of // SIP From and To headers are removed from the copies [refer Table 1, Section // 19.1.1, RFC3261] for(String param : FORBIDDEN_PARAMS) { from.getURI().removeParameter(param); } // Issue 676 : from tags not removed so removing the tag from.removeParameter(TAG_PARAM); fromAddress = SipFactoryImpl.addressFactory .createAddress(((URIImpl)from.getURI()).getURI()); fromAddress.setDisplayName(from.getDisplayName()); fromHeader = SipFactoryImpl.headerFactory.createFromHeader(fromAddress, null); } catch (Exception pe) { throw new ServletParseException("Impossoible to parse the given From " + from.toString(), pe); } javax.sip.address.Address toAddress = null; try{ // Issue 676 : Any component of the from and to URIs not allowed in the context of // SIP From and To headers are removed from the copies [refer Table 1, Section // 19.1.1, RFC3261] for(String param : FORBIDDEN_PARAMS) { to.getURI().removeParameter(param); } // Issue 676 : to tags not removed so removing the tag to.removeParameter(TAG_PARAM); toAddress = SipFactoryImpl.addressFactory .createAddress(((URIImpl)to.getURI()).getURI()); toAddress.setDisplayName(to.getDisplayName()); toHeader = SipFactoryImpl.headerFactory.createToHeader(toAddress, null); } catch (Exception pe) { throw new ServletParseException("Impossoible to parse the given To " + to.toString(), pe); } try { cseqHeader = SipFactoryImpl.headerFactory.createCSeqHeader(1L, method); // Fix provided by Hauke D. Issue 411 MobicentsSipApplicationSessionKey sipApplicationSessionKey = mobicentsSipApplicationSession.getKey(); // if(sipApplicationSessionKey.isAppGeneratedKey()) { if(originalCallId == null) { final Iterator<MobicentsExtendedListeningPoint> listeningPointsIterator = getSipNetworkInterfaceManager().getExtendedListeningPoints(); if(listeningPointsIterator.hasNext()) { callIdHeader = getSipApplicationDispatcher().getCallId(listeningPointsIterator.next(), null); } else { throw new IllegalStateException("There is no SIP connectors available to create the request"); } } else { callIdHeader = getSipApplicationDispatcher().getCallId(null, originalCallId); } // } else { // callIdHeader = SipFactoryImpl.headerFactory.createCallIdHeader( // sipApplicationSessionKey.getId()); // } maxForwardsHeader = SipFactoryImpl.headerFactory .createMaxForwardsHeader(JainSipUtils.MAX_FORWARD_HEADER_VALUE); URIImpl requestURI = (URIImpl)to.getURI().clone(); // copying address params into headers. // commented out because of Issue 1105 // Iterator<String> keys = to.getParameterNames(); // // while (keys.hasNext()) { // String key = keys.next(); // toHeader.setParameter(key, to.getParameter(key)); // } // // keys = from.getParameterNames(); // // while (keys.hasNext()) { // String key = keys.next(); // fromHeader.setParameter(key, from.getParameter(key)); // } //Issue 112 by folsson : no via header to add will be added when the request will be sent out List<Header> viaHeaders = new ArrayList<Header>(); requestToWrap = SipFactoryImpl.messageFactory.createRequest( requestURI.getURI(), method, callIdHeader, cseqHeader, fromHeader, toHeader, viaHeaders, maxForwardsHeader); //Adding default contact header for specific methods only if(JainSipUtils.CONTACT_HEADER_METHODS.contains(method)) { String fromName = null; String displayName = fromHeader.getAddress().getDisplayName(); if(fromHeader.getAddress().getURI() instanceof javax.sip.address.SipURI) { fromName = ((javax.sip.address.SipURI)fromHeader.getAddress().getURI()).getUser(); } // Create the contact name address. contactHeader = null; // if a sip load balancer is present in front of the server, the contact header is the one from the sip lb // so that the subsequent requests can be failed over if(useLoadBalancer) { javax.sip.address.SipURI sipURI = SipFactoryImpl.addressFactory.createSipURI(fromName, loadBalancerToUse.getAddress().getHostAddress()); sipURI.setHost(loadBalancerToUse.getAddress().getHostAddress()); sipURI.setPort(loadBalancerToUse.getSipPort()); sipURI.setTransportParam(transport); javax.sip.address.Address contactAddress = SipFactoryImpl.addressFactory.createAddress(sipURI); if(displayName != null && displayName.length() > 0) { contactAddress.setDisplayName(displayName); } contactHeader = SipFactoryImpl.headerFactory.createContactHeader(contactAddress); } else { contactHeader = JainSipUtils.createContactHeader(getSipNetworkInterfaceManager(), requestToWrap, displayName, fromName, null); } } // Add all headers if(contactHeader != null) { requestToWrap.addHeader(contactHeader); } if(fromTagToUse == null) { fromHeader.setTag(ApplicationRoutingHeaderComposer.getHash(sipApplicationDispatcher, sipAppSession.getApplicationName(), sipApplicationSessionKey.getId())); } else { fromHeader.setTag(fromTagToUse); } MobicentsSipSessionKey key = SessionManagerUtil.getSipSessionKey( mobicentsSipApplicationSession.getKey().getId(), mobicentsSipApplicationSession.getKey().getApplicationName(), requestToWrap, false); MobicentsSipSession session = mobicentsSipApplicationSession.getSipContext().getSipManager(). getSipSession(key, true, this, mobicentsSipApplicationSession); session.setHandler(handler); session.setLocalParty(new AddressImpl(fromAddress, null, ModifiableRule.NotModifiable)); session.setRemoteParty(new AddressImpl(toAddress, null, ModifiableRule.NotModifiable)); // cater to http://code.google.com/p/sipservlets/issues/detail?id=31 to be able to set the rport in applications final SipApplicationDispatcher sipApplicationDispatcher = getSipApplicationDispatcher(); final String branch = JainSipUtils.createBranch(sipApplicationSessionKey.getId(), sipApplicationDispatcher.getHashFromApplicationName(sipApplicationSessionKey.getApplicationName())); ViaHeader viaHeader = JainSipUtils.createViaHeader( getSipNetworkInterfaceManager(), requestToWrap, branch, session.getOutboundInterface()); requestToWrap.addHeader(viaHeader); SipServletRequest retVal = (SipServletRequestImpl) mobicentsSipServletMessageFactory.createSipServletRequest( requestToWrap, session, null, null, JainSipUtils.DIALOG_CREATING_METHODS.contains(method)); return retVal; } catch (Exception e) { throw new IllegalStateException("Error creating sipServletRequest", e); } }
class class_name[name] begin[{] method[createSipServletRequest, return_type[type[SipServletRequest]], modifier[private], parameter[sipAppSession, method, from, to, handler, originalCallId, fromTagToUse]] begin[{] local_variable[type[MobicentsSipApplicationSession], mobicentsSipApplicationSession] local_variable[type[Request], requestToWrap] local_variable[type[ContactHeader], contactHeader] local_variable[type[ToHeader], toHeader] local_variable[type[FromHeader], fromHeader] local_variable[type[CSeqHeader], cseqHeader] local_variable[type[CallIdHeader], callIdHeader] local_variable[type[MaxForwardsHeader], maxForwardsHeader] local_variable[type[String], transport] local_variable[type[javax], fromAddress] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=FORBIDDEN_PARAMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_PARAM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeParameter, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fromAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=URIImpl, sub_type=None))], member=createAddress, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.addressFactory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDisplayName, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None)], member=setDisplayName, postfix_operators=[], prefix_operators=[], qualifier=fromAddress, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fromHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fromAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createFromHeader, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.headerFactory, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Impossoible to parse the given From "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), operator=+), MemberReference(member=pe, 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=ServletParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pe, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[javax], toAddress] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=FORBIDDEN_PARAMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_PARAM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeParameter, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=toAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=URIImpl, sub_type=None))], member=createAddress, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.addressFactory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDisplayName, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None)], member=setDisplayName, postfix_operators=[], prefix_operators=[], qualifier=toAddress, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=toHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=toAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createToHeader, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.headerFactory, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Impossoible to parse the given To "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), operator=+), MemberReference(member=pe, 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=ServletParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pe, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cseqHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createCSeqHeader, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.headerFactory, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=mobicentsSipApplicationSession, selectors=[], type_arguments=None), name=sipApplicationSessionKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MobicentsSipApplicationSessionKey, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=originalCallId, 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=callIdHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSipApplicationDispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=originalCallId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCallId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSipNetworkInterfaceManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getExtendedListeningPoints, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=listeningPointsIterator)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MobicentsExtendedListeningPoint, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=listeningPointsIterator, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="There is no SIP connectors available to create the request")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=callIdHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSipApplicationDispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=listeningPointsIterator, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getCallId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=maxForwardsHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=MAX_FORWARD_HEADER_VALUE, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils, selectors=[])], member=createMaxForwardsHeader, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.headerFactory, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[MethodInvocation(arguments=[], member=clone, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=URIImpl, sub_type=None)), name=requestURI)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URIImpl, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Header, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=viaHeaders)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Header, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=requestToWrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=requestURI, selectors=[], type_arguments=None), MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=callIdHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cseqHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fromHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=viaHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxForwardsHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRequest, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.messageFactory, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils.CONTACT_HEADER_METHODS, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=fromName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=fromHeader, selectors=[MethodInvocation(arguments=[], member=getDisplayName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=displayName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=fromHeader, selectors=[MethodInvocation(arguments=[], member=getURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=sip, sub_type=ReferenceType(arguments=None, dimensions=None, name=address, sub_type=ReferenceType(arguments=None, dimensions=None, name=SipURI, sub_type=None)))), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fromName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=fromHeader, selectors=[MethodInvocation(arguments=[], member=getURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=sip, sub_type=ReferenceType(arguments=None, dimensions=None, name=address, sub_type=ReferenceType(arguments=None, dimensions=None, name=SipURI, sub_type=None)))))), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contactHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), IfStatement(condition=MemberReference(member=useLoadBalancer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contactHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSipNetworkInterfaceManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=requestToWrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=displayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fromName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createContactHeader, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fromName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerToUse, selectors=[MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=createSipURI, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.addressFactory, selectors=[], type_arguments=None), name=sipURI)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=sip, sub_type=ReferenceType(arguments=None, dimensions=None, name=address, sub_type=ReferenceType(arguments=None, dimensions=None, name=SipURI, sub_type=None))))), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerToUse, selectors=[MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setHost, postfix_operators=[], prefix_operators=[], qualifier=sipURI, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSipPort, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerToUse, selectors=[], type_arguments=None)], member=setPort, postfix_operators=[], prefix_operators=[], qualifier=sipURI, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTransportParam, postfix_operators=[], prefix_operators=[], qualifier=sipURI, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=sipURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createAddress, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.addressFactory, selectors=[], type_arguments=None), name=contactAddress)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=sip, sub_type=ReferenceType(arguments=None, dimensions=None, name=address, sub_type=ReferenceType(arguments=None, dimensions=None, name=Address, sub_type=None))))), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=displayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=displayName, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=displayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDisplayName, postfix_operators=[], prefix_operators=[], qualifier=contactAddress, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contactHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=contactAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createContactHeader, postfix_operators=[], prefix_operators=[], qualifier=SipFactoryImpl.headerFactory, selectors=[], type_arguments=None)), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=contactHeader, 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=contactHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addHeader, postfix_operators=[], prefix_operators=[], qualifier=requestToWrap, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fromTagToUse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fromTagToUse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTag, postfix_operators=[], prefix_operators=[], qualifier=fromHeader, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=sipApplicationDispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getApplicationName, postfix_operators=[], prefix_operators=[], qualifier=sipAppSession, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=sipApplicationSessionKey, selectors=[], type_arguments=None)], member=getHash, postfix_operators=[], prefix_operators=[], qualifier=ApplicationRoutingHeaderComposer, selectors=[], type_arguments=None)], member=setTag, postfix_operators=[], prefix_operators=[], qualifier=fromHeader, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=mobicentsSipApplicationSession, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=mobicentsSipApplicationSession, selectors=[MethodInvocation(arguments=[], member=getApplicationName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=requestToWrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getSipSessionKey, postfix_operators=[], prefix_operators=[], qualifier=SessionManagerUtil, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MobicentsSipSessionKey, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSipContext, postfix_operators=[], prefix_operators=[], qualifier=mobicentsSipApplicationSession, selectors=[MethodInvocation(arguments=[], member=getSipManager, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=mobicentsSipApplicationSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSipSession, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=session)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MobicentsSipSession, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setHandler, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=fromAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=NotModifiable, postfix_operators=[], prefix_operators=[], qualifier=ModifiableRule, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddressImpl, sub_type=None))], member=setLocalParty, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=toAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=NotModifiable, postfix_operators=[], prefix_operators=[], qualifier=ModifiableRule, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddressImpl, sub_type=None))], member=setRemoteParty, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSipApplicationDispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=sipApplicationDispatcher)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SipApplicationDispatcher, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=sipApplicationSessionKey, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getApplicationName, postfix_operators=[], prefix_operators=[], qualifier=sipApplicationSessionKey, selectors=[], type_arguments=None)], member=getHashFromApplicationName, postfix_operators=[], prefix_operators=[], qualifier=sipApplicationDispatcher, selectors=[], type_arguments=None)], member=createBranch, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils, selectors=[], type_arguments=None), name=branch)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSipNetworkInterfaceManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=requestToWrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=branch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOutboundInterface, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None)], member=createViaHeader, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils, selectors=[], type_arguments=None), name=viaHeader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ViaHeader, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=viaHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addHeader, postfix_operators=[], prefix_operators=[], qualifier=requestToWrap, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=requestToWrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=JainSipUtils.DIALOG_CREATING_METHODS, selectors=[], type_arguments=None)], member=createSipServletRequest, postfix_operators=[], prefix_operators=[], qualifier=mobicentsSipServletMessageFactory, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SipServletRequestImpl, sub_type=None)), name=retVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SipServletRequest, sub_type=None)), ReturnStatement(expression=MemberReference(member=retVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error creating sipServletRequest"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[SipServletRequest] identifier[createSipServletRequest] operator[SEP] identifier[SipApplicationSession] identifier[sipAppSession] , identifier[String] identifier[method] , identifier[Address] identifier[from] , identifier[Address] identifier[to] , identifier[String] identifier[handler] , identifier[String] identifier[originalCallId] , identifier[String] identifier[fromTagToUse] operator[SEP] Keyword[throws] identifier[ServletParseException] { identifier[MobicentsSipApplicationSession] identifier[mobicentsSipApplicationSession] operator[=] operator[SEP] identifier[MobicentsSipApplicationSession] operator[SEP] identifier[sipAppSession] operator[SEP] identifier[Request] identifier[requestToWrap] operator[=] Other[null] operator[SEP] identifier[ContactHeader] identifier[contactHeader] operator[=] Other[null] operator[SEP] identifier[ToHeader] identifier[toHeader] operator[=] Other[null] operator[SEP] identifier[FromHeader] identifier[fromHeader] operator[=] Other[null] operator[SEP] identifier[CSeqHeader] identifier[cseqHeader] operator[=] Other[null] operator[SEP] identifier[CallIdHeader] identifier[callIdHeader] operator[=] Other[null] operator[SEP] identifier[MaxForwardsHeader] identifier[maxForwardsHeader] operator[=] Other[null] operator[SEP] identifier[String] identifier[transport] operator[=] identifier[ListeningPoint] operator[SEP] identifier[UDP] operator[SEP] identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[Address] identifier[fromAddress] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] identifier[String] identifier[param] operator[:] identifier[FORBIDDEN_PARAMS] operator[SEP] { identifier[from] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] identifier[removeParameter] operator[SEP] identifier[param] operator[SEP] operator[SEP] } identifier[from] operator[SEP] identifier[removeParameter] operator[SEP] identifier[TAG_PARAM] operator[SEP] operator[SEP] identifier[fromAddress] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[addressFactory] operator[SEP] identifier[createAddress] operator[SEP] operator[SEP] operator[SEP] identifier[URIImpl] operator[SEP] identifier[from] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fromAddress] operator[SEP] identifier[setDisplayName] operator[SEP] identifier[from] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fromHeader] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[headerFactory] operator[SEP] identifier[createFromHeader] operator[SEP] identifier[fromAddress] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[pe] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletParseException] operator[SEP] literal[String] operator[+] identifier[from] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[pe] operator[SEP] operator[SEP] } identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[Address] identifier[toAddress] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] identifier[String] identifier[param] operator[:] identifier[FORBIDDEN_PARAMS] operator[SEP] { identifier[to] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] identifier[removeParameter] operator[SEP] identifier[param] operator[SEP] operator[SEP] } identifier[to] operator[SEP] identifier[removeParameter] operator[SEP] identifier[TAG_PARAM] operator[SEP] operator[SEP] identifier[toAddress] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[addressFactory] operator[SEP] identifier[createAddress] operator[SEP] operator[SEP] operator[SEP] identifier[URIImpl] operator[SEP] identifier[to] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toAddress] operator[SEP] identifier[setDisplayName] operator[SEP] identifier[to] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toHeader] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[headerFactory] operator[SEP] identifier[createToHeader] operator[SEP] identifier[toAddress] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[pe] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletParseException] operator[SEP] literal[String] operator[+] identifier[to] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[pe] operator[SEP] operator[SEP] } Keyword[try] { identifier[cseqHeader] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[headerFactory] operator[SEP] identifier[createCSeqHeader] operator[SEP] Other[1L] , identifier[method] operator[SEP] operator[SEP] identifier[MobicentsSipApplicationSessionKey] identifier[sipApplicationSessionKey] operator[=] identifier[mobicentsSipApplicationSession] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[originalCallId] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[MobicentsExtendedListeningPoint] operator[>] identifier[listeningPointsIterator] operator[=] identifier[getSipNetworkInterfaceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getExtendedListeningPoints] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listeningPointsIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[callIdHeader] operator[=] identifier[getSipApplicationDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[getCallId] operator[SEP] identifier[listeningPointsIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[callIdHeader] operator[=] identifier[getSipApplicationDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[getCallId] operator[SEP] Other[null] , identifier[originalCallId] operator[SEP] operator[SEP] } identifier[maxForwardsHeader] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[headerFactory] operator[SEP] identifier[createMaxForwardsHeader] operator[SEP] identifier[JainSipUtils] operator[SEP] identifier[MAX_FORWARD_HEADER_VALUE] operator[SEP] operator[SEP] identifier[URIImpl] identifier[requestURI] operator[=] operator[SEP] identifier[URIImpl] operator[SEP] identifier[to] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Header] operator[>] identifier[viaHeaders] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Header] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[requestToWrap] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[messageFactory] operator[SEP] identifier[createRequest] operator[SEP] identifier[requestURI] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] , identifier[method] , identifier[callIdHeader] , identifier[cseqHeader] , identifier[fromHeader] , identifier[toHeader] , identifier[viaHeaders] , identifier[maxForwardsHeader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[JainSipUtils] operator[SEP] identifier[CONTACT_HEADER_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[method] operator[SEP] operator[SEP] { identifier[String] identifier[fromName] operator[=] Other[null] operator[SEP] identifier[String] identifier[displayName] operator[=] identifier[fromHeader] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fromHeader] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] Keyword[instanceof] identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[SipURI] operator[SEP] { identifier[fromName] operator[=] operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[SipURI] operator[SEP] identifier[fromHeader] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] } identifier[contactHeader] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[useLoadBalancer] operator[SEP] { identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[SipURI] identifier[sipURI] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[addressFactory] operator[SEP] identifier[createSipURI] operator[SEP] identifier[fromName] , identifier[loadBalancerToUse] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sipURI] operator[SEP] identifier[setHost] operator[SEP] identifier[loadBalancerToUse] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sipURI] operator[SEP] identifier[setPort] operator[SEP] identifier[loadBalancerToUse] operator[SEP] identifier[getSipPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sipURI] operator[SEP] identifier[setTransportParam] operator[SEP] identifier[transport] operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[sip] operator[SEP] identifier[address] operator[SEP] identifier[Address] identifier[contactAddress] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[addressFactory] operator[SEP] identifier[createAddress] operator[SEP] identifier[sipURI] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[displayName] operator[!=] Other[null] operator[&&] identifier[displayName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[contactAddress] operator[SEP] identifier[setDisplayName] operator[SEP] identifier[displayName] operator[SEP] operator[SEP] } identifier[contactHeader] operator[=] identifier[SipFactoryImpl] operator[SEP] identifier[headerFactory] operator[SEP] identifier[createContactHeader] operator[SEP] identifier[contactAddress] operator[SEP] operator[SEP] } Keyword[else] { identifier[contactHeader] operator[=] identifier[JainSipUtils] operator[SEP] identifier[createContactHeader] operator[SEP] identifier[getSipNetworkInterfaceManager] operator[SEP] operator[SEP] , identifier[requestToWrap] , identifier[displayName] , identifier[fromName] , Other[null] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[contactHeader] operator[!=] Other[null] operator[SEP] { identifier[requestToWrap] operator[SEP] identifier[addHeader] operator[SEP] identifier[contactHeader] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[fromTagToUse] operator[==] Other[null] operator[SEP] { identifier[fromHeader] operator[SEP] identifier[setTag] operator[SEP] identifier[ApplicationRoutingHeaderComposer] operator[SEP] identifier[getHash] operator[SEP] identifier[sipApplicationDispatcher] , identifier[sipAppSession] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] , identifier[sipApplicationSessionKey] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[fromHeader] operator[SEP] identifier[setTag] operator[SEP] identifier[fromTagToUse] operator[SEP] operator[SEP] } identifier[MobicentsSipSessionKey] identifier[key] operator[=] identifier[SessionManagerUtil] operator[SEP] identifier[getSipSessionKey] operator[SEP] identifier[mobicentsSipApplicationSession] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[mobicentsSipApplicationSession] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] , identifier[requestToWrap] , literal[boolean] operator[SEP] operator[SEP] identifier[MobicentsSipSession] identifier[session] operator[=] identifier[mobicentsSipApplicationSession] operator[SEP] identifier[getSipContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSipManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSipSession] operator[SEP] identifier[key] , literal[boolean] , Keyword[this] , identifier[mobicentsSipApplicationSession] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setHandler] operator[SEP] identifier[handler] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setLocalParty] operator[SEP] Keyword[new] identifier[AddressImpl] operator[SEP] identifier[fromAddress] , Other[null] , identifier[ModifiableRule] operator[SEP] identifier[NotModifiable] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setRemoteParty] operator[SEP] Keyword[new] identifier[AddressImpl] operator[SEP] identifier[toAddress] , Other[null] , identifier[ModifiableRule] operator[SEP] identifier[NotModifiable] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[SipApplicationDispatcher] identifier[sipApplicationDispatcher] operator[=] identifier[getSipApplicationDispatcher] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[branch] operator[=] identifier[JainSipUtils] operator[SEP] identifier[createBranch] operator[SEP] identifier[sipApplicationSessionKey] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[sipApplicationDispatcher] operator[SEP] identifier[getHashFromApplicationName] operator[SEP] identifier[sipApplicationSessionKey] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ViaHeader] identifier[viaHeader] operator[=] identifier[JainSipUtils] operator[SEP] identifier[createViaHeader] operator[SEP] identifier[getSipNetworkInterfaceManager] operator[SEP] operator[SEP] , identifier[requestToWrap] , identifier[branch] , identifier[session] operator[SEP] identifier[getOutboundInterface] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[requestToWrap] operator[SEP] identifier[addHeader] operator[SEP] identifier[viaHeader] operator[SEP] operator[SEP] identifier[SipServletRequest] identifier[retVal] operator[=] operator[SEP] identifier[SipServletRequestImpl] operator[SEP] identifier[mobicentsSipServletMessageFactory] operator[SEP] identifier[createSipServletRequest] operator[SEP] identifier[requestToWrap] , identifier[session] , Other[null] , Other[null] , identifier[JainSipUtils] operator[SEP] identifier[DIALOG_CREATING_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[method] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[retVal] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public void createDatabase(String database, Map<String, String> replacer) { m_errorLogging = true; executeSql(database, "create_db.sql", replacer, true); }
class class_name[name] begin[{] method[createDatabase, return_type[void], modifier[public], parameter[database, replacer]] begin[{] assign[member[.m_errorLogging], literal[true]] call[.executeSql, parameter[member[.database], literal["create_db.sql"], member[.replacer], literal[true]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[createDatabase] operator[SEP] identifier[String] identifier[database] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[replacer] operator[SEP] { identifier[m_errorLogging] operator[=] literal[boolean] operator[SEP] identifier[executeSql] operator[SEP] identifier[database] , literal[String] , identifier[replacer] , literal[boolean] operator[SEP] operator[SEP] }
public void setCommerceDiscountRelLocalService( com.liferay.commerce.discount.service.CommerceDiscountRelLocalService commerceDiscountRelLocalService) { this.commerceDiscountRelLocalService = commerceDiscountRelLocalService; }
class class_name[name] begin[{] method[setCommerceDiscountRelLocalService, return_type[void], modifier[public], parameter[commerceDiscountRelLocalService]] begin[{] assign[THIS[member[None.commerceDiscountRelLocalService]], member[.commerceDiscountRelLocalService]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCommerceDiscountRelLocalService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[discount] operator[SEP] identifier[service] operator[SEP] identifier[CommerceDiscountRelLocalService] identifier[commerceDiscountRelLocalService] operator[SEP] { Keyword[this] operator[SEP] identifier[commerceDiscountRelLocalService] operator[=] identifier[commerceDiscountRelLocalService] operator[SEP] }
public static String encodeBackslashToAlphanumeric(char c) { if (isAlphanumeric(c) || c == '_') return ("" + c); String hex = Integer.toHexString(c); while (hex.length() < 4) hex = "0" + hex; return ("\\u" + hex); }
class class_name[name] begin[{] method[encodeBackslashToAlphanumeric, return_type[type[String]], modifier[public static], parameter[c]] begin[{] if[binary_operation[call[.isAlphanumeric, parameter[member[.c]]], ||, binary_operation[member[.c], ==, literal['_']]]] begin[{] return[binary_operation[literal[""], +, member[.c]]] else begin[{] None end[}] local_variable[type[String], hex] while[binary_operation[call[hex.length, parameter[]], <, literal[4]]] begin[{] assign[member[.hex], binary_operation[literal["0"], +, member[.hex]]] end[}] return[binary_operation[literal["\\u"], +, member[.hex]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encodeBackslashToAlphanumeric] operator[SEP] Keyword[char] identifier[c] operator[SEP] { Keyword[if] operator[SEP] identifier[isAlphanumeric] operator[SEP] identifier[c] operator[SEP] operator[||] identifier[c] operator[==] literal[String] operator[SEP] Keyword[return] operator[SEP] literal[String] operator[+] identifier[c] operator[SEP] operator[SEP] identifier[String] identifier[hex] operator[=] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[hex] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[4] operator[SEP] identifier[hex] operator[=] literal[String] operator[+] identifier[hex] operator[SEP] Keyword[return] operator[SEP] literal[String] operator[+] identifier[hex] operator[SEP] operator[SEP] }
public ListClustersResult withClusters(String... clusters) { if (this.clusters == null) { setClusters(new java.util.ArrayList<String>(clusters.length)); } for (String ele : clusters) { this.clusters.add(ele); } return this; }
class class_name[name] begin[{] method[withClusters, return_type[type[ListClustersResult]], modifier[public], parameter[clusters]] begin[{] if[binary_operation[THIS[member[None.clusters]], ==, literal[null]]] begin[{] call[.setClusters, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=clusters, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=clusters, 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=clusters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListClustersResult] identifier[withClusters] operator[SEP] identifier[String] operator[...] identifier[clusters] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[clusters] operator[==] Other[null] operator[SEP] { identifier[setClusters] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[clusters] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[clusters] operator[SEP] { Keyword[this] operator[SEP] identifier[clusters] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
static void throwIfUnrecognizedParamName(final Enumeration initParamNames) { final Set<String> recognizedParameterNames = new HashSet<String>(); recognizedParameterNames.add(INIT_PARAM_ENABLE_CACHE_CONTROL); recognizedParameterNames.add(INIT_PARAM_ENABLE_XCONTENT_OPTIONS); recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY); recognizedParameterNames.add(INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS); recognizedParameterNames.add(INIT_PARAM_STRICT_XFRAME_OPTIONS); recognizedParameterNames.add(INIT_PARAM_CONTENT_SECURITY_POLICY); recognizedParameterNames.add(LOGGER_HANDLER_CLASS_NAME); recognizedParameterNames.add(INIT_PARAM_ENABLE_XSS_PROTECTION); recognizedParameterNames.add(INIT_PARAM_XSS_PROTECTION); while (initParamNames.hasMoreElements()) { final String initParamName = (String) initParamNames.nextElement(); if (!recognizedParameterNames.contains(initParamName)) { FilterUtils.logException(LOGGER, new ServletException("Unrecognized init parameter [" + initParamName + "]. Failing safe. Typo" + " in the web.xml configuration? " + " Misunderstanding about the configuration " + RequestParameterPolicyEnforcementFilter.class.getSimpleName() + " expects?")); } } }
class class_name[name] begin[{] method[throwIfUnrecognizedParamName, return_type[void], modifier[static], parameter[initParamNames]] begin[{] local_variable[type[Set], recognizedParameterNames] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_ENABLE_CACHE_CONTROL]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_ENABLE_XCONTENT_OPTIONS]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_STRICT_XFRAME_OPTIONS]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_CONTENT_SECURITY_POLICY]]] call[recognizedParameterNames.add, parameter[member[.LOGGER_HANDLER_CLASS_NAME]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_ENABLE_XSS_PROTECTION]]] call[recognizedParameterNames.add, parameter[member[.INIT_PARAM_XSS_PROTECTION]]] while[call[initParamNames.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], initParamName] if[call[recognizedParameterNames.contains, parameter[member[.initParamName]]]] begin[{] call[FilterUtils.logException, parameter[member[.LOGGER], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unrecognized init parameter ["), operandr=MemberReference(member=initParamName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]. Failing safe. Typo"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in the web.xml configuration? "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Misunderstanding about the configuration "), operator=+), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RequestParameterPolicyEnforcementFilter, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" expects?"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None))]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[static] Keyword[void] identifier[throwIfUnrecognizedParamName] operator[SEP] Keyword[final] identifier[Enumeration] identifier[initParamNames] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[recognizedParameterNames] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_ENABLE_CACHE_CONTROL] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_ENABLE_XCONTENT_OPTIONS] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_ENABLE_STRICT_TRANSPORT_SECURITY] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_ENABLE_STRICT_XFRAME_OPTIONS] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_STRICT_XFRAME_OPTIONS] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_CONTENT_SECURITY_POLICY] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[LOGGER_HANDLER_CLASS_NAME] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_ENABLE_XSS_PROTECTION] operator[SEP] operator[SEP] identifier[recognizedParameterNames] operator[SEP] identifier[add] operator[SEP] identifier[INIT_PARAM_XSS_PROTECTION] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[initParamNames] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[initParamName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[initParamNames] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[recognizedParameterNames] operator[SEP] identifier[contains] operator[SEP] identifier[initParamName] operator[SEP] operator[SEP] { identifier[FilterUtils] operator[SEP] identifier[logException] operator[SEP] identifier[LOGGER] , Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[initParamName] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[RequestParameterPolicyEnforcementFilter] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] } } }
@BetaApi public final Operation enableXpnHostProject(ProjectName project) { EnableXpnHostProjectHttpRequest request = EnableXpnHostProjectHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) .build(); return enableXpnHostProject(request); }
class class_name[name] begin[{] method[enableXpnHostProject, return_type[type[Operation]], modifier[final public], parameter[project]] begin[{] local_variable[type[EnableXpnHostProjectHttpRequest], request] return[call[.enableXpnHostProject, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[enableXpnHostProject] operator[SEP] identifier[ProjectName] identifier[project] operator[SEP] { identifier[EnableXpnHostProjectHttpRequest] identifier[request] operator[=] identifier[EnableXpnHostProjectHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setProject] operator[SEP] identifier[project] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[project] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[enableXpnHostProject] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public Double evaluate(List<S> solutionList) { if (solutionList == null) { throw new JMetalException("The pareto front approximation is null") ; } return invertedGenerationalDistancePlus(new ArrayFront(solutionList), referenceParetoFront); }
class class_name[name] begin[{] method[evaluate, return_type[type[Double]], modifier[public], parameter[solutionList]] begin[{] if[binary_operation[member[.solutionList], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The pareto front approximation is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMetalException, sub_type=None)), label=None) else begin[{] None end[}] return[call[.invertedGenerationalDistancePlus, parameter[ClassCreator(arguments=[MemberReference(member=solutionList, 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=ArrayFront, sub_type=None)), member[.referenceParetoFront]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Double] identifier[evaluate] operator[SEP] identifier[List] operator[<] identifier[S] operator[>] identifier[solutionList] operator[SEP] { Keyword[if] operator[SEP] identifier[solutionList] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JMetalException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[invertedGenerationalDistancePlus] operator[SEP] Keyword[new] identifier[ArrayFront] operator[SEP] identifier[solutionList] operator[SEP] , identifier[referenceParetoFront] operator[SEP] operator[SEP] }
public List<List<Segment>> getCompactableGroups(Storage storage, SegmentManager manager) { List<List<Segment>> compact = new ArrayList<>(); List<Segment> segments = null; for (Segment segment : getCompactableSegments(manager)) { // If this is the first segment in a segments list, add the segment. if (segments == null) { segments = new ArrayList<>(); segments.add(segment); } // If the total size of all segments is less than the maximum size of any segment, add the segment to the segments list. else if (segments.stream().mapToLong(Segment::size).sum() + segment.size() <= storage.maxSegmentSize() && segments.stream().mapToLong(Segment::count).sum() + segment.count() <= storage.maxEntriesPerSegment()) { segments.add(segment); } // If there's not enough room to combine segments, reset the segments list. else { compact.add(segments); segments = new ArrayList<>(); segments.add(segment); } } // Ensure all compactable segments have been added to the compact segments list. if (segments != null) { compact.add(segments); } return compact; }
class class_name[name] begin[{] method[getCompactableGroups, return_type[type[List]], modifier[public], parameter[storage, manager]] begin[{] local_variable[type[List], compact] local_variable[type[List], segments] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=segments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=Segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=mapToLong, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=sum, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=segment, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=maxSegmentSize, postfix_operators=[], prefix_operators=[], qualifier=storage, selectors=[], type_arguments=None), operator=<=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=Segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=mapToLong, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=sum, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=count, postfix_operators=[], prefix_operators=[], qualifier=segment, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=maxEntriesPerSegment, postfix_operators=[], prefix_operators=[], qualifier=storage, selectors=[], type_arguments=None), operator=<=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=segments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=compact, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=segments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=segments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=manager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCompactableSegments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=segment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Segment, sub_type=None))), label=None) if[binary_operation[member[.segments], !=, literal[null]]] begin[{] call[compact.add, parameter[member[.segments]]] else begin[{] None end[}] return[member[.compact]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[List] operator[<] identifier[Segment] operator[>] operator[>] identifier[getCompactableGroups] operator[SEP] identifier[Storage] identifier[storage] , identifier[SegmentManager] identifier[manager] operator[SEP] { identifier[List] operator[<] identifier[List] operator[<] identifier[Segment] operator[>] operator[>] identifier[compact] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Segment] operator[>] identifier[segments] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Segment] identifier[segment] operator[:] identifier[getCompactableSegments] operator[SEP] identifier[manager] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[segments] operator[==] Other[null] operator[SEP] { identifier[segments] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[segments] operator[SEP] identifier[add] operator[SEP] identifier[segment] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[segments] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[mapToLong] operator[SEP] identifier[Segment] operator[::] identifier[size] operator[SEP] operator[SEP] identifier[sum] operator[SEP] operator[SEP] operator[+] identifier[segment] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] identifier[storage] operator[SEP] identifier[maxSegmentSize] operator[SEP] operator[SEP] operator[&&] identifier[segments] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[mapToLong] operator[SEP] identifier[Segment] operator[::] identifier[count] operator[SEP] operator[SEP] identifier[sum] operator[SEP] operator[SEP] operator[+] identifier[segment] operator[SEP] identifier[count] operator[SEP] operator[SEP] operator[<=] identifier[storage] operator[SEP] identifier[maxEntriesPerSegment] operator[SEP] operator[SEP] operator[SEP] { identifier[segments] operator[SEP] identifier[add] operator[SEP] identifier[segment] operator[SEP] operator[SEP] } Keyword[else] { identifier[compact] operator[SEP] identifier[add] operator[SEP] identifier[segments] operator[SEP] operator[SEP] identifier[segments] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[segments] operator[SEP] identifier[add] operator[SEP] identifier[segment] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[segments] operator[!=] Other[null] operator[SEP] { identifier[compact] operator[SEP] identifier[add] operator[SEP] identifier[segments] operator[SEP] operator[SEP] } Keyword[return] identifier[compact] operator[SEP] }
public CmsResourceTranslator getFileTranslator() { String[] array = new String[0]; if (m_fileTranslationEnabled) { array = new String[m_fileTranslations.size()]; for (int i = 0; i < m_fileTranslations.size(); i++) { array[i] = m_fileTranslations.get(i); } } return new CmsResourceTranslator(array, true); }
class class_name[name] begin[{] method[getFileTranslator, return_type[type[CmsResourceTranslator]], modifier[public], parameter[]] begin[{] local_variable[type[String], array] if[member[.m_fileTranslationEnabled]] begin[{] assign[member[.array], ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=m_fileTranslations, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m_fileTranslations, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=m_fileTranslations, 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) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsResourceTranslator, sub_type=None))] end[}] END[}]
Keyword[public] identifier[CmsResourceTranslator] identifier[getFileTranslator] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] identifier[String] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_fileTranslationEnabled] operator[SEP] { identifier[array] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[m_fileTranslations] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m_fileTranslations] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[array] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[m_fileTranslations] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[CmsResourceTranslator] operator[SEP] identifier[array] , literal[boolean] operator[SEP] operator[SEP] }
public static Bitmap flip(Bitmap src) { Matrix m = new Matrix(); m.preScale(-1, 1); return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, false); }
class class_name[name] begin[{] method[flip, return_type[type[Bitmap]], modifier[public static], parameter[src]] begin[{] local_variable[type[Matrix], m] call[m.preScale, parameter[literal[1], literal[1]]] return[call[Bitmap.createBitmap, parameter[member[.src], literal[0], literal[0], call[src.getWidth, parameter[]], call[src.getHeight, parameter[]], member[.m], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Bitmap] identifier[flip] operator[SEP] identifier[Bitmap] identifier[src] operator[SEP] { identifier[Matrix] identifier[m] operator[=] Keyword[new] identifier[Matrix] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[preScale] operator[SEP] operator[-] Other[1] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[Bitmap] operator[SEP] identifier[createBitmap] operator[SEP] identifier[src] , Other[0] , Other[0] , identifier[src] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[src] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , identifier[m] , literal[boolean] operator[SEP] operator[SEP] }
@Override public void onManagerWarning(String warning, Exception cause) { logger.debug(marker, "SIMON WARNING: {}", warning, cause); }
class class_name[name] begin[{] method[onManagerWarning, return_type[void], modifier[public], parameter[warning, cause]] begin[{] call[logger.debug, parameter[member[.marker], literal["SIMON WARNING: {}"], member[.warning], member[.cause]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onManagerWarning] operator[SEP] identifier[String] identifier[warning] , identifier[Exception] identifier[cause] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[marker] , literal[String] , identifier[warning] , identifier[cause] operator[SEP] operator[SEP] }
public static CommercePriceListUserSegmentEntryRel fetchByUuid_Last( String uuid, OrderByComparator<CommercePriceListUserSegmentEntryRel> orderByComparator) { return getPersistence().fetchByUuid_Last(uuid, orderByComparator); }
class class_name[name] begin[{] method[fetchByUuid_Last, return_type[type[CommercePriceListUserSegmentEntryRel]], modifier[public static], parameter[uuid, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommercePriceListUserSegmentEntryRel] identifier[fetchByUuid_Last] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommercePriceListUserSegmentEntryRel] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByUuid_Last] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] }
@Override public DescribePendingMaintenanceActionsResult describePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest request) { request = beforeClientExecution(request); return executeDescribePendingMaintenanceActions(request); }
class class_name[name] begin[{] method[describePendingMaintenanceActions, return_type[type[DescribePendingMaintenanceActionsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribePendingMaintenanceActions, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribePendingMaintenanceActionsResult] identifier[describePendingMaintenanceActions] operator[SEP] identifier[DescribePendingMaintenanceActionsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribePendingMaintenanceActions] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void init(ScreenLocation itsLocation, BasePanel parentScreen, String strDisplay) { m_StaticString = strDisplay; super.init(itsLocation, parentScreen, null, ScreenConstants.DONT_DISPLAY_DESC, null); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[itsLocation, parentScreen, strDisplay]] begin[{] assign[member[.m_StaticString], member[.strDisplay]] SuperMethodInvocation(arguments=[MemberReference(member=itsLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parentScreen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=DONT_DISPLAY_DESC, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[ScreenLocation] identifier[itsLocation] , identifier[BasePanel] identifier[parentScreen] , identifier[String] identifier[strDisplay] operator[SEP] { identifier[m_StaticString] operator[=] identifier[strDisplay] operator[SEP] Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[itsLocation] , identifier[parentScreen] , Other[null] , identifier[ScreenConstants] operator[SEP] identifier[DONT_DISPLAY_DESC] , Other[null] operator[SEP] operator[SEP] }
protected List<String> parseStringList( TokenStream tokens ) { List<String> strings = new ArrayList<String>(); if (tokens.canConsume('?')) { // This list is variant ... strings.add("?"); } else { // Read names until we see a ',' do { strings.add(removeQuotes(tokens.consume())); } while (tokens.canConsume(',')); } return strings; }
class class_name[name] begin[{] method[parseStringList, return_type[type[List]], modifier[protected], parameter[tokens]] begin[{] local_variable[type[List], strings] if[call[tokens.canConsume, parameter[literal['?']]]] begin[{] call[strings.add, parameter[literal["?"]]] else begin[{] do[call[tokens.canConsume, parameter[literal[',']]]] begin[{] call[strings.add, parameter[call[.removeQuotes, parameter[call[tokens.consume, parameter[]]]]]] end[}] end[}] return[member[.strings]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[parseStringList] operator[SEP] identifier[TokenStream] identifier[tokens] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[strings] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[canConsume] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[strings] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[do] { identifier[strings] operator[SEP] identifier[add] operator[SEP] identifier[removeQuotes] operator[SEP] identifier[tokens] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[tokens] operator[SEP] identifier[canConsume] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[strings] operator[SEP] }
public static String getDisplayName(String id, ULocale inLocale) { // Resource bundle containing display name keys and the // RB_RULE_BASED_IDS array. // //If we ever integrate this with the Sun JDK, the resource bundle // root will change to sun.text.resources.LocaleElements ICUResourceBundle bundle = (ICUResourceBundle)UResourceBundle. getBundleInstance(ICUData.ICU_TRANSLIT_BASE_NAME, inLocale); // Normalize the ID String stv[] = TransliteratorIDParser.IDtoSTV(id); if (stv == null) { // No target; malformed id return ""; } String ID = stv[0] + '-' + stv[1]; if (stv[2] != null && stv[2].length() > 0) { ID = ID + '/' + stv[2]; } // Use the registered display name, if any String n = displayNameCache.get(new CaseInsensitiveString(ID)); if (n != null) { return n; } // Use display name for the entire transliterator, if it // exists. try { return bundle.getString(RB_DISPLAY_NAME_PREFIX + ID); } catch (MissingResourceException e) {} try { // Construct the formatter first; if getString() fails // we'll exit the try block MessageFormat format = new MessageFormat( bundle.getString(RB_DISPLAY_NAME_PATTERN)); // Construct the argument array Object[] args = new Object[] { Integer.valueOf(2), stv[0], stv[1] }; // Use display names for the scripts, if they exist for (int j=1; j<=2; ++j) { try { args[j] = bundle.getString(RB_SCRIPT_DISPLAY_NAME_PREFIX + (String) args[j]); } catch (MissingResourceException e) {} } // Format it using the pattern in the resource return (stv[2].length() > 0) ? (format.format(args) + '/' + stv[2]) : format.format(args); } catch (MissingResourceException e2) {} // We should not reach this point unless there is something // wrong with the build or the RB_DISPLAY_NAME_PATTERN has // been deleted from the root RB_LOCALE_ELEMENTS resource. throw new RuntimeException(); }
class class_name[name] begin[{] method[getDisplayName, return_type[type[String]], modifier[public static], parameter[id, inLocale]] begin[{] local_variable[type[ICUResourceBundle], bundle] local_variable[type[String], stv] if[binary_operation[member[.stv], ==, literal[null]]] begin[{] return[literal[""]] else begin[{] None end[}] local_variable[type[String], ID] if[binary_operation[binary_operation[member[.stv], !=, literal[null]], &&, binary_operation[member[.stv], >, literal[0]]]] begin[{] assign[member[.ID], binary_operation[binary_operation[member[.ID], +, literal['/']], +, member[.stv]]] else begin[{] None end[}] local_variable[type[String], n] if[binary_operation[member[.n], !=, literal[null]]] begin[{] return[member[.n]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=RB_DISPLAY_NAME_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=RB_DISPLAY_NAME_PATTERN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MessageFormat, sub_type=None)), name=format)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageFormat, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MemberReference(member=stv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=stv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), name=args)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=RB_SCRIPT_DISPLAY_NAME_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Cast(expression=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), operator=+)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None), ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=stv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=format, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=format, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), operator=+), operandr=MemberReference(member=stv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operator=+)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e2, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getDisplayName] operator[SEP] identifier[String] identifier[id] , identifier[ULocale] identifier[inLocale] operator[SEP] { identifier[ICUResourceBundle] identifier[bundle] operator[=] operator[SEP] identifier[ICUResourceBundle] operator[SEP] identifier[UResourceBundle] operator[SEP] identifier[getBundleInstance] operator[SEP] identifier[ICUData] operator[SEP] identifier[ICU_TRANSLIT_BASE_NAME] , identifier[inLocale] operator[SEP] operator[SEP] identifier[String] identifier[stv] operator[SEP] operator[SEP] operator[=] identifier[TransliteratorIDParser] operator[SEP] identifier[IDtoSTV] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stv] operator[==] Other[null] operator[SEP] { Keyword[return] literal[String] operator[SEP] } identifier[String] identifier[ID] operator[=] identifier[stv] operator[SEP] Other[0] operator[SEP] operator[+] literal[String] operator[+] identifier[stv] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stv] operator[SEP] Other[2] operator[SEP] operator[!=] Other[null] operator[&&] identifier[stv] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[ID] operator[=] identifier[ID] operator[+] literal[String] operator[+] identifier[stv] operator[SEP] Other[2] operator[SEP] operator[SEP] } identifier[String] identifier[n] operator[=] identifier[displayNameCache] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[ID] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[n] operator[SEP] } Keyword[try] { Keyword[return] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[RB_DISPLAY_NAME_PREFIX] operator[+] identifier[ID] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { } Keyword[try] { identifier[MessageFormat] identifier[format] operator[=] Keyword[new] identifier[MessageFormat] operator[SEP] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[RB_DISPLAY_NAME_PATTERN] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[=] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] Other[2] operator[SEP] , identifier[stv] operator[SEP] Other[0] operator[SEP] , identifier[stv] operator[SEP] Other[1] operator[SEP] } operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<=] Other[2] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[try] { identifier[args] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[RB_SCRIPT_DISPLAY_NAME_PREFIX] operator[+] operator[SEP] identifier[String] operator[SEP] identifier[args] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { } } Keyword[return] operator[SEP] identifier[stv] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[?] operator[SEP] identifier[format] operator[SEP] identifier[format] operator[SEP] identifier[args] operator[SEP] operator[+] literal[String] operator[+] identifier[stv] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[:] identifier[format] operator[SEP] identifier[format] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e2] operator[SEP] { } Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] operator[SEP] operator[SEP] }
protected void generate(XExpression expression, LightweightTypeReference needReturn, ExtraLanguageAppendable appendable, IExtraLanguageGeneratorContext context) { final IExpressionGenerator generator = getExpressionGenerator(); if (generator == null) { throw new UnsupportedOperationException(); } generator.generate(expression, needReturn, appendable, context); }
class class_name[name] begin[{] method[generate, return_type[void], modifier[protected], parameter[expression, needReturn, appendable, context]] begin[{] local_variable[type[IExpressionGenerator], generator] if[binary_operation[member[.generator], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] None end[}] call[generator.generate, parameter[member[.expression], member[.needReturn], member[.appendable], member[.context]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[generate] operator[SEP] identifier[XExpression] identifier[expression] , identifier[LightweightTypeReference] identifier[needReturn] , identifier[ExtraLanguageAppendable] identifier[appendable] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] { Keyword[final] identifier[IExpressionGenerator] identifier[generator] operator[=] identifier[getExpressionGenerator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[generator] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] operator[SEP] operator[SEP] } identifier[generator] operator[SEP] identifier[generate] operator[SEP] identifier[expression] , identifier[needReturn] , identifier[appendable] , identifier[context] operator[SEP] operator[SEP] }
@Nullable public static InputStream getInputStream (@Nonnull final URL aURL, @CheckForSigned final int nConnectTimeoutMS, @CheckForSigned final int nReadTimeoutMS, @Nullable final Consumer <? super URLConnection> aConnectionModifier, @Nullable final IMutableWrapper <IOException> aExceptionHolder) { ValueEnforcer.notNull (aURL, "URL"); if (DEBUG_GET_IS) if (LOGGER.isInfoEnabled ()) LOGGER.info ("getInputStream ('" + aURL + "', " + nConnectTimeoutMS + ", " + nReadTimeoutMS + ", " + aConnectionModifier + ", " + aExceptionHolder + ")", new Exception ()); URLConnection aConnection; HttpURLConnection aHTTPConnection = null; try { aConnection = aURL.openConnection (); if (nConnectTimeoutMS >= 0) aConnection.setConnectTimeout (nConnectTimeoutMS); if (nReadTimeoutMS >= 0) aConnection.setReadTimeout (nReadTimeoutMS); if (aConnection instanceof HttpURLConnection) aHTTPConnection = (HttpURLConnection) aConnection; // Disable caching aConnection.setUseCaches (false); // Apply optional callback if (aConnectionModifier != null) aConnectionModifier.accept (aConnection); if (aConnection instanceof JarURLConnection) { final JarEntry aJarEntry = ((JarURLConnection) aConnection).getJarEntry (); if (aJarEntry != null) { // Directories are identified by ending with a "/" if (aJarEntry.isDirectory ()) { // Cannot open an InputStream on a directory return null; } // Heuristics for directories not ending with a "/" if (aJarEntry.getSize () == 0 && aJarEntry.getCrc () == 0) { // Cannot open an InputStream on a directory if (LOGGER.isWarnEnabled ()) LOGGER.warn ("Heuristically determined " + aURL + " to be a directory!"); return null; } } } // by default follow-redirects is true for HTTPUrlConnections final InputStream ret = aConnection.getInputStream (); if (DEBUG_GET_IS) if (LOGGER.isInfoEnabled ()) LOGGER.info (" returning " + ret); return ret; } catch (final IOException ex) { if (aExceptionHolder != null) { // Remember the exception aExceptionHolder.set (ex); } else { if (ex instanceof SocketTimeoutException) { if (LOGGER.isWarnEnabled ()) LOGGER.warn ("Timeout to open input stream for '" + aURL + "': " + ex.getClass ().getName () + " - " + ex.getMessage ()); } else { if (LOGGER.isWarnEnabled ()) LOGGER.warn ("Failed to open input stream for '" + aURL + "': " + ex.getClass ().getName () + " - " + ex.getMessage ()); } } if (aHTTPConnection != null) { // Read error completely for keep-alive (see // http://docs.oracle.com/javase/6/docs/technotes/guides/net/http-keepalive.html) InputStream aErrorIS = null; try { aErrorIS = aHTTPConnection.getErrorStream (); if (aErrorIS != null) { final byte [] aBuf = new byte [1024]; // read the response body while (aErrorIS.read (aBuf) > 0) { // Read next } } } catch (final IOException ex2) { // deal with the exception if (LOGGER.isWarnEnabled ()) LOGGER.warn ("Failed to consume error stream for '" + aURL + "': " + ex2.getClass ().getName () + " - " + ex2.getMessage ()); } finally { StreamHelper.close (aErrorIS); } } } return null; }
class class_name[name] begin[{] method[getInputStream, return_type[type[InputStream]], modifier[public static], parameter[aURL, nConnectTimeoutMS, nReadTimeoutMS, aConnectionModifier, aExceptionHolder]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aURL], literal["URL"]]] if[member[.DEBUG_GET_IS]] begin[{] if[call[LOGGER.isInfoEnabled, parameter[]]] begin[{] call[LOGGER.info, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["getInputStream ('"], +, member[.aURL]], +, literal["', "]], +, member[.nConnectTimeoutMS]], +, literal[", "]], +, member[.nReadTimeoutMS]], +, literal[", "]], +, member[.aConnectionModifier]], +, literal[", "]], +, member[.aExceptionHolder]], +, literal[")"]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None))]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[URLConnection], aConnection] local_variable[type[HttpURLConnection], aHTTPConnection] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=openConnection, postfix_operators=[], prefix_operators=[], qualifier=aURL, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nConnectTimeoutMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nConnectTimeoutMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setConnectTimeout, postfix_operators=[], prefix_operators=[], qualifier=aConnection, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nReadTimeoutMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nReadTimeoutMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setReadTimeout, postfix_operators=[], prefix_operators=[], qualifier=aConnection, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=aHTTPConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setUseCaches, postfix_operators=[], prefix_operators=[], qualifier=aConnection, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aConnectionModifier, 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=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=aConnectionModifier, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JarURLConnection, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=aConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JarURLConnection, sub_type=None)), name=aJarEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JarEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aJarEntry, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=aJarEntry, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=aJarEntry, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCrc, postfix_operators=[], prefix_operators=[], qualifier=aJarEntry, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Heuristically determined "), operandr=MemberReference(member=aURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" to be a directory!"), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=aConnection, selectors=[], type_arguments=None), name=ret)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=MemberReference(member=DEBUG_GET_IS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, 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=" returning "), operandr=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None))), ReturnStatement(expression=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aExceptionHolder, 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=BinaryOperation(operandl=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SocketTimeoutException, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to open input stream for '"), operandr=MemberReference(member=aURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="': "), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Timeout to open input stream for '"), operandr=MemberReference(member=aURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="': "), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None))]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=aExceptionHolder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aHTTPConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=aErrorIS)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aErrorIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getErrorStream, postfix_operators=[], prefix_operators=[], qualifier=aHTTPConnection, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aErrorIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1024)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=aBuf)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), WhileStatement(body=BlockStatement(label=None, statements=[]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=aBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=aErrorIS, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to consume error stream for '"), operandr=MemberReference(member=aURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="': "), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=ex2, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex2, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex2, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aErrorIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=StreamHelper, selectors=[], type_arguments=None), label=None)], label=None, resources=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[InputStream] identifier[getInputStream] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[URL] identifier[aURL] , annotation[@] identifier[CheckForSigned] Keyword[final] Keyword[int] identifier[nConnectTimeoutMS] , annotation[@] identifier[CheckForSigned] Keyword[final] Keyword[int] identifier[nReadTimeoutMS] , annotation[@] identifier[Nullable] Keyword[final] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[URLConnection] operator[>] identifier[aConnectionModifier] , annotation[@] identifier[Nullable] Keyword[final] identifier[IMutableWrapper] operator[<] identifier[IOException] operator[>] identifier[aExceptionHolder] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aURL] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG_GET_IS] operator[SEP] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[aURL] operator[+] literal[String] operator[+] identifier[nConnectTimeoutMS] operator[+] literal[String] operator[+] identifier[nReadTimeoutMS] operator[+] literal[String] operator[+] identifier[aConnectionModifier] operator[+] literal[String] operator[+] identifier[aExceptionHolder] operator[+] literal[String] , Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[URLConnection] identifier[aConnection] operator[SEP] identifier[HttpURLConnection] identifier[aHTTPConnection] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[aConnection] operator[=] identifier[aURL] operator[SEP] identifier[openConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nConnectTimeoutMS] operator[>=] Other[0] operator[SEP] identifier[aConnection] operator[SEP] identifier[setConnectTimeout] operator[SEP] identifier[nConnectTimeoutMS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nReadTimeoutMS] operator[>=] Other[0] operator[SEP] identifier[aConnection] operator[SEP] identifier[setReadTimeout] operator[SEP] identifier[nReadTimeoutMS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aConnection] Keyword[instanceof] identifier[HttpURLConnection] operator[SEP] identifier[aHTTPConnection] operator[=] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[aConnection] operator[SEP] identifier[aConnection] operator[SEP] identifier[setUseCaches] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aConnectionModifier] operator[!=] Other[null] operator[SEP] identifier[aConnectionModifier] operator[SEP] identifier[accept] operator[SEP] identifier[aConnection] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aConnection] Keyword[instanceof] identifier[JarURLConnection] operator[SEP] { Keyword[final] identifier[JarEntry] identifier[aJarEntry] operator[=] operator[SEP] operator[SEP] identifier[JarURLConnection] operator[SEP] identifier[aConnection] operator[SEP] operator[SEP] identifier[getJarEntry] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aJarEntry] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[aJarEntry] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[aJarEntry] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[==] Other[0] operator[&&] identifier[aJarEntry] operator[SEP] identifier[getCrc] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[aURL] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } } Keyword[final] identifier[InputStream] identifier[ret] operator[=] identifier[aConnection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG_GET_IS] operator[SEP] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[ret] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[aExceptionHolder] operator[!=] Other[null] operator[SEP] { identifier[aExceptionHolder] operator[SEP] identifier[set] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[ex] Keyword[instanceof] identifier[SocketTimeoutException] operator[SEP] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[aURL] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[aURL] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[aHTTPConnection] operator[!=] Other[null] operator[SEP] { identifier[InputStream] identifier[aErrorIS] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[aErrorIS] operator[=] identifier[aHTTPConnection] operator[SEP] identifier[getErrorStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aErrorIS] operator[!=] Other[null] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[aBuf] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[1024] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[aErrorIS] operator[SEP] identifier[read] operator[SEP] identifier[aBuf] operator[SEP] operator[>] Other[0] operator[SEP] { } } } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[ex2] operator[SEP] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[aURL] operator[+] literal[String] operator[+] identifier[ex2] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ex2] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[StreamHelper] operator[SEP] identifier[close] operator[SEP] identifier[aErrorIS] operator[SEP] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public void error(Object arg0, Throwable arg1) { message(ERROR,new Object[]{arg0,arg1},new Frame(1)); }
class class_name[name] begin[{] method[error, return_type[void], modifier[public], parameter[arg0, arg1]] begin[{] call[.message, parameter[member[.ERROR], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=arg0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arg1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Frame, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[error] operator[SEP] identifier[Object] identifier[arg0] , identifier[Throwable] identifier[arg1] operator[SEP] { identifier[message] operator[SEP] identifier[ERROR] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[arg0] , identifier[arg1] } , Keyword[new] identifier[Frame] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] }
Optional<PointForecast> getPointForecast(ZonedDateTime dateTime) { for (Forecast forecast : forecasts) { if (forecast instanceof PointForecast) { PointForecast pointForecast = (PointForecast) forecast; if (createHourIndexKey(dateTime) .equals(createHourIndexKey(cloneZonedDateTime(pointForecast.getFrom())))) { return Optional.of(pointForecast); } } } return Optional.empty(); }
class class_name[name] begin[{] method[getPointForecast, return_type[type[Optional]], modifier[default], parameter[dateTime]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=forecast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=PointForecast, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=forecast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PointForecast, sub_type=None)), name=pointForecast)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PointForecast, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=dateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createHourIndexKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFrom, postfix_operators=[], prefix_operators=[], qualifier=pointForecast, selectors=[], type_arguments=None)], member=cloneZonedDateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=createHourIndexKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=pointForecast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=forecasts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=forecast)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Forecast, sub_type=None))), label=None) return[call[Optional.empty, parameter[]]] end[}] END[}]
identifier[Optional] operator[<] identifier[PointForecast] operator[>] identifier[getPointForecast] operator[SEP] identifier[ZonedDateTime] identifier[dateTime] operator[SEP] { Keyword[for] operator[SEP] identifier[Forecast] identifier[forecast] operator[:] identifier[forecasts] operator[SEP] { Keyword[if] operator[SEP] identifier[forecast] Keyword[instanceof] identifier[PointForecast] operator[SEP] { identifier[PointForecast] identifier[pointForecast] operator[=] operator[SEP] identifier[PointForecast] operator[SEP] identifier[forecast] operator[SEP] Keyword[if] operator[SEP] identifier[createHourIndexKey] operator[SEP] identifier[dateTime] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[createHourIndexKey] operator[SEP] identifier[cloneZonedDateTime] operator[SEP] identifier[pointForecast] operator[SEP] identifier[getFrom] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[pointForecast] operator[SEP] operator[SEP] } } } Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public static <T> T loadUtf8(String path, ReaderHandler<T> readerHandler) throws IORuntimeException { return load(path, CharsetUtil.CHARSET_UTF_8, readerHandler); }
class class_name[name] begin[{] method[loadUtf8, return_type[type[T]], modifier[public static], parameter[path, readerHandler]] begin[{] return[call[.load, parameter[member[.path], member[CharsetUtil.CHARSET_UTF_8], member[.readerHandler]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[loadUtf8] operator[SEP] identifier[String] identifier[path] , identifier[ReaderHandler] operator[<] identifier[T] operator[>] identifier[readerHandler] operator[SEP] Keyword[throws] identifier[IORuntimeException] { Keyword[return] identifier[load] operator[SEP] identifier[path] , identifier[CharsetUtil] operator[SEP] identifier[CHARSET_UTF_8] , identifier[readerHandler] operator[SEP] operator[SEP] }
public BigDecimal roundBigDecimal(final BigDecimal number) { int mscale = getMathScale(); if (mscale >= 0) { return number.setScale(mscale, getMathContext().getRoundingMode()); } else { return number; } }
class class_name[name] begin[{] method[roundBigDecimal, return_type[type[BigDecimal]], modifier[public], parameter[number]] begin[{] local_variable[type[int], mscale] if[binary_operation[member[.mscale], >=, literal[0]]] begin[{] return[call[number.setScale, parameter[member[.mscale], call[.getMathContext, parameter[]]]]] else begin[{] return[member[.number]] end[}] end[}] END[}]
Keyword[public] identifier[BigDecimal] identifier[roundBigDecimal] operator[SEP] Keyword[final] identifier[BigDecimal] identifier[number] operator[SEP] { Keyword[int] identifier[mscale] operator[=] identifier[getMathScale] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mscale] operator[>=] Other[0] operator[SEP] { Keyword[return] identifier[number] operator[SEP] identifier[setScale] operator[SEP] identifier[mscale] , identifier[getMathContext] operator[SEP] operator[SEP] operator[SEP] identifier[getRoundingMode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[number] operator[SEP] } }
public void setIcons(FeatureRow featureRow, Icons icons) { setIcons(featureRow.getTable().getTableName(), featureRow.getId(), icons); }
class class_name[name] begin[{] method[setIcons, return_type[void], modifier[public], parameter[featureRow, icons]] begin[{] call[.setIcons, parameter[call[featureRow.getTable, parameter[]], call[featureRow.getId, parameter[]], member[.icons]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setIcons] operator[SEP] identifier[FeatureRow] identifier[featureRow] , identifier[Icons] identifier[icons] operator[SEP] { identifier[setIcons] operator[SEP] identifier[featureRow] operator[SEP] identifier[getTable] operator[SEP] operator[SEP] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] , identifier[featureRow] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[icons] operator[SEP] operator[SEP] }
public InsertAllResponse insert( Iterable<InsertAllRequest.RowToInsert> rows, boolean skipInvalidRows, boolean ignoreUnknownValues) throws BigQueryException { InsertAllRequest request = InsertAllRequest.newBuilder(getTableId(), rows) .setSkipInvalidRows(skipInvalidRows) .setIgnoreUnknownValues(ignoreUnknownValues) .build(); return bigquery.insertAll(request); }
class class_name[name] begin[{] method[insert, return_type[type[InsertAllResponse]], modifier[public], parameter[rows, skipInvalidRows, ignoreUnknownValues]] begin[{] local_variable[type[InsertAllRequest], request] return[call[bigquery.insertAll, parameter[member[.request]]]] end[}] END[}]
Keyword[public] identifier[InsertAllResponse] identifier[insert] operator[SEP] identifier[Iterable] operator[<] identifier[InsertAllRequest] operator[SEP] identifier[RowToInsert] operator[>] identifier[rows] , Keyword[boolean] identifier[skipInvalidRows] , Keyword[boolean] identifier[ignoreUnknownValues] operator[SEP] Keyword[throws] identifier[BigQueryException] { identifier[InsertAllRequest] identifier[request] operator[=] identifier[InsertAllRequest] operator[SEP] identifier[newBuilder] operator[SEP] identifier[getTableId] operator[SEP] operator[SEP] , identifier[rows] operator[SEP] operator[SEP] identifier[setSkipInvalidRows] operator[SEP] identifier[skipInvalidRows] operator[SEP] operator[SEP] identifier[setIgnoreUnknownValues] operator[SEP] identifier[ignoreUnknownValues] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[bigquery] operator[SEP] identifier[insertAll] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public Element put(String name, Element value) { assert (name != null); Element oldValue = null; if (value != null) { // Set the value and ensure that the replacement can be done. oldValue = map.put(name, value); if (oldValue != null) { oldValue.checkValidReplacement(value); } } else { // Remove the referenced variable. oldValue = map.remove(name); } return oldValue; }
class class_name[name] begin[{] method[put, return_type[type[Element]], modifier[public], parameter[name, value]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) local_variable[type[Element], oldValue] if[binary_operation[member[.value], !=, literal[null]]] begin[{] assign[member[.oldValue], call[map.put, parameter[member[.name], member[.value]]]] if[binary_operation[member[.oldValue], !=, literal[null]]] begin[{] call[oldValue.checkValidReplacement, parameter[member[.value]]] else begin[{] None end[}] else begin[{] assign[member[.oldValue], call[map.remove, parameter[member[.name]]]] end[}] return[member[.oldValue]] end[}] END[}]
Keyword[public] identifier[Element] identifier[put] operator[SEP] identifier[String] identifier[name] , identifier[Element] identifier[value] operator[SEP] { Keyword[assert] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[Element] identifier[oldValue] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[oldValue] operator[=] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldValue] operator[!=] Other[null] operator[SEP] { identifier[oldValue] operator[SEP] identifier[checkValidReplacement] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } Keyword[else] { identifier[oldValue] operator[=] identifier[map] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[return] identifier[oldValue] operator[SEP] }
public static INDArray toMatrix(Matrix arr) { // we assume that Matrix always has F order return Nd4j.create(arr.toArray(), new int[] {arr.numRows(), arr.numCols()}, 'f'); }
class class_name[name] begin[{] method[toMatrix, return_type[type[INDArray]], modifier[public static], parameter[arr]] begin[{] return[call[Nd4j.create, parameter[call[arr.toArray, parameter[]], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=numRows, postfix_operators=[], prefix_operators=[], qualifier=arr, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=numCols, postfix_operators=[], prefix_operators=[], qualifier=arr, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), literal['f']]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[INDArray] identifier[toMatrix] operator[SEP] identifier[Matrix] identifier[arr] operator[SEP] { Keyword[return] identifier[Nd4j] operator[SEP] identifier[create] operator[SEP] identifier[arr] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] , Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[arr] operator[SEP] identifier[numRows] operator[SEP] operator[SEP] , identifier[arr] operator[SEP] identifier[numCols] operator[SEP] operator[SEP] } , literal[String] operator[SEP] operator[SEP] }
public synchronized void add( int handle , String messageID , int deliveryMode , LocalQueue destination ) { // Create a new transaction item TransactionItem item = new TransactionItem(handle, messageID, deliveryMode, destination); items.add(item); }
class class_name[name] begin[{] method[add, return_type[void], modifier[synchronized public], parameter[handle, messageID, deliveryMode, destination]] begin[{] local_variable[type[TransactionItem], item] call[items.add, parameter[member[.item]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] Keyword[int] identifier[handle] , identifier[String] identifier[messageID] , Keyword[int] identifier[deliveryMode] , identifier[LocalQueue] identifier[destination] operator[SEP] { identifier[TransactionItem] identifier[item] operator[=] Keyword[new] identifier[TransactionItem] operator[SEP] identifier[handle] , identifier[messageID] , identifier[deliveryMode] , identifier[destination] operator[SEP] operator[SEP] identifier[items] operator[SEP] identifier[add] operator[SEP] identifier[item] operator[SEP] operator[SEP] }
@Override public <Y> SingularAttribute<? super X, Y> getVersion(Class<Y> paramClass) { // TODO: Versioning not yet supported. throw new UnsupportedOperationException("Method not supported"); }
class class_name[name] begin[{] method[getVersion, return_type[type[SingularAttribute]], modifier[public], parameter[paramClass]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Method not supported")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[Y] operator[>] identifier[SingularAttribute] operator[<] operator[?] Keyword[super] identifier[X] , identifier[Y] operator[>] identifier[getVersion] operator[SEP] identifier[Class] operator[<] identifier[Y] operator[>] identifier[paramClass] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public JavaType buildMapType(Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) { return mapper.getTypeFactory().constructMapType(mapClass, keyClass, valueClass); }
class class_name[name] begin[{] method[buildMapType, return_type[type[JavaType]], modifier[public], parameter[mapClass, keyClass, valueClass]] begin[{] return[call[mapper.getTypeFactory, parameter[]]] end[}] END[}]
Keyword[public] identifier[JavaType] identifier[buildMapType] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Map] operator[>] identifier[mapClass] , identifier[Class] operator[<] operator[?] operator[>] identifier[keyClass] , identifier[Class] operator[<] operator[?] operator[>] identifier[valueClass] operator[SEP] { Keyword[return] identifier[mapper] operator[SEP] identifier[getTypeFactory] operator[SEP] operator[SEP] operator[SEP] identifier[constructMapType] operator[SEP] identifier[mapClass] , identifier[keyClass] , identifier[valueClass] operator[SEP] operator[SEP] }
public static List<String> replaceDotInMustacheKeys(final List<String> mustacheKeys) { final List<String> fixedMustacheKeys = new ArrayList<>(); for (String mustacheKey : mustacheKeys) { fixedMustacheKeys.add(mustacheKey.replace('.', '#')); } return fixedMustacheKeys; }
class class_name[name] begin[{] method[replaceDotInMustacheKeys, return_type[type[List]], modifier[public static], parameter[mustacheKeys]] begin[{] local_variable[type[List], fixedMustacheKeys] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='#')], member=replace, postfix_operators=[], prefix_operators=[], qualifier=mustacheKey, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=fixedMustacheKeys, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=mustacheKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mustacheKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.fixedMustacheKeys]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[replaceDotInMustacheKeys] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[mustacheKeys] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[fixedMustacheKeys] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[mustacheKey] operator[:] identifier[mustacheKeys] operator[SEP] { identifier[fixedMustacheKeys] operator[SEP] identifier[add] operator[SEP] identifier[mustacheKey] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[fixedMustacheKeys] operator[SEP] }
public Where<T, ID> where() { where = new Where<T, ID>(tableInfo, this, databaseType); return where; }
class class_name[name] begin[{] method[where, return_type[type[Where]], modifier[public], parameter[]] begin[{] assign[member[.where], ClassCreator(arguments=[MemberReference(member=tableInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=databaseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ID, sub_type=None))], dimensions=None, name=Where, sub_type=None))] return[member[.where]] end[}] END[}]
Keyword[public] identifier[Where] operator[<] identifier[T] , identifier[ID] operator[>] identifier[where] operator[SEP] operator[SEP] { identifier[where] operator[=] Keyword[new] identifier[Where] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[tableInfo] , Keyword[this] , identifier[databaseType] operator[SEP] operator[SEP] Keyword[return] identifier[where] operator[SEP] }
public long getNodeDataSize(String repositoryName, String workspaceName, String nodePath) throws UnknownDataSizeException { String workspaceUniqueName = composeWorkspaceUniqueName(repositoryName, workspaceName); CacheKey key = new NodeDataSizeKey(workspaceUniqueName, nodePath); return getDataSize(key); }
class class_name[name] begin[{] method[getNodeDataSize, return_type[type[long]], modifier[public], parameter[repositoryName, workspaceName, nodePath]] begin[{] local_variable[type[String], workspaceUniqueName] local_variable[type[CacheKey], key] return[call[.getDataSize, parameter[member[.key]]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getNodeDataSize] operator[SEP] identifier[String] identifier[repositoryName] , identifier[String] identifier[workspaceName] , identifier[String] identifier[nodePath] operator[SEP] Keyword[throws] identifier[UnknownDataSizeException] { identifier[String] identifier[workspaceUniqueName] operator[=] identifier[composeWorkspaceUniqueName] operator[SEP] identifier[repositoryName] , identifier[workspaceName] operator[SEP] operator[SEP] identifier[CacheKey] identifier[key] operator[=] Keyword[new] identifier[NodeDataSizeKey] operator[SEP] identifier[workspaceUniqueName] , identifier[nodePath] operator[SEP] operator[SEP] Keyword[return] identifier[getDataSize] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
public static String sanitizeAttribute (String value) { for (int ii = 0; ii < ATTR_ESCAPES.length; ++ii) { value = value.replace(ATTR_ESCAPES[ii][0], ""); } return value; }
class class_name[name] begin[{] method[sanitizeAttribute, return_type[type[String]], modifier[public static], parameter[value]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ATTR_ESCAPES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=ATTR_ESCAPES, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=ii)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=ii, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.value]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[sanitizeAttribute] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[ii] operator[=] Other[0] operator[SEP] identifier[ii] operator[<] identifier[ATTR_ESCAPES] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[ii] operator[SEP] { identifier[value] operator[=] identifier[value] operator[SEP] identifier[replace] operator[SEP] identifier[ATTR_ESCAPES] operator[SEP] identifier[ii] operator[SEP] operator[SEP] Other[0] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public static String getPatternFromFile(BufferedReader reader) throws IOException { StringBuilder matchString = new StringBuilder(); for (String thisLine; (thisLine = reader.readLine()) != null; ) { if (matchString.length() > 0 && emptyLinePattern.matcher(thisLine).matches()) { // A blank line after getting some real content (not just comments or nothing) break; } Matcher m = commentPattern.matcher(thisLine); if (m.matches()) { // delete it thisLine = m.replaceFirst(""); } if ( ! emptyLinePattern.matcher(thisLine).matches()) { matchString.append(thisLine); } } return matchString.toString(); }
class class_name[name] begin[{] method[getPatternFromFile, return_type[type[String]], modifier[public static], parameter[reader]] begin[{] local_variable[type[StringBuilder], matchString] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=matchString, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=emptyLinePattern, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=commentPattern, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=matches, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replaceFirst, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=['!'], qualifier=emptyLinePattern, selectors=[MethodInvocation(arguments=[], 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=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=matchString, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=thisLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=thisLine)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), update=None), label=None) return[call[matchString.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getPatternFromFile] operator[SEP] identifier[BufferedReader] identifier[reader] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuilder] identifier[matchString] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[thisLine] operator[SEP] operator[SEP] identifier[thisLine] operator[=] identifier[reader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[matchString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[emptyLinePattern] operator[SEP] identifier[matcher] operator[SEP] identifier[thisLine] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[Matcher] identifier[m] operator[=] identifier[commentPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[thisLine] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[thisLine] operator[=] identifier[m] operator[SEP] identifier[replaceFirst] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[emptyLinePattern] operator[SEP] identifier[matcher] operator[SEP] identifier[thisLine] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[matchString] operator[SEP] identifier[append] operator[SEP] identifier[thisLine] operator[SEP] operator[SEP] } } Keyword[return] identifier[matchString] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static Map<String, Object> getBeanProperties(Object bean) { Map<String, Object> props = new HashMap<>(); if (bean == null) { return props; } Class<?> clazz = bean.getClass(); try { //Public fields: Field[] fields = clazz.getFields(); for (Field field : fields) { String name = field.getName(); if (!name.equals("class")) { props.put(field.getName(), field.get(bean)); } } //Getters: BeanInfo info = Introspector.getBeanInfo(clazz); for (PropertyDescriptor desc : info.getPropertyDescriptors()) { Method readMethod = desc.getReadMethod(); String name = desc.getName(); if (readMethod != null && !name.equals("class")) { props.put(desc.getName(), readMethod.invoke(bean)); } } return props; } catch (IntrospectionException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { throw new UniformException("Error while getting bean object properties of class" + clazz.getName(), ex); } }
class class_name[name] begin[{] method[getBeanProperties, return_type[type[Map]], modifier[public static], parameter[bean]] begin[{] local_variable[type[Map], props] if[binary_operation[member[.bean], ==, literal[null]]] begin[{] return[member[.props]] else begin[{] None end[}] local_variable[type[Class], clazz] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), name=fields)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Field, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="class")], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=name, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBeanInfo, postfix_operators=[], prefix_operators=[], qualifier=Introspector, selectors=[], type_arguments=None), name=info)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BeanInfo, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getReadMethod, postfix_operators=[], prefix_operators=[], qualifier=desc, selectors=[], type_arguments=None), name=readMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=desc, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=readMethod, 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="class")], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=name, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=desc, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=readMethod, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPropertyDescriptors, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=desc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyDescriptor, sub_type=None))), label=None), ReturnStatement(expression=MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while getting bean object properties of class"), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operator=+), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UniformException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IntrospectionException', 'IllegalAccessException', 'IllegalArgumentException', 'InvocationTargetException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getBeanProperties] operator[SEP] identifier[Object] identifier[bean] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[props] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bean] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[props] operator[SEP] } identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[bean] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Field] operator[SEP] operator[SEP] identifier[fields] operator[=] identifier[clazz] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fields] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[bean] operator[SEP] operator[SEP] operator[SEP] } } identifier[BeanInfo] identifier[info] operator[=] identifier[Introspector] operator[SEP] identifier[getBeanInfo] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PropertyDescriptor] identifier[desc] operator[:] identifier[info] operator[SEP] identifier[getPropertyDescriptors] operator[SEP] operator[SEP] operator[SEP] { identifier[Method] identifier[readMethod] operator[=] identifier[desc] operator[SEP] identifier[getReadMethod] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[desc] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[readMethod] operator[!=] Other[null] operator[&&] operator[!] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[desc] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[readMethod] operator[SEP] identifier[invoke] operator[SEP] identifier[bean] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[props] operator[SEP] } Keyword[catch] operator[SEP] identifier[IntrospectionException] operator[|] identifier[IllegalAccessException] operator[|] identifier[IllegalArgumentException] operator[|] identifier[InvocationTargetException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[UniformException] operator[SEP] literal[String] operator[+] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } }
private void releaseAssignedResource(@Nullable Throwable cause) { assertRunningInJobMasterMainThread(); final LogicalSlot slot = assignedResource; if (slot != null) { ComponentMainThreadExecutor jobMasterMainThreadExecutor = getVertex().getExecutionGraph().getJobMasterMainThreadExecutor(); slot.releaseSlot(cause) .whenComplete((Object ignored, Throwable throwable) -> { jobMasterMainThreadExecutor.assertRunningInMainThread(); if (throwable != null) { releaseFuture.completeExceptionally(throwable); } else { releaseFuture.complete(null); } }); } else { // no assigned resource --> we can directly complete the release future releaseFuture.complete(null); } }
class class_name[name] begin[{] method[releaseAssignedResource, return_type[void], modifier[private], parameter[cause]] begin[{] call[.assertRunningInJobMasterMainThread, parameter[]] local_variable[type[LogicalSlot], slot] if[binary_operation[member[.slot], !=, literal[null]]] begin[{] local_variable[type[ComponentMainThreadExecutor], jobMasterMainThreadExecutor] call[slot.releaseSlot, parameter[member[.cause]]] else begin[{] call[releaseFuture.complete, parameter[literal[null]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[releaseAssignedResource] operator[SEP] annotation[@] identifier[Nullable] identifier[Throwable] identifier[cause] operator[SEP] { identifier[assertRunningInJobMasterMainThread] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[LogicalSlot] identifier[slot] operator[=] identifier[assignedResource] operator[SEP] Keyword[if] operator[SEP] identifier[slot] operator[!=] Other[null] operator[SEP] { identifier[ComponentMainThreadExecutor] identifier[jobMasterMainThreadExecutor] operator[=] identifier[getVertex] operator[SEP] operator[SEP] operator[SEP] identifier[getExecutionGraph] operator[SEP] operator[SEP] operator[SEP] identifier[getJobMasterMainThreadExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[slot] operator[SEP] identifier[releaseSlot] operator[SEP] identifier[cause] operator[SEP] operator[SEP] identifier[whenComplete] operator[SEP] operator[SEP] identifier[Object] identifier[ignored] , identifier[Throwable] identifier[throwable] operator[SEP] operator[->] { identifier[jobMasterMainThreadExecutor] operator[SEP] identifier[assertRunningInMainThread] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[throwable] operator[!=] Other[null] operator[SEP] { identifier[releaseFuture] operator[SEP] identifier[completeExceptionally] operator[SEP] identifier[throwable] operator[SEP] operator[SEP] } Keyword[else] { identifier[releaseFuture] operator[SEP] identifier[complete] operator[SEP] Other[null] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[else] { identifier[releaseFuture] operator[SEP] identifier[complete] operator[SEP] Other[null] operator[SEP] operator[SEP] } }
public void driftHandled(boolean dropOld) { /* * Iterate through and either drop everything to the left OR the right * Track statiscits so that we can update allStats */ Iterator<OnLineStatistics> testIter = windows.descendingIterator(); OnLineStatistics leftStats = new OnLineStatistics(); while (testIter.hasNext()) { OnLineStatistics windowItem = testIter.next(); //accumulate left side statistics if(leftStats.getSumOfWeights() < driftStart) { leftStats.add(windowItem); if(dropOld) testIter.remove(); } else { if(!dropOld) testIter.remove(); } } if(dropOld) allStats.remove(leftStats); else allStats = leftStats; time = (int) allStats.getSumOfWeights(); leftMean = leftVariance = rightMean = rightVariance = Double.NaN; //Calling at the end b/c we need driftStart's value super.driftHandled(); }
class class_name[name] begin[{] method[driftHandled, return_type[void], modifier[public], parameter[dropOld]] begin[{] local_variable[type[Iterator], testIter] local_variable[type[OnLineStatistics], leftStats] while[call[testIter.hasNext, parameter[]]] begin[{] local_variable[type[OnLineStatistics], windowItem] if[binary_operation[call[leftStats.getSumOfWeights, parameter[]], <, member[.driftStart]]] begin[{] call[leftStats.add, parameter[member[.windowItem]]] if[member[.dropOld]] begin[{] call[testIter.remove, parameter[]] else begin[{] None end[}] else begin[{] if[member[.dropOld]] begin[{] call[testIter.remove, parameter[]] else begin[{] None end[}] end[}] end[}] if[member[.dropOld]] begin[{] call[allStats.remove, parameter[member[.leftStats]]] else begin[{] assign[member[.allStats], member[.leftStats]] end[}] assign[member[.time], Cast(expression=MethodInvocation(arguments=[], member=getSumOfWeights, postfix_operators=[], prefix_operators=[], qualifier=allStats, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] assign[member[.leftMean], assign[member[.leftVariance], assign[member[.rightMean], assign[member[.rightVariance], member[Double.NaN]]]]] SuperMethodInvocation(arguments=[], member=driftHandled, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[driftHandled] operator[SEP] Keyword[boolean] identifier[dropOld] operator[SEP] { identifier[Iterator] operator[<] identifier[OnLineStatistics] operator[>] identifier[testIter] operator[=] identifier[windows] operator[SEP] identifier[descendingIterator] operator[SEP] operator[SEP] operator[SEP] identifier[OnLineStatistics] identifier[leftStats] operator[=] Keyword[new] identifier[OnLineStatistics] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[testIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[OnLineStatistics] identifier[windowItem] operator[=] identifier[testIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[leftStats] operator[SEP] identifier[getSumOfWeights] operator[SEP] operator[SEP] operator[<] identifier[driftStart] operator[SEP] { identifier[leftStats] operator[SEP] identifier[add] operator[SEP] identifier[windowItem] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dropOld] operator[SEP] identifier[testIter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[dropOld] operator[SEP] identifier[testIter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[dropOld] operator[SEP] identifier[allStats] operator[SEP] identifier[remove] operator[SEP] identifier[leftStats] operator[SEP] operator[SEP] Keyword[else] identifier[allStats] operator[=] identifier[leftStats] operator[SEP] identifier[time] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[allStats] operator[SEP] identifier[getSumOfWeights] operator[SEP] operator[SEP] operator[SEP] identifier[leftMean] operator[=] identifier[leftVariance] operator[=] identifier[rightMean] operator[=] identifier[rightVariance] operator[=] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] Keyword[super] operator[SEP] identifier[driftHandled] operator[SEP] operator[SEP] operator[SEP] }
public Map<String, String> getNodeBreadcrumbs(final UriInfo uriInfo, final Node subject) { final String topic = subject.getURI(); LOGGER.trace("Generating breadcrumbs for subject {}", subject); final String baseUri = uriInfo.getBaseUri().toString(); if (!topic.startsWith(baseUri)) { LOGGER.trace("Topic wasn't part of our base URI {}", baseUri); return emptyMap(); } final String salientPath = topic.substring(baseUri.length()); final StringJoiner cumulativePath = new StringJoiner("/"); return stream(salientPath.split("/")).filter(seg -> !seg.isEmpty()).collect(toMap(seg -> uriInfo .getBaseUriBuilder().path(cumulativePath.add(seg).toString()) .build().toString(), seg -> seg, (u, v) -> null, LinkedHashMap::new)); }
class class_name[name] begin[{] method[getNodeBreadcrumbs, return_type[type[Map]], modifier[public], parameter[uriInfo, subject]] begin[{] local_variable[type[String], topic] call[LOGGER.trace, parameter[literal["Generating breadcrumbs for subject {}"], member[.subject]]] local_variable[type[String], baseUri] if[call[topic.startsWith, parameter[member[.baseUri]]]] begin[{] call[LOGGER.trace, parameter[literal["Topic wasn't part of our base URI {}"], member[.baseUri]]] return[call[.emptyMap, parameter[]]] else begin[{] None end[}] local_variable[type[String], salientPath] local_variable[type[StringJoiner], cumulativePath] return[call[.stream, parameter[call[salientPath.split, parameter[literal["/"]]]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getNodeBreadcrumbs] operator[SEP] Keyword[final] identifier[UriInfo] identifier[uriInfo] , Keyword[final] identifier[Node] identifier[subject] operator[SEP] { Keyword[final] identifier[String] identifier[topic] operator[=] identifier[subject] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[subject] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[baseUri] operator[=] identifier[uriInfo] operator[SEP] identifier[getBaseUri] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[topic] operator[SEP] identifier[startsWith] operator[SEP] identifier[baseUri] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[baseUri] operator[SEP] operator[SEP] Keyword[return] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[salientPath] operator[=] identifier[topic] operator[SEP] identifier[substring] operator[SEP] identifier[baseUri] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[StringJoiner] identifier[cumulativePath] operator[=] Keyword[new] identifier[StringJoiner] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[stream] operator[SEP] identifier[salientPath] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[seg] operator[->] operator[!] identifier[seg] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[toMap] operator[SEP] identifier[seg] operator[->] identifier[uriInfo] operator[SEP] identifier[getBaseUriBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[cumulativePath] operator[SEP] identifier[add] operator[SEP] identifier[seg] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[seg] operator[->] identifier[seg] , operator[SEP] identifier[u] , identifier[v] operator[SEP] operator[->] Other[null] , identifier[LinkedHashMap] operator[::] Keyword[new] operator[SEP] operator[SEP] operator[SEP] }
public void openOtherRecords() { super.openOtherRecords(); Record mainRecord = this.getMainRecord(); if (m_recHeader != null) { if ((mainRecord != m_recHeader) && (mainRecord.getClass() == m_recHeader.getClass()) && (mainRecord.getRecordName().equals(m_recHeader.getRecordName()))) { // Special case... the main record was passed in, but I was expecting a header record, swap them Record oldHeaderRecord = m_recHeader; m_recHeader = this.openHeaderRecord(); // The new correct header record if ((m_recHeader != null) && (mainRecord.getClass() != m_recHeader.getClass())) // Just being sure that the main and header are different { // That's what I thought the header is different mainRecord.free(); // Should not have opened this this.addRecord(oldHeaderRecord, true); // The passed in header is the correct main record } else { // Hmmm, the header and detail records are the same (record class not object) if (m_recHeader != oldHeaderRecord) { // Always if (m_recHeader != null) m_recHeader.free(); m_recHeader = oldHeaderRecord; // It was okay to begin with, restore the original values } } } if (this.getRecord(m_recHeader.getTableNames(false)) != m_recHeader) // May be in a parent screen this.addRecord(m_recHeader, false); } else { m_recHeader = this.openHeaderRecord(); if (mainRecord == m_recHeader) // Passed in the header record as main this.openMainRecord(); } }
class class_name[name] begin[{] method[openOtherRecords, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=openOtherRecords, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[Record], mainRecord] if[binary_operation[member[.m_recHeader], !=, literal[null]]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.mainRecord], !=, member[.m_recHeader]], &&, binary_operation[call[mainRecord.getClass, parameter[]], ==, call[m_recHeader.getClass, parameter[]]]], &&, call[mainRecord.getRecordName, parameter[]]]] begin[{] local_variable[type[Record], oldHeaderRecord] assign[member[.m_recHeader], THIS[call[None.openHeaderRecord, parameter[]]]] if[binary_operation[binary_operation[member[.m_recHeader], !=, literal[null]], &&, binary_operation[call[mainRecord.getClass, parameter[]], !=, call[m_recHeader.getClass, parameter[]]]]] begin[{] call[mainRecord.free, parameter[]] THIS[call[None.addRecord, parameter[member[.oldHeaderRecord], literal[true]]]] else begin[{] if[binary_operation[member[.m_recHeader], !=, member[.oldHeaderRecord]]] begin[{] if[binary_operation[member[.m_recHeader], !=, literal[null]]] begin[{] call[m_recHeader.free, parameter[]] else begin[{] None end[}] assign[member[.m_recHeader], member[.oldHeaderRecord]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[THIS[call[None.getRecord, parameter[call[m_recHeader.getTableNames, parameter[literal[false]]]]]], !=, member[.m_recHeader]]] begin[{] THIS[call[None.addRecord, parameter[member[.m_recHeader], literal[false]]]] else begin[{] None end[}] else begin[{] assign[member[.m_recHeader], THIS[call[None.openHeaderRecord, parameter[]]]] if[binary_operation[member[.mainRecord], ==, member[.m_recHeader]]] begin[{] THIS[call[None.openMainRecord, parameter[]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[openOtherRecords] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[openOtherRecords] operator[SEP] operator[SEP] operator[SEP] identifier[Record] identifier[mainRecord] operator[=] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_recHeader] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[mainRecord] operator[!=] identifier[m_recHeader] operator[SEP] operator[&&] operator[SEP] identifier[mainRecord] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[m_recHeader] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mainRecord] operator[SEP] identifier[getRecordName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[m_recHeader] operator[SEP] identifier[getRecordName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Record] identifier[oldHeaderRecord] operator[=] identifier[m_recHeader] operator[SEP] identifier[m_recHeader] operator[=] Keyword[this] operator[SEP] identifier[openHeaderRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[m_recHeader] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[mainRecord] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[!=] identifier[m_recHeader] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[mainRecord] operator[SEP] identifier[free] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addRecord] operator[SEP] identifier[oldHeaderRecord] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[m_recHeader] operator[!=] identifier[oldHeaderRecord] operator[SEP] { Keyword[if] operator[SEP] identifier[m_recHeader] operator[!=] Other[null] operator[SEP] identifier[m_recHeader] operator[SEP] identifier[free] operator[SEP] operator[SEP] operator[SEP] identifier[m_recHeader] operator[=] identifier[oldHeaderRecord] operator[SEP] } } } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[m_recHeader] operator[SEP] identifier[getTableNames] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[!=] identifier[m_recHeader] operator[SEP] Keyword[this] operator[SEP] identifier[addRecord] operator[SEP] identifier[m_recHeader] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[m_recHeader] operator[=] Keyword[this] operator[SEP] identifier[openHeaderRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mainRecord] operator[==] identifier[m_recHeader] operator[SEP] Keyword[this] operator[SEP] identifier[openMainRecord] operator[SEP] operator[SEP] operator[SEP] } }
protected synchronized void disconnect() { if (socket != null) { logger.info("Closing socket."); try { socket.close(); } catch (IOException ex) { logger.warn("Unable to close socket: " + ex.getMessage()); } socket = null; } protocolIdentifier.reset(); }
class class_name[name] begin[{] method[disconnect, return_type[void], modifier[synchronized protected], parameter[]] begin[{] if[binary_operation[member[.socket], !=, literal[null]]] begin[{] call[logger.info, parameter[literal["Closing socket."]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to close socket: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) assign[member[.socket], literal[null]] else begin[{] None end[}] call[protocolIdentifier.reset, parameter[]] end[}] END[}]
Keyword[protected] Keyword[synchronized] Keyword[void] identifier[disconnect] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[socket] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[socket] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[socket] operator[=] Other[null] operator[SEP] } identifier[protocolIdentifier] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] }
public Event[] getEvents(boolean evalMode) { ArrayList elist = new ArrayList(); //int numMatches; //Set frequent; /* if(!evalMode) { //System.out.println("Reading in all the data"); try { StringBuffer sb = new StringBuffer(); for(String s = br.readLine(); s!=null; s=br.readLine()) sb.append(s+"\n"); //System.out.println("Getting most frequent words"); frequent = getFrequent(new BufferedReader( new StringReader(sb.toString()))); br = new BufferedReader(new StringReader(sb.toString())); sb=null; } catch (IOException e) { e.printStackTrace(); } } */ //System.out.println("Collecting events"); try { String s = br.readLine(); while (s != null) { Pair p = convertAnnotatedString(s); ArrayList tokens = (ArrayList)p.a; ArrayList outcomes = (ArrayList)p.b; ArrayList tags = new ArrayList(); for (int i=0; i<tokens.size(); i++) { String[] context = cg.getContext(i,tokens.toArray(),(String[]) tags.toArray(new String[tags.size()]),null); Event e = new Event((String)outcomes.get(i), context); tags.add(outcomes.get(i)); elist.add(e); } s = br.readLine(); } } catch (Exception e) { e.printStackTrace(); } Event[] events = new Event[elist.size()]; for(int i=0; i<events.length; i++) events[i] = (Event)elist.get(i); return events; }
class class_name[name] begin[{] method[getEvents, return_type[type[Event]], modifier[public], parameter[evalMode]] begin[{] local_variable[type[ArrayList], elist] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=br, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertAnnotatedString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pair, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None)), name=tokens)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None)), name=outcomes)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None)), name=tags)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), Cast(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=cg, selectors=[], type_arguments=None), name=context)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=outcomes, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), MemberReference(member=context, 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=Event, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Event, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=outcomes, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=elist, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=tokens, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=br, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[Event], events] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=events, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=elist, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Event, sub_type=None))), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=events, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.events]] end[}] END[}]
Keyword[public] identifier[Event] operator[SEP] operator[SEP] identifier[getEvents] operator[SEP] Keyword[boolean] identifier[evalMode] operator[SEP] { identifier[ArrayList] identifier[elist] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[s] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] { identifier[Pair] identifier[p] operator[=] identifier[convertAnnotatedString] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[ArrayList] identifier[tokens] operator[=] operator[SEP] identifier[ArrayList] operator[SEP] identifier[p] operator[SEP] identifier[a] operator[SEP] identifier[ArrayList] identifier[outcomes] operator[=] operator[SEP] identifier[ArrayList] operator[SEP] identifier[p] operator[SEP] identifier[b] operator[SEP] identifier[ArrayList] identifier[tags] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[context] operator[=] identifier[cg] operator[SEP] identifier[getContext] operator[SEP] identifier[i] , identifier[tokens] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] , operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[tags] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[tags] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[Event] identifier[e] operator[=] Keyword[new] identifier[Event] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[outcomes] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] , identifier[context] operator[SEP] operator[SEP] identifier[tags] operator[SEP] identifier[add] operator[SEP] identifier[outcomes] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[elist] operator[SEP] identifier[add] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[s] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[Event] operator[SEP] operator[SEP] identifier[events] operator[=] Keyword[new] identifier[Event] operator[SEP] identifier[elist] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[events] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[events] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[Event] operator[SEP] identifier[elist] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] identifier[events] operator[SEP] }
static String encode(String pid, String dsId, String dsVersionId) { if (dsId == null) return encodePart(pid); return encodePart(pid) + '+' + encodePart(dsId) + '+' + encodePart(dsVersionId); }
class class_name[name] begin[{] method[encode, return_type[type[String]], modifier[static], parameter[pid, dsId, dsVersionId]] begin[{] if[binary_operation[member[.dsId], ==, literal[null]]] begin[{] return[call[.encodePart, parameter[member[.pid]]]] else begin[{] None end[}] return[binary_operation[binary_operation[binary_operation[binary_operation[call[.encodePart, parameter[member[.pid]]], +, literal['+']], +, call[.encodePart, parameter[member[.dsId]]]], +, literal['+']], +, call[.encodePart, parameter[member[.dsVersionId]]]]] end[}] END[}]
Keyword[static] identifier[String] identifier[encode] operator[SEP] identifier[String] identifier[pid] , identifier[String] identifier[dsId] , identifier[String] identifier[dsVersionId] operator[SEP] { Keyword[if] operator[SEP] identifier[dsId] operator[==] Other[null] operator[SEP] Keyword[return] identifier[encodePart] operator[SEP] identifier[pid] operator[SEP] operator[SEP] Keyword[return] identifier[encodePart] operator[SEP] identifier[pid] operator[SEP] operator[+] literal[String] operator[+] identifier[encodePart] operator[SEP] identifier[dsId] operator[SEP] operator[+] literal[String] operator[+] identifier[encodePart] operator[SEP] identifier[dsVersionId] operator[SEP] operator[SEP] }
public void addAnnotationInfo(PackageElement packageElement, Content htmltree) { addAnnotationInfo(packageElement, packageElement.getAnnotationMirrors(), htmltree); }
class class_name[name] begin[{] method[addAnnotationInfo, return_type[void], modifier[public], parameter[packageElement, htmltree]] begin[{] call[.addAnnotationInfo, parameter[member[.packageElement], call[packageElement.getAnnotationMirrors, parameter[]], member[.htmltree]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAnnotationInfo] operator[SEP] identifier[PackageElement] identifier[packageElement] , identifier[Content] identifier[htmltree] operator[SEP] { identifier[addAnnotationInfo] operator[SEP] identifier[packageElement] , identifier[packageElement] operator[SEP] identifier[getAnnotationMirrors] operator[SEP] operator[SEP] , identifier[htmltree] operator[SEP] operator[SEP] }
public Collection<SlotKey> getChildrenKeys() { if (granularity == Granularity.FULL) { return ImmutableList.of(); } List<SlotKey> result = new ArrayList<SlotKey>(); Granularity finer; try { finer = granularity.finer(); } catch (GranularityException e) { throw new AssertionError("Should not occur."); } int factor = finer.numSlots() / granularity.numSlots(); for (int i = 0; i < factor; i++) { int childSlot = slot * factor + i; SlotKey child = SlotKey.of(finer, childSlot, shard); result.add(child); result.addAll(child.getChildrenKeys()); } return result; }
class class_name[name] begin[{] method[getChildrenKeys, return_type[type[Collection]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.granularity], ==, member[Granularity.FULL]]] begin[{] return[call[ImmutableList.of, parameter[]]] else begin[{] None end[}] local_variable[type[List], result] local_variable[type[Granularity], finer] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=finer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=finer, postfix_operators=[], prefix_operators=[], qualifier=granularity, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Should not occur.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AssertionError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GranularityException']))], finally_block=None, label=None, resources=None) local_variable[type[int], factor] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=slot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=childSlot)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=finer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=childSlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=shard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=SlotKey, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SlotKey, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getChildrenKeys, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[SlotKey] operator[>] identifier[getChildrenKeys] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[granularity] operator[==] identifier[Granularity] operator[SEP] identifier[FULL] operator[SEP] { Keyword[return] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[SlotKey] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[SlotKey] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Granularity] identifier[finer] operator[SEP] Keyword[try] { identifier[finer] operator[=] identifier[granularity] operator[SEP] identifier[finer] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GranularityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[factor] operator[=] identifier[finer] operator[SEP] identifier[numSlots] operator[SEP] operator[SEP] operator[/] identifier[granularity] operator[SEP] identifier[numSlots] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[factor] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[childSlot] operator[=] identifier[slot] operator[*] identifier[factor] operator[+] identifier[i] operator[SEP] identifier[SlotKey] identifier[child] operator[=] identifier[SlotKey] operator[SEP] identifier[of] operator[SEP] identifier[finer] , identifier[childSlot] , identifier[shard] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[addAll] operator[SEP] identifier[child] operator[SEP] identifier[getChildrenKeys] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static DoubleBinding tanh(final ObservableDoubleValue x) { return createDoubleBinding(() -> Math.tanh(x.get()), x); }
class class_name[name] begin[{] method[tanh, return_type[type[DoubleBinding]], modifier[public static], parameter[x]] begin[{] return[call[.createDoubleBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None)], member=tanh, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), parameters=[]), member[.x]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DoubleBinding] identifier[tanh] operator[SEP] Keyword[final] identifier[ObservableDoubleValue] identifier[x] operator[SEP] { Keyword[return] identifier[createDoubleBinding] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Math] operator[SEP] identifier[tanh] operator[SEP] identifier[x] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] , identifier[x] operator[SEP] operator[SEP] }
@Override public long scanAndAggregate( DimensionSelector dimensionSelector, BufferAggregator aggregator, int aggregatorSize, Cursor cursor, int[] positions, ByteBuffer resultsBuffer ) { long processedRows = 0; int positionToAllocate = 0; while (!cursor.isDoneOrInterrupted()) { final IndexedInts dimValues = dimensionSelector.getRow(); final int dimSize = dimValues.size(); for (int i = 0; i < dimSize; i++) { int dimIndex = dimValues.get(i); int position = positions[dimIndex]; if (position >= 0) { aggregator.aggregate(resultsBuffer, position); } else if (position == TopNAlgorithm.INIT_POSITION_VALUE) { positions[dimIndex] = positionToAllocate; position = positionToAllocate; aggregator.init(resultsBuffer, position); aggregator.aggregate(resultsBuffer, position); positionToAllocate += aggregatorSize; } } processedRows++; cursor.advanceUninterruptibly(); } return processedRows; }
class class_name[name] begin[{] method[scanAndAggregate, return_type[type[long]], modifier[public], parameter[dimensionSelector, aggregator, aggregatorSize, cursor, positions, resultsBuffer]] begin[{] local_variable[type[long], processedRows] local_variable[type[int], positionToAllocate] while[call[cursor.isDoneOrInterrupted, parameter[]]] begin[{] local_variable[type[IndexedInts], dimValues] local_variable[type[int], dimSize] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dimValues, selectors=[], type_arguments=None), name=dimIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=positions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=dimIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=position)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=INIT_POSITION_VALUE, postfix_operators=[], prefix_operators=[], qualifier=TopNAlgorithm, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=positions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=dimIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=positionToAllocate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=positionToAllocate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resultsBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=aggregator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resultsBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=aggregate, postfix_operators=[], prefix_operators=[], qualifier=aggregator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=positionToAllocate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=aggregatorSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resultsBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=aggregate, postfix_operators=[], prefix_operators=[], qualifier=aggregator, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dimSize, 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) member[.processedRows] call[cursor.advanceUninterruptibly, parameter[]] end[}] return[member[.processedRows]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[scanAndAggregate] operator[SEP] identifier[DimensionSelector] identifier[dimensionSelector] , identifier[BufferAggregator] identifier[aggregator] , Keyword[int] identifier[aggregatorSize] , identifier[Cursor] identifier[cursor] , Keyword[int] operator[SEP] operator[SEP] identifier[positions] , identifier[ByteBuffer] identifier[resultsBuffer] operator[SEP] { Keyword[long] identifier[processedRows] operator[=] Other[0] operator[SEP] Keyword[int] identifier[positionToAllocate] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[cursor] operator[SEP] identifier[isDoneOrInterrupted] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[IndexedInts] identifier[dimValues] operator[=] identifier[dimensionSelector] operator[SEP] identifier[getRow] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[dimSize] operator[=] identifier[dimValues] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dimSize] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[dimIndex] operator[=] identifier[dimValues] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[position] operator[=] identifier[positions] operator[SEP] identifier[dimIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[>=] Other[0] operator[SEP] { identifier[aggregator] operator[SEP] identifier[aggregate] operator[SEP] identifier[resultsBuffer] , identifier[position] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[position] operator[==] identifier[TopNAlgorithm] operator[SEP] identifier[INIT_POSITION_VALUE] operator[SEP] { identifier[positions] operator[SEP] identifier[dimIndex] operator[SEP] operator[=] identifier[positionToAllocate] operator[SEP] identifier[position] operator[=] identifier[positionToAllocate] operator[SEP] identifier[aggregator] operator[SEP] identifier[init] operator[SEP] identifier[resultsBuffer] , identifier[position] operator[SEP] operator[SEP] identifier[aggregator] operator[SEP] identifier[aggregate] operator[SEP] identifier[resultsBuffer] , identifier[position] operator[SEP] operator[SEP] identifier[positionToAllocate] operator[+=] identifier[aggregatorSize] operator[SEP] } } identifier[processedRows] operator[++] operator[SEP] identifier[cursor] operator[SEP] identifier[advanceUninterruptibly] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[processedRows] operator[SEP] }
public static Method checkMethodExist(Class<?> clazz, String uniqueMethodName) { if (clazz == null || StrUtils.isEmpty(uniqueMethodName)) return null; Map<String, Object> methodMap = uniqueMethodCache.get(clazz); if (methodMap != null && !methodMap.isEmpty()) { Object result = methodMap.get(uniqueMethodName); if (result != null) { if (ClassOrMethodNotExist.class.equals(result)) return null; else return (Method) result; } } if (methodMap == null) { methodMap = new HashMap<String, Object>(); uniqueMethodCache.put(clazz, methodMap); } Method[] methods = clazz.getMethods(); for (Method method : methods) if (uniqueMethodName != null && uniqueMethodName.equals(method.getName())) { methodMap.put(uniqueMethodName, method); return method; } methodMap.put(uniqueMethodName, ClassOrMethodNotExist.class); return null; }
class class_name[name] begin[{] method[checkMethodExist, return_type[type[Method]], modifier[public static], parameter[clazz, uniqueMethodName]] begin[{] if[binary_operation[binary_operation[member[.clazz], ==, literal[null]], ||, call[StrUtils.isEmpty, parameter[member[.uniqueMethodName]]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Map], methodMap] if[binary_operation[binary_operation[member[.methodMap], !=, literal[null]], &&, call[methodMap.isEmpty, parameter[]]]] begin[{] local_variable[type[Object], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassOrMethodNotExist, sub_type=None))] begin[{] return[literal[null]] else begin[{] return[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))] end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.methodMap], ==, literal[null]]] begin[{] assign[member[.methodMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] call[uniqueMethodCache.put, parameter[member[.clazz], member[.methodMap]]] else begin[{] None end[}] local_variable[type[Method], methods] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uniqueMethodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=uniqueMethodName, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=uniqueMethodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=methodMap, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), control=EnhancedForControl(iterable=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) call[methodMap.put, parameter[member[.uniqueMethodName], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClassOrMethodNotExist, sub_type=None))]] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Method] identifier[checkMethodExist] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[uniqueMethodName] operator[SEP] { Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[null] operator[||] identifier[StrUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[uniqueMethodName] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[methodMap] operator[=] identifier[uniqueMethodCache] operator[SEP] identifier[get] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methodMap] operator[!=] Other[null] operator[&&] operator[!] identifier[methodMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[result] operator[=] identifier[methodMap] operator[SEP] identifier[get] operator[SEP] identifier[uniqueMethodName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[ClassOrMethodNotExist] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[return] operator[SEP] identifier[Method] operator[SEP] identifier[result] operator[SEP] } } Keyword[if] operator[SEP] identifier[methodMap] operator[==] Other[null] operator[SEP] { identifier[methodMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[uniqueMethodCache] operator[SEP] identifier[put] operator[SEP] identifier[clazz] , identifier[methodMap] operator[SEP] operator[SEP] } identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[clazz] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[methods] operator[SEP] Keyword[if] operator[SEP] identifier[uniqueMethodName] operator[!=] Other[null] operator[&&] identifier[uniqueMethodName] operator[SEP] identifier[equals] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[methodMap] operator[SEP] identifier[put] operator[SEP] identifier[uniqueMethodName] , identifier[method] operator[SEP] operator[SEP] Keyword[return] identifier[method] operator[SEP] } identifier[methodMap] operator[SEP] identifier[put] operator[SEP] identifier[uniqueMethodName] , identifier[ClassOrMethodNotExist] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public MultiPartConfig defaultCharset(String defaultCharset) { return new MultiPartConfig(defaultControlName, defaultFileName, defaultSubtype, defaultBoundary, defaultCharset, true); }
class class_name[name] begin[{] method[defaultCharset, return_type[type[MultiPartConfig]], modifier[public], parameter[defaultCharset]] begin[{] return[ClassCreator(arguments=[MemberReference(member=defaultControlName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultSubtype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultBoundary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultCharset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MultiPartConfig, sub_type=None))] end[}] END[}]
Keyword[public] identifier[MultiPartConfig] identifier[defaultCharset] operator[SEP] identifier[String] identifier[defaultCharset] operator[SEP] { Keyword[return] Keyword[new] identifier[MultiPartConfig] operator[SEP] identifier[defaultControlName] , identifier[defaultFileName] , identifier[defaultSubtype] , identifier[defaultBoundary] , identifier[defaultCharset] , literal[boolean] operator[SEP] operator[SEP] }
@SuppressWarnings({"unused"}) public RequestData addFile(String fieldName, String uploadFile, String fileName) { addFile(fieldName, new File(uploadFile), fileName); return this; }
class class_name[name] begin[{] method[addFile, return_type[type[RequestData]], modifier[public], parameter[fieldName, uploadFile, fileName]] begin[{] call[.addFile, parameter[member[.fieldName], ClassCreator(arguments=[MemberReference(member=uploadFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), member[.fileName]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] Keyword[public] identifier[RequestData] identifier[addFile] operator[SEP] identifier[String] identifier[fieldName] , identifier[String] identifier[uploadFile] , identifier[String] identifier[fileName] operator[SEP] { identifier[addFile] operator[SEP] identifier[fieldName] , Keyword[new] identifier[File] operator[SEP] identifier[uploadFile] operator[SEP] , identifier[fileName] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static Point2D gridToWorld( GridGeometry2D gridGeometry, int x, int y ) throws InvalidGridGeometryException, TransformException { final Point2D worldPosition = new Point2D.Double(x, y); gridGeometry.getGridToCRS2D().transform(worldPosition, worldPosition); return worldPosition; }
class class_name[name] begin[{] method[gridToWorld, return_type[type[Point2D]], modifier[public static], parameter[gridGeometry, x, y]] begin[{] local_variable[type[Point2D], worldPosition] call[gridGeometry.getGridToCRS2D, parameter[]] return[member[.worldPosition]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Point2D] identifier[gridToWorld] operator[SEP] identifier[GridGeometry2D] identifier[gridGeometry] , Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] Keyword[throws] identifier[InvalidGridGeometryException] , identifier[TransformException] { Keyword[final] identifier[Point2D] identifier[worldPosition] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[gridGeometry] operator[SEP] identifier[getGridToCRS2D] operator[SEP] operator[SEP] operator[SEP] identifier[transform] operator[SEP] identifier[worldPosition] , identifier[worldPosition] operator[SEP] operator[SEP] Keyword[return] identifier[worldPosition] operator[SEP] }
public List<HistoricVariableInstance> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) { return commandContext.getHistoricVariableInstanceEntityManager().findHistoricVariableInstancesByNativeQuery(parameterMap, firstResult, maxResults); }
class class_name[name] begin[{] method[executeList, return_type[type[List]], modifier[public], parameter[commandContext, parameterMap, firstResult, maxResults]] begin[{] return[call[commandContext.getHistoricVariableInstanceEntityManager, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[HistoricVariableInstance] operator[>] identifier[executeList] operator[SEP] identifier[CommandContext] identifier[commandContext] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameterMap] , Keyword[int] identifier[firstResult] , Keyword[int] identifier[maxResults] operator[SEP] { Keyword[return] identifier[commandContext] operator[SEP] identifier[getHistoricVariableInstanceEntityManager] operator[SEP] operator[SEP] operator[SEP] identifier[findHistoricVariableInstancesByNativeQuery] operator[SEP] identifier[parameterMap] , identifier[firstResult] , identifier[maxResults] operator[SEP] operator[SEP] }
public List<ChampionStatInfo> retrieveTopPlayedChampions(long accId, GameMode mode) { return client.sendRpcAndWait(SERVICE, "retrieveTopPlayedChampions", accId, mode); }
class class_name[name] begin[{] method[retrieveTopPlayedChampions, return_type[type[List]], modifier[public], parameter[accId, mode]] begin[{] return[call[client.sendRpcAndWait, parameter[member[.SERVICE], literal["retrieveTopPlayedChampions"], member[.accId], member[.mode]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ChampionStatInfo] operator[>] identifier[retrieveTopPlayedChampions] operator[SEP] Keyword[long] identifier[accId] , identifier[GameMode] identifier[mode] operator[SEP] { Keyword[return] identifier[client] operator[SEP] identifier[sendRpcAndWait] operator[SEP] identifier[SERVICE] , literal[String] , identifier[accId] , identifier[mode] operator[SEP] operator[SEP] }
protected void addCustomBindings(final DocWorkUnit currentWorkUnit) { final String tagFilterPrefix = getTagPrefix(); Arrays.stream(currentWorkUnit.getClassDoc().inlineTags()) .filter(t -> t.name().startsWith(tagFilterPrefix)) .forEach(t -> currentWorkUnit.setProperty(t.name().substring(tagFilterPrefix.length()), t.text())); }
class class_name[name] begin[{] method[addCustomBindings, return_type[void], modifier[protected], parameter[currentWorkUnit]] begin[{] local_variable[type[String], tagFilterPrefix] call[Arrays.stream, parameter[call[currentWorkUnit.getClassDoc, parameter[]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addCustomBindings] operator[SEP] Keyword[final] identifier[DocWorkUnit] identifier[currentWorkUnit] operator[SEP] { Keyword[final] identifier[String] identifier[tagFilterPrefix] operator[=] identifier[getTagPrefix] operator[SEP] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[stream] operator[SEP] identifier[currentWorkUnit] operator[SEP] identifier[getClassDoc] operator[SEP] operator[SEP] operator[SEP] identifier[inlineTags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[t] operator[->] identifier[t] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[tagFilterPrefix] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[t] operator[->] identifier[currentWorkUnit] operator[SEP] identifier[setProperty] operator[SEP] identifier[t] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[tagFilterPrefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] , identifier[t] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private String[] convertToArray(String newAddress) { int start = 0; String sub; List<String> addressWords = new ArrayList<String>(); String addr = newAddress; while (true) { // fill address from back to front start = addr.lastIndexOf('.'); if (start != -1) { sub = addr.substring(start + 1); addressWords.add(sub); } else { addressWords.add(addr); break; } addr = addr.substring(0, start); } String[] sa = new String[addressWords.size()]; sa = addressWords.toArray(sa); return (sa); }
class class_name[name] begin[{] method[convertToArray, return_type[type[String]], modifier[private], parameter[newAddress]] begin[{] local_variable[type[int], start] local_variable[type[String], sub] local_variable[type[List], addressWords] local_variable[type[String], addr] while[literal[true]] begin[{] assign[member[.start], call[addr.lastIndexOf, parameter[literal['.']]]] if[binary_operation[member[.start], !=, literal[1]]] begin[{] assign[member[.sub], call[addr.substring, parameter[binary_operation[member[.start], +, literal[1]]]]] call[addressWords.add, parameter[member[.sub]]] else begin[{] call[addressWords.add, parameter[member[.addr]]] BreakStatement(goto=None, label=None) end[}] assign[member[.addr], call[addr.substring, parameter[literal[0], member[.start]]]] end[}] local_variable[type[String], sa] assign[member[.sa], call[addressWords.toArray, parameter[member[.sa]]]] return[member[.sa]] end[}] END[}]
Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[convertToArray] operator[SEP] identifier[String] identifier[newAddress] operator[SEP] { Keyword[int] identifier[start] operator[=] Other[0] operator[SEP] identifier[String] identifier[sub] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[addressWords] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[addr] operator[=] identifier[newAddress] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[start] operator[=] identifier[addr] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[!=] operator[-] Other[1] operator[SEP] { identifier[sub] operator[=] identifier[addr] operator[SEP] identifier[substring] operator[SEP] identifier[start] operator[+] Other[1] operator[SEP] operator[SEP] identifier[addressWords] operator[SEP] identifier[add] operator[SEP] identifier[sub] operator[SEP] operator[SEP] } Keyword[else] { identifier[addressWords] operator[SEP] identifier[add] operator[SEP] identifier[addr] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[addr] operator[=] identifier[addr] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[start] operator[SEP] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[sa] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[addressWords] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sa] operator[=] identifier[addressWords] operator[SEP] identifier[toArray] operator[SEP] identifier[sa] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[sa] operator[SEP] operator[SEP] }
public void setRemoveRouteTableIds(java.util.Collection<String> removeRouteTableIds) { if (removeRouteTableIds == null) { this.removeRouteTableIds = null; return; } this.removeRouteTableIds = new com.amazonaws.internal.SdkInternalList<String>(removeRouteTableIds); }
class class_name[name] begin[{] method[setRemoveRouteTableIds, return_type[void], modifier[public], parameter[removeRouteTableIds]] begin[{] if[binary_operation[member[.removeRouteTableIds], ==, literal[null]]] begin[{] assign[THIS[member[None.removeRouteTableIds]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.removeRouteTableIds]], ClassCreator(arguments=[MemberReference(member=removeRouteTableIds, 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRemoveRouteTableIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[removeRouteTableIds] operator[SEP] { Keyword[if] operator[SEP] identifier[removeRouteTableIds] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[removeRouteTableIds] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[removeRouteTableIds] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[removeRouteTableIds] operator[SEP] operator[SEP] }
public static String format(final long millis, final String pattern, final TimeZone timeZone) { return format(new Date(millis), pattern, timeZone, null); }
class class_name[name] begin[{] method[format, return_type[type[String]], modifier[public static], parameter[millis, pattern, timeZone]] begin[{] return[call[.format, parameter[ClassCreator(arguments=[MemberReference(member=millis, 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=Date, sub_type=None)), member[.pattern], member[.timeZone], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[format] operator[SEP] Keyword[final] Keyword[long] identifier[millis] , Keyword[final] identifier[String] identifier[pattern] , Keyword[final] identifier[TimeZone] identifier[timeZone] operator[SEP] { Keyword[return] identifier[format] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[millis] operator[SEP] , identifier[pattern] , identifier[timeZone] , Other[null] operator[SEP] operator[SEP] }
public static double rint(double x) { double y = floor(x); double d = x - y; if (d > 0.5) { if (y == -1.0) { return -0.0; // Preserve sign of operand } return y+1.0; } if (d < 0.5) { return y; } /* half way, round to even */ long z = (long) y; return (z & 1) == 0 ? y : y + 1.0; }
class class_name[name] begin[{] method[rint, return_type[type[double]], modifier[public static], parameter[x]] begin[{] local_variable[type[double], y] local_variable[type[double], d] if[binary_operation[member[.d], >, literal[0.5]]] begin[{] if[binary_operation[member[.y], ==, literal[1.0]]] begin[{] return[literal[0.0]] else begin[{] None end[}] return[binary_operation[member[.y], +, literal[1.0]]] else begin[{] None end[}] if[binary_operation[member[.d], <, literal[0.5]]] begin[{] return[member[.y]] else begin[{] None end[}] local_variable[type[long], z] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operator=+), if_true=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[rint] operator[SEP] Keyword[double] identifier[x] operator[SEP] { Keyword[double] identifier[y] operator[=] identifier[floor] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[double] identifier[d] operator[=] identifier[x] operator[-] identifier[y] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[>] literal[Float] operator[SEP] { Keyword[if] operator[SEP] identifier[y] operator[==] operator[-] literal[Float] operator[SEP] { Keyword[return] operator[-] literal[Float] operator[SEP] } Keyword[return] identifier[y] operator[+] literal[Float] operator[SEP] } Keyword[if] operator[SEP] identifier[d] operator[<] literal[Float] operator[SEP] { Keyword[return] identifier[y] operator[SEP] } Keyword[long] identifier[z] operator[=] operator[SEP] Keyword[long] operator[SEP] identifier[y] operator[SEP] Keyword[return] operator[SEP] identifier[z] operator[&] Other[1] operator[SEP] operator[==] Other[0] operator[?] identifier[y] operator[:] identifier[y] operator[+] literal[Float] operator[SEP] }
public static ClassFileVersion of(Class<?> type) throws IOException { return of(type, ClassFileLocator.ForClassLoader.of(type.getClassLoader())); }
class class_name[name] begin[{] method[of, return_type[type[ClassFileVersion]], modifier[public static], parameter[type]] begin[{] return[call[.of, parameter[member[.type], call[ClassFileLocator.ForClassLoader.of, parameter[call[type.getClassLoader, parameter[]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ClassFileVersion] identifier[of] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[of] operator[SEP] identifier[type] , identifier[ClassFileLocator] operator[SEP] identifier[ForClassLoader] operator[SEP] identifier[of] operator[SEP] identifier[type] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public static void executeUpdateAndClose(PreparedStatement preparedStatement) throws SQLException { try { preparedStatement.executeUpdate(); } finally { try { preparedStatement.close(); } catch (SQLException e) { if (logger.isDebugEnabled()) { logger.debug(e.getMessage(), e); } } } }
class class_name[name] begin[{] method[executeUpdateAndClose, return_type[void], modifier[public static], parameter[preparedStatement]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=executeUpdate, postfix_operators=[], prefix_operators=[], qualifier=preparedStatement, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=preparedStatement, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, 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=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=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[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[void] identifier[executeUpdateAndClose] operator[SEP] identifier[PreparedStatement] identifier[preparedStatement] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[try] { identifier[preparedStatement] operator[SEP] identifier[executeUpdate] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[preparedStatement] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } }
public static final <T extends Date> Function<T[], Period> dateFieldArrayToPeriod(final Chronology chronology) { return new DateFieldArrayToPeriod<T>(chronology); }
class class_name[name] begin[{] method[dateFieldArrayToPeriod, return_type[type[Function]], modifier[final public static], parameter[chronology]] begin[{] return[ClassCreator(arguments=[MemberReference(member=chronology, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=DateFieldArrayToPeriod, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[Date] operator[>] identifier[Function] operator[<] identifier[T] operator[SEP] operator[SEP] , identifier[Period] operator[>] identifier[dateFieldArrayToPeriod] operator[SEP] Keyword[final] identifier[Chronology] identifier[chronology] operator[SEP] { Keyword[return] Keyword[new] identifier[DateFieldArrayToPeriod] operator[<] identifier[T] operator[>] operator[SEP] identifier[chronology] operator[SEP] operator[SEP] }
public void record( TaskInProgress tip, String host, long inputBytes) { synchronized (localityRecords) { localityRecords.add(new Record(tip, host, inputBytes)); localityRecords.notify(); } }
class class_name[name] begin[{] method[record, return_type[void], modifier[public], parameter[tip, host, inputBytes]] begin[{] SYNCHRONIZED[member[.localityRecords]] BEGIN[{] call[localityRecords.add, parameter[ClassCreator(arguments=[MemberReference(member=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inputBytes, 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=Record, sub_type=None))]] call[localityRecords.notify, parameter[]] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[record] operator[SEP] identifier[TaskInProgress] identifier[tip] , identifier[String] identifier[host] , Keyword[long] identifier[inputBytes] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[localityRecords] operator[SEP] { identifier[localityRecords] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Record] operator[SEP] identifier[tip] , identifier[host] , identifier[inputBytes] operator[SEP] operator[SEP] operator[SEP] identifier[localityRecords] operator[SEP] identifier[notify] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void onFinishComposing() { messagingActionHandler.sendEmptyMessage(MSG_REMOVE_COMPOSER); Util.hideSoftKeyboard(hostingActivityRef.get(), getView()); messagingActionHandler.sendEmptyMessage(MSG_SEND_PENDING_CONTEXT_MESSAGE); if (!TextUtils.isEmpty(composerEditText.getText().toString().trim()) || pendingAttachments.size() > 0) { CompoundMessage compoundMessage = new CompoundMessage(); compoundMessage.setBody(composerEditText.getText().toString().trim()); compoundMessage.setRead(true); compoundMessage.setCustomData(ApptentiveInternal.getInstance().getAndClearCustomData()); compoundMessage.setAssociatedImages(new ArrayList<ImageItem>(pendingAttachments)); ConversationProxy conversation = getConversation(); if (conversation != null && conversation.hasActiveState()) { compoundMessage.setSenderId(conversation.getPerson().getId()); } messagingActionHandler.sendMessage(messagingActionHandler.obtainMessage(MSG_START_SENDING, compoundMessage)); composingViewSavedState = null; composerEditText.getText().clear(); pendingAttachments.clear(); clearPendingComposingMessage(); } showFab(); showProfileButton(); }
class class_name[name] begin[{] method[onFinishComposing, return_type[void], modifier[public], parameter[]] begin[{] call[messagingActionHandler.sendEmptyMessage, parameter[member[.MSG_REMOVE_COMPOSER]]] call[Util.hideSoftKeyboard, parameter[call[hostingActivityRef.get, parameter[]], call[.getView, parameter[]]]] call[messagingActionHandler.sendEmptyMessage, parameter[member[.MSG_SEND_PENDING_CONTEXT_MESSAGE]]] if[binary_operation[call[TextUtils.isEmpty, parameter[call[composerEditText.getText, parameter[]]]], ||, binary_operation[call[pendingAttachments.size, parameter[]], >, literal[0]]]] begin[{] local_variable[type[CompoundMessage], compoundMessage] call[compoundMessage.setBody, parameter[call[composerEditText.getText, parameter[]]]] call[compoundMessage.setRead, parameter[literal[true]]] call[compoundMessage.setCustomData, parameter[call[ApptentiveInternal.getInstance, parameter[]]]] call[compoundMessage.setAssociatedImages, parameter[ClassCreator(arguments=[MemberReference(member=pendingAttachments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ImageItem, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]] local_variable[type[ConversationProxy], conversation] if[binary_operation[binary_operation[member[.conversation], !=, literal[null]], &&, call[conversation.hasActiveState, parameter[]]]] begin[{] call[compoundMessage.setSenderId, parameter[call[conversation.getPerson, parameter[]]]] else begin[{] None end[}] call[messagingActionHandler.sendMessage, parameter[call[messagingActionHandler.obtainMessage, parameter[member[.MSG_START_SENDING], member[.compoundMessage]]]]] assign[member[.composingViewSavedState], literal[null]] call[composerEditText.getText, parameter[]] call[pendingAttachments.clear, parameter[]] call[.clearPendingComposingMessage, parameter[]] else begin[{] None end[}] call[.showFab, parameter[]] call[.showProfileButton, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFinishComposing] operator[SEP] operator[SEP] { identifier[messagingActionHandler] operator[SEP] identifier[sendEmptyMessage] operator[SEP] identifier[MSG_REMOVE_COMPOSER] operator[SEP] operator[SEP] identifier[Util] operator[SEP] identifier[hideSoftKeyboard] operator[SEP] identifier[hostingActivityRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[getView] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[messagingActionHandler] operator[SEP] identifier[sendEmptyMessage] operator[SEP] identifier[MSG_SEND_PENDING_CONTEXT_MESSAGE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[composerEditText] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[pendingAttachments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[CompoundMessage] identifier[compoundMessage] operator[=] Keyword[new] identifier[CompoundMessage] operator[SEP] operator[SEP] operator[SEP] identifier[compoundMessage] operator[SEP] identifier[setBody] operator[SEP] identifier[composerEditText] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[compoundMessage] operator[SEP] identifier[setRead] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[compoundMessage] operator[SEP] identifier[setCustomData] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getAndClearCustomData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[compoundMessage] operator[SEP] identifier[setAssociatedImages] operator[SEP] Keyword[new] identifier[ArrayList] operator[<] identifier[ImageItem] operator[>] operator[SEP] identifier[pendingAttachments] operator[SEP] operator[SEP] operator[SEP] identifier[ConversationProxy] identifier[conversation] operator[=] identifier[getConversation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conversation] operator[!=] Other[null] operator[&&] identifier[conversation] operator[SEP] identifier[hasActiveState] operator[SEP] operator[SEP] operator[SEP] { identifier[compoundMessage] operator[SEP] identifier[setSenderId] operator[SEP] identifier[conversation] operator[SEP] identifier[getPerson] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[messagingActionHandler] operator[SEP] identifier[sendMessage] operator[SEP] identifier[messagingActionHandler] operator[SEP] identifier[obtainMessage] operator[SEP] identifier[MSG_START_SENDING] , identifier[compoundMessage] operator[SEP] operator[SEP] operator[SEP] identifier[composingViewSavedState] operator[=] Other[null] operator[SEP] identifier[composerEditText] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[pendingAttachments] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[clearPendingComposingMessage] operator[SEP] operator[SEP] operator[SEP] } identifier[showFab] operator[SEP] operator[SEP] operator[SEP] identifier[showProfileButton] operator[SEP] operator[SEP] operator[SEP] }