code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static String convert(final StringBuilder holder, final String text, final String ... vars) { StringBuilder sb = null; int idx,index=0,prev = 0; if(text.contains("%s")) { sb = new StringBuilder(); } StringBuilder[] sbs = new StringBuilder[] {sb,holder}; boolean replace, clearIndex = false; int c; while((idx=text.indexOf('%',prev))>=0) { replace = false; if(clearIndex) { index=0; } if(sb!=null) { sb.append(text,prev,idx); } if(holder!=null) { holder.append(text,prev,idx); } boolean go = true; while(go) { if(text.length()>++idx) { switch(c=text.charAt(idx)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': index *=10; index +=(c-'0'); clearIndex=replace=true; continue; case 's': ++index; replace = true; continue; default: break; } } prev = idx; go=false; if(replace) { if(sb!=null) { sb.append('%'); sb.append(index); } if(index<=vars.length) { if(holder!=null) { holder.append(vars[index-1]); } } } else { for(StringBuilder s : sbs) { if(s!=null) { s.append("%"); } } } } } if(sb!=null) { sb.append(text,prev,text.length()); } if(holder!=null) { holder.append(text,prev,text.length()); } return sb==null?text:sb.toString(); }
class class_name[name] begin[{] method[convert, return_type[type[String]], modifier[public static], parameter[holder, text, vars]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[int], idx] if[call[text.contains, parameter[literal["%s"]]]] begin[{] assign[member[.sb], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))] else begin[{] None end[}] local_variable[type[StringBuilder], sbs] local_variable[type[boolean], replace] local_variable[type[int], c] while[binary_operation[assign[member[.idx], call[text.indexOf, parameter[literal['%'], member[.prev]]]], >=, literal[0]]] begin[{] assign[member[.replace], literal[false]] if[member[.clearIndex]] begin[{] assign[member[.index], literal[0]] else begin[{] None end[}] if[binary_operation[member[.sb], !=, literal[null]]] begin[{] call[sb.append, parameter[member[.text], member[.prev], member[.idx]]] else begin[{] None end[}] if[binary_operation[member[.holder], !=, literal[null]]] begin[{] call[holder.append, parameter[member[.text], member[.prev], member[.idx]]] else begin[{] None end[}] local_variable[type[boolean], go] while[member[.go]] begin[{] if[binary_operation[call[text.length, parameter[]], >, member[.idx]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='1'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='2'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='3'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='4'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='5'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='6'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='7'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='8'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='9')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=clearIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true))), label=None), ContinueStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='s')], statements=[StatementExpression(expression=MemberReference(member=index, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ContinueStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[], type_arguments=None)), label=None) else begin[{] None end[}] assign[member[.prev], member[.idx]] assign[member[.go], literal[false]] if[member[.replace]] begin[{] if[binary_operation[member[.sb], !=, literal[null]]] begin[{] call[sb.append, parameter[literal['%']]] call[sb.append, parameter[member[.index]]] else begin[{] None end[}] if[binary_operation[member[.index], <=, member[vars.length]]] begin[{] if[binary_operation[member[.holder], !=, literal[null]]] begin[{] call[holder.append, parameter[member[.vars]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%")], member=append, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sbs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None))), label=None) end[}] end[}] end[}] if[binary_operation[member[.sb], !=, literal[null]]] begin[{] call[sb.append, parameter[member[.text], member[.prev], call[text.length, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.holder], !=, literal[null]]] begin[{] call[holder.append, parameter[member[.text], member[.prev], call[text.length, parameter[]]]] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=sb, 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=sb, selectors=[], type_arguments=None), if_true=MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[convert] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[holder] , Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] operator[...] identifier[vars] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Other[null] operator[SEP] Keyword[int] identifier[idx] , identifier[index] operator[=] Other[0] , identifier[prev] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] } identifier[StringBuilder] operator[SEP] operator[SEP] identifier[sbs] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] { identifier[sb] , identifier[holder] } operator[SEP] Keyword[boolean] identifier[replace] , identifier[clearIndex] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[c] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[idx] operator[=] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[prev] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[replace] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[clearIndex] operator[SEP] { identifier[index] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[text] , identifier[prev] , identifier[idx] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[holder] operator[!=] Other[null] operator[SEP] { identifier[holder] operator[SEP] identifier[append] operator[SEP] identifier[text] , identifier[prev] , identifier[idx] operator[SEP] operator[SEP] } Keyword[boolean] identifier[go] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] identifier[go] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] operator[++] identifier[idx] operator[SEP] { Keyword[switch] operator[SEP] identifier[c] operator[=] identifier[text] operator[SEP] identifier[charAt] operator[SEP] identifier[idx] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] identifier[index] operator[*=] Other[10] operator[SEP] identifier[index] operator[+=] operator[SEP] identifier[c] operator[-] literal[String] operator[SEP] operator[SEP] identifier[clearIndex] operator[=] identifier[replace] operator[=] literal[boolean] operator[SEP] Keyword[continue] operator[SEP] Keyword[case] literal[String] operator[:] operator[++] identifier[index] operator[SEP] identifier[replace] operator[=] literal[boolean] operator[SEP] Keyword[continue] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } identifier[prev] operator[=] identifier[idx] operator[SEP] identifier[go] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[replace] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[index] operator[<=] identifier[vars] operator[SEP] identifier[length] operator[SEP] { Keyword[if] operator[SEP] identifier[holder] operator[!=] Other[null] operator[SEP] { identifier[holder] operator[SEP] identifier[append] operator[SEP] identifier[vars] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { Keyword[for] operator[SEP] identifier[StringBuilder] identifier[s] operator[:] identifier[sbs] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] { identifier[s] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } } } Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[text] , identifier[prev] , identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[holder] operator[!=] Other[null] operator[SEP] { identifier[holder] operator[SEP] identifier[append] operator[SEP] identifier[text] , identifier[prev] , identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[==] Other[null] operator[?] identifier[text] operator[:] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public void prepare(FeatureProvider provider) { super.prepare(provider); transformable = provider.getFeature(Transformable.class); transformable.addListener(this); if (provider instanceof CollidableListener) { addListener((CollidableListener) provider); } }
class class_name[name] begin[{] method[prepare, return_type[void], modifier[public], parameter[provider]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepare, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[member[.transformable], call[provider.getFeature, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Transformable, sub_type=None))]]] call[transformable.addListener, parameter[THIS[]]] if[binary_operation[member[.provider], instanceof, type[CollidableListener]]] begin[{] call[.addListener, parameter[Cast(expression=MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CollidableListener, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[prepare] operator[SEP] identifier[FeatureProvider] identifier[provider] operator[SEP] { Keyword[super] operator[SEP] identifier[prepare] operator[SEP] identifier[provider] operator[SEP] operator[SEP] identifier[transformable] operator[=] identifier[provider] operator[SEP] identifier[getFeature] operator[SEP] identifier[Transformable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[transformable] operator[SEP] identifier[addListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[provider] Keyword[instanceof] identifier[CollidableListener] operator[SEP] { identifier[addListener] operator[SEP] operator[SEP] identifier[CollidableListener] operator[SEP] identifier[provider] operator[SEP] operator[SEP] } }
@Override public void close() { if(jdbcReader != null) { try { jdbcReader.close(); } catch(Exception e) { LOG.error("Unable to close jdbcReader", e); } } if(jdbcWriter != null) { try { jdbcWriter.close(); } catch(Exception e) { LOG.error("Unable to close jdbcWriter", e); } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.jdbcReader], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=jdbcReader, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to close jdbcReader"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.jdbcWriter], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=jdbcWriter, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to close jdbcWriter"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[jdbcReader] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[jdbcReader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[jdbcWriter] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[jdbcWriter] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
private static int[] lift(int[] path, int[] mapping) { for (int i = 0; i < path.length; i++) { path[i] = mapping[path[i]]; } return path; }
class class_name[name] begin[{] method[lift, return_type[type[int]], modifier[private static], parameter[path, mapping]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=mapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=path, 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[.path]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[lift] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[path] , Keyword[int] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[path] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[path] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[mapping] operator[SEP] identifier[path] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[path] operator[SEP] }
public synchronized void add(GenericKeys key) { KeyBucket bucket = makeBucket(key.getName().charAt(0)); if (null != bucket) { bucket.add(key); } }
class class_name[name] begin[{] method[add, return_type[void], modifier[synchronized public], parameter[key]] begin[{] local_variable[type[KeyBucket], bucket] if[binary_operation[literal[null], !=, member[.bucket]]] begin[{] call[bucket.add, parameter[member[.key]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] identifier[GenericKeys] identifier[key] operator[SEP] { identifier[KeyBucket] identifier[bucket] operator[=] identifier[makeBucket] operator[SEP] identifier[key] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[bucket] operator[SEP] { identifier[bucket] operator[SEP] identifier[add] operator[SEP] identifier[key] operator[SEP] operator[SEP] } }
public static String stacktraceToString(Throwable throwable, int limit, Map<Character, String> replaceCharToStrMap) { final FastByteArrayOutputStream baos = new FastByteArrayOutputStream(); throwable.printStackTrace(new PrintStream(baos)); String exceptionStr = baos.toString(); int length = exceptionStr.length(); if (limit > 0 && limit < length) { length = limit; } if (CollectionUtil.isNotEmpty(replaceCharToStrMap)) { final StringBuilder sb = StrUtil.builder(); char c; String value; for (int i = 0; i < length; i++) { c = exceptionStr.charAt(i); value = replaceCharToStrMap.get(c); if (null != value) { sb.append(value); } else { sb.append(c); } } return sb.toString(); } else { return StrUtil.subPre(exceptionStr, limit); } }
class class_name[name] begin[{] method[stacktraceToString, return_type[type[String]], modifier[public static], parameter[throwable, limit, replaceCharToStrMap]] begin[{] local_variable[type[FastByteArrayOutputStream], baos] call[throwable.printStackTrace, parameter[ClassCreator(arguments=[MemberReference(member=baos, 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=PrintStream, sub_type=None))]] local_variable[type[String], exceptionStr] local_variable[type[int], length] if[binary_operation[binary_operation[member[.limit], >, literal[0]], &&, binary_operation[member[.limit], <, member[.length]]]] begin[{] assign[member[.length], member[.limit]] else begin[{] None end[}] if[call[CollectionUtil.isNotEmpty, parameter[member[.replaceCharToStrMap]]]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[char], c] local_variable[type[String], value] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=exceptionStr, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=replaceCharToStrMap, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sb.toString, parameter[]]] else begin[{] return[call[StrUtil.subPre, parameter[member[.exceptionStr], member[.limit]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[stacktraceToString] operator[SEP] identifier[Throwable] identifier[throwable] , Keyword[int] identifier[limit] , identifier[Map] operator[<] identifier[Character] , identifier[String] operator[>] identifier[replaceCharToStrMap] operator[SEP] { Keyword[final] identifier[FastByteArrayOutputStream] identifier[baos] operator[=] Keyword[new] identifier[FastByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[throwable] operator[SEP] identifier[printStackTrace] operator[SEP] Keyword[new] identifier[PrintStream] operator[SEP] identifier[baos] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[exceptionStr] operator[=] identifier[baos] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[exceptionStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[limit] operator[>] Other[0] operator[&&] identifier[limit] operator[<] identifier[length] operator[SEP] { identifier[length] operator[=] identifier[limit] operator[SEP] } Keyword[if] operator[SEP] identifier[CollectionUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[replaceCharToStrMap] operator[SEP] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] identifier[StrUtil] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[char] identifier[c] operator[SEP] identifier[String] identifier[value] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[c] operator[=] identifier[exceptionStr] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[replaceCharToStrMap] operator[SEP] identifier[get] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[value] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[StrUtil] operator[SEP] identifier[subPre] operator[SEP] identifier[exceptionStr] , identifier[limit] operator[SEP] operator[SEP] } }
public Version nextBuildMetaData() { final String[] newBuildMetaData = incrementIdentifier(this.buildMetaDataParts); return new Version(this.major, this.minor, this.patch, this.preReleaseParts, newBuildMetaData); }
class class_name[name] begin[{] method[nextBuildMetaData, return_type[type[Version]], modifier[public], parameter[]] begin[{] local_variable[type[String], newBuildMetaData] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=major, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=minor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=patch, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=preReleaseParts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=newBuildMetaData, 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=Version, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Version] identifier[nextBuildMetaData] operator[SEP] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[newBuildMetaData] operator[=] identifier[incrementIdentifier] operator[SEP] Keyword[this] operator[SEP] identifier[buildMetaDataParts] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Version] operator[SEP] Keyword[this] operator[SEP] identifier[major] , Keyword[this] operator[SEP] identifier[minor] , Keyword[this] operator[SEP] identifier[patch] , Keyword[this] operator[SEP] identifier[preReleaseParts] , identifier[newBuildMetaData] operator[SEP] operator[SEP] }
public void marshall(CreateTaskRequest createTaskRequest, ProtocolMarshaller protocolMarshaller) { if (createTaskRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createTaskRequest.getSourceLocationArn(), SOURCELOCATIONARN_BINDING); protocolMarshaller.marshall(createTaskRequest.getDestinationLocationArn(), DESTINATIONLOCATIONARN_BINDING); protocolMarshaller.marshall(createTaskRequest.getCloudWatchLogGroupArn(), CLOUDWATCHLOGGROUPARN_BINDING); protocolMarshaller.marshall(createTaskRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createTaskRequest.getOptions(), OPTIONS_BINDING); protocolMarshaller.marshall(createTaskRequest.getTags(), TAGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[createTaskRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createTaskRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSourceLocationArn, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=SOURCELOCATIONARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDestinationLocationArn, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=DESTINATIONLOCATIONARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCloudWatchLogGroupArn, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=CLOUDWATCHLOGGROUPARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOptions, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=OPTIONS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTags, postfix_operators=[], prefix_operators=[], qualifier=createTaskRequest, selectors=[], type_arguments=None), MemberReference(member=TAGS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateTaskRequest] identifier[createTaskRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createTaskRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getSourceLocationArn] operator[SEP] operator[SEP] , identifier[SOURCELOCATIONARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getDestinationLocationArn] operator[SEP] operator[SEP] , identifier[DESTINATIONLOCATIONARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getCloudWatchLogGroupArn] operator[SEP] operator[SEP] , identifier[CLOUDWATCHLOGGROUPARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] , identifier[OPTIONS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createTaskRequest] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[TAGS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static ElasticSearch getElasticSearchSink(String elasticSearch){ init(); if(elasticSearch == null || elasticSearch.equals("")) { return elasticSearchSink; } ElasticSearch elasticSearchSink = elasticSearchMap.get(elasticSearch); if(elasticSearchSink == null) { synchronized (elasticSearchMap) { elasticSearchSink = elasticSearchMap.get(elasticSearch); if(elasticSearchSink != null) return elasticSearchSink; context = DefaultApplicationContext.getApplicationContext("conf/elasticsearch.xml"); elasticSearchSink = context.getTBeanObject(elasticSearch, ElasticSearch.class); if (elasticSearchSink != null) { elasticSearchMap.put(elasticSearch, elasticSearchSink); } } } return elasticSearchSink; }
class class_name[name] begin[{] method[getElasticSearchSink, return_type[type[ElasticSearch]], modifier[public static], parameter[elasticSearch]] begin[{] call[.init, parameter[]] if[binary_operation[binary_operation[member[.elasticSearch], ==, literal[null]], ||, call[elasticSearch.equals, parameter[literal[""]]]]] begin[{] return[member[.elasticSearchSink]] else begin[{] None end[}] local_variable[type[ElasticSearch], elasticSearchSink] if[binary_operation[member[.elasticSearchSink], ==, literal[null]]] begin[{] SYNCHRONIZED[member[.elasticSearchMap]] BEGIN[{] assign[member[.elasticSearchSink], call[elasticSearchMap.get, parameter[member[.elasticSearch]]]] if[binary_operation[member[.elasticSearchSink], !=, literal[null]]] begin[{] return[member[.elasticSearchSink]] else begin[{] None end[}] assign[member[.context], call[DefaultApplicationContext.getApplicationContext, parameter[literal["conf/elasticsearch.xml"]]]] assign[member[.elasticSearchSink], call[context.getTBeanObject, parameter[member[.elasticSearch], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ElasticSearch, sub_type=None))]]] if[binary_operation[member[.elasticSearchSink], !=, literal[null]]] begin[{] call[elasticSearchMap.put, parameter[member[.elasticSearch], member[.elasticSearchSink]]] else begin[{] None end[}] END[}] else begin[{] None end[}] return[member[.elasticSearchSink]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ElasticSearch] identifier[getElasticSearchSink] operator[SEP] identifier[String] identifier[elasticSearch] operator[SEP] { identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elasticSearch] operator[==] Other[null] operator[||] identifier[elasticSearch] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[elasticSearchSink] operator[SEP] } identifier[ElasticSearch] identifier[elasticSearchSink] operator[=] identifier[elasticSearchMap] operator[SEP] identifier[get] operator[SEP] identifier[elasticSearch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elasticSearchSink] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[elasticSearchMap] operator[SEP] { identifier[elasticSearchSink] operator[=] identifier[elasticSearchMap] operator[SEP] identifier[get] operator[SEP] identifier[elasticSearch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elasticSearchSink] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[elasticSearchSink] operator[SEP] identifier[context] operator[=] identifier[DefaultApplicationContext] operator[SEP] identifier[getApplicationContext] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[elasticSearchSink] operator[=] identifier[context] operator[SEP] identifier[getTBeanObject] operator[SEP] identifier[elasticSearch] , identifier[ElasticSearch] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elasticSearchSink] operator[!=] Other[null] operator[SEP] { identifier[elasticSearchMap] operator[SEP] identifier[put] operator[SEP] identifier[elasticSearch] , identifier[elasticSearchSink] operator[SEP] operator[SEP] } } } Keyword[return] identifier[elasticSearchSink] operator[SEP] }
public static ExecutableScript parseCamundaScript(Element scriptElement) { String scriptLanguage = scriptElement.attribute("scriptFormat"); if (scriptLanguage == null || scriptLanguage.isEmpty()) { throw new BpmnParseException("Missing attribute 'scriptFormatAttribute' for 'script' element", scriptElement); } else { String scriptResource = scriptElement.attribute("resource"); String scriptSource = scriptElement.getText(); try { return ScriptUtil.getScript(scriptLanguage, scriptSource, scriptResource, getExpressionManager()); } catch (ProcessEngineException e) { throw new BpmnParseException("Unable to process script", scriptElement, e); } } }
class class_name[name] begin[{] method[parseCamundaScript, return_type[type[ExecutableScript]], modifier[public static], parameter[scriptElement]] begin[{] local_variable[type[String], scriptLanguage] if[binary_operation[binary_operation[member[.scriptLanguage], ==, literal[null]], ||, call[scriptLanguage.isEmpty, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing attribute 'scriptFormatAttribute' for 'script' element"), MemberReference(member=scriptElement, 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=BpmnParseException, sub_type=None)), label=None) else begin[{] local_variable[type[String], scriptResource] local_variable[type[String], scriptSource] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=scriptLanguage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scriptSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scriptResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getExpressionManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getScript, postfix_operators=[], prefix_operators=[], qualifier=ScriptUtil, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to process script"), MemberReference(member=scriptElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BpmnParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ProcessEngineException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[ExecutableScript] identifier[parseCamundaScript] operator[SEP] identifier[Element] identifier[scriptElement] operator[SEP] { identifier[String] identifier[scriptLanguage] operator[=] identifier[scriptElement] operator[SEP] identifier[attribute] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scriptLanguage] operator[==] Other[null] operator[||] identifier[scriptLanguage] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[BpmnParseException] operator[SEP] literal[String] , identifier[scriptElement] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[scriptResource] operator[=] identifier[scriptElement] operator[SEP] identifier[attribute] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[scriptSource] operator[=] identifier[scriptElement] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[ScriptUtil] operator[SEP] identifier[getScript] operator[SEP] identifier[scriptLanguage] , identifier[scriptSource] , identifier[scriptResource] , identifier[getExpressionManager] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ProcessEngineException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BpmnParseException] operator[SEP] literal[String] , identifier[scriptElement] , identifier[e] operator[SEP] operator[SEP] } } }
@SuppressWarnings("checkstyle:npathcomplexity") protected void copyNonStaticPublicJvmOperations(JvmGenericType source, JvmGenericType target, Set<ActionPrototype> createdActions, Procedure2<? super JvmOperation, ? super ITreeAppendable> bodyBuilder) { final Iterable<JvmOperation> operations = Iterables.transform(Iterables.filter(source.getMembers(), it -> { if (it instanceof JvmOperation) { final JvmOperation op = (JvmOperation) it; return !op.isStatic() && op.getVisibility() == JvmVisibility.PUBLIC; } return false; }), it -> (JvmOperation) it); for (final JvmOperation operation : operations) { final ActionParameterTypes types = this.sarlSignatureProvider.createParameterTypesFromJvmModel( operation.isVarArgs(), operation.getParameters()); final ActionPrototype actSigKey = this.sarlSignatureProvider.createActionPrototype( operation.getSimpleName(), types); if (createdActions.add(actSigKey)) { final JvmOperation newOp = this.typesFactory.createJvmOperation(); target.getMembers().add(newOp); newOp.setAbstract(false); newOp.setFinal(false); newOp.setNative(false); newOp.setStatic(false); newOp.setSynchronized(false); newOp.setVisibility(JvmVisibility.PUBLIC); newOp.setDefault(operation.isDefault()); newOp.setDeprecated(operation.isDeprecated()); newOp.setSimpleName(operation.getSimpleName()); newOp.setStrictFloatingPoint(operation.isStrictFloatingPoint()); copyTypeParametersFromJvmOperation(operation, newOp); for (final JvmTypeReference exception : operation.getExceptions()) { newOp.getExceptions().add(cloneWithTypeParametersAndProxies(exception, newOp)); } for (final JvmFormalParameter parameter : operation.getParameters()) { final JvmFormalParameter newParam = this.typesFactory.createJvmFormalParameter(); newOp.getParameters().add(newParam); newParam.setName(parameter.getSimpleName()); newParam.setParameterType(cloneWithTypeParametersAndProxies(parameter.getParameterType(), newOp)); } newOp.setVarArgs(operation.isVarArgs()); newOp.setReturnType(cloneWithTypeParametersAndProxies(operation.getReturnType(), newOp)); setBody(newOp, it -> bodyBuilder.apply(operation, it)); } } }
class class_name[name] begin[{] method[copyNonStaticPublicJvmOperations, return_type[void], modifier[protected], parameter[source, target, createdActions, bodyBuilder]] begin[{] local_variable[type[Iterable], operations] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sarlSignatureProvider, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isVarArgs, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=createParameterTypesFromJvmModel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=types)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ActionParameterTypes, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sarlSignatureProvider, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None), MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createActionPrototype, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=actSigKey)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ActionPrototype, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=actSigKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=createdActions, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=typesFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=createJvmOperation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=newOp)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmOperation, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getMembers, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[MethodInvocation(arguments=[MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setAbstract, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setFinal, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setNative, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setStatic, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setSynchronized, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PUBLIC, postfix_operators=[], prefix_operators=[], qualifier=JvmVisibility, selectors=[])], member=setVisibility, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isDefault, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=setDefault, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isDeprecated, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=setDeprecated, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=setSimpleName, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isStrictFloatingPoint, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=setStrictFloatingPoint, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyTypeParametersFromJvmOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getExceptions, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cloneWithTypeParametersAndProxies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getExceptions, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=exception)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeReference, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=typesFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=createJvmFormalParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=newParam)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmFormalParameter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[MethodInvocation(arguments=[MemberReference(member=newParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=parameter, selectors=[], type_arguments=None)], member=setName, postfix_operators=[], prefix_operators=[], qualifier=newParam, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParameterType, postfix_operators=[], prefix_operators=[], qualifier=parameter, selectors=[], type_arguments=None), MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cloneWithTypeParametersAndProxies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setParameterType, postfix_operators=[], prefix_operators=[], qualifier=newParam, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parameter)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmFormalParameter, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isVarArgs, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None)], member=setVarArgs, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReturnType, postfix_operators=[], prefix_operators=[], qualifier=operation, selectors=[], type_arguments=None), MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cloneWithTypeParametersAndProxies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setReturnType, postfix_operators=[], prefix_operators=[], qualifier=newOp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=bodyBuilder, selectors=[], type_arguments=None), parameters=[MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=setBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=operations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=operation)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmOperation, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[copyNonStaticPublicJvmOperations] operator[SEP] identifier[JvmGenericType] identifier[source] , identifier[JvmGenericType] identifier[target] , identifier[Set] operator[<] identifier[ActionPrototype] operator[>] identifier[createdActions] , identifier[Procedure2] operator[<] operator[?] Keyword[super] identifier[JvmOperation] , operator[?] Keyword[super] identifier[ITreeAppendable] operator[>] identifier[bodyBuilder] operator[SEP] { Keyword[final] identifier[Iterable] operator[<] identifier[JvmOperation] operator[>] identifier[operations] operator[=] identifier[Iterables] operator[SEP] identifier[transform] operator[SEP] identifier[Iterables] operator[SEP] identifier[filter] operator[SEP] identifier[source] operator[SEP] identifier[getMembers] operator[SEP] operator[SEP] , identifier[it] operator[->] { Keyword[if] operator[SEP] identifier[it] Keyword[instanceof] identifier[JvmOperation] operator[SEP] { Keyword[final] identifier[JvmOperation] identifier[op] operator[=] operator[SEP] identifier[JvmOperation] operator[SEP] identifier[it] operator[SEP] Keyword[return] operator[!] identifier[op] operator[SEP] identifier[isStatic] operator[SEP] operator[SEP] operator[&&] identifier[op] operator[SEP] identifier[getVisibility] operator[SEP] operator[SEP] operator[==] identifier[JvmVisibility] operator[SEP] identifier[PUBLIC] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } operator[SEP] , identifier[it] operator[->] operator[SEP] identifier[JvmOperation] operator[SEP] identifier[it] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[JvmOperation] identifier[operation] operator[:] identifier[operations] operator[SEP] { Keyword[final] identifier[ActionParameterTypes] identifier[types] operator[=] Keyword[this] operator[SEP] identifier[sarlSignatureProvider] operator[SEP] identifier[createParameterTypesFromJvmModel] operator[SEP] identifier[operation] operator[SEP] identifier[isVarArgs] operator[SEP] operator[SEP] , identifier[operation] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ActionPrototype] identifier[actSigKey] operator[=] Keyword[this] operator[SEP] identifier[sarlSignatureProvider] operator[SEP] identifier[createActionPrototype] operator[SEP] identifier[operation] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[types] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[createdActions] operator[SEP] identifier[add] operator[SEP] identifier[actSigKey] operator[SEP] operator[SEP] { Keyword[final] identifier[JvmOperation] identifier[newOp] operator[=] Keyword[this] operator[SEP] identifier[typesFactory] operator[SEP] identifier[createJvmOperation] operator[SEP] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[getMembers] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[newOp] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setAbstract] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setFinal] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setNative] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setStatic] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setSynchronized] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setVisibility] operator[SEP] identifier[JvmVisibility] operator[SEP] identifier[PUBLIC] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setDefault] operator[SEP] identifier[operation] operator[SEP] identifier[isDefault] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setDeprecated] operator[SEP] identifier[operation] operator[SEP] identifier[isDeprecated] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setSimpleName] operator[SEP] identifier[operation] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setStrictFloatingPoint] operator[SEP] identifier[operation] operator[SEP] identifier[isStrictFloatingPoint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[copyTypeParametersFromJvmOperation] operator[SEP] identifier[operation] , identifier[newOp] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[JvmTypeReference] identifier[exception] operator[:] identifier[operation] operator[SEP] identifier[getExceptions] operator[SEP] operator[SEP] operator[SEP] { identifier[newOp] operator[SEP] identifier[getExceptions] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[cloneWithTypeParametersAndProxies] operator[SEP] identifier[exception] , identifier[newOp] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[JvmFormalParameter] identifier[parameter] operator[:] identifier[operation] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[JvmFormalParameter] identifier[newParam] operator[=] Keyword[this] operator[SEP] identifier[typesFactory] operator[SEP] identifier[createJvmFormalParameter] operator[SEP] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[newParam] operator[SEP] operator[SEP] identifier[newParam] operator[SEP] identifier[setName] operator[SEP] identifier[parameter] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newParam] operator[SEP] identifier[setParameterType] operator[SEP] identifier[cloneWithTypeParametersAndProxies] operator[SEP] identifier[parameter] operator[SEP] identifier[getParameterType] operator[SEP] operator[SEP] , identifier[newOp] operator[SEP] operator[SEP] operator[SEP] } identifier[newOp] operator[SEP] identifier[setVarArgs] operator[SEP] identifier[operation] operator[SEP] identifier[isVarArgs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newOp] operator[SEP] identifier[setReturnType] operator[SEP] identifier[cloneWithTypeParametersAndProxies] operator[SEP] identifier[operation] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] , identifier[newOp] operator[SEP] operator[SEP] operator[SEP] identifier[setBody] operator[SEP] identifier[newOp] , identifier[it] operator[->] identifier[bodyBuilder] operator[SEP] identifier[apply] operator[SEP] identifier[operation] , identifier[it] operator[SEP] operator[SEP] operator[SEP] } } }
public static Map<String, Object> onInExpression(Expression expression, EntityMetadata m, KunderaMetadata kunderaMetadata, KunderaQuery kunderaQuery) { InExpression inExp = (InExpression) expression; Expression sfpExp = inExp.getExpression(); Map<String, Object> map = KunderaQueryUtils.setFieldClazzAndColumnFamily(sfpExp, m, kunderaMetadata); kunderaQuery.addFilterClause( (String) map.get(Constants.COL_NAME), inExp.getIdentifier(), inExp.getInItems(), (String) map.get(Constants.FIELD_NAME), (Boolean) map.get(Constants.IGNORE_CASE)); return map; }
class class_name[name] begin[{] method[onInExpression, return_type[type[Map]], modifier[public static], parameter[expression, m, kunderaMetadata, kunderaQuery]] begin[{] local_variable[type[InExpression], inExp] local_variable[type[Expression], sfpExp] local_variable[type[Map], map] call[kunderaQuery.addFilterClause, parameter[Cast(expression=MethodInvocation(arguments=[MemberReference(member=COL_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), call[inExp.getIdentifier, parameter[]], call[inExp.getInItems, parameter[]], Cast(expression=MethodInvocation(arguments=[MemberReference(member=FIELD_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), Cast(expression=MethodInvocation(arguments=[MemberReference(member=IGNORE_CASE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))]] return[member[.map]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[onInExpression] operator[SEP] identifier[Expression] identifier[expression] , identifier[EntityMetadata] identifier[m] , identifier[KunderaMetadata] identifier[kunderaMetadata] , identifier[KunderaQuery] identifier[kunderaQuery] operator[SEP] { identifier[InExpression] identifier[inExp] operator[=] operator[SEP] identifier[InExpression] operator[SEP] identifier[expression] operator[SEP] identifier[Expression] identifier[sfpExp] operator[=] identifier[inExp] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[=] identifier[KunderaQueryUtils] operator[SEP] identifier[setFieldClazzAndColumnFamily] operator[SEP] identifier[sfpExp] , identifier[m] , identifier[kunderaMetadata] operator[SEP] operator[SEP] identifier[kunderaQuery] operator[SEP] identifier[addFilterClause] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[Constants] operator[SEP] identifier[COL_NAME] operator[SEP] , identifier[inExp] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] , identifier[inExp] operator[SEP] identifier[getInItems] operator[SEP] operator[SEP] , operator[SEP] identifier[String] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[Constants] operator[SEP] identifier[FIELD_NAME] operator[SEP] , operator[SEP] identifier[Boolean] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[Constants] operator[SEP] identifier[IGNORE_CASE] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[map] operator[SEP] }
private void textFieldKeyCodeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldKeyCodeKeyPressed if (this.buttonEditKeyCode.isSelected()){ switch(evt.getKeyCode()){ case KeyEvent.VK_META: case KeyEvent.VK_ALT: case KeyEvent.VK_SHIFT: case KeyEvent.VK_CONTROL: evt.consume();break; default:{ updateCurrentSelectedForKey(evt); this.buttonEditKeyCode.setSelected(false); this.tableKeyShortcuts.requestFocus(); }break; } } evt.consume(); }
class class_name[name] begin[{] method[textFieldKeyCodeKeyPressed, return_type[void], modifier[private], parameter[evt]] begin[{] if[THIS[member[None.buttonEditKeyCode]call[None.isSelected, parameter[]]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=VK_META, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), MemberReference(member=VK_ALT, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), MemberReference(member=VK_SHIFT, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), MemberReference(member=VK_CONTROL, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=evt, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateCurrentSelectedForKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=buttonEditKeyCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setSelected, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tableKeyShortcuts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=requestFocus, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getKeyCode, postfix_operators=[], prefix_operators=[], qualifier=evt, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] call[evt.consume, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[textFieldKeyCodeKeyPressed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyEvent] identifier[evt] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buttonEditKeyCode] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] { Keyword[switch] operator[SEP] identifier[evt] operator[SEP] identifier[getKeyCode] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[KeyEvent] operator[SEP] identifier[VK_META] operator[:] Keyword[case] identifier[KeyEvent] operator[SEP] identifier[VK_ALT] operator[:] Keyword[case] identifier[KeyEvent] operator[SEP] identifier[VK_SHIFT] operator[:] Keyword[case] identifier[KeyEvent] operator[SEP] identifier[VK_CONTROL] operator[:] identifier[evt] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] { identifier[updateCurrentSelectedForKey] operator[SEP] identifier[evt] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[buttonEditKeyCode] operator[SEP] identifier[setSelected] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[tableKeyShortcuts] operator[SEP] identifier[requestFocus] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } identifier[evt] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] }
@Get("/header") public HttpResponse header(@Header String xArmeriaText, /* no conversion */ @Header List<Integer> xArmeriaSequence, /* converted into integer */ Cookies cookies /* converted into Cookies object */) throws JsonProcessingException { return HttpResponse.of(HttpStatus.OK, MediaType.JSON_UTF_8, mapper.writeValueAsBytes( Arrays.asList(xArmeriaText, xArmeriaSequence, cookies.stream().map(Cookie::name).collect(Collectors.toList())))); }
class class_name[name] begin[{] method[header, return_type[type[HttpResponse]], modifier[public], parameter[xArmeriaText, xArmeriaSequence, cookies]] begin[{] return[call[HttpResponse.of, parameter[member[HttpStatus.OK], member[MediaType.JSON_UTF_8], call[mapper.writeValueAsBytes, parameter[call[Arrays.asList, parameter[member[.xArmeriaText], member[.xArmeriaSequence], call[cookies.stream, parameter[]]]]]]]]] end[}] END[}]
annotation[@] identifier[Get] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[HttpResponse] identifier[header] operator[SEP] annotation[@] identifier[Header] identifier[String] identifier[xArmeriaText] , annotation[@] identifier[Header] identifier[List] operator[<] identifier[Integer] operator[>] identifier[xArmeriaSequence] , identifier[Cookies] identifier[cookies] operator[SEP] Keyword[throws] identifier[JsonProcessingException] { Keyword[return] identifier[HttpResponse] operator[SEP] identifier[of] operator[SEP] identifier[HttpStatus] operator[SEP] identifier[OK] , identifier[MediaType] operator[SEP] identifier[JSON_UTF_8] , identifier[mapper] operator[SEP] identifier[writeValueAsBytes] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[xArmeriaText] , identifier[xArmeriaSequence] , identifier[cookies] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[Cookie] operator[::] identifier[name] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public PointList calcPoints() { final PointList points = new PointList(edgeIds.size() + 1, nodeAccess.is3D()); if (edgeIds.isEmpty()) { if (isFound()) { points.add(graph.getNodeAccess(), endNode); } return points; } int tmpNode = getFromNode(); points.add(nodeAccess, tmpNode); forEveryEdge(new EdgeVisitor() { @Override public void next(EdgeIteratorState eb, int index, int prevEdgeId) { PointList pl = eb.fetchWayGeometry(2); for (int j = 0; j < pl.getSize(); j++) { points.add(pl, j); } } @Override public void finish() { } }); return points; }
class class_name[name] begin[{] method[calcPoints, return_type[type[PointList]], modifier[public], parameter[]] begin[{] local_variable[type[PointList], points] if[call[edgeIds.isEmpty, parameter[]]] begin[{] if[call[.isFound, parameter[]]] begin[{] call[points.add, parameter[call[graph.getNodeAccess, parameter[]], member[.endNode]]] else begin[{] None end[}] return[member[.points]] else begin[{] None end[}] local_variable[type[int], tmpNode] call[points.add, parameter[member[.nodeAccess], member[.tmpNode]]] call[.forEveryEdge, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=fetchWayGeometry, postfix_operators=[], prefix_operators=[], qualifier=eb, selectors=[], type_arguments=None), name=pl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PointList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=points, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=pl, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], documentation=None, modifiers={'public'}, name=next, parameters=[FormalParameter(annotations=[], modifiers=set(), name=eb, type=ReferenceType(arguments=None, dimensions=[], name=EdgeIteratorState, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=index, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=prevEdgeId, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'public'}, name=finish, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EdgeVisitor, sub_type=None))]] return[member[.points]] end[}] END[}]
Keyword[public] identifier[PointList] identifier[calcPoints] operator[SEP] operator[SEP] { Keyword[final] identifier[PointList] identifier[points] operator[=] Keyword[new] identifier[PointList] operator[SEP] identifier[edgeIds] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] , identifier[nodeAccess] operator[SEP] identifier[is3D] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[edgeIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFound] operator[SEP] operator[SEP] operator[SEP] { identifier[points] operator[SEP] identifier[add] operator[SEP] identifier[graph] operator[SEP] identifier[getNodeAccess] operator[SEP] operator[SEP] , identifier[endNode] operator[SEP] operator[SEP] } Keyword[return] identifier[points] operator[SEP] } Keyword[int] identifier[tmpNode] operator[=] identifier[getFromNode] operator[SEP] operator[SEP] operator[SEP] identifier[points] operator[SEP] identifier[add] operator[SEP] identifier[nodeAccess] , identifier[tmpNode] operator[SEP] operator[SEP] identifier[forEveryEdge] operator[SEP] Keyword[new] identifier[EdgeVisitor] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[next] operator[SEP] identifier[EdgeIteratorState] identifier[eb] , Keyword[int] identifier[index] , Keyword[int] identifier[prevEdgeId] operator[SEP] { identifier[PointList] identifier[pl] operator[=] identifier[eb] operator[SEP] identifier[fetchWayGeometry] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[pl] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[points] operator[SEP] identifier[add] operator[SEP] identifier[pl] , identifier[j] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[finish] operator[SEP] operator[SEP] { } } operator[SEP] operator[SEP] Keyword[return] identifier[points] operator[SEP] }
@XmlElementDecl(namespace = "http://www.drugbank.ca", name = "adverse-reaction", scope = SnpAdverseDrugReactionType.class) public JAXBElement<String> createSnpAdverseDrugReactionTypeAdverseReaction(String value) { return new JAXBElement<String>(_SnpAdverseDrugReactionTypeAdverseReaction_QNAME, String.class, SnpAdverseDrugReactionType.class, value); }
class class_name[name] begin[{] method[createSnpAdverseDrugReactionTypeAdverseReaction, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_SnpAdverseDrugReactionTypeAdverseReaction_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SnpAdverseDrugReactionType, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[SnpAdverseDrugReactionType] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[String] operator[>] identifier[createSnpAdverseDrugReactionTypeAdverseReaction] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[String] operator[>] operator[SEP] identifier[_SnpAdverseDrugReactionTypeAdverseReaction_QNAME] , identifier[String] operator[SEP] Keyword[class] , identifier[SnpAdverseDrugReactionType] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public void setEnabled(boolean bEnable) { if (m_vScreenField != null) { for (Enumeration<Object> e = m_vScreenField.elements() ; e.hasMoreElements() ;) { ((ScreenComponent)e.nextElement()).setEnabled(bEnable); } } }
class class_name[name] begin[{] method[setEnabled, return_type[void], modifier[public], parameter[bEnable]] begin[{] if[binary_operation[member[.m_vScreenField], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ScreenComponent, sub_type=None)), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasMoreElements, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=elements, postfix_operators=[], prefix_operators=[], qualifier=m_vScreenField, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Enumeration, sub_type=None)), update=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[bEnable] operator[SEP] { Keyword[if] operator[SEP] identifier[m_vScreenField] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Enumeration] operator[<] identifier[Object] operator[>] identifier[e] operator[=] identifier[m_vScreenField] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[ScreenComponent] operator[SEP] identifier[e] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setEnabled] operator[SEP] identifier[bEnable] operator[SEP] operator[SEP] } } }
public static boolean isPotentiallyEncryptedBytes(byte[] bytes) { checkNotNull(bytes, "bytes"); // The number of bytes is a non-zero multiple of the block size. try { return bytes.length != 0 && bytes.length % Cipher.getInstance(CIPHER).getBlockSize() == 0; } catch (Throwable t) { // This shouldn't happen since AES is supported by all JVMs. throw Throwables.propagate(t); } }
class class_name[name] begin[{] method[isPotentiallyEncryptedBytes, return_type[type[boolean]], modifier[public static], parameter[bytes]] begin[{] call[.checkNotNull, parameter[member[.bytes], literal["bytes"]]] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=CIPHER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Cipher, selectors=[MethodInvocation(arguments=[], member=getBlockSize, 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=0), operator===), operator=&&), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=propagate, postfix_operators=[], prefix_operators=[], qualifier=Throwables, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPotentiallyEncryptedBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[bytes] , literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[bytes] operator[SEP] identifier[length] operator[!=] Other[0] operator[&&] identifier[bytes] operator[SEP] identifier[length] operator[%] identifier[Cipher] operator[SEP] identifier[getInstance] operator[SEP] identifier[CIPHER] operator[SEP] operator[SEP] identifier[getBlockSize] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] identifier[Throwables] operator[SEP] identifier[propagate] operator[SEP] identifier[t] operator[SEP] operator[SEP] } }
public GCBOXRES createGCBOXRESFromString(EDataType eDataType, String initialValue) { GCBOXRES result = GCBOXRES.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createGCBOXRESFromString, return_type[type[GCBOXRES]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[GCBOXRES], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[GCBOXRES] identifier[createGCBOXRESFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[GCBOXRES] identifier[result] operator[=] identifier[GCBOXRES] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public void setDisks(java.util.Collection<Disk> disks) { if (disks == null) { this.disks = null; return; } this.disks = new java.util.ArrayList<Disk>(disks); }
class class_name[name] begin[{] method[setDisks, return_type[void], modifier[public], parameter[disks]] begin[{] if[binary_operation[member[.disks], ==, literal[null]]] begin[{] assign[THIS[member[None.disks]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.disks]], ClassCreator(arguments=[MemberReference(member=disks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Disk, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDisks] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Disk] operator[>] identifier[disks] operator[SEP] { Keyword[if] operator[SEP] identifier[disks] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[disks] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[disks] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Disk] operator[>] operator[SEP] identifier[disks] operator[SEP] operator[SEP] }
public void add(Item item) { Item innerItem = trie.get(item.key); if (innerItem == null) { innerItem = item; trie.put(innerItem.key, innerItem); } else { innerItem.combine(item); } }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[item]] begin[{] local_variable[type[Item], innerItem] if[binary_operation[member[.innerItem], ==, literal[null]]] begin[{] assign[member[.innerItem], member[.item]] call[trie.put, parameter[member[innerItem.key], member[.innerItem]]] else begin[{] call[innerItem.combine, parameter[member[.item]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Item] identifier[item] operator[SEP] { identifier[Item] identifier[innerItem] operator[=] identifier[trie] operator[SEP] identifier[get] operator[SEP] identifier[item] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[innerItem] operator[==] Other[null] operator[SEP] { identifier[innerItem] operator[=] identifier[item] operator[SEP] identifier[trie] operator[SEP] identifier[put] operator[SEP] identifier[innerItem] operator[SEP] identifier[key] , identifier[innerItem] operator[SEP] operator[SEP] } Keyword[else] { identifier[innerItem] operator[SEP] identifier[combine] operator[SEP] identifier[item] operator[SEP] operator[SEP] } }
@Override public CProduct findByGroupId_Last(long groupId, OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException { CProduct cProduct = fetchByGroupId_Last(groupId, orderByComparator); if (cProduct != null) { return cProduct; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("groupId="); msg.append(groupId); msg.append("}"); throw new NoSuchCProductException(msg.toString()); }
class class_name[name] begin[{] method[findByGroupId_Last, return_type[type[CProduct]], modifier[public], parameter[groupId, orderByComparator]] begin[{] local_variable[type[CProduct], cProduct] if[binary_operation[member[.cProduct], !=, literal[null]]] begin[{] return[member[.cProduct]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["groupId="]]] call[msg.append, parameter[member[.groupId]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchCProductException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CProduct] identifier[findByGroupId_Last] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CProduct] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchCProductException] { identifier[CProduct] identifier[cProduct] operator[=] identifier[fetchByGroupId_Last] operator[SEP] identifier[groupId] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cProduct] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[cProduct] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[groupId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchCProductException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public Iterator<Tree> iterator() { return new Iterator<Tree>() { @Override public boolean hasNext() { return next != null; } @Override public Tree next() { Tree t = next.leaf; next = next.parent; return t; } @Override public void remove() { throw new UnsupportedOperationException(); } private TreePath next = TreePath.this; }; }
class class_name[name] begin[{] method[iterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], documentation=None, modifiers={'public'}, name=hasNext, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=leaf, postfix_operators=[], prefix_operators=[], qualifier=next, selectors=[]), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Tree, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=next, selectors=[])), label=None), ReturnStatement(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=next, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Tree, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[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)], documentation=None, modifiers={'public'}, name=remove, parameters=[], return_type=None, throws=None, type_parameters=None), FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=TreePath, selectors=[]), name=next)], documentation=None, modifiers={'private'}, type=ReferenceType(arguments=None, dimensions=[], name=TreePath, sub_type=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=Tree, sub_type=None))], dimensions=None, name=Iterator, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[Tree] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Iterator] operator[<] identifier[Tree] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[return] identifier[next] operator[!=] Other[null] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Tree] identifier[next] operator[SEP] operator[SEP] { identifier[Tree] identifier[t] operator[=] identifier[next] operator[SEP] identifier[leaf] operator[SEP] identifier[next] operator[=] identifier[next] operator[SEP] identifier[parent] operator[SEP] Keyword[return] identifier[t] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[remove] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] operator[SEP] operator[SEP] } Keyword[private] identifier[TreePath] identifier[next] operator[=] identifier[TreePath] operator[SEP] Keyword[this] operator[SEP] } operator[SEP] }
public void checkExpand(int _hash) { int si = _hash & LOCK_MASK; long _size = segmentSize[si].get(); if (_size > segmentMaxFill) { eventuallyExpand(si); } }
class class_name[name] begin[{] method[checkExpand, return_type[void], modifier[public], parameter[_hash]] begin[{] local_variable[type[int], si] local_variable[type[long], _size] if[binary_operation[member[._size], >, member[.segmentMaxFill]]] begin[{] call[.eventuallyExpand, parameter[member[.si]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[checkExpand] operator[SEP] Keyword[int] identifier[_hash] operator[SEP] { Keyword[int] identifier[si] operator[=] identifier[_hash] operator[&] identifier[LOCK_MASK] operator[SEP] Keyword[long] identifier[_size] operator[=] identifier[segmentSize] operator[SEP] identifier[si] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_size] operator[>] identifier[segmentMaxFill] operator[SEP] { identifier[eventuallyExpand] operator[SEP] identifier[si] operator[SEP] operator[SEP] } }
protected void saveData() throws CmsException { CmsObject cms = m_context.getCms(); for (CmsResource resource : m_context.getResources()) { CmsLockActionRecord actionRecord = null; try { actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource); String secureValue = (String)m_secureField.getValue(); String exportValue = (String)m_exportField.getValue(); String exportname = m_exportNameField.getValue(); CmsProperty secureProp = new CmsProperty(CmsPropertyDefinition.PROPERTY_SECURE, secureValue, null); CmsProperty exportProp = new CmsProperty(CmsPropertyDefinition.PROPERTY_EXPORT, exportValue, null); CmsProperty exportNameProp = new CmsProperty( CmsPropertyDefinition.PROPERTY_EXPORTNAME, exportname, null); boolean internal = m_internalField.getValue().booleanValue(); cms.writePropertyObjects(resource, Arrays.asList(secureProp, exportProp, exportNameProp)); resource.setInternal(internal); cms.writeResource(resource); } finally { if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) { try { cms.unlockResource(resource); } catch (CmsLockException e) { LOG.warn(e.getLocalizedMessage(), e); } } } } }
class class_name[name] begin[{] method[saveData, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[CmsObject], cms] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=actionRecord)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsLockActionRecord, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=actionRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCms, postfix_operators=[], prefix_operators=[], qualifier=m_context, selectors=[], type_arguments=None), MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ensureLock, postfix_operators=[], prefix_operators=[], qualifier=CmsLockUtil, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_secureField, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=secureValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_exportField, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=exportValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_exportNameField, selectors=[], type_arguments=None), name=exportname)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=PROPERTY_SECURE, postfix_operators=[], prefix_operators=[], qualifier=CmsPropertyDefinition, selectors=[]), MemberReference(member=secureValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=CmsProperty, sub_type=None)), name=secureProp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsProperty, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=PROPERTY_EXPORT, postfix_operators=[], prefix_operators=[], qualifier=CmsPropertyDefinition, selectors=[]), MemberReference(member=exportValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=CmsProperty, sub_type=None)), name=exportProp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsProperty, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=PROPERTY_EXPORTNAME, postfix_operators=[], prefix_operators=[], qualifier=CmsPropertyDefinition, selectors=[]), MemberReference(member=exportname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=CmsProperty, sub_type=None)), name=exportNameProp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsProperty, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_internalField, selectors=[MethodInvocation(arguments=[], member=booleanValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=internal)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=secureProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exportProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exportNameProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], member=writePropertyObjects, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=internal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInternal, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=actionRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getChange, postfix_operators=[], prefix_operators=[], qualifier=actionRecord, selectors=[], type_arguments=None), operandr=MemberReference(member=locked, postfix_operators=[], prefix_operators=[], qualifier=LockChange, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unlockResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsLockException']))], finally_block=None, label=None, resources=None)]))], label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=m_context, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsResource, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[saveData] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[CmsObject] identifier[cms] operator[=] identifier[m_context] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CmsResource] identifier[resource] operator[:] identifier[m_context] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsLockActionRecord] identifier[actionRecord] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[actionRecord] operator[=] identifier[CmsLockUtil] operator[SEP] identifier[ensureLock] operator[SEP] identifier[m_context] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] , identifier[resource] operator[SEP] operator[SEP] identifier[String] identifier[secureValue] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[m_secureField] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[exportValue] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[m_exportField] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[exportname] operator[=] identifier[m_exportNameField] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[CmsProperty] identifier[secureProp] operator[=] Keyword[new] identifier[CmsProperty] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_SECURE] , identifier[secureValue] , Other[null] operator[SEP] operator[SEP] identifier[CmsProperty] identifier[exportProp] operator[=] Keyword[new] identifier[CmsProperty] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_EXPORT] , identifier[exportValue] , Other[null] operator[SEP] operator[SEP] identifier[CmsProperty] identifier[exportNameProp] operator[=] Keyword[new] identifier[CmsProperty] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_EXPORTNAME] , identifier[exportname] , Other[null] operator[SEP] operator[SEP] Keyword[boolean] identifier[internal] operator[=] identifier[m_internalField] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[cms] operator[SEP] identifier[writePropertyObjects] operator[SEP] identifier[resource] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[secureProp] , identifier[exportProp] , identifier[exportNameProp] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[setInternal] operator[SEP] identifier[internal] operator[SEP] operator[SEP] identifier[cms] operator[SEP] identifier[writeResource] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] operator[SEP] identifier[actionRecord] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[actionRecord] operator[SEP] identifier[getChange] operator[SEP] operator[SEP] operator[==] identifier[LockChange] operator[SEP] identifier[locked] operator[SEP] operator[SEP] { Keyword[try] { identifier[cms] operator[SEP] identifier[unlockResource] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsLockException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } } }
public Collection<Object> collectAll(InputStream inputStream, JsonPath... paths) { return collectAll(inputStream, Object.class, paths); }
class class_name[name] begin[{] method[collectAll, return_type[type[Collection]], modifier[public], parameter[inputStream, paths]] begin[{] return[call[.collectAll, parameter[member[.inputStream], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), member[.paths]]]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[collectAll] operator[SEP] identifier[InputStream] identifier[inputStream] , identifier[JsonPath] operator[...] identifier[paths] operator[SEP] { Keyword[return] identifier[collectAll] operator[SEP] identifier[inputStream] , identifier[Object] operator[SEP] Keyword[class] , identifier[paths] operator[SEP] operator[SEP] }
protected void validate(String operationType) throws Exception { super.validate(operationType); MPSString id_validator = new MPSString(); id_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true); id_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true); id_validator.validate(operationType, id, "\"id\""); MPSString sessionid_validator = new MPSString(); sessionid_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128); sessionid_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1); sessionid_validator.validate(operationType, sessionid, "\"sessionid\""); MPSString username_validator = new MPSString(); username_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[ a-zA-Z0-9_#.:@=-]+"); username_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128); username_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1); username_validator.validate(operationType, username, "\"username\""); MPSIPAddress ip_address_validator = new MPSIPAddress(); ip_address_validator.validate(operationType, ip_address, "\"ip_address\""); MPSInt port_validator = new MPSInt(); port_validator.validate(operationType, port, "\"port\""); MPSInt session_timeout_validator = new MPSInt(); session_timeout_validator.validate(operationType, session_timeout, "\"session_timeout\""); MPSInt login_time_validator = new MPSInt(); login_time_validator.validate(operationType, login_time, "\"login_time\""); MPSInt last_activity_time_validator = new MPSInt(); last_activity_time_validator.validate(operationType, last_activity_time, "\"last_activity_time\""); MPSInt expire_after_validator = new MPSInt(); expire_after_validator.validate(operationType, expire_after, "\"expire_after\""); MPSBoolean is_self_validator = new MPSBoolean(); is_self_validator.validate(operationType, is_self, "\"is_self\""); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[protected], parameter[operationType]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=operationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validate, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[MPSString], id_validator] call[id_validator.setConstraintIsReq, parameter[member[MPSConstants.DELETE_CONSTRAINT], literal[true]]] call[id_validator.setConstraintIsReq, parameter[member[MPSConstants.MODIFY_CONSTRAINT], literal[true]]] call[id_validator.validate, parameter[member[.operationType], member[.id], literal["\"id\""]]] local_variable[type[MPSString], sessionid_validator] call[sessionid_validator.setConstraintMaxStrLen, parameter[member[MPSConstants.GENERIC_CONSTRAINT], literal[128]]] call[sessionid_validator.setConstraintMinStrLen, parameter[member[MPSConstants.GENERIC_CONSTRAINT], literal[1]]] call[sessionid_validator.validate, parameter[member[.operationType], member[.sessionid], literal["\"sessionid\""]]] local_variable[type[MPSString], username_validator] call[username_validator.setConstraintCharSetRegEx, parameter[member[MPSConstants.GENERIC_CONSTRAINT], literal["[ a-zA-Z0-9_#.:@=-]+"]]] call[username_validator.setConstraintMaxStrLen, parameter[member[MPSConstants.GENERIC_CONSTRAINT], literal[128]]] call[username_validator.setConstraintMinStrLen, parameter[member[MPSConstants.GENERIC_CONSTRAINT], literal[1]]] call[username_validator.validate, parameter[member[.operationType], member[.username], literal["\"username\""]]] local_variable[type[MPSIPAddress], ip_address_validator] call[ip_address_validator.validate, parameter[member[.operationType], member[.ip_address], literal["\"ip_address\""]]] local_variable[type[MPSInt], port_validator] call[port_validator.validate, parameter[member[.operationType], member[.port], literal["\"port\""]]] local_variable[type[MPSInt], session_timeout_validator] call[session_timeout_validator.validate, parameter[member[.operationType], member[.session_timeout], literal["\"session_timeout\""]]] local_variable[type[MPSInt], login_time_validator] call[login_time_validator.validate, parameter[member[.operationType], member[.login_time], literal["\"login_time\""]]] local_variable[type[MPSInt], last_activity_time_validator] call[last_activity_time_validator.validate, parameter[member[.operationType], member[.last_activity_time], literal["\"last_activity_time\""]]] local_variable[type[MPSInt], expire_after_validator] call[expire_after_validator.validate, parameter[member[.operationType], member[.expire_after], literal["\"expire_after\""]]] local_variable[type[MPSBoolean], is_self_validator] call[is_self_validator.validate, parameter[member[.operationType], member[.is_self], literal["\"is_self\""]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[operationType] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] operator[SEP] operator[SEP] identifier[MPSString] identifier[id_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[id_validator] operator[SEP] identifier[setConstraintIsReq] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[DELETE_CONSTRAINT] , literal[boolean] operator[SEP] operator[SEP] identifier[id_validator] operator[SEP] identifier[setConstraintIsReq] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[MODIFY_CONSTRAINT] , literal[boolean] operator[SEP] operator[SEP] identifier[id_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[id] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[sessionid_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[sessionid_validator] operator[SEP] identifier[setConstraintMaxStrLen] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[GENERIC_CONSTRAINT] , Other[128] operator[SEP] operator[SEP] identifier[sessionid_validator] operator[SEP] identifier[setConstraintMinStrLen] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[GENERIC_CONSTRAINT] , Other[1] operator[SEP] operator[SEP] identifier[sessionid_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[sessionid] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[username_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[username_validator] operator[SEP] identifier[setConstraintCharSetRegEx] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[GENERIC_CONSTRAINT] , literal[String] operator[SEP] operator[SEP] identifier[username_validator] operator[SEP] identifier[setConstraintMaxStrLen] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[GENERIC_CONSTRAINT] , Other[128] operator[SEP] operator[SEP] identifier[username_validator] operator[SEP] identifier[setConstraintMinStrLen] operator[SEP] identifier[MPSConstants] operator[SEP] identifier[GENERIC_CONSTRAINT] , Other[1] operator[SEP] operator[SEP] identifier[username_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[username] , literal[String] operator[SEP] operator[SEP] identifier[MPSIPAddress] identifier[ip_address_validator] operator[=] Keyword[new] identifier[MPSIPAddress] operator[SEP] operator[SEP] operator[SEP] identifier[ip_address_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[ip_address] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[port_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[port_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[port] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[session_timeout_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[session_timeout_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[session_timeout] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[login_time_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[login_time_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[login_time] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[last_activity_time_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[last_activity_time_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[last_activity_time] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[expire_after_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[expire_after_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[expire_after] , literal[String] operator[SEP] operator[SEP] identifier[MPSBoolean] identifier[is_self_validator] operator[=] Keyword[new] identifier[MPSBoolean] operator[SEP] operator[SEP] operator[SEP] identifier[is_self_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[is_self] , literal[String] operator[SEP] operator[SEP] }
public void addListeners() { super.addListeners(); this.addMainKeyBehavior(); this.getMainRecord().getField(ClassInfo.CLASS_NAME).addListener(new MainFieldHandler(ClassInfo.CLASS_NAME_KEY)); this.getMainRecord().addListener(new EnableOnPhysicalHandler(null)); this.getMainRecord().getField(ClassInfo.CLASS_NAME).addListener(new MoveOnChangeHandler(this.getMainRecord().getField(ClassInfo.CLASS_SOURCE_FILE), this.getMainRecord().getField(ClassInfo.CLASS_NAME), false, true)); this.getMainRecord().addListener(new FileListener(null) { public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) || (iChangeType == DBConstants.AFTER_ADD_TYPE)) { Record classInfo = getMainRecord(); TaskScheduler js = BaseApplet.getSharedInstance().getApplication().getTaskScheduler(); String strJob = Utility.addURLParam(null, DBParams.PROCESS, ".app.program.manual.util.WriteClasses"); strJob = Utility.addURLParam(strJob, "fileName", classInfo.getField(ClassInfo.CLASS_SOURCE_FILE).toString()); strJob = Utility.addURLParam(strJob, "package", classInfo.getField(ClassInfo.CLASS_PACKAGE).toString()); strJob = Utility.addURLParam(strJob, "project", Converter.stripNonNumber(classInfo.getField(ClassInfo.CLASS_PROJECT_ID).toString())); strJob = Utility.addURLParam(strJob, DBParams.TASK, ProcessRunnerTask.class.getName()); // Screen class js.addTask(strJob); } return iErrorCode; }; }); DateChangedHandler dateChangedHandler = (DateChangedHandler)this.getMainRecord().getListener(DateChangedHandler.class); if (dateChangedHandler == null) this.getMainRecord().addListener(dateChangedHandler = new DateChangedHandler((DateTimeField)this.getMainRecord().getField(ClassInfo.LAST_CHANGED))); dateChangedHandler.setOnFieldChange(true); }
class class_name[name] begin[{] method[addListeners, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=addListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) THIS[call[None.addMainKeyBehavior, parameter[]]] THIS[call[None.getMainRecord, parameter[]]call[None.getField, parameter[member[ClassInfo.CLASS_NAME]]]call[None.addListener, parameter[ClassCreator(arguments=[MemberReference(member=CLASS_NAME_KEY, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MainFieldHandler, sub_type=None))]]] THIS[call[None.getMainRecord, parameter[]]call[None.addListener, parameter[ClassCreator(arguments=[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=EnableOnPhysicalHandler, sub_type=None))]]] THIS[call[None.getMainRecord, parameter[]]call[None.getField, parameter[member[ClassInfo.CLASS_NAME]]]call[None.addListener, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=CLASS_SOURCE_FILE, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), 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=MoveOnChangeHandler, sub_type=None))]]] THIS[call[None.getMainRecord, parameter[]]call[None.addListener, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=SuperMethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iChangeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doRecordChange, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), name=iErrorCode)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=iChangeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=AFTER_UPDATE_TYPE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=iChangeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=AFTER_ADD_TYPE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=classInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSharedInstance, postfix_operators=[], prefix_operators=[], qualifier=BaseApplet, selectors=[MethodInvocation(arguments=[], member=getApplication, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTaskScheduler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=js)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TaskScheduler, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=PROCESS, postfix_operators=[], prefix_operators=[], qualifier=DBParams, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".app.program.manual.util.WriteClasses")], member=addURLParam, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None), name=strJob)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fileName"), MethodInvocation(arguments=[MemberReference(member=CLASS_SOURCE_FILE, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=classInfo, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addURLParam, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="package"), MethodInvocation(arguments=[MemberReference(member=CLASS_PACKAGE, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=classInfo, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addURLParam, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="project"), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=CLASS_PROJECT_ID, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=classInfo, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=stripNonNumber, postfix_operators=[], prefix_operators=[], qualifier=Converter, selectors=[], type_arguments=None)], member=addURLParam, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TASK, postfix_operators=[], prefix_operators=[], qualifier=DBParams, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ProcessRunnerTask, sub_type=None))], member=addURLParam, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=strJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTask, postfix_operators=[], prefix_operators=[], qualifier=js, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=iErrorCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=doRecordChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=field, type=ReferenceType(arguments=None, dimensions=[], name=FieldInfo, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=iChangeType, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=bDisplayOption, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileListener, sub_type=None))]]] local_variable[type[DateChangedHandler], dateChangedHandler] if[binary_operation[member[.dateChangedHandler], ==, literal[null]]] begin[{] THIS[call[None.getMainRecord, parameter[]]call[None.addListener, parameter[assign[member[.dateChangedHandler], ClassCreator(arguments=[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LAST_CHANGED, postfix_operators=[], prefix_operators=[], qualifier=ClassInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=DateTimeField, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateChangedHandler, sub_type=None))]]]] else begin[{] None end[}] call[dateChangedHandler.setOnFieldChange, parameter[literal[true]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addListeners] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[addListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addMainKeyBehavior] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_NAME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[MainFieldHandler] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_NAME_KEY] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[EnableOnPhysicalHandler] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_NAME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[MoveOnChangeHandler] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_SOURCE_FILE] operator[SEP] , Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_NAME] operator[SEP] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[FileListener] operator[SEP] Other[null] operator[SEP] { Keyword[public] Keyword[int] identifier[doRecordChange] operator[SEP] identifier[FieldInfo] identifier[field] , Keyword[int] identifier[iChangeType] , Keyword[boolean] identifier[bDisplayOption] operator[SEP] { Keyword[int] identifier[iErrorCode] operator[=] Keyword[super] operator[SEP] identifier[doRecordChange] operator[SEP] identifier[field] , identifier[iChangeType] , identifier[bDisplayOption] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iChangeType] operator[==] identifier[DBConstants] operator[SEP] identifier[AFTER_UPDATE_TYPE] operator[SEP] operator[||] operator[SEP] identifier[iChangeType] operator[==] identifier[DBConstants] operator[SEP] identifier[AFTER_ADD_TYPE] operator[SEP] operator[SEP] { identifier[Record] identifier[classInfo] operator[=] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[TaskScheduler] identifier[js] operator[=] identifier[BaseApplet] operator[SEP] identifier[getSharedInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] identifier[getTaskScheduler] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strJob] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] Other[null] , identifier[DBParams] operator[SEP] identifier[PROCESS] , literal[String] operator[SEP] operator[SEP] identifier[strJob] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strJob] , literal[String] , identifier[classInfo] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_SOURCE_FILE] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[strJob] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strJob] , literal[String] , identifier[classInfo] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_PACKAGE] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[strJob] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strJob] , literal[String] , identifier[Converter] operator[SEP] identifier[stripNonNumber] operator[SEP] identifier[classInfo] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[CLASS_PROJECT_ID] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[strJob] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strJob] , identifier[DBParams] operator[SEP] identifier[TASK] , identifier[ProcessRunnerTask] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[js] operator[SEP] identifier[addTask] operator[SEP] identifier[strJob] operator[SEP] operator[SEP] } Keyword[return] identifier[iErrorCode] operator[SEP] } operator[SEP] } operator[SEP] operator[SEP] identifier[DateChangedHandler] identifier[dateChangedHandler] operator[=] operator[SEP] identifier[DateChangedHandler] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getListener] operator[SEP] identifier[DateChangedHandler] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dateChangedHandler] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] identifier[dateChangedHandler] operator[=] Keyword[new] identifier[DateChangedHandler] operator[SEP] operator[SEP] identifier[DateTimeField] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfo] operator[SEP] identifier[LAST_CHANGED] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dateChangedHandler] operator[SEP] identifier[setOnFieldChange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
protected boolean removeConnection( WebSocket ws ) { boolean removed = false; synchronized ( connections ) { if (this.connections.contains( ws )) { removed = this.connections.remove( ws ); } else { //Don't throw an assert error if the ws is not in the list. e.g. when the other endpoint did not send any handshake. see #512 log.trace("Removing connection which is not in the connections collection! Possible no handshake recieved! {}", ws); } } if( isclosed.get() && connections.isEmpty() ) { selectorthread.interrupt(); } return removed; }
class class_name[name] begin[{] method[removeConnection, return_type[type[boolean]], modifier[protected], parameter[ws]] begin[{] local_variable[type[boolean], removed] SYNCHRONIZED[member[.connections]] BEGIN[{] if[THIS[member[None.connections]call[None.contains, parameter[member[.ws]]]]] begin[{] assign[member[.removed], THIS[member[None.connections]call[None.remove, parameter[member[.ws]]]]] else begin[{] call[log.trace, parameter[literal["Removing connection which is not in the connections collection! Possible no handshake recieved! {}"], member[.ws]]] end[}] END[}] if[binary_operation[call[isclosed.get, parameter[]], &&, call[connections.isEmpty, parameter[]]]] begin[{] call[selectorthread.interrupt, parameter[]] else begin[{] None end[}] return[member[.removed]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[removeConnection] operator[SEP] identifier[WebSocket] identifier[ws] operator[SEP] { Keyword[boolean] identifier[removed] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[connections] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[connections] operator[SEP] identifier[contains] operator[SEP] identifier[ws] operator[SEP] operator[SEP] { identifier[removed] operator[=] Keyword[this] operator[SEP] identifier[connections] operator[SEP] identifier[remove] operator[SEP] identifier[ws] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[ws] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isclosed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[&&] identifier[connections] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[selectorthread] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[removed] operator[SEP] }
@Nullable public OAuthConnection parse(String email) { String domain = extractDomain(email); if (domain == null) { return null; } domain = domain.toLowerCase(); for (OAuthConnection c : connections) { String mainDomain = domainForConnection(c); if (domain.equalsIgnoreCase(mainDomain)) { return c; } List<String> aliases = c.valueForKey(DOMAIN_ALIASES_KEY, List.class); if (aliases != null) { for (String d : aliases) { if (d.equalsIgnoreCase(domain)) { return c; } } } } return null; }
class class_name[name] begin[{] method[parse, return_type[type[OAuthConnection]], modifier[public], parameter[email]] begin[{] local_variable[type[String], domain] if[binary_operation[member[.domain], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.domain], call[domain.toLowerCase, parameter[]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=domainForConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=mainDomain)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=mainDomain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=domain, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=DOMAIN_ALIASES_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=List, sub_type=None))], member=valueForKey, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), name=aliases)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aliases, 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=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=domain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=aliases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=connections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OAuthConnection, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] identifier[OAuthConnection] identifier[parse] operator[SEP] identifier[String] identifier[email] operator[SEP] { identifier[String] identifier[domain] operator[=] identifier[extractDomain] operator[SEP] identifier[email] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[domain] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[domain] operator[=] identifier[domain] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OAuthConnection] identifier[c] operator[:] identifier[connections] operator[SEP] { identifier[String] identifier[mainDomain] operator[=] identifier[domainForConnection] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[domain] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[mainDomain] operator[SEP] operator[SEP] { Keyword[return] identifier[c] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[aliases] operator[=] identifier[c] operator[SEP] identifier[valueForKey] operator[SEP] identifier[DOMAIN_ALIASES_KEY] , identifier[List] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aliases] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[d] operator[:] identifier[aliases] operator[SEP] { Keyword[if] operator[SEP] identifier[d] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[domain] operator[SEP] operator[SEP] { Keyword[return] identifier[c] operator[SEP] } } } } Keyword[return] Other[null] operator[SEP] }
private void dateFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_dateFocusLost String date = jTextField2.getText(); setDate(date); }
class class_name[name] begin[{] method[dateFocusLost, return_type[void], modifier[private], parameter[evt]] begin[{] local_variable[type[String], date] call[.setDate, parameter[member[.date]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[dateFocusLost] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusEvent] identifier[evt] operator[SEP] { identifier[String] identifier[date] operator[=] identifier[jTextField2] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[setDate] operator[SEP] identifier[date] operator[SEP] operator[SEP] }
public KeyRestoreParameters withKeyBundleBackup(byte[] keyBundleBackup) { if (keyBundleBackup == null) { this.keyBundleBackup = null; } else { this.keyBundleBackup = Base64Url.encode(keyBundleBackup); } return this; }
class class_name[name] begin[{] method[withKeyBundleBackup, return_type[type[KeyRestoreParameters]], modifier[public], parameter[keyBundleBackup]] begin[{] if[binary_operation[member[.keyBundleBackup], ==, literal[null]]] begin[{] assign[THIS[member[None.keyBundleBackup]], literal[null]] else begin[{] assign[THIS[member[None.keyBundleBackup]], call[Base64Url.encode, parameter[member[.keyBundleBackup]]]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[KeyRestoreParameters] identifier[withKeyBundleBackup] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[keyBundleBackup] operator[SEP] { Keyword[if] operator[SEP] identifier[keyBundleBackup] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[keyBundleBackup] operator[=] Other[null] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[keyBundleBackup] operator[=] identifier[Base64Url] operator[SEP] identifier[encode] operator[SEP] identifier[keyBundleBackup] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Nonnull public FineUploader5Request setEndpoint (@Nonnull final ISimpleURL aRequestEndpoint) { ValueEnforcer.notNull (aRequestEndpoint, "RequestEndpoint"); m_aRequestEndpoint = aRequestEndpoint; return this; }
class class_name[name] begin[{] method[setEndpoint, return_type[type[FineUploader5Request]], modifier[public], parameter[aRequestEndpoint]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aRequestEndpoint], literal["RequestEndpoint"]]] assign[member[.m_aRequestEndpoint], member[.aRequestEndpoint]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[FineUploader5Request] identifier[setEndpoint] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ISimpleURL] identifier[aRequestEndpoint] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aRequestEndpoint] , literal[String] operator[SEP] operator[SEP] identifier[m_aRequestEndpoint] operator[=] identifier[aRequestEndpoint] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void consumeUntilGreedy(Parser recognizer, IntervalSet follow, CSSLexerState.RecoveryMode mode, CSSLexerState ls) { consumeUntil(recognizer, follow, mode, ls); recognizer.getInputStream().consume(); }
class class_name[name] begin[{] method[consumeUntilGreedy, return_type[void], modifier[public], parameter[recognizer, follow, mode, ls]] begin[{] call[.consumeUntil, parameter[member[.recognizer], member[.follow], member[.mode], member[.ls]]] call[recognizer.getInputStream, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[consumeUntilGreedy] operator[SEP] identifier[Parser] identifier[recognizer] , identifier[IntervalSet] identifier[follow] , identifier[CSSLexerState] operator[SEP] identifier[RecoveryMode] identifier[mode] , identifier[CSSLexerState] identifier[ls] operator[SEP] { identifier[consumeUntil] operator[SEP] identifier[recognizer] , identifier[follow] , identifier[mode] , identifier[ls] operator[SEP] operator[SEP] identifier[recognizer] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] }
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { inventory_responses result = (inventory_responses) service.get_payload_formatter().string_to_resource(inventory_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS) service.clear_session(); throw new nitro_exception(result.message, result.errorcode, (base_response [])result.inventory_response_array); } inventory[] result_inventory = new inventory[result.inventory_response_array.length]; for(int i = 0; i < result.inventory_response_array.length; i++) { result_inventory[i] = result.inventory_response_array[i].inventory[0]; } return result_inventory; }
class class_name[name] begin[{] method[get_nitro_bulk_response, return_type[type[base_resource]], modifier[protected], parameter[service, response]] begin[{] local_variable[type[inventory_responses], result] if[binary_operation[member[result.errorcode], !=, literal[0]]] begin[{] if[binary_operation[member[result.errorcode], ==, member[.SESSION_NOT_EXISTS]]] begin[{] call[service.clear_session, parameter[]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), MemberReference(member=errorcode, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), Cast(expression=MemberReference(member=inventory_response_array, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=base_response, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=nitro_exception, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[inventory], result_inventory] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result_inventory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=inventory_response_array, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=inventory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), 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=result.inventory_response_array, 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_inventory]] end[}] END[}]
Keyword[protected] identifier[base_resource] operator[SEP] operator[SEP] identifier[get_nitro_bulk_response] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] { identifier[inventory_responses] identifier[result] operator[=] operator[SEP] identifier[inventory_responses] operator[SEP] identifier[service] operator[SEP] identifier[get_payload_formatter] operator[SEP] operator[SEP] operator[SEP] identifier[string_to_resource] operator[SEP] identifier[inventory_responses] operator[SEP] Keyword[class] , identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[errorcode] operator[!=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[errorcode] operator[==] identifier[SESSION_NOT_EXISTS] operator[SEP] identifier[service] operator[SEP] identifier[clear_session] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[nitro_exception] operator[SEP] identifier[result] operator[SEP] identifier[message] , identifier[result] operator[SEP] identifier[errorcode] , operator[SEP] identifier[base_response] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[inventory_response_array] operator[SEP] operator[SEP] } identifier[inventory] operator[SEP] operator[SEP] identifier[result_inventory] operator[=] Keyword[new] identifier[inventory] operator[SEP] identifier[result] operator[SEP] identifier[inventory_response_array] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[result] operator[SEP] identifier[inventory_response_array] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result_inventory] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[result] operator[SEP] identifier[inventory_response_array] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[inventory] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[result_inventory] operator[SEP] }
public static <T> T newInstance(String className, Site site) { return newInstance(className, null, site, site != null ? site.getConfig() : null); }
class class_name[name] begin[{] method[newInstance, return_type[type[T]], modifier[public static], parameter[className, site]] begin[{] return[call[.newInstance, parameter[member[.className], literal[null], member[.site], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=site, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[], member=getConfig, postfix_operators=[], prefix_operators=[], qualifier=site, selectors=[], type_arguments=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[newInstance] operator[SEP] identifier[String] identifier[className] , identifier[Site] identifier[site] operator[SEP] { Keyword[return] identifier[newInstance] operator[SEP] identifier[className] , Other[null] , identifier[site] , identifier[site] operator[!=] Other[null] operator[?] identifier[site] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] }
public static void assertTrueOrInvalidTypeForAnnotationMethodParameterException(boolean expression, Element classElement, ExecutableElement methodElement, VariableElement parameterElement, Class<? extends Annotation> annotationClazz) { if (!expression) { String msg = String.format("In method '%s.%s', parameter '%s' has an invalid type '%s' for @%s annotation", classElement.getSimpleName().toString(), methodElement.getSimpleName().toString(), parameterElement.getSimpleName().toString(), parameterElement.asType(), annotationClazz.getSimpleName()); throw (new InvalidTypeForAnnotationException(msg)); } }
class class_name[name] begin[{] method[assertTrueOrInvalidTypeForAnnotationMethodParameterException, return_type[void], modifier[public static], parameter[expression, classElement, methodElement, parameterElement, annotationClazz]] begin[{] if[member[.expression]] begin[{] local_variable[type[String], msg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidTypeForAnnotationException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertTrueOrInvalidTypeForAnnotationMethodParameterException] operator[SEP] Keyword[boolean] identifier[expression] , identifier[Element] identifier[classElement] , identifier[ExecutableElement] identifier[methodElement] , identifier[VariableElement] identifier[parameterElement] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotationClazz] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[expression] operator[SEP] { identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[classElement] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[methodElement] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[parameterElement] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[parameterElement] operator[SEP] identifier[asType] operator[SEP] operator[SEP] , identifier[annotationClazz] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] operator[SEP] Keyword[new] identifier[InvalidTypeForAnnotationException] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] } }
public<V> Future<V> submit(Callable<V> task) { Preconditions.checkState(isOpen.get(), "CloseableExecutorService is closed"); InternalFutureTask<V> futureTask = new InternalFutureTask<V>(new FutureTask<V>(task)); executorService.execute(futureTask); return futureTask; }
class class_name[name] begin[{] method[submit, return_type[type[Future]], modifier[public], parameter[task]] begin[{] call[Preconditions.checkState, parameter[call[isOpen.get, parameter[]], literal["CloseableExecutorService is closed"]]] local_variable[type[InternalFutureTask], futureTask] call[executorService.execute, parameter[member[.futureTask]]] return[member[.futureTask]] end[}] END[}]
Keyword[public] operator[<] identifier[V] operator[>] identifier[Future] operator[<] identifier[V] operator[>] identifier[submit] operator[SEP] identifier[Callable] operator[<] identifier[V] operator[>] identifier[task] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[isOpen] operator[SEP] identifier[get] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[InternalFutureTask] operator[<] identifier[V] operator[>] identifier[futureTask] operator[=] Keyword[new] identifier[InternalFutureTask] operator[<] identifier[V] operator[>] operator[SEP] Keyword[new] identifier[FutureTask] operator[<] identifier[V] operator[>] operator[SEP] identifier[task] operator[SEP] operator[SEP] operator[SEP] identifier[executorService] operator[SEP] identifier[execute] operator[SEP] identifier[futureTask] operator[SEP] operator[SEP] Keyword[return] identifier[futureTask] operator[SEP] }
public void marshall(Organization organization, ProtocolMarshaller protocolMarshaller) { if (organization == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(organization.getId(), ID_BINDING); protocolMarshaller.marshall(organization.getArn(), ARN_BINDING); protocolMarshaller.marshall(organization.getFeatureSet(), FEATURESET_BINDING); protocolMarshaller.marshall(organization.getMasterAccountArn(), MASTERACCOUNTARN_BINDING); protocolMarshaller.marshall(organization.getMasterAccountId(), MASTERACCOUNTID_BINDING); protocolMarshaller.marshall(organization.getMasterAccountEmail(), MASTERACCOUNTEMAIL_BINDING); protocolMarshaller.marshall(organization.getAvailablePolicyTypes(), AVAILABLEPOLICYTYPES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[organization, protocolMarshaller]] begin[{] if[binary_operation[member[.organization], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=ID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getArn, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=ARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFeatureSet, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=FEATURESET_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMasterAccountArn, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=MASTERACCOUNTARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMasterAccountId, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=MASTERACCOUNTID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMasterAccountEmail, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=MASTERACCOUNTEMAIL_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAvailablePolicyTypes, postfix_operators=[], prefix_operators=[], qualifier=organization, selectors=[], type_arguments=None), MemberReference(member=AVAILABLEPOLICYTYPES_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Organization] identifier[organization] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[organization] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[ID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getFeatureSet] operator[SEP] operator[SEP] , identifier[FEATURESET_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getMasterAccountArn] operator[SEP] operator[SEP] , identifier[MASTERACCOUNTARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getMasterAccountId] operator[SEP] operator[SEP] , identifier[MASTERACCOUNTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getMasterAccountEmail] operator[SEP] operator[SEP] , identifier[MASTERACCOUNTEMAIL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[organization] operator[SEP] identifier[getAvailablePolicyTypes] operator[SEP] operator[SEP] , identifier[AVAILABLEPOLICYTYPES_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private TerminalBindingCondition getTerminalBindingCondition( final int respCode, final AbstractBody respBody) { assertLocked(); if (isTermination(respBody)) { String str = respBody.getAttribute(Attributes.CONDITION); return TerminalBindingCondition.forString(str); } // Check for deprecated HTTP Error Conditions if (cmParams != null && cmParams.getVersion() == null) { return TerminalBindingCondition.forHTTPResponseCode(respCode); } return null; }
class class_name[name] begin[{] method[getTerminalBindingCondition, return_type[type[TerminalBindingCondition]], modifier[private], parameter[respCode, respBody]] begin[{] call[.assertLocked, parameter[]] if[call[.isTermination, parameter[member[.respBody]]]] begin[{] local_variable[type[String], str] return[call[TerminalBindingCondition.forString, parameter[member[.str]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.cmParams], !=, literal[null]], &&, binary_operation[call[cmParams.getVersion, parameter[]], ==, literal[null]]]] begin[{] return[call[TerminalBindingCondition.forHTTPResponseCode, parameter[member[.respCode]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[TerminalBindingCondition] identifier[getTerminalBindingCondition] operator[SEP] Keyword[final] Keyword[int] identifier[respCode] , Keyword[final] identifier[AbstractBody] identifier[respBody] operator[SEP] { identifier[assertLocked] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTermination] operator[SEP] identifier[respBody] operator[SEP] operator[SEP] { identifier[String] identifier[str] operator[=] identifier[respBody] operator[SEP] identifier[getAttribute] operator[SEP] identifier[Attributes] operator[SEP] identifier[CONDITION] operator[SEP] operator[SEP] Keyword[return] identifier[TerminalBindingCondition] operator[SEP] identifier[forString] operator[SEP] identifier[str] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cmParams] operator[!=] Other[null] operator[&&] identifier[cmParams] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[TerminalBindingCondition] operator[SEP] identifier[forHTTPResponseCode] operator[SEP] identifier[respCode] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private Set<String> doGetActiveProfiles() { synchronized (activeProfiles) { if (activeProfiles.isEmpty()) { String[] profiles = getProfilesFromSystemProperty(ACTIVE_PROFILES_PROPERTY_NAME); if (profiles != null) { setActiveProfiles(profiles); String[] activeProfiles = getActiveProfiles(); if (activeProfiles.length > 0) { log.info("Activating profiles [" + StringUtils.joinCommaDelimitedList(activeProfiles) + "]"); } } } return activeProfiles; } }
class class_name[name] begin[{] method[doGetActiveProfiles, return_type[type[Set]], modifier[private], parameter[]] begin[{] SYNCHRONIZED[member[.activeProfiles]] BEGIN[{] if[call[activeProfiles.isEmpty, parameter[]]] begin[{] local_variable[type[String], profiles] if[binary_operation[member[.profiles], !=, literal[null]]] begin[{] call[.setActiveProfiles, parameter[member[.profiles]]] local_variable[type[String], activeProfiles] if[binary_operation[member[activeProfiles.length], >, literal[0]]] begin[{] call[log.info, parameter[binary_operation[binary_operation[literal["Activating profiles ["], +, call[StringUtils.joinCommaDelimitedList, parameter[member[.activeProfiles]]]], +, literal["]"]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.activeProfiles]] END[}] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[doGetActiveProfiles] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[activeProfiles] operator[SEP] { Keyword[if] operator[SEP] identifier[activeProfiles] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[profiles] operator[=] identifier[getProfilesFromSystemProperty] operator[SEP] identifier[ACTIVE_PROFILES_PROPERTY_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[profiles] operator[!=] Other[null] operator[SEP] { identifier[setActiveProfiles] operator[SEP] identifier[profiles] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[activeProfiles] operator[=] identifier[getActiveProfiles] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[activeProfiles] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[joinCommaDelimitedList] operator[SEP] identifier[activeProfiles] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[activeProfiles] operator[SEP] } }
@Reference(name = KEY_DESTINATION_ADDRESS_FACTORY, service = SIDestinationAddressFactory.class) protected void setDestinationAddressFactory(ServiceReference<SIDestinationAddressFactory> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.entry(tc, "setDestinationAddressFactory", ref); destinationAddressFactoryRef.setReference(ref); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.exit(tc, "setDestinationAddressFactory"); }
class class_name[name] begin[{] method[setDestinationAddressFactory, return_type[void], modifier[protected], parameter[ref]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["setDestinationAddressFactory"], member[.ref]]] else begin[{] None end[}] call[destinationAddressFactoryRef.setReference, parameter[member[.ref]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["setDestinationAddressFactory"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Reference] operator[SEP] identifier[name] operator[=] identifier[KEY_DESTINATION_ADDRESS_FACTORY] , identifier[service] operator[=] identifier[SIDestinationAddressFactory] operator[SEP] Keyword[class] operator[SEP] Keyword[protected] Keyword[void] identifier[setDestinationAddressFactory] operator[SEP] identifier[ServiceReference] operator[<] identifier[SIDestinationAddressFactory] operator[>] identifier[ref] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[ref] operator[SEP] operator[SEP] identifier[destinationAddressFactoryRef] operator[SEP] identifier[setReference] operator[SEP] identifier[ref] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private void getInitialCroppingParameter( final String resourcePath, final I_CmsSimpleCallback<CmsCroppingParamBean> callback) { getImageInfo(resourcePath, new I_CmsSimpleCallback<CmsImageInfoBean>() { public void execute(CmsImageInfoBean imageInfo) { CmsImageFormatHandler formatHandler = new CmsImageFormatHandler( getGalleryMode(), getGalleryDialog(), resourcePath, imageInfo.getHeight(), imageInfo.getWidth()); CmsCroppingParamBean param = formatHandler.getCroppingParam(); if (formatHandler.isUseFormats()) { formatHandler.getFormats().values().iterator().next().adjustCroppingParam(param); } callback.execute(param); } }); }
class class_name[name] begin[{] method[getInitialCroppingParameter, return_type[void], modifier[private], parameter[resourcePath, callback]] begin[{] call[.getImageInfo, parameter[member[.resourcePath], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGalleryMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getGalleryDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=resourcePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=imageInfo, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=imageInfo, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsImageFormatHandler, sub_type=None)), name=formatHandler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsImageFormatHandler, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCroppingParam, postfix_operators=[], prefix_operators=[], qualifier=formatHandler, selectors=[], type_arguments=None), name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsCroppingParamBean, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isUseFormats, postfix_operators=[], prefix_operators=[], qualifier=formatHandler, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getFormats, postfix_operators=[], prefix_operators=[], qualifier=formatHandler, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=next, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=adjustCroppingParam, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[FormalParameter(annotations=[], modifiers=set(), name=imageInfo, type=ReferenceType(arguments=None, dimensions=[], name=CmsImageInfoBean, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmsImageInfoBean, sub_type=None))], dimensions=None, name=I_CmsSimpleCallback, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[getInitialCroppingParameter] operator[SEP] Keyword[final] identifier[String] identifier[resourcePath] , Keyword[final] identifier[I_CmsSimpleCallback] operator[<] identifier[CmsCroppingParamBean] operator[>] identifier[callback] operator[SEP] { identifier[getImageInfo] operator[SEP] identifier[resourcePath] , Keyword[new] identifier[I_CmsSimpleCallback] operator[<] identifier[CmsImageInfoBean] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[CmsImageInfoBean] identifier[imageInfo] operator[SEP] { identifier[CmsImageFormatHandler] identifier[formatHandler] operator[=] Keyword[new] identifier[CmsImageFormatHandler] operator[SEP] identifier[getGalleryMode] operator[SEP] operator[SEP] , identifier[getGalleryDialog] operator[SEP] operator[SEP] , identifier[resourcePath] , identifier[imageInfo] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , identifier[imageInfo] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CmsCroppingParamBean] identifier[param] operator[=] identifier[formatHandler] operator[SEP] identifier[getCroppingParam] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[formatHandler] operator[SEP] identifier[isUseFormats] operator[SEP] operator[SEP] operator[SEP] { identifier[formatHandler] operator[SEP] identifier[getFormats] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[adjustCroppingParam] operator[SEP] identifier[param] operator[SEP] operator[SEP] } identifier[callback] operator[SEP] identifier[execute] operator[SEP] identifier[param] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private static void clearOneAndTwoButtonClicked(ActionEvent e) { // Clear the date pickers. datePicker1.clear(); datePicker2.clear(); // Display message. String message = "The datePicker1 and datePicker2 dates were cleared!\n\n"; message += getDatePickerOneDateText() + "\n"; String date2String = datePicker2.getDateStringOrSuppliedString("(null)"); message += ("The datePicker2 date is currently set to: " + date2String + "."); panel.messageTextArea.setText(message); }
class class_name[name] begin[{] method[clearOneAndTwoButtonClicked, return_type[void], modifier[private static], parameter[e]] begin[{] call[datePicker1.clear, parameter[]] call[datePicker2.clear, parameter[]] local_variable[type[String], message] assign[member[.message], binary_operation[call[.getDatePickerOneDateText, parameter[]], +, literal["\n"]]] local_variable[type[String], date2String] assign[member[.message], binary_operation[binary_operation[literal["The datePicker2 date is currently set to: "], +, member[.date2String]], +, literal["."]]] call[panel.messageTextArea.setText, parameter[member[.message]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[clearOneAndTwoButtonClicked] operator[SEP] identifier[ActionEvent] identifier[e] operator[SEP] { identifier[datePicker1] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[datePicker2] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[message] operator[=] literal[String] operator[SEP] identifier[message] operator[+=] identifier[getDatePickerOneDateText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[String] identifier[date2String] operator[=] identifier[datePicker2] operator[SEP] identifier[getDateStringOrSuppliedString] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[message] operator[+=] operator[SEP] literal[String] operator[+] identifier[date2String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[messageTextArea] operator[SEP] identifier[setText] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
@Process(actionType = ModifyStandardRole.class) public void modifyStandardRole(final ModifyStandardRole action, final Channel channel) { Role role = action.getRole(); new Async<FunctionContext>().waterfall(new FunctionContext(), new ReloadOutcome(channel), new AccessControlFunctions.CheckAssignment(dispatcher, role), new AccessControlFunctions.AddAssignment(dispatcher, role, status -> status == 404), new AccessControlFunctions.ModifyIncludeAll(dispatcher, role)); }
class class_name[name] begin[{] method[modifyStandardRole, return_type[void], modifier[public], parameter[action, channel]] begin[{] local_variable[type[Role], role] ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FunctionContext, sub_type=None)), ClassCreator(arguments=[MemberReference(member=channel, 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=ReloadOutcome, sub_type=None)), ClassCreator(arguments=[MemberReference(member=dispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=role, 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=AccessControlFunctions, sub_type=ReferenceType(arguments=None, dimensions=None, name=CheckAssignment, sub_type=None))), ClassCreator(arguments=[MemberReference(member=dispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=role, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), LambdaExpression(body=BinaryOperation(operandl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=404), operator===), parameters=[MemberReference(member=status, 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=AccessControlFunctions, sub_type=ReferenceType(arguments=None, dimensions=None, name=AddAssignment, sub_type=None))), ClassCreator(arguments=[MemberReference(member=dispatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=role, 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=AccessControlFunctions, sub_type=ReferenceType(arguments=None, dimensions=None, name=ModifyIncludeAll, sub_type=None)))], member=waterfall, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FunctionContext, sub_type=None))], dimensions=None, name=Async, sub_type=None)) end[}] END[}]
annotation[@] identifier[Process] operator[SEP] identifier[actionType] operator[=] identifier[ModifyStandardRole] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[void] identifier[modifyStandardRole] operator[SEP] Keyword[final] identifier[ModifyStandardRole] identifier[action] , Keyword[final] identifier[Channel] identifier[channel] operator[SEP] { identifier[Role] identifier[role] operator[=] identifier[action] operator[SEP] identifier[getRole] operator[SEP] operator[SEP] operator[SEP] Keyword[new] identifier[Async] operator[<] identifier[FunctionContext] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[waterfall] operator[SEP] Keyword[new] identifier[FunctionContext] operator[SEP] operator[SEP] , Keyword[new] identifier[ReloadOutcome] operator[SEP] identifier[channel] operator[SEP] , Keyword[new] identifier[AccessControlFunctions] operator[SEP] identifier[CheckAssignment] operator[SEP] identifier[dispatcher] , identifier[role] operator[SEP] , Keyword[new] identifier[AccessControlFunctions] operator[SEP] identifier[AddAssignment] operator[SEP] identifier[dispatcher] , identifier[role] , identifier[status] operator[->] identifier[status] operator[==] Other[404] operator[SEP] , Keyword[new] identifier[AccessControlFunctions] operator[SEP] identifier[ModifyIncludeAll] operator[SEP] identifier[dispatcher] , identifier[role] operator[SEP] operator[SEP] operator[SEP] }
public byte[] unbind(int sequenceNumber) { PDUByteBuffer buf = new PDUByteBuffer(SMPPConstant.CID_UNBIND, 0, sequenceNumber); return buf.toBytes(); }
class class_name[name] begin[{] method[unbind, return_type[type[byte]], modifier[public], parameter[sequenceNumber]] begin[{] local_variable[type[PDUByteBuffer], buf] return[call[buf.toBytes, parameter[]]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[unbind] operator[SEP] Keyword[int] identifier[sequenceNumber] operator[SEP] { identifier[PDUByteBuffer] identifier[buf] operator[=] Keyword[new] identifier[PDUByteBuffer] operator[SEP] identifier[SMPPConstant] operator[SEP] identifier[CID_UNBIND] , Other[0] , identifier[sequenceNumber] operator[SEP] operator[SEP] Keyword[return] identifier[buf] operator[SEP] identifier[toBytes] operator[SEP] operator[SEP] operator[SEP] }
protected void restoreSubActionViewAfterAnimation(FloatingActionMenu.Item subActionItem, ActionType actionType) { ViewGroup.LayoutParams params = subActionItem.view.getLayoutParams(); subActionItem.view.setTranslationX(0); subActionItem.view.setTranslationY(0); subActionItem.view.setRotation(0); subActionItem.view.setScaleX(1); subActionItem.view.setScaleY(1); subActionItem.view.setAlpha(1); if(actionType == ActionType.OPENING) { FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params; if(menu.isSystemOverlay()) { WindowManager.LayoutParams overlayParams = (WindowManager.LayoutParams) menu.getOverlayContainer().getLayoutParams(); lp.setMargins(subActionItem.x - overlayParams.x, subActionItem.y - overlayParams.y, 0, 0); } else { lp.setMargins(subActionItem.x, subActionItem.y, 0, 0); } subActionItem.view.setLayoutParams(lp); } else if(actionType == ActionType.CLOSING) { Point center = menu.getActionViewCenter(); FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params; if(menu.isSystemOverlay()) { WindowManager.LayoutParams overlayParams = (WindowManager.LayoutParams) menu.getOverlayContainer().getLayoutParams(); lp.setMargins(center.x - overlayParams.x - subActionItem.width / 2, center.y - overlayParams.y - subActionItem.height / 2, 0, 0); } else { lp.setMargins(center.x - subActionItem.width / 2, center.y - subActionItem.height / 2, 0, 0); } subActionItem.view.setLayoutParams(lp); menu.removeViewFromCurrentContainer(subActionItem.view); if(menu.isSystemOverlay()) { // When all the views are removed from the overlay container, // we also need to detach it if (menu.getOverlayContainer().getChildCount() == 0) { menu.detachOverlayContainer(); } } } }
class class_name[name] begin[{] method[restoreSubActionViewAfterAnimation, return_type[void], modifier[protected], parameter[subActionItem, actionType]] begin[{] local_variable[type[ViewGroup], params] call[subActionItem.view.setTranslationX, parameter[literal[0]]] call[subActionItem.view.setTranslationY, parameter[literal[0]]] call[subActionItem.view.setRotation, parameter[literal[0]]] call[subActionItem.view.setScaleX, parameter[literal[1]]] call[subActionItem.view.setScaleY, parameter[literal[1]]] call[subActionItem.view.setAlpha, parameter[literal[1]]] if[binary_operation[member[.actionType], ==, member[ActionType.OPENING]]] begin[{] local_variable[type[FrameLayout], lp] if[call[menu.isSystemOverlay, parameter[]]] begin[{] local_variable[type[WindowManager], overlayParams] call[lp.setMargins, parameter[binary_operation[member[subActionItem.x], -, member[overlayParams.x]], binary_operation[member[subActionItem.y], -, member[overlayParams.y]], literal[0], literal[0]]] else begin[{] call[lp.setMargins, parameter[member[subActionItem.x], member[subActionItem.y], literal[0], literal[0]]] end[}] call[subActionItem.view.setLayoutParams, parameter[member[.lp]]] else begin[{] if[binary_operation[member[.actionType], ==, member[ActionType.CLOSING]]] begin[{] local_variable[type[Point], center] local_variable[type[FrameLayout], lp] if[call[menu.isSystemOverlay, parameter[]]] begin[{] local_variable[type[WindowManager], overlayParams] call[lp.setMargins, parameter[binary_operation[binary_operation[member[center.x], -, member[overlayParams.x]], -, binary_operation[member[subActionItem.width], /, literal[2]]], binary_operation[binary_operation[member[center.y], -, member[overlayParams.y]], -, binary_operation[member[subActionItem.height], /, literal[2]]], literal[0], literal[0]]] else begin[{] call[lp.setMargins, parameter[binary_operation[member[center.x], -, binary_operation[member[subActionItem.width], /, literal[2]]], binary_operation[member[center.y], -, binary_operation[member[subActionItem.height], /, literal[2]]], literal[0], literal[0]]] end[}] call[subActionItem.view.setLayoutParams, parameter[member[.lp]]] call[menu.removeViewFromCurrentContainer, parameter[member[subActionItem.view]]] if[call[menu.isSystemOverlay, parameter[]]] begin[{] if[binary_operation[call[menu.getOverlayContainer, parameter[]], ==, literal[0]]] begin[{] call[menu.detachOverlayContainer, parameter[]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[restoreSubActionViewAfterAnimation] operator[SEP] identifier[FloatingActionMenu] operator[SEP] identifier[Item] identifier[subActionItem] , identifier[ActionType] identifier[actionType] operator[SEP] { identifier[ViewGroup] operator[SEP] identifier[LayoutParams] identifier[params] operator[=] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setTranslationX] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setTranslationY] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setRotation] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setScaleX] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setScaleY] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setAlpha] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actionType] operator[==] identifier[ActionType] operator[SEP] identifier[OPENING] operator[SEP] { identifier[FrameLayout] operator[SEP] identifier[LayoutParams] identifier[lp] operator[=] operator[SEP] identifier[FrameLayout] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[params] operator[SEP] Keyword[if] operator[SEP] identifier[menu] operator[SEP] identifier[isSystemOverlay] operator[SEP] operator[SEP] operator[SEP] { identifier[WindowManager] operator[SEP] identifier[LayoutParams] identifier[overlayParams] operator[=] operator[SEP] identifier[WindowManager] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[menu] operator[SEP] identifier[getOverlayContainer] operator[SEP] operator[SEP] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] identifier[lp] operator[SEP] identifier[setMargins] operator[SEP] identifier[subActionItem] operator[SEP] identifier[x] operator[-] identifier[overlayParams] operator[SEP] identifier[x] , identifier[subActionItem] operator[SEP] identifier[y] operator[-] identifier[overlayParams] operator[SEP] identifier[y] , Other[0] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[lp] operator[SEP] identifier[setMargins] operator[SEP] identifier[subActionItem] operator[SEP] identifier[x] , identifier[subActionItem] operator[SEP] identifier[y] , Other[0] , Other[0] operator[SEP] operator[SEP] } identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setLayoutParams] operator[SEP] identifier[lp] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[actionType] operator[==] identifier[ActionType] operator[SEP] identifier[CLOSING] operator[SEP] { identifier[Point] identifier[center] operator[=] identifier[menu] operator[SEP] identifier[getActionViewCenter] operator[SEP] operator[SEP] operator[SEP] identifier[FrameLayout] operator[SEP] identifier[LayoutParams] identifier[lp] operator[=] operator[SEP] identifier[FrameLayout] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[params] operator[SEP] Keyword[if] operator[SEP] identifier[menu] operator[SEP] identifier[isSystemOverlay] operator[SEP] operator[SEP] operator[SEP] { identifier[WindowManager] operator[SEP] identifier[LayoutParams] identifier[overlayParams] operator[=] operator[SEP] identifier[WindowManager] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[menu] operator[SEP] identifier[getOverlayContainer] operator[SEP] operator[SEP] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] identifier[lp] operator[SEP] identifier[setMargins] operator[SEP] identifier[center] operator[SEP] identifier[x] operator[-] identifier[overlayParams] operator[SEP] identifier[x] operator[-] identifier[subActionItem] operator[SEP] identifier[width] operator[/] Other[2] , identifier[center] operator[SEP] identifier[y] operator[-] identifier[overlayParams] operator[SEP] identifier[y] operator[-] identifier[subActionItem] operator[SEP] identifier[height] operator[/] Other[2] , Other[0] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[lp] operator[SEP] identifier[setMargins] operator[SEP] identifier[center] operator[SEP] identifier[x] operator[-] identifier[subActionItem] operator[SEP] identifier[width] operator[/] Other[2] , identifier[center] operator[SEP] identifier[y] operator[-] identifier[subActionItem] operator[SEP] identifier[height] operator[/] Other[2] , Other[0] , Other[0] operator[SEP] operator[SEP] } identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] identifier[setLayoutParams] operator[SEP] identifier[lp] operator[SEP] operator[SEP] identifier[menu] operator[SEP] identifier[removeViewFromCurrentContainer] operator[SEP] identifier[subActionItem] operator[SEP] identifier[view] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[menu] operator[SEP] identifier[isSystemOverlay] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[menu] operator[SEP] identifier[getOverlayContainer] operator[SEP] operator[SEP] operator[SEP] identifier[getChildCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[menu] operator[SEP] identifier[detachOverlayContainer] operator[SEP] operator[SEP] operator[SEP] } } } }
protected void estimateCase1( double betas[] ) { betas[0] = matchScale(nullPts[0], controlWorldPts); betas[0] = adjustBetaSign(betas[0],nullPts[0]); betas[1] = 0; betas[2] = 0; betas[3] = 0; }
class class_name[name] begin[{] method[estimateCase1, return_type[void], modifier[protected], parameter[betas]] begin[{] assign[member[.betas], call[.matchScale, parameter[member[.nullPts], member[.controlWorldPts]]]] assign[member[.betas], call[.adjustBetaSign, parameter[member[.betas], member[.nullPts]]]] assign[member[.betas], literal[0]] assign[member[.betas], literal[0]] assign[member[.betas], literal[0]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[estimateCase1] operator[SEP] Keyword[double] identifier[betas] operator[SEP] operator[SEP] operator[SEP] { identifier[betas] operator[SEP] Other[0] operator[SEP] operator[=] identifier[matchScale] operator[SEP] identifier[nullPts] operator[SEP] Other[0] operator[SEP] , identifier[controlWorldPts] operator[SEP] operator[SEP] identifier[betas] operator[SEP] Other[0] operator[SEP] operator[=] identifier[adjustBetaSign] operator[SEP] identifier[betas] operator[SEP] Other[0] operator[SEP] , identifier[nullPts] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[betas] operator[SEP] Other[1] operator[SEP] operator[=] Other[0] operator[SEP] identifier[betas] operator[SEP] Other[2] operator[SEP] operator[=] Other[0] operator[SEP] identifier[betas] operator[SEP] Other[3] operator[SEP] operator[=] Other[0] operator[SEP] }
synchronized public void setEnabledProtocols(String[] protocols) { enabledProtocols = new ProtocolList(protocols); if ((handshaker != null) && !handshaker.activated()) { handshaker.setEnabledProtocols(enabledProtocols); } }
class class_name[name] begin[{] method[setEnabledProtocols, return_type[void], modifier[synchronized public], parameter[protocols]] begin[{] assign[member[.enabledProtocols], ClassCreator(arguments=[MemberReference(member=protocols, 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=ProtocolList, sub_type=None))] if[binary_operation[binary_operation[member[.handshaker], !=, literal[null]], &&, call[handshaker.activated, parameter[]]]] begin[{] call[handshaker.setEnabledProtocols, parameter[member[.enabledProtocols]]] else begin[{] None end[}] end[}] END[}]
Keyword[synchronized] Keyword[public] Keyword[void] identifier[setEnabledProtocols] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[protocols] operator[SEP] { identifier[enabledProtocols] operator[=] Keyword[new] identifier[ProtocolList] operator[SEP] identifier[protocols] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[handshaker] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[handshaker] operator[SEP] identifier[activated] operator[SEP] operator[SEP] operator[SEP] { identifier[handshaker] operator[SEP] identifier[setEnabledProtocols] operator[SEP] identifier[enabledProtocols] operator[SEP] operator[SEP] } }
public SearchParams between(final Date start, final Date end) { return this.creationGte(start).creationLte(end); }
class class_name[name] begin[{] method[between, return_type[type[SearchParams]], modifier[public], parameter[start, end]] begin[{] return[THIS[call[None.creationGte, parameter[member[.start]]]call[None.creationLte, parameter[member[.end]]]]] end[}] END[}]
Keyword[public] identifier[SearchParams] identifier[between] operator[SEP] Keyword[final] identifier[Date] identifier[start] , Keyword[final] identifier[Date] identifier[end] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[creationGte] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[creationLte] operator[SEP] identifier[end] operator[SEP] operator[SEP] }
@Indexable(type = IndexableType.REINDEX) @Override public CommerceAvailabilityEstimate addCommerceAvailabilityEstimate( CommerceAvailabilityEstimate commerceAvailabilityEstimate) { commerceAvailabilityEstimate.setNew(true); return commerceAvailabilityEstimatePersistence.update(commerceAvailabilityEstimate); }
class class_name[name] begin[{] method[addCommerceAvailabilityEstimate, return_type[type[CommerceAvailabilityEstimate]], modifier[public], parameter[commerceAvailabilityEstimate]] begin[{] call[commerceAvailabilityEstimate.setNew, parameter[literal[true]]] return[call[commerceAvailabilityEstimatePersistence.update, parameter[member[.commerceAvailabilityEstimate]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[REINDEX] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CommerceAvailabilityEstimate] identifier[addCommerceAvailabilityEstimate] operator[SEP] identifier[CommerceAvailabilityEstimate] identifier[commerceAvailabilityEstimate] operator[SEP] { identifier[commerceAvailabilityEstimate] operator[SEP] identifier[setNew] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[commerceAvailabilityEstimatePersistence] operator[SEP] identifier[update] operator[SEP] identifier[commerceAvailabilityEstimate] operator[SEP] operator[SEP] }
private double parseDouble() throws IOException { long b64 = read(); long b56 = read(); long b48 = read(); long b40 = read(); long b32 = read(); long b24 = read(); long b16 = read(); long b8 = read(); long bits = ((b64 << 56) + (b56 << 48) + (b48 << 40) + (b40 << 32) + (b32 << 24) + (b24 << 16) + (b16 << 8) + b8); return Double.longBitsToDouble(bits); }
class class_name[name] begin[{] method[parseDouble, return_type[type[double]], modifier[private], parameter[]] begin[{] local_variable[type[long], b64] local_variable[type[long], b56] local_variable[type[long], b48] local_variable[type[long], b40] local_variable[type[long], b32] local_variable[type[long], b24] local_variable[type[long], b16] local_variable[type[long], b8] local_variable[type[long], bits] return[call[Double.longBitsToDouble, parameter[member[.bits]]]] end[}] END[}]
Keyword[private] Keyword[double] identifier[parseDouble] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[b64] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b56] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b48] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b40] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b32] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b24] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b16] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b8] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[bits] operator[=] operator[SEP] operator[SEP] identifier[b64] operator[<<] Other[56] operator[SEP] operator[+] operator[SEP] identifier[b56] operator[<<] Other[48] operator[SEP] operator[+] operator[SEP] identifier[b48] operator[<<] Other[40] operator[SEP] operator[+] operator[SEP] identifier[b40] operator[<<] Other[32] operator[SEP] operator[+] operator[SEP] identifier[b32] operator[<<] Other[24] operator[SEP] operator[+] operator[SEP] identifier[b24] operator[<<] Other[16] operator[SEP] operator[+] operator[SEP] identifier[b16] operator[<<] Other[8] operator[SEP] operator[+] identifier[b8] operator[SEP] operator[SEP] Keyword[return] identifier[Double] operator[SEP] identifier[longBitsToDouble] operator[SEP] identifier[bits] operator[SEP] operator[SEP] }
private static String getString(Object value) { // The logic here is slightly icky, as getValue may or may not exist, // and must be called reflectively if it does exist if (!(value instanceof Enum)) { return value.toString(); } Method method = null; try { method = value.getClass().getMethod("getValue"); } catch (NoSuchMethodException e) { } catch (SecurityException e) { } if (method != null && method.getReturnType() != String.class) { method = null; } if (method == null) { // There was no appropriate getValue method, so rely on toString return value.toString(); } // An error at this point is unrecoverable, something is really wrong String answer = null; try { answer = (String) method.invoke(value); } catch (IllegalAccessException e) { throw new RuntimeException("The enum " + value.getClass().getName() + " was expected to have a public getValue method", e); } catch (IllegalArgumentException e) { throw new RuntimeException("The enum " + value.getClass().getName() + " was expected to have a public getValue method with no arguments", e); } catch (InvocationTargetException e) { throw new RuntimeException("The enum " + value.getClass().getName() + " getValue method threw an unexpectd exception", e); } return answer; }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[private static], parameter[value]] begin[{] if[binary_operation[member[.value], instanceof, type[Enum]]] begin[{] return[call[value.toString, parameter[]]] else begin[{] None end[}] local_variable[type[Method], method] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getValue")], member=getMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException'])), CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SecurityException']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[member[.method], !=, literal[null]], &&, binary_operation[call[method.getReturnType, parameter[]], !=, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] begin[{] assign[member[.method], literal[null]] else begin[{] None end[}] if[binary_operation[member[.method], ==, literal[null]]] begin[{] return[call[value.toString, parameter[]]] else begin[{] None end[}] local_variable[type[String], answer] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The enum "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=value, 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=" was expected to have a public getValue method"), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The enum "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=value, 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=" was expected to have a public getValue method with no arguments"), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The enum "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=value, 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=" getValue method threw an unexpectd exception"), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) return[member[.answer]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getString] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[value] Keyword[instanceof] identifier[Enum] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[Method] identifier[method] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[method] operator[=] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[e] operator[SEP] { } Keyword[if] operator[SEP] identifier[method] operator[!=] Other[null] operator[&&] identifier[method] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[!=] identifier[String] operator[SEP] Keyword[class] operator[SEP] { identifier[method] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[method] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[answer] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[answer] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[answer] operator[SEP] }
public static Timestamp fromMillis(long epochMilli) { long secs = floorDiv(epochMilli, MILLIS_PER_SECOND); int mos = (int) floorMod(epochMilli, MILLIS_PER_SECOND); return create(secs, (int) (mos * NANOS_PER_MILLI)); // Safe int * NANOS_PER_MILLI }
class class_name[name] begin[{] method[fromMillis, return_type[type[Timestamp]], modifier[public static], parameter[epochMilli]] begin[{] local_variable[type[long], secs] local_variable[type[int], mos] return[call[.create, parameter[member[.secs], Cast(expression=BinaryOperation(operandl=MemberReference(member=mos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NANOS_PER_MILLI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), type=BasicType(dimensions=[], name=int))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Timestamp] identifier[fromMillis] operator[SEP] Keyword[long] identifier[epochMilli] operator[SEP] { Keyword[long] identifier[secs] operator[=] identifier[floorDiv] operator[SEP] identifier[epochMilli] , identifier[MILLIS_PER_SECOND] operator[SEP] operator[SEP] Keyword[int] identifier[mos] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[floorMod] operator[SEP] identifier[epochMilli] , identifier[MILLIS_PER_SECOND] operator[SEP] operator[SEP] Keyword[return] identifier[create] operator[SEP] identifier[secs] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[mos] operator[*] identifier[NANOS_PER_MILLI] operator[SEP] operator[SEP] operator[SEP] }
@Override public ODocument getRecord() { if (rawElement == null) { // CREATE AT THE FLY final ODocument tmp = new ODocument(getClassName(label)).setTrackingChanges(false); tmp.field(OrientBaseGraph.CONNECTION_IN, vIn.getIdentity()); tmp.field(OrientBaseGraph.CONNECTION_OUT, vOut.getIdentity()); if (label != null && settings != null && !settings.isUseClassForEdgeLabel()) tmp.field(OrientEdge.LABEL_FIELD_NAME, label); return tmp; } return super.getRecord(); }
class class_name[name] begin[{] method[getRecord, return_type[type[ODocument]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.rawElement], ==, literal[null]]] begin[{] local_variable[type[ODocument], tmp] call[tmp.field, parameter[member[OrientBaseGraph.CONNECTION_IN], call[vIn.getIdentity, parameter[]]]] call[tmp.field, parameter[member[OrientBaseGraph.CONNECTION_OUT], call[vOut.getIdentity, parameter[]]]] if[binary_operation[binary_operation[binary_operation[member[.label], !=, literal[null]], &&, binary_operation[member[.settings], !=, literal[null]]], &&, call[settings.isUseClassForEdgeLabel, parameter[]]]] begin[{] call[tmp.field, parameter[member[OrientEdge.LABEL_FIELD_NAME], member[.label]]] else begin[{] None end[}] return[member[.tmp]] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[], member=getRecord, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ODocument] identifier[getRecord] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[rawElement] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[ODocument] identifier[tmp] operator[=] Keyword[new] identifier[ODocument] operator[SEP] identifier[getClassName] operator[SEP] identifier[label] operator[SEP] operator[SEP] operator[SEP] identifier[setTrackingChanges] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[field] operator[SEP] identifier[OrientBaseGraph] operator[SEP] identifier[CONNECTION_IN] , identifier[vIn] operator[SEP] identifier[getIdentity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[field] operator[SEP] identifier[OrientBaseGraph] operator[SEP] identifier[CONNECTION_OUT] , identifier[vOut] operator[SEP] identifier[getIdentity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[&&] identifier[settings] operator[!=] Other[null] operator[&&] operator[!] identifier[settings] operator[SEP] identifier[isUseClassForEdgeLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[field] operator[SEP] identifier[OrientEdge] operator[SEP] identifier[LABEL_FIELD_NAME] , identifier[label] operator[SEP] operator[SEP] Keyword[return] identifier[tmp] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] }
@NotNull public OptionalInt mapToInt(@NotNull ToIntFunction<? super T> mapper) { if (!isPresent()) return OptionalInt.empty(); return OptionalInt.of(mapper.applyAsInt(value)); }
class class_name[name] begin[{] method[mapToInt, return_type[type[OptionalInt]], modifier[public], parameter[mapper]] begin[{] if[call[.isPresent, parameter[]]] begin[{] return[call[OptionalInt.empty, parameter[]]] else begin[{] None end[}] return[call[OptionalInt.of, parameter[call[mapper.applyAsInt, parameter[member[.value]]]]]] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] identifier[OptionalInt] identifier[mapToInt] operator[SEP] annotation[@] identifier[NotNull] identifier[ToIntFunction] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[mapper] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[OptionalInt] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[OptionalInt] operator[SEP] identifier[of] operator[SEP] identifier[mapper] operator[SEP] identifier[applyAsInt] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public Object next() { int iOldKeyOrder = m_recFieldData.getDefaultOrder(); try { if (m_bFirstTime) this.scanSharedFields(); if (m_iCurrentIndex >= m_vFieldList.size()) return null; // EOF FieldSummary fieldSummary = (FieldSummary)m_vFieldList.elementAt(m_iCurrentIndex); m_iCurrentIndex++; m_recFieldData.setKeyArea(FieldData.ID_KEY); m_recFieldData.addNew(); m_recFieldData.getField(FieldData.kID).setData(fieldSummary.m_objID); if (!m_recFieldData.seek(null)) return null; // Never if (fieldSummary.m_strNewBaseField != null) m_recFieldData.getField(FieldData.BASE_FIELD_NAME).setString(fieldSummary.m_strNewBaseField); if (fieldSummary.m_strNewFieldClass == UNUSED) { m_recFieldData.getField(FieldData.FIELD_CLASS).setString(fieldSummary.m_strNewFieldClass); m_recFieldData.getField(FieldData.DEFAULT_VALUE).setString(DBConstants.BLANK); m_recFieldData.getField(FieldData.INITIAL_VALUE).setString(DBConstants.BLANK); } else if (this.inBaseField(fieldSummary.m_strFieldFileName, m_rgstrClasses)) { // This field is in a base record class, so fake the record to think it just overrides the field m_recFieldData.addNew(); m_recFieldData.getField(FieldData.BASE_FIELD_NAME).setString(fieldSummary.m_strFieldName); m_recFieldData.getField(FieldData.FIELD_NAME).setString(fieldSummary.m_strFieldName); m_recFieldData.getField(FieldData.FIELD_FILE_NAME).setString(m_rgstrClasses[m_rgstrClasses.length-1]); } m_recFieldData.getField(FieldData.INCLUDE_SCOPE).setValue(fieldSummary.m_iIncludeScope); return m_recFieldData; // This is the next field data record } catch (DBException ex) { ex.printStackTrace(); return null; } finally { m_recFieldData.setKeyArea(iOldKeyOrder); } }
class class_name[name] begin[{] method[next, return_type[type[Object]], modifier[public], parameter[]] begin[{] local_variable[type[int], iOldKeyOrder] TryStatement(block=[IfStatement(condition=MemberReference(member=m_bFirstTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=scanSharedFields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_iCurrentIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=m_vFieldList, selectors=[], type_arguments=None), operator=>=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=m_iCurrentIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=elementAt, postfix_operators=[], prefix_operators=[], qualifier=m_vFieldList, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldSummary, sub_type=None)), name=fieldSummary)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldSummary, sub_type=None)), StatementExpression(expression=MemberReference(member=m_iCurrentIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ID_KEY, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=setKeyArea, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=addNew, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kID, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_objID, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=seek, postfix_operators=[], prefix_operators=['!'], qualifier=m_recFieldData, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_strNewBaseField, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, 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=BASE_FIELD_NAME, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_strNewBaseField, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_strNewFieldClass, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[]), operandr=MemberReference(member=UNUSED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=m_strFieldFileName, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[]), MemberReference(member=m_rgstrClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inBaseField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=addNew, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=BASE_FIELD_NAME, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_strFieldName, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIELD_NAME, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_strFieldName, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIELD_FILE_NAME, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_rgstrClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m_rgstrClasses, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=setString, 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=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIELD_CLASS, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_strNewFieldClass, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DEFAULT_VALUE, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=BLANK, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=INITIAL_VALUE, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=BLANK, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=setString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=INCLUDE_SCOPE, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[MethodInvocation(arguments=[MemberReference(member=m_iIncludeScope, postfix_operators=[], prefix_operators=[], qualifier=fieldSummary, selectors=[])], member=setValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=m_recFieldData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=iOldKeyOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setKeyArea, postfix_operators=[], prefix_operators=[], qualifier=m_recFieldData, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[next] operator[SEP] operator[SEP] { Keyword[int] identifier[iOldKeyOrder] operator[=] identifier[m_recFieldData] operator[SEP] identifier[getDefaultOrder] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[m_bFirstTime] operator[SEP] Keyword[this] operator[SEP] identifier[scanSharedFields] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_iCurrentIndex] operator[>=] identifier[m_vFieldList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[FieldSummary] identifier[fieldSummary] operator[=] operator[SEP] identifier[FieldSummary] operator[SEP] identifier[m_vFieldList] operator[SEP] identifier[elementAt] operator[SEP] identifier[m_iCurrentIndex] operator[SEP] operator[SEP] identifier[m_iCurrentIndex] operator[++] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[setKeyArea] operator[SEP] identifier[FieldData] operator[SEP] identifier[ID_KEY] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[kID] operator[SEP] operator[SEP] identifier[setData] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_objID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[m_recFieldData] operator[SEP] identifier[seek] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strNewBaseField] operator[!=] Other[null] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[BASE_FIELD_NAME] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strNewBaseField] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strNewFieldClass] operator[==] identifier[UNUSED] operator[SEP] { identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_CLASS] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strNewFieldClass] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[DEFAULT_VALUE] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[DBConstants] operator[SEP] identifier[BLANK] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[INITIAL_VALUE] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[DBConstants] operator[SEP] identifier[BLANK] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[inBaseField] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strFieldFileName] , identifier[m_rgstrClasses] operator[SEP] operator[SEP] { identifier[m_recFieldData] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[BASE_FIELD_NAME] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strFieldName] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_NAME] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_strFieldName] operator[SEP] operator[SEP] identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_FILE_NAME] operator[SEP] operator[SEP] identifier[setString] operator[SEP] identifier[m_rgstrClasses] operator[SEP] identifier[m_rgstrClasses] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } identifier[m_recFieldData] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[INCLUDE_SCOPE] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] identifier[fieldSummary] operator[SEP] identifier[m_iIncludeScope] operator[SEP] operator[SEP] Keyword[return] identifier[m_recFieldData] operator[SEP] } Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[finally] { identifier[m_recFieldData] operator[SEP] identifier[setKeyArea] operator[SEP] identifier[iOldKeyOrder] operator[SEP] operator[SEP] } }
public String createContainingBase64Value(String basename, String key) { String file; Object value = value(key); if (value == null) { throw new SlimFixtureException(false, "No value for key: " + key); } else if (value instanceof String) { file = createFileFromBase64(basename, (String) value); } else { throw new SlimFixtureException(false, "Value for key: " + key + " is not a String, but: " + value); } return file; }
class class_name[name] begin[{] method[createContainingBase64Value, return_type[type[String]], modifier[public], parameter[basename, key]] begin[{] local_variable[type[String], file] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No value for key: "), operandr=MemberReference(member=key, 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=SlimFixtureException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.file], call[.createFileFromBase64, parameter[member[.basename], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Value for key: "), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not a String, but: "), operator=+), operandr=MemberReference(member=value, 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=SlimFixtureException, sub_type=None)), label=None) end[}] end[}] return[member[.file]] end[}] END[}]
Keyword[public] identifier[String] identifier[createContainingBase64Value] operator[SEP] identifier[String] identifier[basename] , identifier[String] identifier[key] operator[SEP] { identifier[String] identifier[file] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[value] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SlimFixtureException] operator[SEP] literal[boolean] , literal[String] operator[+] identifier[key] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[file] operator[=] identifier[createFileFromBase64] operator[SEP] identifier[basename] , operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[SlimFixtureException] operator[SEP] literal[boolean] , literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[file] operator[SEP] }
public static List<weka.core.Attribute> buildAttributes(DataDictionary dataDict) { ImmutableList.Builder<weka.core.Attribute> attribuesBuilder = ImmutableList.builder(); for (DataField dataField : dataDict.getDataFields()) { attribuesBuilder.add(buildAttribute(dataField)); } return attribuesBuilder.build(); }
class class_name[name] begin[{] method[buildAttributes, return_type[type[List]], modifier[public static], parameter[dataDict]] begin[{] local_variable[type[ImmutableList], attribuesBuilder] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dataField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=buildAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=attribuesBuilder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDataFields, postfix_operators=[], prefix_operators=[], qualifier=dataDict, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dataField)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DataField, sub_type=None))), label=None) return[call[attribuesBuilder.build, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[weka] operator[SEP] identifier[core] operator[SEP] identifier[Attribute] operator[>] identifier[buildAttributes] operator[SEP] identifier[DataDictionary] identifier[dataDict] operator[SEP] { identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[weka] operator[SEP] identifier[core] operator[SEP] identifier[Attribute] operator[>] identifier[attribuesBuilder] operator[=] identifier[ImmutableList] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DataField] identifier[dataField] operator[:] identifier[dataDict] operator[SEP] identifier[getDataFields] operator[SEP] operator[SEP] operator[SEP] { identifier[attribuesBuilder] operator[SEP] identifier[add] operator[SEP] identifier[buildAttribute] operator[SEP] identifier[dataField] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[attribuesBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
private void printDetailBandForEmptyData() throws QueryException { printRowsForEmptyData = true; printBand(null, null, false); printRowsForEmptyData = false; }
class class_name[name] begin[{] method[printDetailBandForEmptyData, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.printRowsForEmptyData], literal[true]] call[.printBand, parameter[literal[null], literal[null], literal[false]]] assign[member[.printRowsForEmptyData], literal[false]] end[}] END[}]
Keyword[private] Keyword[void] identifier[printDetailBandForEmptyData] operator[SEP] operator[SEP] Keyword[throws] identifier[QueryException] { identifier[printRowsForEmptyData] operator[=] literal[boolean] operator[SEP] identifier[printBand] operator[SEP] Other[null] , Other[null] , literal[boolean] operator[SEP] operator[SEP] identifier[printRowsForEmptyData] operator[=] literal[boolean] operator[SEP] }
public ResponseBuilder addDirective(Directive directive) { if (directiveList == null) { directiveList = new ArrayList<>(); } directiveList.add(directive); return this; }
class class_name[name] begin[{] method[addDirective, return_type[type[ResponseBuilder]], modifier[public], parameter[directive]] begin[{] if[binary_operation[member[.directiveList], ==, literal[null]]] begin[{] assign[member[.directiveList], 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[}] call[directiveList.add, parameter[member[.directive]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ResponseBuilder] identifier[addDirective] operator[SEP] identifier[Directive] identifier[directive] operator[SEP] { Keyword[if] operator[SEP] identifier[directiveList] operator[==] Other[null] operator[SEP] { identifier[directiveList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[directiveList] operator[SEP] identifier[add] operator[SEP] identifier[directive] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void serialize(Callback value, JsonGenerator jgen, SerializerProvider provider) throws IOException { if (StringUtils.isBlank(value.getRef())) { jgen.writeStartObject(); for (Entry<String, PathItem> entry : value.entrySet()) { jgen.writeObjectField(entry.getKey(), entry.getValue()); } jgen.writeEndObject(); } else { jgen.writeStartObject(); jgen.writeStringField("$ref", value.getRef()); jgen.writeEndObject(); } }
class class_name[name] begin[{] method[serialize, return_type[void], modifier[public], parameter[value, jgen, provider]] begin[{] if[call[StringUtils.isBlank, parameter[call[value.getRef, parameter[]]]]] begin[{] call[jgen.writeStartObject, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=writeObjectField, postfix_operators=[], prefix_operators=[], qualifier=jgen, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], 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=PathItem, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) call[jgen.writeEndObject, parameter[]] else begin[{] call[jgen.writeStartObject, parameter[]] call[jgen.writeStringField, parameter[literal["$ref"], call[value.getRef, parameter[]]]] call[jgen.writeEndObject, parameter[]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serialize] operator[SEP] identifier[Callback] identifier[value] , identifier[JsonGenerator] identifier[jgen] , identifier[SerializerProvider] identifier[provider] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[value] operator[SEP] identifier[getRef] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[jgen] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[PathItem] operator[>] identifier[entry] operator[:] identifier[value] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[jgen] operator[SEP] identifier[writeObjectField] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[jgen] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[jgen] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] identifier[jgen] operator[SEP] identifier[writeStringField] operator[SEP] literal[String] , identifier[value] operator[SEP] identifier[getRef] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jgen] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] } }
@Indexable(type = IndexableType.DELETE) @Override public CPDefinitionVirtualSetting deleteCPDefinitionVirtualSetting( long CPDefinitionVirtualSettingId) throws PortalException { return cpDefinitionVirtualSettingPersistence.remove(CPDefinitionVirtualSettingId); }
class class_name[name] begin[{] method[deleteCPDefinitionVirtualSetting, return_type[type[CPDefinitionVirtualSetting]], modifier[public], parameter[CPDefinitionVirtualSettingId]] begin[{] return[call[cpDefinitionVirtualSettingPersistence.remove, parameter[member[.CPDefinitionVirtualSettingId]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionVirtualSetting] identifier[deleteCPDefinitionVirtualSetting] operator[SEP] Keyword[long] identifier[CPDefinitionVirtualSettingId] operator[SEP] Keyword[throws] identifier[PortalException] { Keyword[return] identifier[cpDefinitionVirtualSettingPersistence] operator[SEP] identifier[remove] operator[SEP] identifier[CPDefinitionVirtualSettingId] operator[SEP] operator[SEP] }
public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE(String billingAccount, String serviceName, Long dialplanId) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}"; StringBuilder sb = path(qPath, billingAccount, serviceName, dialplanId); exec(qPath, "DELETE", sb.toString(), null); }
class class_name[name] begin[{] method[billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE, return_type[void], modifier[public], parameter[billingAccount, serviceName, dialplanId]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] call[.exec, parameter[member[.qPath], literal["DELETE"], call[sb.toString, parameter[]], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[Long] identifier[dialplanId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[billingAccount] , identifier[serviceName] , identifier[dialplanId] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] }
private void fireOnClosed(ChannelEvent e) { if (readyState == ReadyState.CLOSED) { // If the channel has been closed, then we should not fire events. return; } readyState = ReadyState.CLOSED; List<EventListener> listeners = changes.getListenerList(AMQP); for (EventListener listener : listeners) { ChannelListener amqpListener = (ChannelListener)listener; amqpListener.onClose(e); } }
class class_name[name] begin[{] method[fireOnClosed, return_type[void], modifier[private], parameter[e]] begin[{] if[binary_operation[member[.readyState], ==, member[ReadyState.CLOSED]]] begin[{] return[None] else begin[{] None end[}] assign[member[.readyState], member[ReadyState.CLOSED]] local_variable[type[List], listeners] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ChannelListener, sub_type=None)), name=amqpListener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChannelListener, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onClose, postfix_operators=[], prefix_operators=[], qualifier=amqpListener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EventListener, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[fireOnClosed] operator[SEP] identifier[ChannelEvent] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[readyState] operator[==] identifier[ReadyState] operator[SEP] identifier[CLOSED] operator[SEP] { Keyword[return] operator[SEP] } identifier[readyState] operator[=] identifier[ReadyState] operator[SEP] identifier[CLOSED] operator[SEP] identifier[List] operator[<] identifier[EventListener] operator[>] identifier[listeners] operator[=] identifier[changes] operator[SEP] identifier[getListenerList] operator[SEP] identifier[AMQP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EventListener] identifier[listener] operator[:] identifier[listeners] operator[SEP] { identifier[ChannelListener] identifier[amqpListener] operator[=] operator[SEP] identifier[ChannelListener] operator[SEP] identifier[listener] operator[SEP] identifier[amqpListener] operator[SEP] identifier[onClose] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public synchronized boolean setPools(Collection<HostConnectionPool<CL>> newPools) { Set<HostConnectionPool<CL>> toRemove = Sets.newHashSet(this.pools); // Add new pools not previously seen boolean didChange = false; for (HostConnectionPool<CL> pool : newPools) { if (this.pools.add(pool)) didChange = true; toRemove.remove(pool); } // Remove pools for hosts that no longer exist for (HostConnectionPool<CL> pool : toRemove) { if (this.pools.remove(pool)) didChange = true; } if (didChange) refresh(); return didChange; }
class class_name[name] begin[{] method[setPools, return_type[type[boolean]], modifier[synchronized public], parameter[newPools]] begin[{] local_variable[type[Set], toRemove] local_variable[type[boolean], didChange] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pools, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=didChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=toRemove, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=newPools, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pool)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CL, sub_type=None))], dimensions=[], name=HostConnectionPool, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pools, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=didChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=toRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pool)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CL, sub_type=None))], dimensions=[], name=HostConnectionPool, sub_type=None))), label=None) if[member[.didChange]] begin[{] call[.refresh, parameter[]] else begin[{] None end[}] return[member[.didChange]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[setPools] operator[SEP] identifier[Collection] operator[<] identifier[HostConnectionPool] operator[<] identifier[CL] operator[>] operator[>] identifier[newPools] operator[SEP] { identifier[Set] operator[<] identifier[HostConnectionPool] operator[<] identifier[CL] operator[>] operator[>] identifier[toRemove] operator[=] identifier[Sets] operator[SEP] identifier[newHashSet] operator[SEP] Keyword[this] operator[SEP] identifier[pools] operator[SEP] operator[SEP] Keyword[boolean] identifier[didChange] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[HostConnectionPool] operator[<] identifier[CL] operator[>] identifier[pool] operator[:] identifier[newPools] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pools] operator[SEP] identifier[add] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[didChange] operator[=] literal[boolean] operator[SEP] identifier[toRemove] operator[SEP] identifier[remove] operator[SEP] identifier[pool] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[HostConnectionPool] operator[<] identifier[CL] operator[>] identifier[pool] operator[:] identifier[toRemove] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pools] operator[SEP] identifier[remove] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[didChange] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[didChange] operator[SEP] identifier[refresh] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[didChange] operator[SEP] }
@Override public void destroy() { try { super.destroy(); } finally { if (myOwnJdbcHelper && defaultJdbcHelper != null && defaultJdbcHelper instanceof AbstractJdbcHelper) { try { ((AbstractJdbcHelper) defaultJdbcHelper).destroy(); } catch (Exception e) { LOGGER.warn(e.getMessage(), e); } finally { defaultJdbcHelper = null; } } } }
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=SuperMethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=myOwnJdbcHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=defaultJdbcHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=defaultJdbcHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AbstractJdbcHelper, sub_type=None), operator=instanceof), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Cast(expression=MemberReference(member=defaultJdbcHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractJdbcHelper, sub_type=None)), label=None)], catches=[CatchClause(block=[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=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=defaultJdbcHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, resources=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { Keyword[try] { Keyword[super] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[myOwnJdbcHelper] operator[&&] identifier[defaultJdbcHelper] operator[!=] Other[null] operator[&&] identifier[defaultJdbcHelper] Keyword[instanceof] identifier[AbstractJdbcHelper] operator[SEP] { Keyword[try] { operator[SEP] operator[SEP] identifier[AbstractJdbcHelper] operator[SEP] identifier[defaultJdbcHelper] operator[SEP] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[defaultJdbcHelper] operator[=] Other[null] operator[SEP] } } } }
public List<SiteNode> getNodesInContextFromSiteTree() { List<SiteNode> nodes = new LinkedList<>(); SiteNode rootNode = session.getSiteTree().getRoot(); fillNodesInContext(rootNode, nodes); return nodes; }
class class_name[name] begin[{] method[getNodesInContextFromSiteTree, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], nodes] local_variable[type[SiteNode], rootNode] call[.fillNodesInContext, parameter[member[.rootNode], member[.nodes]]] return[member[.nodes]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[SiteNode] operator[>] identifier[getNodesInContextFromSiteTree] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[SiteNode] operator[>] identifier[nodes] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[SiteNode] identifier[rootNode] operator[=] identifier[session] operator[SEP] identifier[getSiteTree] operator[SEP] operator[SEP] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] operator[SEP] identifier[fillNodesInContext] operator[SEP] identifier[rootNode] , identifier[nodes] operator[SEP] operator[SEP] Keyword[return] identifier[nodes] operator[SEP] }
public static base_response delete(nitro_service client, application resource) throws Exception { application deleteresource = new application(); deleteresource.appname = resource.appname; return deleteresource.delete_resource(client); }
class class_name[name] begin[{] method[delete, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[application], deleteresource] assign[member[deleteresource.appname], member[resource.appname]] return[call[deleteresource.delete_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[application] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[application] identifier[deleteresource] operator[=] Keyword[new] identifier[application] operator[SEP] operator[SEP] operator[SEP] identifier[deleteresource] operator[SEP] identifier[appname] operator[=] identifier[resource] operator[SEP] identifier[appname] operator[SEP] Keyword[return] identifier[deleteresource] operator[SEP] identifier[delete_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
public static Measurement first(final Iterable<Measurement> ms, final String k, final String v) { return first(ms, value -> v.equals(getTagValue(value.id(), k))); }
class class_name[name] begin[{] method[first, return_type[type[Measurement]], modifier[public static], parameter[ms, k, v]] begin[{] return[call[.first, parameter[member[.ms], LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=id, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTagValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), parameters=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Measurement] identifier[first] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[Measurement] operator[>] identifier[ms] , Keyword[final] identifier[String] identifier[k] , Keyword[final] identifier[String] identifier[v] operator[SEP] { Keyword[return] identifier[first] operator[SEP] identifier[ms] , identifier[value] operator[->] identifier[v] operator[SEP] identifier[equals] operator[SEP] identifier[getTagValue] operator[SEP] identifier[value] operator[SEP] identifier[id] operator[SEP] operator[SEP] , identifier[k] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C straightJoin() { return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN); }
class class_name[name] begin[{] method[straightJoin, return_type[type[C]], modifier[public], parameter[]] begin[{] return[call[.addFlag, parameter[member[Position.AFTER_SELECT], member[.STRAIGHT_JOIN]]]] end[}] END[}]
annotation[@] identifier[WithBridgeMethods] operator[SEP] identifier[value] operator[=] identifier[MySQLQuery] operator[SEP] Keyword[class] , identifier[castRequired] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[C] identifier[straightJoin] operator[SEP] operator[SEP] { Keyword[return] identifier[addFlag] operator[SEP] identifier[Position] operator[SEP] identifier[AFTER_SELECT] , identifier[STRAIGHT_JOIN] operator[SEP] operator[SEP] }
public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) { return new DummyFuture<>(handler.getChampion(id, champData, version, locale)); }
class class_name[name] begin[{] method[getChampion, return_type[type[Future]], modifier[public], parameter[id, champData, version, locale]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=champData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChampion, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=DummyFuture, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Future] operator[<] identifier[Champion] operator[>] identifier[getChampion] operator[SEP] Keyword[int] identifier[id] , identifier[ChampData] identifier[champData] , identifier[String] identifier[version] , identifier[String] identifier[locale] operator[SEP] { Keyword[return] Keyword[new] identifier[DummyFuture] operator[<] operator[>] operator[SEP] identifier[handler] operator[SEP] identifier[getChampion] operator[SEP] identifier[id] , identifier[champData] , identifier[version] , identifier[locale] operator[SEP] operator[SEP] operator[SEP] }
public SecurityWebFilterChain build() { if (this.built != null) { throw new IllegalStateException("This has already been built with the following stacktrace. " + buildToString()); } this.built = new RuntimeException("First Build Invocation").fillInStackTrace(); if (this.headers != null) { this.headers.configure(this); } WebFilter securityContextRepositoryWebFilter = securityContextRepositoryWebFilter(); if (securityContextRepositoryWebFilter != null) { this.webFilters.add(securityContextRepositoryWebFilter); } if (this.httpsRedirectSpec != null) { this.httpsRedirectSpec.configure(this); } if (this.x509 != null) { this.x509.configure(this); } if (this.csrf != null) { this.csrf.configure(this); } if (this.cors != null) { this.cors.configure(this); } if (this.httpBasic != null) { this.httpBasic.authenticationManager(this.authenticationManager); this.httpBasic.configure(this); } if (this.formLogin != null) { this.formLogin.authenticationManager(this.authenticationManager); if (this.securityContextRepository != null) { this.formLogin.securityContextRepository(this.securityContextRepository); } this.formLogin.configure(this); } if (this.oauth2Login != null) { this.oauth2Login.configure(this); } if (this.resourceServer != null) { this.resourceServer.configure(this); } if (this.client != null) { this.client.configure(this); } if (this.anonymous != null) { this.anonymous.configure(this); } this.loginPage.configure(this); if (this.logout != null) { this.logout.configure(this); } this.requestCache.configure(this); this.addFilterAt(new SecurityContextServerWebExchangeWebFilter(), SecurityWebFiltersOrder.SECURITY_CONTEXT_SERVER_WEB_EXCHANGE); if (this.authorizeExchange != null) { ServerAuthenticationEntryPoint authenticationEntryPoint = getAuthenticationEntryPoint(); ExceptionTranslationWebFilter exceptionTranslationWebFilter = new ExceptionTranslationWebFilter(); if (authenticationEntryPoint != null) { exceptionTranslationWebFilter.setAuthenticationEntryPoint( authenticationEntryPoint); } ServerAccessDeniedHandler accessDeniedHandler = getAccessDeniedHandler(); if (accessDeniedHandler != null) { exceptionTranslationWebFilter.setAccessDeniedHandler( accessDeniedHandler); } this.addFilterAt(exceptionTranslationWebFilter, SecurityWebFiltersOrder.EXCEPTION_TRANSLATION); this.authorizeExchange.configure(this); } AnnotationAwareOrderComparator.sort(this.webFilters); List<WebFilter> sortedWebFilters = new ArrayList<>(); this.webFilters.forEach( f -> { if (f instanceof OrderedWebFilter) { f = ((OrderedWebFilter) f).webFilter; } sortedWebFilters.add(f); }); sortedWebFilters.add(0, new ServerWebExchangeReactorContextWebFilter()); return new MatcherSecurityWebFilterChain(getSecurityMatcher(), sortedWebFilters); }
class class_name[name] begin[{] method[build, return_type[type[SecurityWebFilterChain]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.built]], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This has already been built with the following stacktrace. "), operandr=MethodInvocation(arguments=[], member=buildToString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.built]], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="First Build Invocation")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=fillInStackTrace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None))] if[binary_operation[THIS[member[None.headers]], !=, literal[null]]] begin[{] THIS[member[None.headers]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] local_variable[type[WebFilter], securityContextRepositoryWebFilter] if[binary_operation[member[.securityContextRepositoryWebFilter], !=, literal[null]]] begin[{] THIS[member[None.webFilters]call[None.add, parameter[member[.securityContextRepositoryWebFilter]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.httpsRedirectSpec]], !=, literal[null]]] begin[{] THIS[member[None.httpsRedirectSpec]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.x509]], !=, literal[null]]] begin[{] THIS[member[None.x509]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.csrf]], !=, literal[null]]] begin[{] THIS[member[None.csrf]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.cors]], !=, literal[null]]] begin[{] THIS[member[None.cors]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.httpBasic]], !=, literal[null]]] begin[{] THIS[member[None.httpBasic]call[None.authenticationManager, parameter[THIS[member[None.authenticationManager]]]]] THIS[member[None.httpBasic]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.formLogin]], !=, literal[null]]] begin[{] THIS[member[None.formLogin]call[None.authenticationManager, parameter[THIS[member[None.authenticationManager]]]]] if[binary_operation[THIS[member[None.securityContextRepository]], !=, literal[null]]] begin[{] THIS[member[None.formLogin]call[None.securityContextRepository, parameter[THIS[member[None.securityContextRepository]]]]] else begin[{] None end[}] THIS[member[None.formLogin]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.oauth2Login]], !=, literal[null]]] begin[{] THIS[member[None.oauth2Login]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.resourceServer]], !=, literal[null]]] begin[{] THIS[member[None.resourceServer]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.client]], !=, literal[null]]] begin[{] THIS[member[None.client]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.anonymous]], !=, literal[null]]] begin[{] THIS[member[None.anonymous]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] THIS[member[None.loginPage]call[None.configure, parameter[THIS[]]]] if[binary_operation[THIS[member[None.logout]], !=, literal[null]]] begin[{] THIS[member[None.logout]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] THIS[member[None.requestCache]call[None.configure, parameter[THIS[]]]] THIS[call[None.addFilterAt, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SecurityContextServerWebExchangeWebFilter, sub_type=None)), member[SecurityWebFiltersOrder.SECURITY_CONTEXT_SERVER_WEB_EXCHANGE]]]] if[binary_operation[THIS[member[None.authorizeExchange]], !=, literal[null]]] begin[{] local_variable[type[ServerAuthenticationEntryPoint], authenticationEntryPoint] local_variable[type[ExceptionTranslationWebFilter], exceptionTranslationWebFilter] if[binary_operation[member[.authenticationEntryPoint], !=, literal[null]]] begin[{] call[exceptionTranslationWebFilter.setAuthenticationEntryPoint, parameter[member[.authenticationEntryPoint]]] else begin[{] None end[}] local_variable[type[ServerAccessDeniedHandler], accessDeniedHandler] if[binary_operation[member[.accessDeniedHandler], !=, literal[null]]] begin[{] call[exceptionTranslationWebFilter.setAccessDeniedHandler, parameter[member[.accessDeniedHandler]]] else begin[{] None end[}] THIS[call[None.addFilterAt, parameter[member[.exceptionTranslationWebFilter], member[SecurityWebFiltersOrder.EXCEPTION_TRANSLATION]]]] THIS[member[None.authorizeExchange]call[None.configure, parameter[THIS[]]]] else begin[{] None end[}] call[AnnotationAwareOrderComparator.sort, parameter[THIS[member[None.webFilters]]]] local_variable[type[List], sortedWebFilters] THIS[member[None.webFilters]call[None.forEach, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=OrderedWebFilter, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OrderedWebFilter, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=sortedWebFilters, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] call[sortedWebFilters.add, parameter[literal[0], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerWebExchangeReactorContextWebFilter, sub_type=None))]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSecurityMatcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=sortedWebFilters, 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=MatcherSecurityWebFilterChain, sub_type=None))] end[}] END[}]
Keyword[public] identifier[SecurityWebFilterChain] identifier[build] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[built] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[buildToString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[built] operator[=] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[fillInStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[headers] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[headers] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } identifier[WebFilter] identifier[securityContextRepositoryWebFilter] operator[=] identifier[securityContextRepositoryWebFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[securityContextRepositoryWebFilter] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[webFilters] operator[SEP] identifier[add] operator[SEP] identifier[securityContextRepositoryWebFilter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[httpsRedirectSpec] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[httpsRedirectSpec] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[x509] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[x509] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[csrf] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[csrf] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cors] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[cors] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[httpBasic] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[httpBasic] operator[SEP] identifier[authenticationManager] operator[SEP] Keyword[this] operator[SEP] identifier[authenticationManager] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[httpBasic] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[formLogin] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[formLogin] operator[SEP] identifier[authenticationManager] operator[SEP] Keyword[this] operator[SEP] identifier[authenticationManager] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[securityContextRepository] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[formLogin] operator[SEP] identifier[securityContextRepository] operator[SEP] Keyword[this] operator[SEP] identifier[securityContextRepository] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[formLogin] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[oauth2Login] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[oauth2Login] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceServer] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[resourceServer] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[anonymous] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[anonymous] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[loginPage] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[logout] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[logout] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[requestCache] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addFilterAt] operator[SEP] Keyword[new] identifier[SecurityContextServerWebExchangeWebFilter] operator[SEP] operator[SEP] , identifier[SecurityWebFiltersOrder] operator[SEP] identifier[SECURITY_CONTEXT_SERVER_WEB_EXCHANGE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[authorizeExchange] operator[!=] Other[null] operator[SEP] { identifier[ServerAuthenticationEntryPoint] identifier[authenticationEntryPoint] operator[=] identifier[getAuthenticationEntryPoint] operator[SEP] operator[SEP] operator[SEP] identifier[ExceptionTranslationWebFilter] identifier[exceptionTranslationWebFilter] operator[=] Keyword[new] identifier[ExceptionTranslationWebFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[authenticationEntryPoint] operator[!=] Other[null] operator[SEP] { identifier[exceptionTranslationWebFilter] operator[SEP] identifier[setAuthenticationEntryPoint] operator[SEP] identifier[authenticationEntryPoint] operator[SEP] operator[SEP] } identifier[ServerAccessDeniedHandler] identifier[accessDeniedHandler] operator[=] identifier[getAccessDeniedHandler] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessDeniedHandler] operator[!=] Other[null] operator[SEP] { identifier[exceptionTranslationWebFilter] operator[SEP] identifier[setAccessDeniedHandler] operator[SEP] identifier[accessDeniedHandler] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[addFilterAt] operator[SEP] identifier[exceptionTranslationWebFilter] , identifier[SecurityWebFiltersOrder] operator[SEP] identifier[EXCEPTION_TRANSLATION] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[authorizeExchange] operator[SEP] identifier[configure] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } identifier[AnnotationAwareOrderComparator] operator[SEP] identifier[sort] operator[SEP] Keyword[this] operator[SEP] identifier[webFilters] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[WebFilter] operator[>] identifier[sortedWebFilters] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[webFilters] operator[SEP] identifier[forEach] operator[SEP] identifier[f] operator[->] { Keyword[if] operator[SEP] identifier[f] Keyword[instanceof] identifier[OrderedWebFilter] operator[SEP] { identifier[f] operator[=] operator[SEP] operator[SEP] identifier[OrderedWebFilter] operator[SEP] identifier[f] operator[SEP] operator[SEP] identifier[webFilter] operator[SEP] } identifier[sortedWebFilters] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[sortedWebFilters] operator[SEP] identifier[add] operator[SEP] Other[0] , Keyword[new] identifier[ServerWebExchangeReactorContextWebFilter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MatcherSecurityWebFilterChain] operator[SEP] identifier[getSecurityMatcher] operator[SEP] operator[SEP] , identifier[sortedWebFilters] operator[SEP] operator[SEP] }
public static CommerceWishList fetchByUserId_First(long userId, OrderByComparator<CommerceWishList> orderByComparator) { return getPersistence().fetchByUserId_First(userId, orderByComparator); }
class class_name[name] begin[{] method[fetchByUserId_First, return_type[type[CommerceWishList]], modifier[public static], parameter[userId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceWishList] identifier[fetchByUserId_First] operator[SEP] Keyword[long] identifier[userId] , identifier[OrderByComparator] operator[<] identifier[CommerceWishList] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByUserId_First] operator[SEP] identifier[userId] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public final boolean synpred3_DSLMap() { state.backtracking++; int start = input.mark(); try { synpred3_DSLMap_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } boolean success = !state.failed; input.rewind(start); state.backtracking--; state.failed=false; return success; }
class class_name[name] begin[{] method[synpred3_DSLMap, return_type[type[boolean]], modifier[final public], parameter[]] begin[{] member[state.backtracking] local_variable[type[int], start] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=synpred3_DSLMap_fragment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="impossible: "), operandr=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=None, label=None, resources=None) local_variable[type[boolean], success] call[input.rewind, parameter[member[.start]]] member[state.backtracking] assign[member[state.failed], literal[false]] return[member[.success]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[boolean] identifier[synpred3_DSLMap] operator[SEP] operator[SEP] { identifier[state] operator[SEP] identifier[backtracking] operator[++] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[input] operator[SEP] identifier[mark] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[synpred3_DSLMap_fragment] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[re] operator[SEP] operator[SEP] } Keyword[boolean] identifier[success] operator[=] operator[!] identifier[state] operator[SEP] identifier[failed] operator[SEP] identifier[input] operator[SEP] identifier[rewind] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[--] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[success] operator[SEP] }
@SuppressWarnings("ReferenceEquality") // need to use a reference check to ensure it is a constant private static SanitizedContent fromConstant( @CompileTimeConstant final String constant, ContentKind kind, @Nullable Dir dir) { // Extra runtime check in case the compile-time check doesn't work. Preconditions.checkArgument( constant.intern() == constant, "The provided argument does not look like a compile-time constant."); return SanitizedContent.create(constant, kind, dir); }
class class_name[name] begin[{] method[fromConstant, return_type[type[SanitizedContent]], modifier[private static], parameter[constant, kind, dir]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[call[constant.intern, parameter[]], ==, member[.constant]], literal["The provided argument does not look like a compile-time constant."]]] return[call[SanitizedContent.create, parameter[member[.constant], member[.kind], member[.dir]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[SanitizedContent] identifier[fromConstant] operator[SEP] annotation[@] identifier[CompileTimeConstant] Keyword[final] identifier[String] identifier[constant] , identifier[ContentKind] identifier[kind] , annotation[@] identifier[Nullable] identifier[Dir] identifier[dir] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[constant] operator[SEP] identifier[intern] operator[SEP] operator[SEP] operator[==] identifier[constant] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[SanitizedContent] operator[SEP] identifier[create] operator[SEP] identifier[constant] , identifier[kind] , identifier[dir] operator[SEP] operator[SEP] }
public Method[] findMethods( Pattern methodNamePattern ) { final Method[] allMethods = this.targetClass.getMethods(); final List<Method> result = new ArrayList<Method>(); for (int i = 0; i < allMethods.length; i++) { final Method m = allMethods[i]; if (methodNamePattern.matcher(m.getName()).matches()) { result.add(m); } } return result.toArray(new Method[result.size()]); }
class class_name[name] begin[{] method[findMethods, return_type[type[Method]], modifier[public], parameter[methodNamePattern]] begin[{] local_variable[type[Method], allMethods] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=allMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=m)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=methodNamePattern, 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=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, 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=length, postfix_operators=[], prefix_operators=[], qualifier=allMethods, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[result.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Method, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Method] operator[SEP] operator[SEP] identifier[findMethods] operator[SEP] identifier[Pattern] identifier[methodNamePattern] operator[SEP] { Keyword[final] identifier[Method] operator[SEP] operator[SEP] identifier[allMethods] operator[=] Keyword[this] operator[SEP] identifier[targetClass] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Method] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Method] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[allMethods] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Method] identifier[m] operator[=] identifier[allMethods] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methodNamePattern] operator[SEP] identifier[matcher] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Method] operator[SEP] identifier[result] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void billingAccount_easyHunting_serviceName_timeConditions_PUT(String billingAccount, String serviceName, OvhEasyHuntingTimeConditionsSettings body) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/timeConditions"; StringBuilder sb = path(qPath, billingAccount, serviceName); exec(qPath, "PUT", sb.toString(), body); }
class class_name[name] begin[{] method[billingAccount_easyHunting_serviceName_timeConditions_PUT, return_type[void], modifier[public], parameter[billingAccount, serviceName, body]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] call[.exec, parameter[member[.qPath], literal["PUT"], call[sb.toString, parameter[]], member[.body]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[billingAccount_easyHunting_serviceName_timeConditions_PUT] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[OvhEasyHuntingTimeConditionsSettings] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[billingAccount] , identifier[serviceName] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[body] operator[SEP] operator[SEP] }
@Override public void start(int mode) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "start, mode ", mode); // _eventNotificationEnabled = isEventNotificationPropertySet(); // notifyMessagingEngineStarting(getName(), getUuid().toString(), "STANDARD_MODE"); boolean startFailed = false; ListIterator<ComponentList> li = null; synchronized (stateChangeLock) { if (_state == STATE_STOPPED) setState(STATE_STARTING); } // synchronized (stateChangeLock) try { //Start the message store _messageStore.start(); //Start the message processor _messageProcessor.start(0); setState(STATE_STARTED); } catch (Exception e) { if (!(e.getCause() instanceof SeverePersistenceException)) com.ibm.ws.ffdc.FFDCFilter.processException(e, CLASS_NAME + ".start", "626", this); SibTr.error(tc, "ME_CANNOT_BE_STARTED_SIAS0034", new Object[] { _name, "", "start()" }); SibTr.exception(tc, e); startFailed = true; } if (startFailed) { SibTr.error(tc, "ME_RESTART_CHECK_SIAS0027", getName()); stop(JsConstants.ME_STOP_FORCE); destroy(); setState(STATE_STOPPED); } else { // Find the MP administrator class _mpAdmin = ((SIMPAdmin) getMessageProcessor()).getAdministrator(); setState(STATE_STARTED); } if (!startFailed) { serverStarted(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Messaging Engine " + _name + " with UUID " + _uuid + " has been started."); } else { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Messaging engine failed"); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "start"); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[mode]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["start, mode "], member[.mode]]] else begin[{] None end[}] local_variable[type[boolean], startFailed] local_variable[type[ListIterator], li] SYNCHRONIZED[member[.stateChangeLock]] BEGIN[{] if[binary_operation[member[._state], ==, member[.STATE_STOPPED]]] begin[{] call[.setState, parameter[member[.STATE_STARTING]]] else begin[{] None end[}] END[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=_messageStore, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=start, postfix_operators=[], prefix_operators=[], qualifier=_messageProcessor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=STATE_STARTED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=SeverePersistenceException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".start"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="626"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ME_CANNOT_BE_STARTED_SIAS0034"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="start()")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startFailed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.startFailed]] begin[{] call[SibTr.error, parameter[member[.tc], literal["ME_RESTART_CHECK_SIAS0027"], call[.getName, parameter[]]]] call[.stop, parameter[member[JsConstants.ME_STOP_FORCE]]] call[.destroy, parameter[]] call[.setState, parameter[member[.STATE_STOPPED]]] else begin[{] assign[member[._mpAdmin], Cast(expression=MethodInvocation(arguments=[], member=getMessageProcessor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SIMPAdmin, sub_type=None))] call[.setState, parameter[member[.STATE_STARTED]]] end[}] if[member[.startFailed]] begin[{] call[.serverStarted, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[literal["Messaging Engine "], +, member[._name]], +, literal[" with UUID "]], +, member[._uuid]], +, literal[" has been started."]]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], literal["Messaging engine failed"]]] else begin[{] None end[}] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["start"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[int] identifier[mode] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[mode] operator[SEP] operator[SEP] Keyword[boolean] identifier[startFailed] operator[=] literal[boolean] operator[SEP] identifier[ListIterator] operator[<] identifier[ComponentList] operator[>] identifier[li] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[stateChangeLock] operator[SEP] { Keyword[if] operator[SEP] identifier[_state] operator[==] identifier[STATE_STOPPED] operator[SEP] identifier[setState] operator[SEP] identifier[STATE_STARTING] operator[SEP] operator[SEP] } Keyword[try] { identifier[_messageStore] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[_messageProcessor] operator[SEP] identifier[start] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[STATE_STARTED] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[SeverePersistenceException] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[_name] , literal[String] , literal[String] } operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] identifier[startFailed] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[startFailed] operator[SEP] { identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stop] operator[SEP] identifier[JsConstants] operator[SEP] identifier[ME_STOP_FORCE] operator[SEP] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[STATE_STOPPED] operator[SEP] operator[SEP] } Keyword[else] { identifier[_mpAdmin] operator[=] operator[SEP] operator[SEP] identifier[SIMPAdmin] operator[SEP] identifier[getMessageProcessor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getAdministrator] operator[SEP] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[STATE_STARTED] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[startFailed] operator[SEP] { identifier[serverStarted] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[_name] operator[+] literal[String] operator[+] identifier[_uuid] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public int getMaxConnections() throws GuacamoleException { // Pull default from environment if connection limit is unset Integer value = getModel().getMaxConnections(); if (value == null) return environment.getDefaultMaxConnections(); // Otherwise use defined value return value; }
class class_name[name] begin[{] method[getMaxConnections, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[Integer], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[call[environment.getDefaultMaxConnections, parameter[]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getMaxConnections] operator[SEP] operator[SEP] Keyword[throws] identifier[GuacamoleException] { identifier[Integer] identifier[value] operator[=] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxConnections] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[return] identifier[environment] operator[SEP] identifier[getDefaultMaxConnections] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] }
public Link target(String t) { if (t!=null && t.length()>0) attribute("target",t); return this; }
class class_name[name] begin[{] method[target, return_type[type[Link]], modifier[public], parameter[t]] begin[{] if[binary_operation[binary_operation[member[.t], !=, literal[null]], &&, binary_operation[call[t.length, parameter[]], >, literal[0]]]] begin[{] call[.attribute, parameter[literal["target"], member[.t]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Link] identifier[target] operator[SEP] identifier[String] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[&&] identifier[t] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static admin_ns_config modify(nitro_service client, admin_ns_config resource) throws Exception { resource.validate("modify"); return ((admin_ns_config[]) resource.update_resource(client))[0]; }
class class_name[name] begin[{] method[modify, return_type[type[admin_ns_config]], modifier[public static], parameter[client, resource]] begin[{] call[resource.validate, parameter[literal["modify"]]] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=update_resource, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=admin_ns_config, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[admin_ns_config] identifier[modify] operator[SEP] identifier[nitro_service] identifier[client] , identifier[admin_ns_config] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[resource] operator[SEP] identifier[validate] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[admin_ns_config] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[update_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] }
public Map<String, TableContext> listTablesForConfig( DatabaseVendor vendor, PushSource.Context context, List<Stage.ConfigIssue> issues, Connection connection, TableConfigBean tableConfigBean, TableJdbcELEvalContext tableJdbcELEvalContext, QuoteChar quoteChar ) throws SQLException, StageException { Map<String, TableContext> tableContextMap = new LinkedHashMap<>(); Pattern tableExclusion = StringUtils.isEmpty(tableConfigBean.tableExclusionPattern)? null : Pattern.compile(tableConfigBean.tableExclusionPattern); Pattern schemaExclusion = StringUtils.isEmpty(tableConfigBean.schemaExclusionPattern)? null : Pattern.compile(tableConfigBean.schemaExclusionPattern); try (ResultSet rs = jdbcUtil.getTableAndViewMetadata(connection, tableConfigBean.schema, tableConfigBean.tablePattern)) { while (rs.next()) { String schemaName = rs.getString(TABLE_METADATA_TABLE_SCHEMA_CONSTANT); String tableName = rs.getString(TABLE_METADATA_TABLE_NAME_CONSTANT); if ( (tableExclusion == null || !tableExclusion.matcher(tableName).matches()) && (schemaExclusion == null || !schemaExclusion.matcher(schemaName).matches()) ) { TableContext tableContext = createTableContext( vendor, context, issues, connection, schemaName, tableName, tableConfigBean, tableJdbcELEvalContext, quoteChar ); if (tableContext != null) { tableContextMap.put( getQualifiedTableName(schemaName, tableName), tableContext ); } } } } return tableContextMap; }
class class_name[name] begin[{] method[listTablesForConfig, return_type[type[Map]], modifier[public], parameter[vendor, context, issues, connection, tableConfigBean, tableJdbcELEvalContext, quoteChar]] begin[{] local_variable[type[Map], tableContextMap] local_variable[type[Pattern], tableExclusion] local_variable[type[Pattern], schemaExclusion] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=TABLE_METADATA_TABLE_SCHEMA_CONSTANT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None), name=schemaName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=TABLE_METADATA_TABLE_NAME_CONSTANT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None), name=tableName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tableExclusion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=['!'], qualifier=tableExclusion, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=schemaExclusion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=schemaName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=['!'], qualifier=schemaExclusion, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=vendor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=issues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schemaName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableConfigBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableJdbcELEvalContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=quoteChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createTableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=tableContext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TableContext, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=schemaName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getQualifiedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=tableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=tableContextMap, selectors=[], type_arguments=None), label=None)]))]))]), condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=rs, type=ReferenceType(arguments=None, dimensions=[], name=ResultSet, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schema, postfix_operators=[], prefix_operators=[], qualifier=tableConfigBean, selectors=[]), MemberReference(member=tablePattern, postfix_operators=[], prefix_operators=[], qualifier=tableConfigBean, selectors=[])], member=getTableAndViewMetadata, postfix_operators=[], prefix_operators=[], qualifier=jdbcUtil, selectors=[], type_arguments=None))]) return[member[.tableContextMap]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[TableContext] operator[>] identifier[listTablesForConfig] operator[SEP] identifier[DatabaseVendor] identifier[vendor] , identifier[PushSource] operator[SEP] identifier[Context] identifier[context] , identifier[List] operator[<] identifier[Stage] operator[SEP] identifier[ConfigIssue] operator[>] identifier[issues] , identifier[Connection] identifier[connection] , identifier[TableConfigBean] identifier[tableConfigBean] , identifier[TableJdbcELEvalContext] identifier[tableJdbcELEvalContext] , identifier[QuoteChar] identifier[quoteChar] operator[SEP] Keyword[throws] identifier[SQLException] , identifier[StageException] { identifier[Map] operator[<] identifier[String] , identifier[TableContext] operator[>] identifier[tableContextMap] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Pattern] identifier[tableExclusion] operator[=] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[tableConfigBean] operator[SEP] identifier[tableExclusionPattern] operator[SEP] operator[?] Other[null] operator[:] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[tableConfigBean] operator[SEP] identifier[tableExclusionPattern] operator[SEP] operator[SEP] identifier[Pattern] identifier[schemaExclusion] operator[=] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[tableConfigBean] operator[SEP] identifier[schemaExclusionPattern] operator[SEP] operator[?] Other[null] operator[:] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[tableConfigBean] operator[SEP] identifier[schemaExclusionPattern] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[ResultSet] identifier[rs] operator[=] identifier[jdbcUtil] operator[SEP] identifier[getTableAndViewMetadata] operator[SEP] identifier[connection] , identifier[tableConfigBean] operator[SEP] identifier[schema] , identifier[tableConfigBean] operator[SEP] identifier[tablePattern] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] identifier[rs] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[schemaName] operator[=] identifier[rs] operator[SEP] identifier[getString] operator[SEP] identifier[TABLE_METADATA_TABLE_SCHEMA_CONSTANT] operator[SEP] operator[SEP] identifier[String] identifier[tableName] operator[=] identifier[rs] operator[SEP] identifier[getString] operator[SEP] identifier[TABLE_METADATA_TABLE_NAME_CONSTANT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[tableExclusion] operator[==] Other[null] operator[||] operator[!] identifier[tableExclusion] operator[SEP] identifier[matcher] operator[SEP] identifier[tableName] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[schemaExclusion] operator[==] Other[null] operator[||] operator[!] identifier[schemaExclusion] operator[SEP] identifier[matcher] operator[SEP] identifier[schemaName] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[TableContext] identifier[tableContext] operator[=] identifier[createTableContext] operator[SEP] identifier[vendor] , identifier[context] , identifier[issues] , identifier[connection] , identifier[schemaName] , identifier[tableName] , identifier[tableConfigBean] , identifier[tableJdbcELEvalContext] , identifier[quoteChar] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tableContext] operator[!=] Other[null] operator[SEP] { identifier[tableContextMap] operator[SEP] identifier[put] operator[SEP] identifier[getQualifiedTableName] operator[SEP] identifier[schemaName] , identifier[tableName] operator[SEP] , identifier[tableContext] operator[SEP] operator[SEP] } } } } Keyword[return] identifier[tableContextMap] operator[SEP] }
public static void checkBothNotNull(Object object1, Object object2, String errorMsg) { check(!(object1 == null && object2 == null), errorMsg); }
class class_name[name] begin[{] method[checkBothNotNull, return_type[void], modifier[public static], parameter[object1, object2, errorMsg]] begin[{] call[.check, parameter[binary_operation[binary_operation[member[.object1], ==, literal[null]], &&, binary_operation[member[.object2], ==, literal[null]]], member[.errorMsg]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkBothNotNull] operator[SEP] identifier[Object] identifier[object1] , identifier[Object] identifier[object2] , identifier[String] identifier[errorMsg] operator[SEP] { identifier[check] operator[SEP] operator[!] operator[SEP] identifier[object1] operator[==] Other[null] operator[&&] identifier[object2] operator[==] Other[null] operator[SEP] , identifier[errorMsg] operator[SEP] operator[SEP] }
@POST @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public Response submit(@Context HttpServletRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.submit()"); } String entityJson = null; AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityResource.submit()"); } String entities = Servlets.getRequestPayload(request); //Handle backward compatibility - if entities is not JSONArray, convert to JSONArray try { new JSONArray(entities); } catch (JSONException e) { final String finalEntities = entities; entities = new JSONArray() {{ put(finalEntities); }}.toString(); } entityJson = AtlasClient.toString(new JSONArray(entities)); if (LOG.isDebugEnabled()) { LOG.debug("submitting entities {} ", entityJson); } AtlasEntitiesWithExtInfo entitiesInfo = restAdapters.toAtlasEntities(entities); EntityMutationResponse mutationResponse = entityREST.createOrUpdate(entitiesInfo); final List<String> guids = restAdapters.getGuids(mutationResponse.getCreatedEntities()); if (LOG.isDebugEnabled()) { LOG.debug("Created entities {}", guids); } final CreateUpdateEntitiesResult result = restAdapters.toCreateUpdateEntitiesResult(mutationResponse); JSONObject response = getResponse(result); URI locationURI = getLocationURI(guids); return Response.created(locationURI).entity(response).build(); } catch (AtlasBaseException e) { LOG.error("Unable to persist entity instance entityDef={}", entityJson, e); throw toWebApplicationException(e); } catch(EntityExistsException e) { LOG.error("Unique constraint violation for entity entityDef={}", entityJson, e); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT)); } catch (ValueConversionException ve) { LOG.error("Unable to persist entity instance due to a deserialization error entityDef={}", entityJson, ve); throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause() != null ? ve.getCause() : ve, Response.Status.BAD_REQUEST)); } catch (AtlasException | IllegalArgumentException e) { LOG.error("Unable to persist entity instance entityDef={}", entityJson, e); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); } catch (WebApplicationException e) { LOG.error("Unable to persist entity instance entityDef={}", entityJson, e); throw e; } catch (Throwable e) { LOG.error("Unable to persist entity instance entityDef={}", entityJson, e); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); } finally { AtlasPerfTracer.log(perf); if (LOG.isDebugEnabled()) { LOG.debug("<== EntityResource.submit()"); } } }
class class_name[name] begin[{] method[submit, return_type[type[Response]], modifier[public], parameter[request]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[literal["==> EntityResource.submit()"]]] else begin[{] None end[}] local_variable[type[String], entityJson] local_variable[type[AtlasPerfTracer], perf] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PERF_LOG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPerfTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=AtlasPerfTracer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=perf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=PERF_LOG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="EntityResource.submit()")], member=getPerfTracer, postfix_operators=[], prefix_operators=[], qualifier=AtlasPerfTracer, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRequestPayload, postfix_operators=[], prefix_operators=[], qualifier=Servlets, selectors=[], type_arguments=None), name=entities)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=entities, 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=JSONArray, sub_type=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=finalEntities)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=[[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=finalEntities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=JSONArray, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=entities, 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=JSONArray, sub_type=None))], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AtlasClient, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="submitting entities {} "), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toAtlasEntities, postfix_operators=[], prefix_operators=[], qualifier=restAdapters, selectors=[], type_arguments=None), name=entitiesInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AtlasEntitiesWithExtInfo, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entitiesInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createOrUpdate, postfix_operators=[], prefix_operators=[], qualifier=entityREST, selectors=[], type_arguments=None), name=mutationResponse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityMutationResponse, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreatedEntities, postfix_operators=[], prefix_operators=[], qualifier=mutationResponse, selectors=[], type_arguments=None)], member=getGuids, postfix_operators=[], prefix_operators=[], qualifier=restAdapters, selectors=[], type_arguments=None), name=guids)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Created entities {}"), MemberReference(member=guids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=mutationResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toCreateUpdateEntitiesResult, postfix_operators=[], prefix_operators=[], qualifier=restAdapters, selectors=[], type_arguments=None), name=result)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CreateUpdateEntitiesResult, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=guids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLocationURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=locationURI)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=locationURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=created, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=entity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to persist entity instance entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toWebApplicationException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AtlasBaseException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unique constraint violation for entity entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CONFLICT, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=getErrorResponse, postfix_operators=[], prefix_operators=[], qualifier=Servlets, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebApplicationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EntityExistsException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to persist entity instance due to a deserialization error entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=ve, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=ve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=ve, selectors=[], type_arguments=None)), MemberReference(member=BAD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=getErrorResponse, postfix_operators=[], prefix_operators=[], qualifier=Servlets, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebApplicationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ve, types=['ValueConversionException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to persist entity instance entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=BAD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=getErrorResponse, postfix_operators=[], prefix_operators=[], qualifier=Servlets, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebApplicationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AtlasException', 'IllegalArgumentException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to persist entity instance entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['WebApplicationException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to persist entity instance entityDef={}"), MemberReference(member=entityJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=getErrorResponse, postfix_operators=[], prefix_operators=[], qualifier=Servlets, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebApplicationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=perf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=AtlasPerfTracer, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<== EntityResource.submit()")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Consumes] operator[SEP] { identifier[Servlets] operator[SEP] identifier[JSON_MEDIA_TYPE] , identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] } operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[Servlets] operator[SEP] identifier[JSON_MEDIA_TYPE] operator[SEP] Keyword[public] identifier[Response] identifier[submit] operator[SEP] annotation[@] identifier[Context] identifier[HttpServletRequest] identifier[request] 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[SEP] operator[SEP] } identifier[String] identifier[entityJson] operator[=] Other[null] operator[SEP] identifier[AtlasPerfTracer] identifier[perf] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[AtlasPerfTracer] operator[SEP] identifier[isPerfTraceEnabled] operator[SEP] identifier[PERF_LOG] operator[SEP] operator[SEP] { identifier[perf] operator[=] identifier[AtlasPerfTracer] operator[SEP] identifier[getPerfTracer] operator[SEP] identifier[PERF_LOG] , literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[entities] operator[=] identifier[Servlets] operator[SEP] identifier[getRequestPayload] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[try] { Keyword[new] identifier[JSONArray] operator[SEP] identifier[entities] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[finalEntities] operator[=] identifier[entities] operator[SEP] identifier[entities] operator[=] Keyword[new] identifier[JSONArray] operator[SEP] operator[SEP] { { identifier[put] operator[SEP] identifier[finalEntities] operator[SEP] operator[SEP] } } operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[entityJson] operator[=] identifier[AtlasClient] operator[SEP] identifier[toString] operator[SEP] Keyword[new] identifier[JSONArray] operator[SEP] identifier[entities] 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] , identifier[entityJson] operator[SEP] operator[SEP] } identifier[AtlasEntitiesWithExtInfo] identifier[entitiesInfo] operator[=] identifier[restAdapters] operator[SEP] identifier[toAtlasEntities] operator[SEP] identifier[entities] operator[SEP] operator[SEP] identifier[EntityMutationResponse] identifier[mutationResponse] operator[=] identifier[entityREST] operator[SEP] identifier[createOrUpdate] operator[SEP] identifier[entitiesInfo] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[guids] operator[=] identifier[restAdapters] operator[SEP] identifier[getGuids] operator[SEP] identifier[mutationResponse] operator[SEP] identifier[getCreatedEntities] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[guids] operator[SEP] operator[SEP] } Keyword[final] identifier[CreateUpdateEntitiesResult] identifier[result] operator[=] identifier[restAdapters] operator[SEP] identifier[toCreateUpdateEntitiesResult] operator[SEP] identifier[mutationResponse] operator[SEP] operator[SEP] identifier[JSONObject] identifier[response] operator[=] identifier[getResponse] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[URI] identifier[locationURI] operator[=] identifier[getLocationURI] operator[SEP] identifier[guids] operator[SEP] operator[SEP] Keyword[return] identifier[Response] operator[SEP] identifier[created] operator[SEP] identifier[locationURI] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AtlasBaseException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[toWebApplicationException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[EntityExistsException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[Servlets] operator[SEP] identifier[getErrorResponse] operator[SEP] identifier[e] , identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[CONFLICT] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ValueConversionException] identifier[ve] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[ve] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[Servlets] operator[SEP] identifier[getErrorResponse] operator[SEP] identifier[ve] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[!=] Other[null] operator[?] identifier[ve] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[:] identifier[ve] , identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[BAD_REQUEST] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AtlasException] operator[|] identifier[IllegalArgumentException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[Servlets] operator[SEP] identifier[getErrorResponse] operator[SEP] identifier[e] , identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[BAD_REQUEST] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[WebApplicationException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[entityJson] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[WebApplicationException] operator[SEP] identifier[Servlets] operator[SEP] identifier[getErrorResponse] operator[SEP] identifier[e] , identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[AtlasPerfTracer] operator[SEP] identifier[log] operator[SEP] identifier[perf] 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[SEP] operator[SEP] } } }
@Override public PurchaseReservedElasticsearchInstanceOfferingResult purchaseReservedElasticsearchInstanceOffering( PurchaseReservedElasticsearchInstanceOfferingRequest request) { request = beforeClientExecution(request); return executePurchaseReservedElasticsearchInstanceOffering(request); }
class class_name[name] begin[{] method[purchaseReservedElasticsearchInstanceOffering, return_type[type[PurchaseReservedElasticsearchInstanceOfferingResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executePurchaseReservedElasticsearchInstanceOffering, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[PurchaseReservedElasticsearchInstanceOfferingResult] identifier[purchaseReservedElasticsearchInstanceOffering] operator[SEP] identifier[PurchaseReservedElasticsearchInstanceOfferingRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executePurchaseReservedElasticsearchInstanceOffering] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception { HttpResponseStatus result; try { result = parseLine(status); if (result == HttpResponseStatus.SWITCHING_PROTOCOLS) { throw connectionError(PROTOCOL_ERROR, "Invalid HTTP/2 status code '%d'", result.code()); } } catch (Http2Exception e) { throw e; } catch (Throwable t) { throw connectionError(PROTOCOL_ERROR, t, "Unrecognized HTTP status code '%s' encountered in translation to HTTP/1.x", status); } return result; }
class class_name[name] begin[{] method[parseStatus, return_type[type[HttpResponseStatus]], modifier[public static], parameter[status]] begin[{] local_variable[type[HttpResponseStatus], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SWITCHING_PROTOCOLS, postfix_operators=[], prefix_operators=[], qualifier=HttpResponseStatus, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=PROTOCOL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid HTTP/2 status code '%d'"), MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=connectionError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Http2Exception'])), CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=PROTOCOL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unrecognized HTTP status code '%s' encountered in translation to HTTP/1.x"), MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=connectionError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpResponseStatus] identifier[parseStatus] operator[SEP] identifier[CharSequence] identifier[status] operator[SEP] Keyword[throws] identifier[Http2Exception] { identifier[HttpResponseStatus] identifier[result] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[parseLine] operator[SEP] identifier[status] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] identifier[HttpResponseStatus] operator[SEP] identifier[SWITCHING_PROTOCOLS] operator[SEP] { Keyword[throw] identifier[connectionError] operator[SEP] identifier[PROTOCOL_ERROR] , literal[String] , identifier[result] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Http2Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] identifier[connectionError] operator[SEP] identifier[PROTOCOL_ERROR] , identifier[t] , literal[String] , identifier[status] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Deprecated public List<ServerDescription> getSecondaries(final TagSet tagSet) { return getServersByPredicate(new Predicate() { public boolean apply(final ServerDescription serverDescription) { return serverDescription.isSecondary() && serverDescription.hasTags(tagSet); } }); }
class class_name[name] begin[{] method[getSecondaries, return_type[type[List]], modifier[public], parameter[tagSet]] begin[{] return[call[.getServersByPredicate, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isSecondary, postfix_operators=[], prefix_operators=[], qualifier=serverDescription, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=tagSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTags, postfix_operators=[], prefix_operators=[], qualifier=serverDescription, selectors=[], type_arguments=None), operator=&&), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=serverDescription, type=ReferenceType(arguments=None, dimensions=[], name=ServerDescription, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Predicate, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[List] operator[<] identifier[ServerDescription] operator[>] identifier[getSecondaries] operator[SEP] Keyword[final] identifier[TagSet] identifier[tagSet] operator[SEP] { Keyword[return] identifier[getServersByPredicate] operator[SEP] Keyword[new] identifier[Predicate] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[apply] operator[SEP] Keyword[final] identifier[ServerDescription] identifier[serverDescription] operator[SEP] { Keyword[return] identifier[serverDescription] operator[SEP] identifier[isSecondary] operator[SEP] operator[SEP] operator[&&] identifier[serverDescription] operator[SEP] identifier[hasTags] operator[SEP] identifier[tagSet] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void validate() { // AutoResetToZero if (niceMinValue > 0 || niceMaxValue < 0) { autoResetToZero = false; } // Threshold if (threshold < niceMinValue || threshold > niceMaxValue) { threshold = niceMaxValue; } // MinMeasuredValue if (minMeasuredValue < niceMinValue || minMeasuredValue > niceMaxValue) { minMeasuredValue = value; } // MaxMeasuredValue if (maxMeasuredValue > niceMaxValue || maxMeasuredValue < niceMinValue) { maxMeasuredValue = value; } // PeakValue if (peakValue < niceMinValue || peakValue > niceMaxValue) { peakValue = value; } // TrackStart if (Double.compare(trackStart, niceMinValue) <= 0 || Double.compare(trackStart, niceMaxValue) >= 0 || Double.compare(trackStart, trackStop) >= 0) { trackStart = niceMinValue; } // TrackStop if ((Double.compare(trackStop, niceMinValue)) <= 0 || Double.compare(trackStop, niceMaxValue) >= 0 || Double.compare(trackStop, trackStart) <= 0) { trackStop = niceMaxValue; } // TrackSection if (Double.compare(trackSection, niceMinValue) <= 0 || Double.compare(trackSection, niceMaxValue) >= 0 || Double.compare(trackSection, trackStart) <= 0 || Double.compare(trackSection, trackStop) >= 0) { trackSection = ((trackStart + (trackStop - trackStart) / 2.0)); } // Areas for (Section area : areas) { if ((area.getStart() < niceMinValue) || Double.compare(area.getStart(), niceMaxValue) >= 0 || Double.compare(area.getStart(), area.getStop()) >= 0) { area.setStart(niceMinValue); } if (area.getStop() < niceMinValue || area.getStop() > niceMaxValue || Double.compare(area.getStop(), area.getStart()) <= 0) { area.setStop(niceMaxValue); } if (Double.compare(area.getStart(), minValue) == 0) { area.setStart(niceMinValue); } if (Double.compare(area.getStop(), maxValue) == 0) { area.setStop(niceMaxValue); } } // Sections for (Section section : sections) { if ((section.getStart() < niceMinValue) || Double.compare(section.getStart(), niceMaxValue) >= 0 || Double.compare(section.getStart(), section.getStop()) >= 0) { section.setStart(niceMinValue); } if (section.getStop() < niceMinValue || section.getStop() > niceMaxValue || Double.compare(section.getStop(), section.getStart()) <= 0) { section.setStop(niceMaxValue); } if (Double.compare(section.getStart(), minValue) == 0) { section.setStart(niceMinValue); } if (Double.compare(section.getStop(), maxValue) == 0) { section.setStop(niceMaxValue); } } // TickmarkSections for (Section tickmarkSection : tickmarkSections) { if ((tickmarkSection.getStart() < niceMinValue) || Double.compare(tickmarkSection.getStart(), niceMaxValue) >= 0 || Double.compare(tickmarkSection.getStart(), tickmarkSection.getStop()) >= 0) { tickmarkSection.setStart(niceMinValue); } if (tickmarkSection.getStop() < niceMinValue || tickmarkSection.getStop() > niceMaxValue || Double.compare(tickmarkSection.getStop(), tickmarkSection.getStart()) <= 0) { tickmarkSection.setStop(niceMaxValue); } if (Double.compare(tickmarkSection.getStart(), minValue) == 0) { tickmarkSection.setStart(niceMinValue); } if (Double.compare(tickmarkSection.getStop(), maxValue) == 0) { tickmarkSection.setStop(niceMaxValue); } } // Recalculate the redrawTolerance redrawFactor = redrawTolerance * getRange(); // Correct the value (needed for init with negative minValue) value = value < niceMinValue ? niceMinValue : (value > niceMaxValue ? niceMaxValue : value); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.niceMinValue], >, literal[0]], ||, binary_operation[member[.niceMaxValue], <, literal[0]]]] begin[{] assign[member[.autoResetToZero], literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.threshold], <, member[.niceMinValue]], ||, binary_operation[member[.threshold], >, member[.niceMaxValue]]]] begin[{] assign[member[.threshold], member[.niceMaxValue]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.minMeasuredValue], <, member[.niceMinValue]], ||, binary_operation[member[.minMeasuredValue], >, member[.niceMaxValue]]]] begin[{] assign[member[.minMeasuredValue], member[.value]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.maxMeasuredValue], >, member[.niceMaxValue]], ||, binary_operation[member[.maxMeasuredValue], <, member[.niceMinValue]]]] begin[{] assign[member[.maxMeasuredValue], member[.value]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.peakValue], <, member[.niceMinValue]], ||, binary_operation[member[.peakValue], >, member[.niceMaxValue]]]] begin[{] assign[member[.peakValue], member[.value]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[Double.compare, parameter[member[.trackStart], member[.niceMinValue]]], <=, literal[0]], ||, binary_operation[call[Double.compare, parameter[member[.trackStart], member[.niceMaxValue]]], >=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[member[.trackStart], member[.trackStop]]], >=, literal[0]]]] begin[{] assign[member[.trackStart], member[.niceMinValue]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[Double.compare, parameter[member[.trackStop], member[.niceMinValue]]], <=, literal[0]], ||, binary_operation[call[Double.compare, parameter[member[.trackStop], member[.niceMaxValue]]], >=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[member[.trackStop], member[.trackStart]]], <=, literal[0]]]] begin[{] assign[member[.trackStop], member[.niceMaxValue]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[binary_operation[call[Double.compare, parameter[member[.trackSection], member[.niceMinValue]]], <=, literal[0]], ||, binary_operation[call[Double.compare, parameter[member[.trackSection], member[.niceMaxValue]]], >=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[member[.trackSection], member[.trackStart]]], <=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[member[.trackSection], member[.trackStop]]], >=, literal[0]]]] begin[{] assign[member[.trackSection], binary_operation[member[.trackStart], +, binary_operation[binary_operation[member[.trackStop], -, member[.trackStart]], /, literal[2.0]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), MemberReference(member=minValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), MemberReference(member=maxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=areas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=area)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Section, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), MemberReference(member=minValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), MemberReference(member=maxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=section)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Section, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), operandr=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, 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=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), MemberReference(member=minValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStart, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), MemberReference(member=maxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStop, postfix_operators=[], prefix_operators=[], qualifier=tickmarkSection, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=tickmarkSections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tickmarkSection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Section, sub_type=None))), label=None) assign[member[.redrawFactor], binary_operation[member[.redrawTolerance], *, call[.getRange, parameter[]]]] assign[member[.value], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), if_true=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[void] identifier[validate] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[niceMinValue] operator[>] Other[0] operator[||] identifier[niceMaxValue] operator[<] Other[0] operator[SEP] { identifier[autoResetToZero] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[threshold] operator[<] identifier[niceMinValue] operator[||] identifier[threshold] operator[>] identifier[niceMaxValue] operator[SEP] { identifier[threshold] operator[=] identifier[niceMaxValue] operator[SEP] } Keyword[if] operator[SEP] identifier[minMeasuredValue] operator[<] identifier[niceMinValue] operator[||] identifier[minMeasuredValue] operator[>] identifier[niceMaxValue] operator[SEP] { identifier[minMeasuredValue] operator[=] identifier[value] operator[SEP] } Keyword[if] operator[SEP] identifier[maxMeasuredValue] operator[>] identifier[niceMaxValue] operator[||] identifier[maxMeasuredValue] operator[<] identifier[niceMinValue] operator[SEP] { identifier[maxMeasuredValue] operator[=] identifier[value] operator[SEP] } Keyword[if] operator[SEP] identifier[peakValue] operator[<] identifier[niceMinValue] operator[||] identifier[peakValue] operator[>] identifier[niceMaxValue] operator[SEP] { identifier[peakValue] operator[=] identifier[value] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStart] , identifier[niceMinValue] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStart] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStart] , identifier[trackStop] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[trackStart] operator[=] identifier[niceMinValue] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStop] , identifier[niceMinValue] operator[SEP] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStop] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackStop] , identifier[trackStart] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[trackStop] operator[=] identifier[niceMaxValue] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackSection] , identifier[niceMinValue] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackSection] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackSection] , identifier[trackStart] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[trackSection] , identifier[trackStop] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[trackSection] operator[=] operator[SEP] operator[SEP] identifier[trackStart] operator[+] operator[SEP] identifier[trackStop] operator[-] identifier[trackStart] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Section] identifier[area] operator[:] identifier[areas] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[area] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[area] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[area] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[area] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[area] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[||] identifier[area] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[>] identifier[niceMaxValue] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[area] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[area] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[area] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[minValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[area] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[maxValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Section] identifier[section] operator[:] identifier[sections] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[section] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[section] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[section] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[section] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[section] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[||] identifier[section] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[>] identifier[niceMaxValue] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[section] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[section] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[section] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[section] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[minValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[section] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[section] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[maxValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[section] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Section] identifier[tickmarkSection] operator[:] identifier[tickmarkSections] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[niceMaxValue] operator[SEP] operator[>=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[tickmarkSection] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[tickmarkSection] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[<] identifier[niceMinValue] operator[||] identifier[tickmarkSection] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] operator[>] identifier[niceMaxValue] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[tickmarkSection] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[tickmarkSection] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[minValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[tickmarkSection] operator[SEP] identifier[setStart] operator[SEP] identifier[niceMinValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[tickmarkSection] operator[SEP] identifier[getStop] operator[SEP] operator[SEP] , identifier[maxValue] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[tickmarkSection] operator[SEP] identifier[setStop] operator[SEP] identifier[niceMaxValue] operator[SEP] operator[SEP] } } identifier[redrawFactor] operator[=] identifier[redrawTolerance] operator[*] identifier[getRange] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[value] operator[<] identifier[niceMinValue] operator[?] identifier[niceMinValue] operator[:] operator[SEP] identifier[value] operator[>] identifier[niceMaxValue] operator[?] identifier[niceMaxValue] operator[:] identifier[value] operator[SEP] operator[SEP] }
@Override public boolean containsKey(Object key) { return key instanceof String ? members.containsKey(Key.of((String)key)) : false; }
class class_name[name] begin[{] method[containsKey, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=of, postfix_operators=[], prefix_operators=[], qualifier=Key, selectors=[], type_arguments=None)], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=members, selectors=[], type_arguments=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[return] identifier[key] Keyword[instanceof] identifier[String] operator[?] identifier[members] operator[SEP] identifier[containsKey] operator[SEP] identifier[Key] operator[SEP] identifier[of] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[:] literal[boolean] operator[SEP] }
public static boolean isBindable(Class<?> subClass) { return !subClass.isInterface() && !Modifier.isAbstract( subClass.getModifiers()) && subClass.getTypeParameters().length == 0; }
class class_name[name] begin[{] method[isBindable, return_type[type[boolean]], modifier[public static], parameter[subClass]] begin[{] return[binary_operation[binary_operation[call[subClass.isInterface, parameter[]], &&, call[Modifier.isAbstract, parameter[call[subClass.getModifiers, parameter[]]]]], &&, binary_operation[call[subClass.getTypeParameters, parameter[]], ==, literal[0]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isBindable] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[subClass] operator[SEP] { Keyword[return] operator[!] identifier[subClass] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[Modifier] operator[SEP] identifier[isAbstract] operator[SEP] identifier[subClass] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[subClass] operator[SEP] identifier[getTypeParameters] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] }
public List<io.motown.vas.v10.soap.schema.ConnectorType> getConnectorTypes(ChargingStation chargingStation) { List<io.motown.vas.v10.soap.schema.ConnectorType> connectorTypes = new ArrayList<>(); for (ConnectorType connectorType : chargingStation.getConnectorTypes()) { if(connectorType.equals(ConnectorType.TEPCO_CHA_DE_MO)) { connectorTypes.add(io.motown.vas.v10.soap.schema.ConnectorType.TEPCO_CHA_ME_DO); } else { connectorTypes.add(io.motown.vas.v10.soap.schema.ConnectorType.fromValue(connectorType.value())); } } return connectorTypes; }
class class_name[name] begin[{] method[getConnectorTypes, return_type[type[List]], modifier[public], parameter[chargingStation]] begin[{] local_variable[type[List], connectorTypes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=TEPCO_CHA_DE_MO, postfix_operators=[], prefix_operators=[], qualifier=ConnectorType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=connectorType, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=value, postfix_operators=[], prefix_operators=[], qualifier=connectorType, selectors=[], type_arguments=None)], member=fromValue, postfix_operators=[], prefix_operators=[], qualifier=io.motown.vas.v10.soap.schema.ConnectorType, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=connectorTypes, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TEPCO_CHA_ME_DO, postfix_operators=[], prefix_operators=[], qualifier=io.motown.vas.v10.soap.schema.ConnectorType, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=connectorTypes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConnectorTypes, postfix_operators=[], prefix_operators=[], qualifier=chargingStation, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=connectorType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConnectorType, sub_type=None))), label=None) return[member[.connectorTypes]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[vas] operator[SEP] identifier[v10] operator[SEP] identifier[soap] operator[SEP] identifier[schema] operator[SEP] identifier[ConnectorType] operator[>] identifier[getConnectorTypes] operator[SEP] identifier[ChargingStation] identifier[chargingStation] operator[SEP] { identifier[List] operator[<] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[vas] operator[SEP] identifier[v10] operator[SEP] identifier[soap] operator[SEP] identifier[schema] operator[SEP] identifier[ConnectorType] operator[>] identifier[connectorTypes] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ConnectorType] identifier[connectorType] operator[:] identifier[chargingStation] operator[SEP] identifier[getConnectorTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[connectorType] operator[SEP] identifier[equals] operator[SEP] identifier[ConnectorType] operator[SEP] identifier[TEPCO_CHA_DE_MO] operator[SEP] operator[SEP] { identifier[connectorTypes] operator[SEP] identifier[add] operator[SEP] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[vas] operator[SEP] identifier[v10] operator[SEP] identifier[soap] operator[SEP] identifier[schema] operator[SEP] identifier[ConnectorType] operator[SEP] identifier[TEPCO_CHA_ME_DO] operator[SEP] operator[SEP] } Keyword[else] { identifier[connectorTypes] operator[SEP] identifier[add] operator[SEP] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[vas] operator[SEP] identifier[v10] operator[SEP] identifier[soap] operator[SEP] identifier[schema] operator[SEP] identifier[ConnectorType] operator[SEP] identifier[fromValue] operator[SEP] identifier[connectorType] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[connectorTypes] operator[SEP] }
protected boolean shouldCloseConnection(HttpConnection conn) { // Connection must be closed due to an abnormal circumstance if (isConnectionCloseForced()) { LOG.debug("Should force-close connection."); return true; } Header connectionHeader = null; // In case being connected via a proxy server if (!conn.isTransparent()) { // Check for 'proxy-connection' directive connectionHeader = responseHeaders.getFirstHeader("proxy-connection"); } // In all cases Check for 'connection' directive // some non-complaint proxy servers send it instread of // expected 'proxy-connection' directive if (connectionHeader == null) { connectionHeader = responseHeaders.getFirstHeader("connection"); } // In case the response does not contain any explict connection // directives, check whether the request does if (connectionHeader == null) { connectionHeader = requestHeaders.getFirstHeader("connection"); } if (connectionHeader != null) { if (connectionHeader.getValue().equalsIgnoreCase("close")) { if (LOG.isDebugEnabled()) { LOG.debug("Should close connection in response to directive: " + connectionHeader.getValue()); } return true; } else if (connectionHeader.getValue().equalsIgnoreCase("keep-alive")) { if (LOG.isDebugEnabled()) { LOG.debug("Should NOT close connection in response to directive: " + connectionHeader.getValue()); } return false; } else { if (LOG.isDebugEnabled()) { LOG.debug("Unknown directive: " + connectionHeader.toExternalForm()); } } } LOG.debug("Resorting to protocol version default close connection policy"); // missing or invalid connection header, do the default if (this.effectiveVersion.greaterEquals(HttpVersion.HTTP_1_1)) { if (LOG.isDebugEnabled()) { LOG.debug("Should NOT close connection, using " + this.effectiveVersion.toString()); } } else { if (LOG.isDebugEnabled()) { LOG.debug("Should close connection, using " + this.effectiveVersion.toString()); } } return this.effectiveVersion.lessEquals(HttpVersion.HTTP_1_0); }
class class_name[name] begin[{] method[shouldCloseConnection, return_type[type[boolean]], modifier[protected], parameter[conn]] begin[{] if[call[.isConnectionCloseForced, parameter[]]] begin[{] call[LOG.debug, parameter[literal["Should force-close connection."]]] return[literal[true]] else begin[{] None end[}] local_variable[type[Header], connectionHeader] if[call[conn.isTransparent, parameter[]]] begin[{] assign[member[.connectionHeader], call[responseHeaders.getFirstHeader, parameter[literal["proxy-connection"]]]] else begin[{] None end[}] if[binary_operation[member[.connectionHeader], ==, literal[null]]] begin[{] assign[member[.connectionHeader], call[responseHeaders.getFirstHeader, parameter[literal["connection"]]]] else begin[{] None end[}] if[binary_operation[member[.connectionHeader], ==, literal[null]]] begin[{] assign[member[.connectionHeader], call[requestHeaders.getFirstHeader, parameter[literal["connection"]]]] else begin[{] None end[}] if[binary_operation[member[.connectionHeader], !=, literal[null]]] begin[{] if[call[connectionHeader.getValue, parameter[]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Should close connection in response to directive: "], +, call[connectionHeader.getValue, parameter[]]]]] else begin[{] None end[}] return[literal[true]] else begin[{] if[call[connectionHeader.getValue, parameter[]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Should NOT close connection in response to directive: "], +, call[connectionHeader.getValue, parameter[]]]]] else begin[{] None end[}] return[literal[false]] else begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Unknown directive: "], +, call[connectionHeader.toExternalForm, parameter[]]]]] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] call[LOG.debug, parameter[literal["Resorting to protocol version default close connection policy"]]] if[THIS[member[None.effectiveVersion]call[None.greaterEquals, parameter[member[HttpVersion.HTTP_1_1]]]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Should NOT close connection, using "], +, THIS[member[None.effectiveVersion]call[None.toString, parameter[]]]]]] else begin[{] None end[}] else begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Should close connection, using "], +, THIS[member[None.effectiveVersion]call[None.toString, parameter[]]]]]] else begin[{] None end[}] end[}] return[THIS[member[None.effectiveVersion]call[None.lessEquals, parameter[member[HttpVersion.HTTP_1_0]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[shouldCloseConnection] operator[SEP] identifier[HttpConnection] identifier[conn] operator[SEP] { Keyword[if] operator[SEP] identifier[isConnectionCloseForced] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[Header] identifier[connectionHeader] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[conn] operator[SEP] identifier[isTransparent] operator[SEP] operator[SEP] operator[SEP] { identifier[connectionHeader] operator[=] identifier[responseHeaders] operator[SEP] identifier[getFirstHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connectionHeader] operator[==] Other[null] operator[SEP] { identifier[connectionHeader] operator[=] identifier[responseHeaders] operator[SEP] identifier[getFirstHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connectionHeader] operator[==] Other[null] operator[SEP] { identifier[connectionHeader] operator[=] identifier[requestHeaders] operator[SEP] identifier[getFirstHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connectionHeader] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[connectionHeader] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] 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[connectionHeader] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[connectionHeader] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] 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[connectionHeader] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { 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[connectionHeader] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[effectiveVersion] operator[SEP] identifier[greaterEquals] operator[SEP] identifier[HttpVersion] operator[SEP] identifier[HTTP_1_1] 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[+] Keyword[this] operator[SEP] identifier[effectiveVersion] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { 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[+] Keyword[this] operator[SEP] identifier[effectiveVersion] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] identifier[effectiveVersion] operator[SEP] identifier[lessEquals] operator[SEP] identifier[HttpVersion] operator[SEP] identifier[HTTP_1_0] operator[SEP] operator[SEP] }
@VisibleForTesting static boolean isPghp(String line) { if (line == null) return false; else // return Pattern.matches("^(\\\\.*\\\\)?\\$PGHP.*$", line); return pghpPattern.matcher(line).matches(); }
class class_name[name] begin[{] method[isPghp, return_type[type[boolean]], modifier[static], parameter[line]] begin[{] if[binary_operation[member[.line], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] return[call[pghpPattern.matcher, parameter[member[.line]]]] end[}] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[static] Keyword[boolean] identifier[isPghp] operator[SEP] identifier[String] identifier[line] operator[SEP] { Keyword[if] operator[SEP] identifier[line] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[else] Keyword[return] identifier[pghpPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public EList<IfcSurfaceStyleElementSelect> getStyles() { return (EList<IfcSurfaceStyleElementSelect>) eGet(Ifc2x3tc1Package.Literals.IFC_SURFACE_STYLE__STYLES, true); }
class class_name[name] begin[{] method[getStyles, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_SURFACE_STYLE__STYLES, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package.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=IfcSurfaceStyleElementSelect, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[EList] operator[<] identifier[IfcSurfaceStyleElementSelect] operator[>] identifier[getStyles] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcSurfaceStyleElementSelect] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_SURFACE_STYLE__STYLES] , literal[boolean] operator[SEP] operator[SEP] }
public void waitTask(String taskID, long timeToWait) throws AlgoliaException { this.waitTask(taskID, timeToWait, RequestOptions.empty); }
class class_name[name] begin[{] method[waitTask, return_type[void], modifier[public], parameter[taskID, timeToWait]] begin[{] THIS[call[None.waitTask, parameter[member[.taskID], member[.timeToWait], member[RequestOptions.empty]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[waitTask] operator[SEP] identifier[String] identifier[taskID] , Keyword[long] identifier[timeToWait] operator[SEP] Keyword[throws] identifier[AlgoliaException] { Keyword[this] operator[SEP] identifier[waitTask] operator[SEP] identifier[taskID] , identifier[timeToWait] , identifier[RequestOptions] operator[SEP] identifier[empty] operator[SEP] operator[SEP] }
public Integer getAllocationSize() { if(childNode.getAttribute("allocation-size") != null && !childNode.getAttribute("allocation-size").equals("null")) { return Integer.valueOf(childNode.getAttribute("allocation-size")); } return null; }
class class_name[name] begin[{] method[getAllocationSize, return_type[type[Integer]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[call[childNode.getAttribute, parameter[literal["allocation-size"]]], !=, literal[null]], &&, call[childNode.getAttribute, parameter[literal["allocation-size"]]]]] begin[{] return[call[Integer.valueOf, parameter[call[childNode.getAttribute, parameter[literal["allocation-size"]]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Integer] identifier[getAllocationSize] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[childNode] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[childNode] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[childNode] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void addAnonymousFunctions() { TreeSet<SymbolScope> scopes = new TreeSet<>(lexicalScopeOrdering); for (SymbolScope scope : getAllScopes()) { if (scope.isLexicalScope()) { scopes.add(scope); } } for (SymbolScope scope : scopes) { addAnonymousFunctionsInScope(scope); } }
class class_name[name] begin[{] method[addAnonymousFunctions, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[TreeSet], scopes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isLexicalScope, postfix_operators=[], prefix_operators=[], qualifier=scope, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=scopes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAllScopes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=scope)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SymbolScope, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAnonymousFunctionsInScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=scopes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=scope)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SymbolScope, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addAnonymousFunctions] operator[SEP] operator[SEP] { identifier[TreeSet] operator[<] identifier[SymbolScope] operator[>] identifier[scopes] operator[=] Keyword[new] identifier[TreeSet] operator[<] operator[>] operator[SEP] identifier[lexicalScopeOrdering] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SymbolScope] identifier[scope] operator[:] identifier[getAllScopes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[scope] operator[SEP] identifier[isLexicalScope] operator[SEP] operator[SEP] operator[SEP] { identifier[scopes] operator[SEP] identifier[add] operator[SEP] identifier[scope] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[SymbolScope] identifier[scope] operator[:] identifier[scopes] operator[SEP] { identifier[addAnonymousFunctionsInScope] operator[SEP] identifier[scope] operator[SEP] operator[SEP] } }
synchronized public LHS toLHS( CallStack callstack, Interpreter interpreter ) throws UtilEvalError { // Should clean this up to a single return statement reset(); LHS lhs; // Simple (non-compound) variable assignment e.g. x=5; if ( !isCompound(evalName) ) { if ( evalName.equals("this") ) throw new UtilEvalError("Can't assign to 'this'." ); if (namespace.isClass) // Loose type field lhs = new LHS( namespace, evalName ); else lhs = new LHS( namespace, evalName, false/*bubble up if allowed*/); return lhs; } // Field e.g. foo.bar=5; Object obj = null; try { while( evalName != null && isCompound( evalName ) ) { obj = consumeNextObjectField( callstack, interpreter, false/*forcclass*/, true/*autoallocthis*/ ); } } catch( UtilEvalError e ) { throw new UtilEvalError( "LHS evaluation: " + e.getMessage(), e); } // Finished eval and its a class. if ( evalName == null && obj instanceof ClassIdentifier ) throw new UtilEvalError("Can't assign to class: " + value ); if ( obj == null ) throw new UtilEvalError("Error in LHS: " + value ); // e.g. this.x=5; or someThisType.x=5; if ( obj instanceof This ) { // dissallow assignment to magic fields if ( evalName.equals("namespace") || evalName.equals("variables") || evalName.equals("methods") || evalName.equals("caller") ) throw new UtilEvalError( "Can't assign to special variable: "+evalName ); Interpreter.debug("found This reference evaluating LHS"); /* If this was a literal "super" reference then we allow recursion in setting the variable to get the normal effect of finding the nearest definition starting at the super scope. On any other resolution qualified by a 'this' type reference we want to set the variable directly in that scope. e.g. this.x=5; or someThisType.x=5; In the old scoping rules super didn't do this. */ boolean localVar = !lastEvalName.equals("super"); return new LHS( ((This)obj).namespace, evalName, localVar ); } if ( evalName != null ) { try { if ( obj instanceof ClassIdentifier ) { Class clas = ((ClassIdentifier)obj).getTargetClass(); lhs = Reflect.getLHSStaticField(clas, evalName); return lhs; } else { lhs = Reflect.getLHSObjectField(obj, evalName); return lhs; } } catch(ReflectError e) { return new LHS(obj, evalName); } } throw new InterpreterError("Internal error in lhs..."); }
class class_name[name] begin[{] method[toLHS, return_type[type[LHS]], modifier[synchronized public], parameter[callstack, interpreter]] begin[{] call[.reset, parameter[]] local_variable[type[LHS], lhs] if[call[.isCompound, parameter[member[.evalName]]]] begin[{] if[call[evalName.equals, parameter[literal["this"]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't assign to 'this'.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UtilEvalError, sub_type=None)), label=None) else begin[{] None end[}] if[member[namespace.isClass]] begin[{] assign[member[.lhs], ClassCreator(arguments=[MemberReference(member=namespace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=evalName, 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=LHS, sub_type=None))] else begin[{] assign[member[.lhs], ClassCreator(arguments=[MemberReference(member=namespace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LHS, sub_type=None))] end[}] return[member[.lhs]] else begin[{] None end[}] local_variable[type[Object], obj] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=callstack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=interpreter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=consumeNextObjectField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isCompound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LHS evaluation: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UtilEvalError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UtilEvalError']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[member[.evalName], ==, literal[null]], &&, binary_operation[member[.obj], instanceof, type[ClassIdentifier]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't assign to class: "), operandr=MemberReference(member=value, 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=UtilEvalError, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.obj], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in LHS: "), operandr=MemberReference(member=value, 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=UtilEvalError, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.obj], instanceof, type[This]]] begin[{] if[binary_operation[binary_operation[binary_operation[call[evalName.equals, parameter[literal["namespace"]]], ||, call[evalName.equals, parameter[literal["variables"]]]], ||, call[evalName.equals, parameter[literal["methods"]]]], ||, call[evalName.equals, parameter[literal["caller"]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't assign to special variable: "), operandr=MemberReference(member=evalName, 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=UtilEvalError, sub_type=None)), label=None) else begin[{] None end[}] call[Interpreter.debug, parameter[literal["found This reference evaluating LHS"]]] local_variable[type[boolean], localVar] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=This, sub_type=None)), MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=localVar, 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=LHS, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.evalName], !=, literal[null]]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ClassIdentifier, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLHSObjectField, postfix_operators=[], prefix_operators=[], qualifier=Reflect, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ClassIdentifier, sub_type=None)), name=clas)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=clas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=evalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLHSStaticField, postfix_operators=[], prefix_operators=[], qualifier=Reflect, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=evalName, 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=LHS, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ReflectError']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Internal error in lhs...")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterpreterError, sub_type=None)), label=None) end[}] END[}]
Keyword[synchronized] Keyword[public] identifier[LHS] identifier[toLHS] operator[SEP] identifier[CallStack] identifier[callstack] , identifier[Interpreter] identifier[interpreter] operator[SEP] Keyword[throws] identifier[UtilEvalError] { identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[LHS] identifier[lhs] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isCompound] operator[SEP] identifier[evalName] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[evalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UtilEvalError] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[namespace] operator[SEP] identifier[isClass] operator[SEP] identifier[lhs] operator[=] Keyword[new] identifier[LHS] operator[SEP] identifier[namespace] , identifier[evalName] operator[SEP] operator[SEP] Keyword[else] identifier[lhs] operator[=] Keyword[new] identifier[LHS] operator[SEP] identifier[namespace] , identifier[evalName] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[lhs] operator[SEP] } identifier[Object] identifier[obj] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] identifier[evalName] operator[!=] Other[null] operator[&&] identifier[isCompound] operator[SEP] identifier[evalName] operator[SEP] operator[SEP] { identifier[obj] operator[=] identifier[consumeNextObjectField] operator[SEP] identifier[callstack] , identifier[interpreter] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[UtilEvalError] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UtilEvalError] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[evalName] operator[==] Other[null] operator[&&] identifier[obj] Keyword[instanceof] identifier[ClassIdentifier] operator[SEP] Keyword[throw] Keyword[new] identifier[UtilEvalError] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[UtilEvalError] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[This] operator[SEP] { Keyword[if] operator[SEP] identifier[evalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[evalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[evalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[evalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UtilEvalError] operator[SEP] literal[String] operator[+] identifier[evalName] operator[SEP] operator[SEP] identifier[Interpreter] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[localVar] operator[=] operator[!] identifier[lastEvalName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[LHS] operator[SEP] operator[SEP] operator[SEP] identifier[This] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[namespace] , identifier[evalName] , identifier[localVar] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[evalName] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[ClassIdentifier] operator[SEP] { identifier[Class] identifier[clas] operator[=] operator[SEP] operator[SEP] identifier[ClassIdentifier] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[getTargetClass] operator[SEP] operator[SEP] operator[SEP] identifier[lhs] operator[=] identifier[Reflect] operator[SEP] identifier[getLHSStaticField] operator[SEP] identifier[clas] , identifier[evalName] operator[SEP] operator[SEP] Keyword[return] identifier[lhs] operator[SEP] } Keyword[else] { identifier[lhs] operator[=] identifier[Reflect] operator[SEP] identifier[getLHSObjectField] operator[SEP] identifier[obj] , identifier[evalName] operator[SEP] operator[SEP] Keyword[return] identifier[lhs] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ReflectError] identifier[e] operator[SEP] { Keyword[return] Keyword[new] identifier[LHS] operator[SEP] identifier[obj] , identifier[evalName] operator[SEP] operator[SEP] } } Keyword[throw] Keyword[new] identifier[InterpreterError] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public int controlledPoll(final ControlledFragmentHandler handler, final int fragmentLimit) { if (isClosed) { return 0; } int fragmentsRead = 0; long initialPosition = subscriberPosition.get(); int initialOffset = (int)initialPosition & termLengthMask; int resultingOffset = initialOffset; final UnsafeBuffer termBuffer = activeTermBuffer(initialPosition); final int capacity = termBuffer.capacity(); final Header header = this.header; header.buffer(termBuffer); try { while (fragmentsRead < fragmentLimit && resultingOffset < capacity) { final int length = frameLengthVolatile(termBuffer, resultingOffset); if (length <= 0) { break; } final int frameOffset = resultingOffset; final int alignedLength = BitUtil.align(length, FRAME_ALIGNMENT); resultingOffset += alignedLength; if (isPaddingFrame(termBuffer, frameOffset)) { continue; } header.offset(frameOffset); final Action action = handler.onFragment( termBuffer, frameOffset + HEADER_LENGTH, length - HEADER_LENGTH, header); if (action == ABORT) { resultingOffset -= alignedLength; break; } ++fragmentsRead; if (action == BREAK) { break; } else if (action == COMMIT) { initialPosition += (resultingOffset - initialOffset); initialOffset = resultingOffset; subscriberPosition.setOrdered(initialPosition); } } } catch (final Throwable t) { errorHandler.onError(t); } finally { final long resultingPosition = initialPosition + (resultingOffset - initialOffset); if (resultingPosition > initialPosition) { subscriberPosition.setOrdered(resultingPosition); } } return fragmentsRead; }
class class_name[name] begin[{] method[controlledPoll, return_type[type[int]], modifier[public], parameter[handler, fragmentLimit]] begin[{] if[member[.isClosed]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[int], fragmentsRead] local_variable[type[long], initialPosition] local_variable[type[int], initialOffset] local_variable[type[int], resultingOffset] local_variable[type[UnsafeBuffer], termBuffer] local_variable[type[int], capacity] local_variable[type[Header], header] call[header.buffer, parameter[member[.termBuffer]]] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=termBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=frameLengthVolatile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=length)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=frameOffset)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FRAME_ALIGNMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=align, postfix_operators=[], prefix_operators=[], qualifier=BitUtil, selectors=[], type_arguments=None), name=alignedLength)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=alignedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=termBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=frameOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPaddingFrame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=frameOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=offset, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=termBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=frameOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=HEADER_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=HEADER_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=header, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onFragment, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), name=action)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Action, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ABORT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=alignedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=MemberReference(member=fragmentsRead, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BREAK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMMIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=initialPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=initialOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=initialOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=initialPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOrdered, postfix_operators=[], prefix_operators=[], qualifier=subscriberPosition, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fragmentsRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fragmentLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onError, postfix_operators=[], prefix_operators=[], qualifier=errorHandler, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=initialPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=resultingOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=initialOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=+), name=resultingPosition)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=resultingPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=initialPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resultingPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOrdered, postfix_operators=[], prefix_operators=[], qualifier=subscriberPosition, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) return[member[.fragmentsRead]] end[}] END[}]
Keyword[public] Keyword[int] identifier[controlledPoll] operator[SEP] Keyword[final] identifier[ControlledFragmentHandler] identifier[handler] , Keyword[final] Keyword[int] identifier[fragmentLimit] operator[SEP] { Keyword[if] operator[SEP] identifier[isClosed] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[int] identifier[fragmentsRead] operator[=] Other[0] operator[SEP] Keyword[long] identifier[initialPosition] operator[=] identifier[subscriberPosition] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[initialOffset] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[initialPosition] operator[&] identifier[termLengthMask] operator[SEP] Keyword[int] identifier[resultingOffset] operator[=] identifier[initialOffset] operator[SEP] Keyword[final] identifier[UnsafeBuffer] identifier[termBuffer] operator[=] identifier[activeTermBuffer] operator[SEP] identifier[initialPosition] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[capacity] operator[=] identifier[termBuffer] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Header] identifier[header] operator[=] Keyword[this] operator[SEP] identifier[header] operator[SEP] identifier[header] operator[SEP] identifier[buffer] operator[SEP] identifier[termBuffer] operator[SEP] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] identifier[fragmentsRead] operator[<] identifier[fragmentLimit] operator[&&] identifier[resultingOffset] operator[<] identifier[capacity] operator[SEP] { Keyword[final] Keyword[int] identifier[length] operator[=] identifier[frameLengthVolatile] operator[SEP] identifier[termBuffer] , identifier[resultingOffset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[<=] Other[0] operator[SEP] { Keyword[break] operator[SEP] } Keyword[final] Keyword[int] identifier[frameOffset] operator[=] identifier[resultingOffset] operator[SEP] Keyword[final] Keyword[int] identifier[alignedLength] operator[=] identifier[BitUtil] operator[SEP] identifier[align] operator[SEP] identifier[length] , identifier[FRAME_ALIGNMENT] operator[SEP] operator[SEP] identifier[resultingOffset] operator[+=] identifier[alignedLength] operator[SEP] Keyword[if] operator[SEP] identifier[isPaddingFrame] operator[SEP] identifier[termBuffer] , identifier[frameOffset] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[header] operator[SEP] identifier[offset] operator[SEP] identifier[frameOffset] operator[SEP] operator[SEP] Keyword[final] identifier[Action] identifier[action] operator[=] identifier[handler] operator[SEP] identifier[onFragment] operator[SEP] identifier[termBuffer] , identifier[frameOffset] operator[+] identifier[HEADER_LENGTH] , identifier[length] operator[-] identifier[HEADER_LENGTH] , identifier[header] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[action] operator[==] identifier[ABORT] operator[SEP] { identifier[resultingOffset] operator[-=] identifier[alignedLength] operator[SEP] Keyword[break] operator[SEP] } operator[++] identifier[fragmentsRead] operator[SEP] Keyword[if] operator[SEP] identifier[action] operator[==] identifier[BREAK] operator[SEP] { Keyword[break] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[action] operator[==] identifier[COMMIT] operator[SEP] { identifier[initialPosition] operator[+=] operator[SEP] identifier[resultingOffset] operator[-] identifier[initialOffset] operator[SEP] operator[SEP] identifier[initialOffset] operator[=] identifier[resultingOffset] operator[SEP] identifier[subscriberPosition] operator[SEP] identifier[setOrdered] operator[SEP] identifier[initialPosition] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] Keyword[final] identifier[Throwable] identifier[t] operator[SEP] { identifier[errorHandler] operator[SEP] identifier[onError] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[final] Keyword[long] identifier[resultingPosition] operator[=] identifier[initialPosition] operator[+] operator[SEP] identifier[resultingOffset] operator[-] identifier[initialOffset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resultingPosition] operator[>] identifier[initialPosition] operator[SEP] { identifier[subscriberPosition] operator[SEP] identifier[setOrdered] operator[SEP] identifier[resultingPosition] operator[SEP] operator[SEP] } } Keyword[return] identifier[fragmentsRead] operator[SEP] }