code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public final T fromString(final Map<String, Object> pAddParam, final String pStrVal) throws Exception { if (pStrVal == null || "".equals(pStrVal)) { return null; } T object = this.objectClass.newInstance(); for (String fldValStr : pStrVal.split(",")) { int eqIdx = fldValStr.indexOf("="); String fldName = fldValStr.substring(0, eqIdx); String cnvrtName = this.fieldConverterNamesHolder.getFor(this.objectClass, fldName); if (cnvrtName != null) { // e.g. transient field IConverterToFromString cnvrt = this.fieldsConvertersFatory .lazyGet(null, cnvrtName); Method fldSetter = this.settersRapiHolder .getFor(this.objectClass, fldName); String strVal = fldValStr.substring(eqIdx + 1); Object fldVal = cnvrt.fromString(pAddParam, strVal); fldSetter.invoke(object, fldVal); } } return object; }
class class_name[name] begin[{] method[fromString, return_type[type[T]], modifier[final public], parameter[pAddParam, pStrVal]] begin[{] if[binary_operation[binary_operation[member[.pStrVal], ==, literal[null]], ||, literal[""]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[T], object] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=fldValStr, selectors=[], type_arguments=None), name=eqIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=eqIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=fldValStr, selectors=[], type_arguments=None), name=fldName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fieldConverterNamesHolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=objectClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=fldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=cnvrtName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnvrtName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fieldsConvertersFatory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=cnvrtName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lazyGet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=cnvrt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IConverterToFromString, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=settersRapiHolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=objectClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=fldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=fldSetter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=eqIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=fldValStr, selectors=[], type_arguments=None), name=strVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=strVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=cnvrt, selectors=[], type_arguments=None), name=fldVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fldVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=fldSetter, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=split, postfix_operators=[], prefix_operators=[], qualifier=pStrVal, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fldValStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.object]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[T] identifier[fromString] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[String] identifier[pStrVal] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[pStrVal] operator[==] Other[null] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[pStrVal] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[T] identifier[object] operator[=] Keyword[this] operator[SEP] identifier[objectClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[fldValStr] operator[:] identifier[pStrVal] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[int] identifier[eqIdx] operator[=] identifier[fldValStr] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[fldName] operator[=] identifier[fldValStr] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[eqIdx] operator[SEP] operator[SEP] identifier[String] identifier[cnvrtName] operator[=] Keyword[this] operator[SEP] identifier[fieldConverterNamesHolder] operator[SEP] identifier[getFor] operator[SEP] Keyword[this] operator[SEP] identifier[objectClass] , identifier[fldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cnvrtName] operator[!=] Other[null] operator[SEP] { identifier[IConverterToFromString] identifier[cnvrt] operator[=] Keyword[this] operator[SEP] identifier[fieldsConvertersFatory] operator[SEP] identifier[lazyGet] operator[SEP] Other[null] , identifier[cnvrtName] operator[SEP] operator[SEP] identifier[Method] identifier[fldSetter] operator[=] Keyword[this] operator[SEP] identifier[settersRapiHolder] operator[SEP] identifier[getFor] operator[SEP] Keyword[this] operator[SEP] identifier[objectClass] , identifier[fldName] operator[SEP] operator[SEP] identifier[String] identifier[strVal] operator[=] identifier[fldValStr] operator[SEP] identifier[substring] operator[SEP] identifier[eqIdx] operator[+] Other[1] operator[SEP] operator[SEP] identifier[Object] identifier[fldVal] operator[=] identifier[cnvrt] operator[SEP] identifier[fromString] operator[SEP] identifier[pAddParam] , identifier[strVal] operator[SEP] operator[SEP] identifier[fldSetter] operator[SEP] identifier[invoke] operator[SEP] identifier[object] , identifier[fldVal] operator[SEP] operator[SEP] } } Keyword[return] identifier[object] operator[SEP] }
public static String getIfCacheNotNull(EntityColumn column, String contents) { StringBuilder sql = new StringBuilder(); sql.append("<if test=\"").append(column.getProperty()).append("_cache != null\">"); sql.append(contents); sql.append("</if>"); return sql.toString(); }
class class_name[name] begin[{] method[getIfCacheNotNull, return_type[type[String]], modifier[public static], parameter[column, contents]] begin[{] local_variable[type[StringBuilder], sql] call[sql.append, parameter[literal["<if test=\""]]] call[sql.append, parameter[member[.contents]]] call[sql.append, parameter[literal["</if>"]]] return[call[sql.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getIfCacheNotNull] operator[SEP] identifier[EntityColumn] identifier[column] , identifier[String] identifier[contents] operator[SEP] { identifier[StringBuilder] identifier[sql] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[column] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] identifier[contents] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sql] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public void resolve(final ValueStack values) throws Exception { if (values.size() < 2) throw new Exception("missing operands for " + toString()); try { final double multiplier = Math.pow(10, values.popDouble()); values.push(new Double(Math.round(values.popDouble() * multiplier) / multiplier)); } catch (final ParseException e) { e.fillInStackTrace(); throw new Exception(toString() + "; " + e.getMessage(), e); } }
class class_name[name] begin[{] method[resolve, return_type[void], modifier[public], parameter[values]] begin[{] if[binary_operation[call[values.size, parameter[]], <, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="missing operands for "), operandr=MethodInvocation(arguments=[], member=toString, 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=Exception, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), MethodInvocation(arguments=[], member=popDouble, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=multiplier)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=popDouble, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), operandr=MemberReference(member=multiplier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MemberReference(member=multiplier, 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=Double, sub_type=None))], member=push, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=fillInStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="; "), operator=+), 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=Exception, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[resolve] operator[SEP] Keyword[final] identifier[ValueStack] identifier[values] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] Keyword[double] identifier[multiplier] operator[=] identifier[Math] operator[SEP] identifier[pow] operator[SEP] Other[10] , identifier[values] operator[SEP] identifier[popDouble] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] identifier[push] operator[SEP] Keyword[new] identifier[Double] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[values] operator[SEP] identifier[popDouble] operator[SEP] operator[SEP] operator[*] identifier[multiplier] operator[SEP] operator[/] identifier[multiplier] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[ParseException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[fillInStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public Config setProperty(String name, String value) { properties.put(name, value); return this; }
class class_name[name] begin[{] method[setProperty, return_type[type[Config]], modifier[public], parameter[name, value]] begin[{] call[properties.put, parameter[member[.name], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Config] identifier[setProperty] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public boolean isAllowedCachedLeft(final ContextEntry[] context, final InternalFactHandle handle) { return (indexed[0] || constraints[0].isAllowedCachedLeft(context[0], handle)) && (indexed[1] || constraints[1].isAllowedCachedLeft(context[1], handle)) && (indexed[2] || constraints[2].isAllowedCachedLeft( context[2], handle )); }
class class_name[name] begin[{] method[isAllowedCachedLeft, return_type[type[boolean]], modifier[public], parameter[context, handle]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.indexed], ||, member[.constraints]], &&, binary_operation[member[.indexed], ||, member[.constraints]]], &&, binary_operation[member[.indexed], ||, member[.constraints]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isAllowedCachedLeft] operator[SEP] Keyword[final] identifier[ContextEntry] operator[SEP] operator[SEP] identifier[context] , Keyword[final] identifier[InternalFactHandle] identifier[handle] operator[SEP] { Keyword[return] operator[SEP] identifier[indexed] operator[SEP] Other[0] operator[SEP] operator[||] identifier[constraints] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[isAllowedCachedLeft] operator[SEP] identifier[context] operator[SEP] Other[0] operator[SEP] , identifier[handle] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[indexed] operator[SEP] Other[1] operator[SEP] operator[||] identifier[constraints] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[isAllowedCachedLeft] operator[SEP] identifier[context] operator[SEP] Other[1] operator[SEP] , identifier[handle] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[indexed] operator[SEP] Other[2] operator[SEP] operator[||] identifier[constraints] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[isAllowedCachedLeft] operator[SEP] identifier[context] operator[SEP] Other[2] operator[SEP] , identifier[handle] operator[SEP] operator[SEP] operator[SEP] }
void changeBackgroundAlpha() { Drawable background = getBackground(); if (background != null) { int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset())); background.setAlpha(newAlpha); } }
class class_name[name] begin[{] method[changeBackgroundAlpha, return_type[void], modifier[default], parameter[]] begin[{] local_variable[type[Drawable], background] if[binary_operation[member[.background], !=, literal[null]]] begin[{] local_variable[type[int], newAlpha] call[background.setAlpha, parameter[member[.newAlpha]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[changeBackgroundAlpha] operator[SEP] operator[SEP] { identifier[Drawable] identifier[background] operator[=] identifier[getBackground] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[background] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[newAlpha] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[ONE_HUNDRED] operator[*] operator[SEP] Other[1] operator[-] identifier[getVerticalDragOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[background] operator[SEP] identifier[setAlpha] operator[SEP] identifier[newAlpha] operator[SEP] operator[SEP] } }
public static int damerauLevenshteinDistanceCaseInsensitive(String str1, String str2) { return damerauLevenshteinDistance(str1.toLowerCase(), str2.toLowerCase()); }
class class_name[name] begin[{] method[damerauLevenshteinDistanceCaseInsensitive, return_type[type[int]], modifier[public static], parameter[str1, str2]] begin[{] return[call[.damerauLevenshteinDistance, parameter[call[str1.toLowerCase, parameter[]], call[str2.toLowerCase, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[damerauLevenshteinDistanceCaseInsensitive] operator[SEP] identifier[String] identifier[str1] , identifier[String] identifier[str2] operator[SEP] { Keyword[return] identifier[damerauLevenshteinDistance] operator[SEP] identifier[str1] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] , identifier[str2] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Contract(pure = true) @NotNull public static Promise<Void> all(@NotNull List<? extends Promise<?>> promises) { int size = promises.size(); if (size == 0) return Promise.complete(); if (size == 1) return promises.get(0).toVoid(); if (size == 2) return promises.get(0).both(promises.get(1)); return all(promises.iterator()); }
class class_name[name] begin[{] method[all, return_type[type[Promise]], modifier[public static], parameter[promises]] begin[{] local_variable[type[int], size] if[binary_operation[member[.size], ==, literal[0]]] begin[{] return[call[Promise.complete, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.size], ==, literal[1]]] begin[{] return[call[promises.get, parameter[literal[0]]]] else begin[{] None end[}] if[binary_operation[member[.size], ==, literal[2]]] begin[{] return[call[promises.get, parameter[literal[0]]]] else begin[{] None end[}] return[call[.all, parameter[call[promises.iterator, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[all] operator[SEP] annotation[@] identifier[NotNull] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Promise] operator[<] operator[?] operator[>] operator[>] identifier[promises] operator[SEP] { Keyword[int] identifier[size] operator[=] identifier[promises] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[0] operator[SEP] Keyword[return] identifier[Promise] operator[SEP] identifier[complete] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[1] operator[SEP] Keyword[return] identifier[promises] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[toVoid] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[2] operator[SEP] Keyword[return] identifier[promises] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[both] operator[SEP] identifier[promises] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[all] operator[SEP] identifier[promises] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Workflow getWorkflow(String workflowId, boolean includeTasks) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); Workflow workflow = getForEntity("workflow/{workflowId}", new Object[]{"includeTasks", includeTasks}, Workflow.class, workflowId); populateWorkflowOutput(workflow); return workflow; }
class class_name[name] begin[{] method[getWorkflow, return_type[type[Workflow]], modifier[public], parameter[workflowId, includeTasks]] begin[{] call[Preconditions.checkArgument, parameter[call[StringUtils.isNotBlank, parameter[member[.workflowId]]], literal["workflow id cannot be blank"]]] local_variable[type[Workflow], workflow] call[.populateWorkflowOutput, parameter[member[.workflow]]] return[member[.workflow]] end[}] END[}]
Keyword[public] identifier[Workflow] identifier[getWorkflow] operator[SEP] identifier[String] identifier[workflowId] , Keyword[boolean] identifier[includeTasks] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[workflowId] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[Workflow] identifier[workflow] operator[=] identifier[getForEntity] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , identifier[includeTasks] } , identifier[Workflow] operator[SEP] Keyword[class] , identifier[workflowId] operator[SEP] operator[SEP] identifier[populateWorkflowOutput] operator[SEP] identifier[workflow] operator[SEP] operator[SEP] Keyword[return] identifier[workflow] operator[SEP] }
public static Resource createResource(String resourcePath) throws IOException { if (resourcePath.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) { return Resource.newClassPathResource(resourcePath.substring(ResourceUtils.CLASSPATH_URL_PREFIX.length())); } else if (resourcePath.startsWith(ResourceUtils.FILE_URL_PREFIX)) { return Resource.newResource(new File(resourcePath.substring(ResourceUtils.FILE_URL_PREFIX.length()))); } else if (resourcePath.startsWith("/")) { return Resource.newResource(new File(resourcePath)); } try { if (Files.exists(Paths.get(resourcePath))) { return Resource.newResource(new File(resourcePath)); } // path seem to be valid but nothing exists there throw new IOException("Missing file at resourcePath=" + resourcePath); } catch (InvalidPathException e) { throw new IOException("Invalid path or unknown protocol in resourcePath=" + resourcePath, e); } }
class class_name[name] begin[{] method[createResource, return_type[type[Resource]], modifier[public static], parameter[resourcePath]] begin[{] if[call[resourcePath.startsWith, parameter[member[ResourceUtils.CLASSPATH_URL_PREFIX]]]] begin[{] return[call[Resource.newClassPathResource, parameter[call[resourcePath.substring, parameter[call[ResourceUtils.CLASSPATH_URL_PREFIX.length, parameter[]]]]]]] else begin[{] if[call[resourcePath.startsWith, parameter[member[ResourceUtils.FILE_URL_PREFIX]]]] begin[{] return[call[Resource.newResource, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=ResourceUtils.FILE_URL_PREFIX, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=resourcePath, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]] else begin[{] if[call[resourcePath.startsWith, parameter[literal["/"]]]] begin[{] return[call[Resource.newResource, parameter[ClassCreator(arguments=[MemberReference(member=resourcePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]] else begin[{] None end[}] end[}] end[}] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=resourcePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None)], member=exists, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=resourcePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], member=newResource, postfix_operators=[], prefix_operators=[], qualifier=Resource, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing file at resourcePath="), operandr=MemberReference(member=resourcePath, 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=IOException, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid path or unknown protocol in resourcePath="), operandr=MemberReference(member=resourcePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvalidPathException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Resource] identifier[createResource] operator[SEP] identifier[String] identifier[resourcePath] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[ResourceUtils] operator[SEP] identifier[CLASSPATH_URL_PREFIX] operator[SEP] operator[SEP] { Keyword[return] identifier[Resource] operator[SEP] identifier[newClassPathResource] operator[SEP] identifier[resourcePath] operator[SEP] identifier[substring] operator[SEP] identifier[ResourceUtils] operator[SEP] identifier[CLASSPATH_URL_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[ResourceUtils] operator[SEP] identifier[FILE_URL_PREFIX] operator[SEP] operator[SEP] { Keyword[return] identifier[Resource] operator[SEP] identifier[newResource] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[resourcePath] operator[SEP] identifier[substring] operator[SEP] identifier[ResourceUtils] operator[SEP] identifier[FILE_URL_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[Resource] operator[SEP] identifier[newResource] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[resourcePath] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[Files] operator[SEP] identifier[exists] operator[SEP] identifier[Paths] operator[SEP] identifier[get] operator[SEP] identifier[resourcePath] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Resource] operator[SEP] identifier[newResource] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[resourcePath] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[resourcePath] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvalidPathException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[resourcePath] , identifier[e] operator[SEP] operator[SEP] } }
ByteBuffer readView(int position) { ByteBuffer bb = content.duplicate().asReadOnlyBuffer(); bb.position(position); return bb; }
class class_name[name] begin[{] method[readView, return_type[type[ByteBuffer]], modifier[default], parameter[position]] begin[{] local_variable[type[ByteBuffer], bb] call[bb.position, parameter[member[.position]]] return[member[.bb]] end[}] END[}]
identifier[ByteBuffer] identifier[readView] operator[SEP] Keyword[int] identifier[position] operator[SEP] { identifier[ByteBuffer] identifier[bb] operator[=] identifier[content] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[asReadOnlyBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[bb] operator[SEP] identifier[position] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[return] identifier[bb] operator[SEP] }
synchronized public void set(Element value) { int bind = ((int)value.getIndex() & Integer.MAX_VALUE) % buckets.length; Element[] bucket = buckets[bind]; int count = counts[bind]; if (bucket == null) buckets[bind] = bucket = new Element[initBucketSize]; else if (bucket.length == count) { bucket = new Element[count * 2]; System.arraycopy(buckets[bind], 0, bucket, 0, count); buckets[bind] = bucket; } bucket[count] = value; counts[bind] = count + 1; totalSize += 1; }
class class_name[name] begin[{] method[set, return_type[void], modifier[synchronized public], parameter[value]] begin[{] local_variable[type[int], bind] local_variable[type[Element], bucket] local_variable[type[int], count] if[binary_operation[member[.bucket], ==, literal[null]]] begin[{] assign[member[.buckets], assign[member[.bucket], ArrayCreator(dimensions=[MemberReference(member=initBucketSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None))]] else begin[{] if[binary_operation[member[bucket.length], ==, member[.count]]] begin[{] assign[member[.bucket], ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None))] call[System.arraycopy, parameter[member[.buckets], literal[0], member[.bucket], literal[0], member[.count]]] assign[member[.buckets], member[.bucket]] else begin[{] None end[}] end[}] assign[member[.bucket], member[.value]] assign[member[.counts], binary_operation[member[.count], +, literal[1]]] assign[member[.totalSize], literal[1]] end[}] END[}]
Keyword[synchronized] Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[Element] identifier[value] operator[SEP] { Keyword[int] identifier[bind] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[&] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[%] identifier[buckets] operator[SEP] identifier[length] operator[SEP] identifier[Element] operator[SEP] operator[SEP] identifier[bucket] operator[=] identifier[buckets] operator[SEP] identifier[bind] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[counts] operator[SEP] identifier[bind] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bucket] operator[==] Other[null] operator[SEP] identifier[buckets] operator[SEP] identifier[bind] operator[SEP] operator[=] identifier[bucket] operator[=] Keyword[new] identifier[Element] operator[SEP] identifier[initBucketSize] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[bucket] operator[SEP] identifier[length] operator[==] identifier[count] operator[SEP] { identifier[bucket] operator[=] Keyword[new] identifier[Element] operator[SEP] identifier[count] operator[*] Other[2] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[buckets] operator[SEP] identifier[bind] operator[SEP] , Other[0] , identifier[bucket] , Other[0] , identifier[count] operator[SEP] operator[SEP] identifier[buckets] operator[SEP] identifier[bind] operator[SEP] operator[=] identifier[bucket] operator[SEP] } identifier[bucket] operator[SEP] identifier[count] operator[SEP] operator[=] identifier[value] operator[SEP] identifier[counts] operator[SEP] identifier[bind] operator[SEP] operator[=] identifier[count] operator[+] Other[1] operator[SEP] identifier[totalSize] operator[+=] Other[1] operator[SEP] }
public List<Double> getOffsetsInTimeUnits() { double start = firstDate.getMillis(); List<Double> result = new ArrayList<>(runtimes.length); for (int idx=0; idx<runtimes.length; idx++) { double runtime = (double) getRuntime(idx); double msecs = (runtime - start); result.add(msecs / timeUnit.getValueInMillisecs()); } return result; }
class class_name[name] begin[{] method[getOffsetsInTimeUnits, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[double], start] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRuntime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=double)), name=runtime)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=runtime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=msecs)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=msecs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getValueInMillisecs, postfix_operators=[], prefix_operators=[], qualifier=timeUnit, selectors=[], type_arguments=None), operator=/)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=runtimes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=idx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Double] operator[>] identifier[getOffsetsInTimeUnits] operator[SEP] operator[SEP] { Keyword[double] identifier[start] operator[=] identifier[firstDate] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Double] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[runtimes] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[idx] operator[=] Other[0] operator[SEP] identifier[idx] operator[<] identifier[runtimes] operator[SEP] identifier[length] operator[SEP] identifier[idx] operator[++] operator[SEP] { Keyword[double] identifier[runtime] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[getRuntime] operator[SEP] identifier[idx] operator[SEP] operator[SEP] Keyword[double] identifier[msecs] operator[=] operator[SEP] identifier[runtime] operator[-] identifier[start] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[msecs] operator[/] identifier[timeUnit] operator[SEP] identifier[getValueInMillisecs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private int expandCompositChar(char[] dest, int start, int length, int lacount, int shapingMode) throws ArabicShapingException { int lenOptionsLamAlef = options & LAMALEF_MASK; int lenOptionsSeen = options & SEEN_MASK; int lenOptionsYehHamza = options & YEHHAMZA_MASK; boolean spaceNotFound = false; if (!isLogical && !spacesRelativeToTextBeginEnd) { switch (lenOptionsLamAlef) { case LAMALEF_BEGIN: lenOptionsLamAlef = LAMALEF_END; break; case LAMALEF_END: lenOptionsLamAlef = LAMALEF_BEGIN; break; default: break; } } if(shapingMode == 1){ if(lenOptionsLamAlef == LAMALEF_AUTO){ if(isLogical){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); if(spaceNotFound){ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); } if(spaceNotFound){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); } if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else{ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); if(spaceNotFound){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); } if(spaceNotFound){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); } if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } } }else if(lenOptionsLamAlef == LAMALEF_END){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_BEGIN){ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_RESIZE){ for (int r = start + length, w = r + lacount; --r >= start;) { char ch = dest[r]; if (isNormalizedLamAlefChar(ch)) { dest[--w] = '\u0644'; dest[--w] = convertNormalizedLamAlef[ch - '\u065C']; } else { dest[--w] = ch; } } length += lacount; } }else{ if(lenOptionsSeen == SEEN_TWOCELL_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,1,0); if(spaceNotFound){ throw new ArabicShapingException("No space for Seen tail expansion"); } } if(lenOptionsYehHamza == YEHHAMZA_TWOCELL_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,1,0,0); if(spaceNotFound){ throw new ArabicShapingException("No space for YehHamza expansion"); } } } return length; }
class class_name[name] begin[{] method[expandCompositChar, return_type[type[int]], modifier[private], parameter[dest, start, length, lacount, shapingMode]] begin[{] local_variable[type[int], lenOptionsLamAlef] local_variable[type[int], lenOptionsSeen] local_variable[type[int], lenOptionsYehHamza] local_variable[type[boolean], spaceNotFound] if[binary_operation[member[.isLogical], &&, member[.spacesRelativeToTextBeginEnd]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['LAMALEF_BEGIN'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lenOptionsLamAlef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=LAMALEF_END, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LAMALEF_END'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lenOptionsLamAlef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=LAMALEF_BEGIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=lenOptionsLamAlef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] if[binary_operation[member[.shapingMode], ==, literal[1]]] begin[{] if[binary_operation[member[.lenOptionsLamAlef], ==, member[.LAMALEF_AUTO]]] begin[{] if[member[.isLogical]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtEnd, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] if[member[.spaceNotFound]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtBegin, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] else begin[{] None end[}] if[member[.spaceNotFound]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtNear, parameter[member[.dest], member[.start], member[.length], literal[0], literal[0], literal[1]]]] else begin[{] None end[}] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No spacefor lamalef")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtBegin, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] if[member[.spaceNotFound]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtEnd, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] else begin[{] None end[}] if[member[.spaceNotFound]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtNear, parameter[member[.dest], member[.start], member[.length], literal[0], literal[0], literal[1]]]] else begin[{] None end[}] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No spacefor lamalef")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] end[}] else begin[{] if[binary_operation[member[.lenOptionsLamAlef], ==, member[.LAMALEF_END]]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtEnd, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No spacefor lamalef")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.lenOptionsLamAlef], ==, member[.LAMALEF_BEGIN]]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtBegin, parameter[member[.dest], member[.start], member[.length], member[.lacount]]]] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No spacefor lamalef")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.lenOptionsLamAlef], ==, member[.LAMALEF_NEAR]]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtNear, parameter[member[.dest], member[.start], member[.length], literal[0], literal[0], literal[1]]]] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No spacefor lamalef")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.lenOptionsLamAlef], ==, member[.LAMALEF_RESIZE]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNormalizedLamAlefChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=w, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]))]), type==, value=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=w, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='ل')), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=w, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]))]), type==, value=MemberReference(member=convertNormalizedLamAlef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='ٜ'), operator=-))])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=r), VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lacount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=w)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) assign[member[.length], member[.lacount]] else begin[{] None end[}] end[}] end[}] end[}] end[}] else begin[{] if[binary_operation[member[.lenOptionsSeen], ==, member[.SEEN_TWOCELL_NEAR]]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtNear, parameter[member[.dest], member[.start], member[.length], literal[0], literal[1], literal[0]]]] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No space for Seen tail expansion")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.lenOptionsYehHamza], ==, member[.YEHHAMZA_TWOCELL_NEAR]]] begin[{] assign[member[.spaceNotFound], call[.expandCompositCharAtNear, parameter[member[.dest], member[.start], member[.length], literal[1], literal[0], literal[0]]]] if[member[.spaceNotFound]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No space for YehHamza expansion")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArabicShapingException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] return[member[.length]] end[}] END[}]
Keyword[private] Keyword[int] identifier[expandCompositChar] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[start] , Keyword[int] identifier[length] , Keyword[int] identifier[lacount] , Keyword[int] identifier[shapingMode] operator[SEP] Keyword[throws] identifier[ArabicShapingException] { Keyword[int] identifier[lenOptionsLamAlef] operator[=] identifier[options] operator[&] identifier[LAMALEF_MASK] operator[SEP] Keyword[int] identifier[lenOptionsSeen] operator[=] identifier[options] operator[&] identifier[SEEN_MASK] operator[SEP] Keyword[int] identifier[lenOptionsYehHamza] operator[=] identifier[options] operator[&] identifier[YEHHAMZA_MASK] operator[SEP] Keyword[boolean] identifier[spaceNotFound] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isLogical] operator[&&] operator[!] identifier[spacesRelativeToTextBeginEnd] operator[SEP] { Keyword[switch] operator[SEP] identifier[lenOptionsLamAlef] operator[SEP] { Keyword[case] identifier[LAMALEF_BEGIN] operator[:] identifier[lenOptionsLamAlef] operator[=] identifier[LAMALEF_END] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[LAMALEF_END] operator[:] identifier[lenOptionsLamAlef] operator[=] identifier[LAMALEF_BEGIN] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[shapingMode] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[lenOptionsLamAlef] operator[==] identifier[LAMALEF_AUTO] operator[SEP] { Keyword[if] operator[SEP] identifier[isLogical] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtEnd] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtBegin] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtNear] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , Other[0] , Other[0] , Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtBegin] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtEnd] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtNear] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , Other[0] , Other[0] , Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[lenOptionsLamAlef] operator[==] identifier[LAMALEF_END] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtEnd] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[lenOptionsLamAlef] operator[==] identifier[LAMALEF_BEGIN] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtBegin] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , identifier[lacount] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[lenOptionsLamAlef] operator[==] identifier[LAMALEF_NEAR] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtNear] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , Other[0] , Other[0] , Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[lenOptionsLamAlef] operator[==] identifier[LAMALEF_RESIZE] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[r] operator[=] identifier[start] operator[+] identifier[length] , identifier[w] operator[=] identifier[r] operator[+] identifier[lacount] operator[SEP] operator[--] identifier[r] operator[>=] identifier[start] operator[SEP] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[dest] operator[SEP] identifier[r] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isNormalizedLamAlefChar] operator[SEP] identifier[ch] operator[SEP] operator[SEP] { identifier[dest] operator[SEP] operator[--] identifier[w] operator[SEP] operator[=] literal[String] operator[SEP] identifier[dest] operator[SEP] operator[--] identifier[w] operator[SEP] operator[=] identifier[convertNormalizedLamAlef] operator[SEP] identifier[ch] operator[-] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[dest] operator[SEP] operator[--] identifier[w] operator[SEP] operator[=] identifier[ch] operator[SEP] } } identifier[length] operator[+=] identifier[lacount] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[lenOptionsSeen] operator[==] identifier[SEEN_TWOCELL_NEAR] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtNear] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , Other[0] , Other[1] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[lenOptionsYehHamza] operator[==] identifier[YEHHAMZA_TWOCELL_NEAR] operator[SEP] { identifier[spaceNotFound] operator[=] identifier[expandCompositCharAtNear] operator[SEP] identifier[dest] , identifier[start] , identifier[length] , Other[1] , Other[0] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[spaceNotFound] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArabicShapingException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[length] operator[SEP] }
public void setSupportedEndpointTypes(java.util.Collection<SupportedEndpointType> supportedEndpointTypes) { if (supportedEndpointTypes == null) { this.supportedEndpointTypes = null; return; } this.supportedEndpointTypes = new java.util.ArrayList<SupportedEndpointType>(supportedEndpointTypes); }
class class_name[name] begin[{] method[setSupportedEndpointTypes, return_type[void], modifier[public], parameter[supportedEndpointTypes]] begin[{] if[binary_operation[member[.supportedEndpointTypes], ==, literal[null]]] begin[{] assign[THIS[member[None.supportedEndpointTypes]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.supportedEndpointTypes]], ClassCreator(arguments=[MemberReference(member=supportedEndpointTypes, 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=SupportedEndpointType, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSupportedEndpointTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[SupportedEndpointType] operator[>] identifier[supportedEndpointTypes] operator[SEP] { Keyword[if] operator[SEP] identifier[supportedEndpointTypes] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[supportedEndpointTypes] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[supportedEndpointTypes] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[SupportedEndpointType] operator[>] operator[SEP] identifier[supportedEndpointTypes] operator[SEP] operator[SEP] }
public static IndexChangeAdapter forEnumeratedProperty( ExecutionContext context, NodeTypePredicate matcher, String workspaceName, Name propertyName, ProvidedIndex<?> index ) { return new EnumeratedPropertyChangeAdapter(context, matcher, workspaceName, propertyName, index); }
class class_name[name] begin[{] method[forEnumeratedProperty, return_type[type[IndexChangeAdapter]], modifier[public static], parameter[context, matcher, workspaceName, propertyName, index]] begin[{] return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=matcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=workspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index, 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=EnumeratedPropertyChangeAdapter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[IndexChangeAdapter] identifier[forEnumeratedProperty] operator[SEP] identifier[ExecutionContext] identifier[context] , identifier[NodeTypePredicate] identifier[matcher] , identifier[String] identifier[workspaceName] , identifier[Name] identifier[propertyName] , identifier[ProvidedIndex] operator[<] operator[?] operator[>] identifier[index] operator[SEP] { Keyword[return] Keyword[new] identifier[EnumeratedPropertyChangeAdapter] operator[SEP] identifier[context] , identifier[matcher] , identifier[workspaceName] , identifier[propertyName] , identifier[index] operator[SEP] operator[SEP] }
@Nonnull public static <T> EbInterfaceReader <T> create (@Nonnull final Class <T> aClass) { return new EbInterfaceReader <> (aClass); }
class class_name[name] begin[{] method[create, return_type[type[EbInterfaceReader]], modifier[public static], parameter[aClass]] begin[{] return[ClassCreator(arguments=[MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=EbInterfaceReader, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[EbInterfaceReader] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[aClass] operator[SEP] { Keyword[return] Keyword[new] identifier[EbInterfaceReader] operator[<] operator[>] operator[SEP] identifier[aClass] operator[SEP] operator[SEP] }
public JobExecutionResult execute(String job_name) throws Exception { distributeFiles(); JobExecutionResult result = this.env.execute(job_name); return result; }
class class_name[name] begin[{] method[execute, return_type[type[JobExecutionResult]], modifier[public], parameter[job_name]] begin[{] call[.distributeFiles, parameter[]] local_variable[type[JobExecutionResult], result] return[member[.result]] end[}] END[}]
Keyword[public] identifier[JobExecutionResult] identifier[execute] operator[SEP] identifier[String] identifier[job_name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[distributeFiles] operator[SEP] operator[SEP] operator[SEP] identifier[JobExecutionResult] identifier[result] operator[=] Keyword[this] operator[SEP] identifier[env] operator[SEP] identifier[execute] operator[SEP] identifier[job_name] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public GeocoderAddressComponent getAddressComponent(AddressComponentType addressComponentType) { for (GeocoderAddressComponent component : getPlace().getAddressComponents()) { for (String type : component.getTypes()) { if (addressComponentType.getName().equals(type)) { return component; } } } return null; }
class class_name[name] begin[{] method[getAddressComponent, return_type[type[GeocoderAddressComponent]], modifier[public], parameter[addressComponentType]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=addressComponentType, selectors=[MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTypes, postfix_operators=[], prefix_operators=[], qualifier=component, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPlace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getAddressComponents, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GeocoderAddressComponent, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[GeocoderAddressComponent] identifier[getAddressComponent] operator[SEP] identifier[AddressComponentType] identifier[addressComponentType] operator[SEP] { Keyword[for] operator[SEP] identifier[GeocoderAddressComponent] identifier[component] operator[:] identifier[getPlace] operator[SEP] operator[SEP] operator[SEP] identifier[getAddressComponents] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[type] operator[:] identifier[component] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addressComponentType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[return] identifier[component] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public static java.util.Date getDateTime(Object value) { try { return toDateTime(value); } catch (ParseException pe) { pe.printStackTrace(); return null; } }
class class_name[name] begin[{] method[getDateTime, return_type[type[java]], modifier[public static], parameter[value]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toDateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=pe, 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=pe, types=['ParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[getDateTime] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[try] { Keyword[return] identifier[toDateTime] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[pe] operator[SEP] { identifier[pe] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (null != params) { this.serializer = params.getDefaultSerializer(); } }
class class_name[name] begin[{] method[readObject, return_type[void], modifier[private], parameter[in]] begin[{] call[in.defaultReadObject, parameter[]] if[binary_operation[literal[null], !=, member[.params]]] begin[{] assign[THIS[member[None.serializer]], call[params.getDefaultSerializer, parameter[]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[in] operator[SEP] identifier[defaultReadObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[params] operator[SEP] { Keyword[this] operator[SEP] identifier[serializer] operator[=] identifier[params] operator[SEP] identifier[getDefaultSerializer] operator[SEP] operator[SEP] operator[SEP] } }
@Deprecated protected int handleGetExtendedYear() { // Ethiopic calendar uses EXTENDED_YEAR aligned to // Amelete Mihret year always. int eyear; if (newerField(EXTENDED_YEAR, YEAR) == EXTENDED_YEAR) { eyear = internalGet(EXTENDED_YEAR, 1); // Default to year 1 } else if (isAmeteAlemEra()){ eyear = internalGet(YEAR, 1 + AMETE_MIHRET_DELTA) - AMETE_MIHRET_DELTA; // Default to year 1 of Amelete Mihret } else { // The year defaults to the epoch start, the era to AMETE_MIHRET int era = internalGet(ERA, AMETE_MIHRET); if (era == AMETE_MIHRET) { eyear = internalGet(YEAR, 1); // Default to year 1 } else { eyear = internalGet(YEAR, 1) - AMETE_MIHRET_DELTA; } } return eyear; }
class class_name[name] begin[{] method[handleGetExtendedYear, return_type[type[int]], modifier[protected], parameter[]] begin[{] local_variable[type[int], eyear] if[binary_operation[call[.newerField, parameter[member[.EXTENDED_YEAR], member[.YEAR]]], ==, member[.EXTENDED_YEAR]]] begin[{] assign[member[.eyear], call[.internalGet, parameter[member[.EXTENDED_YEAR], literal[1]]]] else begin[{] if[call[.isAmeteAlemEra, parameter[]]] begin[{] assign[member[.eyear], binary_operation[call[.internalGet, parameter[member[.YEAR], binary_operation[literal[1], +, member[.AMETE_MIHRET_DELTA]]]], -, member[.AMETE_MIHRET_DELTA]]] else begin[{] local_variable[type[int], era] if[binary_operation[member[.era], ==, member[.AMETE_MIHRET]]] begin[{] assign[member[.eyear], call[.internalGet, parameter[member[.YEAR], literal[1]]]] else begin[{] assign[member[.eyear], binary_operation[call[.internalGet, parameter[member[.YEAR], literal[1]]], -, member[.AMETE_MIHRET_DELTA]]] end[}] end[}] end[}] return[member[.eyear]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[protected] Keyword[int] identifier[handleGetExtendedYear] operator[SEP] operator[SEP] { Keyword[int] identifier[eyear] operator[SEP] Keyword[if] operator[SEP] identifier[newerField] operator[SEP] identifier[EXTENDED_YEAR] , identifier[YEAR] operator[SEP] operator[==] identifier[EXTENDED_YEAR] operator[SEP] { identifier[eyear] operator[=] identifier[internalGet] operator[SEP] identifier[EXTENDED_YEAR] , Other[1] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isAmeteAlemEra] operator[SEP] operator[SEP] operator[SEP] { identifier[eyear] operator[=] identifier[internalGet] operator[SEP] identifier[YEAR] , Other[1] operator[+] identifier[AMETE_MIHRET_DELTA] operator[SEP] operator[-] identifier[AMETE_MIHRET_DELTA] operator[SEP] } Keyword[else] { Keyword[int] identifier[era] operator[=] identifier[internalGet] operator[SEP] identifier[ERA] , identifier[AMETE_MIHRET] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[era] operator[==] identifier[AMETE_MIHRET] operator[SEP] { identifier[eyear] operator[=] identifier[internalGet] operator[SEP] identifier[YEAR] , Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[eyear] operator[=] identifier[internalGet] operator[SEP] identifier[YEAR] , Other[1] operator[SEP] operator[-] identifier[AMETE_MIHRET_DELTA] operator[SEP] } } Keyword[return] identifier[eyear] operator[SEP] }
static String extractSimpleName(String fqcn, String separator) { if (fqcn.contains(separator)) { return fqcn.substring(fqcn.lastIndexOf(separator) + 1, fqcn.length()); } else { return fqcn; } }
class class_name[name] begin[{] method[extractSimpleName, return_type[type[String]], modifier[static], parameter[fqcn, separator]] begin[{] if[call[fqcn.contains, parameter[member[.separator]]]] begin[{] return[call[fqcn.substring, parameter[binary_operation[call[fqcn.lastIndexOf, parameter[member[.separator]]], +, literal[1]], call[fqcn.length, parameter[]]]]] else begin[{] return[member[.fqcn]] end[}] end[}] END[}]
Keyword[static] identifier[String] identifier[extractSimpleName] operator[SEP] identifier[String] identifier[fqcn] , identifier[String] identifier[separator] operator[SEP] { Keyword[if] operator[SEP] identifier[fqcn] operator[SEP] identifier[contains] operator[SEP] identifier[separator] operator[SEP] operator[SEP] { Keyword[return] identifier[fqcn] operator[SEP] identifier[substring] operator[SEP] identifier[fqcn] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[separator] operator[SEP] operator[+] Other[1] , identifier[fqcn] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[fqcn] operator[SEP] } }
private static ColumnCapabilities getEffectiveCapabilities( DimensionSpec dimSpec, @Nullable ColumnCapabilities capabilities ) { if (capabilities == null) { capabilities = DEFAULT_STRING_CAPABILITIES; } // Complex dimension type is not supported if (capabilities.getType() == ValueType.COMPLEX) { capabilities = DEFAULT_STRING_CAPABILITIES; } // Currently, all extractionFns output Strings, so the column will return String values via a // DimensionSelector if an extractionFn is present. if (dimSpec.getExtractionFn() != null) { capabilities = DEFAULT_STRING_CAPABILITIES; } // DimensionSpec's decorate only operates on DimensionSelectors, so if a spec mustDecorate(), // we need to wrap selectors on numeric columns with a string casting DimensionSelector. if (ValueType.isNumeric(capabilities.getType())) { if (dimSpec.mustDecorate()) { capabilities = DEFAULT_STRING_CAPABILITIES; } } return capabilities; }
class class_name[name] begin[{] method[getEffectiveCapabilities, return_type[type[ColumnCapabilities]], modifier[private static], parameter[dimSpec, capabilities]] begin[{] if[binary_operation[member[.capabilities], ==, literal[null]]] begin[{] assign[member[.capabilities], member[.DEFAULT_STRING_CAPABILITIES]] else begin[{] None end[}] if[binary_operation[call[capabilities.getType, parameter[]], ==, member[ValueType.COMPLEX]]] begin[{] assign[member[.capabilities], member[.DEFAULT_STRING_CAPABILITIES]] else begin[{] None end[}] if[binary_operation[call[dimSpec.getExtractionFn, parameter[]], !=, literal[null]]] begin[{] assign[member[.capabilities], member[.DEFAULT_STRING_CAPABILITIES]] else begin[{] None end[}] if[call[ValueType.isNumeric, parameter[call[capabilities.getType, parameter[]]]]] begin[{] if[call[dimSpec.mustDecorate, parameter[]]] begin[{] assign[member[.capabilities], member[.DEFAULT_STRING_CAPABILITIES]] else begin[{] None end[}] else begin[{] None end[}] return[member[.capabilities]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ColumnCapabilities] identifier[getEffectiveCapabilities] operator[SEP] identifier[DimensionSpec] identifier[dimSpec] , annotation[@] identifier[Nullable] identifier[ColumnCapabilities] identifier[capabilities] operator[SEP] { Keyword[if] operator[SEP] identifier[capabilities] operator[==] Other[null] operator[SEP] { identifier[capabilities] operator[=] identifier[DEFAULT_STRING_CAPABILITIES] operator[SEP] } Keyword[if] operator[SEP] identifier[capabilities] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[ValueType] operator[SEP] identifier[COMPLEX] operator[SEP] { identifier[capabilities] operator[=] identifier[DEFAULT_STRING_CAPABILITIES] operator[SEP] } Keyword[if] operator[SEP] identifier[dimSpec] operator[SEP] identifier[getExtractionFn] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[capabilities] operator[=] identifier[DEFAULT_STRING_CAPABILITIES] operator[SEP] } Keyword[if] operator[SEP] identifier[ValueType] operator[SEP] identifier[isNumeric] operator[SEP] identifier[capabilities] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[dimSpec] operator[SEP] identifier[mustDecorate] operator[SEP] operator[SEP] operator[SEP] { identifier[capabilities] operator[=] identifier[DEFAULT_STRING_CAPABILITIES] operator[SEP] } } Keyword[return] identifier[capabilities] operator[SEP] }
public static List<CPOptionCategory> findByGroupId(long groupId, int start, int end) { return getPersistence().findByGroupId(groupId, start, end); }
class class_name[name] begin[{] method[findByGroupId, return_type[type[List]], modifier[public static], parameter[groupId, start, end]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPOptionCategory] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByGroupId] operator[SEP] identifier[groupId] , identifier[start] , identifier[end] operator[SEP] operator[SEP] }
public static void deleteIfExists(File file) throws IOException { if (file.exists()) { if (file.isFile()) { if (!file.delete()) { throw new IOException("Delete file failure,path:" + file.getAbsolutePath()); } } else { File[] files = file.listFiles(); if (files != null && files.length > 0) { for (File temp : files) { deleteIfExists(temp); } } if (!file.delete()) { throw new IOException("Delete file failure,path:" + file.getAbsolutePath()); } } } }
class class_name[name] begin[{] method[deleteIfExists, return_type[void], modifier[public static], parameter[file]] begin[{] if[call[file.exists, parameter[]]] begin[{] if[call[file.isFile, parameter[]]] begin[{] if[call[file.delete, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Delete file failure,path:"), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, 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=IOException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] local_variable[type[File], files] if[binary_operation[binary_operation[member[.files], !=, literal[null]], &&, binary_operation[member[files.length], >, literal[0]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteIfExists, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=temp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] None end[}] if[call[file.delete, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Delete file failure,path:"), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, 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=IOException, sub_type=None)), label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[deleteIfExists] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[file] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[files] operator[!=] Other[null] operator[&&] identifier[files] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] identifier[File] identifier[temp] operator[:] identifier[files] operator[SEP] { identifier[deleteIfExists] operator[SEP] identifier[temp] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } }
public int compareTo(Version that) { if (that == null) { return 1; } if (major != that.major) { return major - that.major; } if (minor != that.minor) { return minor - that.minor; } if (bugfix != that.bugfix) { return bugfix - that.bugfix; } if (build != that.build) { return build - that.build; } return 0; }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[that]] begin[{] if[binary_operation[member[.that], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[.major], !=, member[that.major]]] begin[{] return[binary_operation[member[.major], -, member[that.major]]] else begin[{] None end[}] if[binary_operation[member[.minor], !=, member[that.minor]]] begin[{] return[binary_operation[member[.minor], -, member[that.minor]]] else begin[{] None end[}] if[binary_operation[member[.bugfix], !=, member[that.bugfix]]] begin[{] return[binary_operation[member[.bugfix], -, member[that.bugfix]]] else begin[{] None end[}] if[binary_operation[member[.build], !=, member[that.build]]] begin[{] return[binary_operation[member[.build], -, member[that.build]]] else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Version] identifier[that] operator[SEP] { Keyword[if] operator[SEP] identifier[that] operator[==] Other[null] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[major] operator[!=] identifier[that] operator[SEP] identifier[major] operator[SEP] { Keyword[return] identifier[major] operator[-] identifier[that] operator[SEP] identifier[major] operator[SEP] } Keyword[if] operator[SEP] identifier[minor] operator[!=] identifier[that] operator[SEP] identifier[minor] operator[SEP] { Keyword[return] identifier[minor] operator[-] identifier[that] operator[SEP] identifier[minor] operator[SEP] } Keyword[if] operator[SEP] identifier[bugfix] operator[!=] identifier[that] operator[SEP] identifier[bugfix] operator[SEP] { Keyword[return] identifier[bugfix] operator[-] identifier[that] operator[SEP] identifier[bugfix] operator[SEP] } Keyword[if] operator[SEP] identifier[build] operator[!=] identifier[that] operator[SEP] identifier[build] operator[SEP] { Keyword[return] identifier[build] operator[-] identifier[that] operator[SEP] identifier[build] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public void writeDefinition(final OutputStream result) throws IOException { result.write(OPEN_GROUP); result.write(LIST_TABLE); this.document.outputDebugLinebreak(result); for(int i = 0; i < picturelists.size(); i++) { RtfPictureList l = (RtfPictureList)picturelists.get(i); // l.setID(document.getRandomInt()); l.writeDefinition(result); this.document.outputDebugLinebreak(result); } for(int i = 0; i < lists.size(); i++) { RtfList l = (RtfList)lists.get(i); l.setID(document.getRandomInt()); l.writeDefinition(result); this.document.outputDebugLinebreak(result); } result.write(CLOSE_GROUP); this.document.outputDebugLinebreak(result); result.write(OPEN_GROUP); result.write(LIST_OVERRIDE_TABLE); this.document.outputDebugLinebreak(result); // list override index values are 1-based, not 0. // valid list override index values \ls are 1 to 2000. // if there are more then 2000 lists, the result is undefined. for(int i = 0; i < lists.size(); i++) { result.write(OPEN_GROUP); result.write(LIST_OVERRIDE); result.write(RtfList.LIST_ID); result.write(intToByteArray( ((RtfList) lists.get(i)).getID() )); result.write(LIST_OVERRIDE_COUNT); result.write(intToByteArray(0)); // is this correct? Spec says valid values are 1 or 9. result.write(RtfList.LIST_NUMBER); result.write(intToByteArray( ((RtfList) lists.get(i)).getListNumber()) ); result.write(CLOSE_GROUP); this.document.outputDebugLinebreak(result); } result.write(CLOSE_GROUP); this.document.outputDebugLinebreak(result); }
class class_name[name] begin[{] method[writeDefinition, return_type[void], modifier[public], parameter[result]] begin[{] call[result.write, parameter[member[.OPEN_GROUP]]] call[result.write, parameter[member[.LIST_TABLE]]] THIS[member[None.document]call[None.outputDebugLinebreak, parameter[member[.result]]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=picturelists, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RtfPictureList, sub_type=None)), name=l)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RtfPictureList, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeDefinition, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=outputDebugLinebreak, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=picturelists, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=lists, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RtfList, sub_type=None)), name=l)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RtfList, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRandomInt, postfix_operators=[], prefix_operators=[], qualifier=document, selectors=[], type_arguments=None)], member=setID, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeDefinition, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=outputDebugLinebreak, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=lists, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[result.write, parameter[member[.CLOSE_GROUP]]] THIS[member[None.document]call[None.outputDebugLinebreak, parameter[member[.result]]]] call[result.write, parameter[member[.OPEN_GROUP]]] call[result.write, parameter[member[.LIST_OVERRIDE_TABLE]]] THIS[member[None.document]call[None.outputDebugLinebreak, parameter[member[.result]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=OPEN_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LIST_OVERRIDE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LIST_ID, postfix_operators=[], prefix_operators=[], qualifier=RtfList, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=lists, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RtfList, sub_type=None))], member=intToByteArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LIST_OVERRIDE_COUNT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=intToByteArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LIST_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=RtfList, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=lists, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RtfList, sub_type=None))], member=intToByteArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLOSE_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=outputDebugLinebreak, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=lists, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[result.write, parameter[member[.CLOSE_GROUP]]] THIS[member[None.document]call[None.outputDebugLinebreak, parameter[member[.result]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeDefinition] operator[SEP] Keyword[final] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] { identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[LIST_TABLE] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[picturelists] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[RtfPictureList] identifier[l] operator[=] operator[SEP] identifier[RtfPictureList] operator[SEP] identifier[picturelists] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[l] operator[SEP] identifier[writeDefinition] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[lists] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[RtfList] identifier[l] operator[=] operator[SEP] identifier[RtfList] operator[SEP] identifier[lists] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[l] operator[SEP] identifier[setID] operator[SEP] identifier[document] operator[SEP] identifier[getRandomInt] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[l] operator[SEP] identifier[writeDefinition] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[CLOSE_GROUP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[LIST_OVERRIDE_TABLE] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[lists] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[LIST_OVERRIDE] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[RtfList] operator[SEP] identifier[LIST_ID] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[intToByteArray] operator[SEP] operator[SEP] operator[SEP] identifier[RtfList] operator[SEP] identifier[lists] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[LIST_OVERRIDE_COUNT] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[intToByteArray] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[RtfList] operator[SEP] identifier[LIST_NUMBER] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[intToByteArray] operator[SEP] operator[SEP] operator[SEP] identifier[RtfList] operator[SEP] identifier[lists] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[getListNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[CLOSE_GROUP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[CLOSE_GROUP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
private static String getEncodedInstance(String encodedResponse) { if (isReturnValue(encodedResponse) || isThrownException(encodedResponse)) { return encodedResponse.substring(4); } return encodedResponse; }
class class_name[name] begin[{] method[getEncodedInstance, return_type[type[String]], modifier[private static], parameter[encodedResponse]] begin[{] if[binary_operation[call[.isReturnValue, parameter[member[.encodedResponse]]], ||, call[.isThrownException, parameter[member[.encodedResponse]]]]] begin[{] return[call[encodedResponse.substring, parameter[literal[4]]]] else begin[{] None end[}] return[member[.encodedResponse]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getEncodedInstance] operator[SEP] identifier[String] identifier[encodedResponse] operator[SEP] { Keyword[if] operator[SEP] identifier[isReturnValue] operator[SEP] identifier[encodedResponse] operator[SEP] operator[||] identifier[isThrownException] operator[SEP] identifier[encodedResponse] operator[SEP] operator[SEP] { Keyword[return] identifier[encodedResponse] operator[SEP] identifier[substring] operator[SEP] Other[4] operator[SEP] operator[SEP] } Keyword[return] identifier[encodedResponse] operator[SEP] }
@SuppressWarnings("unchecked") protected Flash getFlashCookie(HttpServerExchange exchange) { Flash flash = Flash.create(); final String cookieValue = getCookieValue(exchange, this.config.getFlashCookieName()); if (StringUtils.isNotBlank(cookieValue)) { try { String decryptedValue = Application.getInstance(Crypto.class).decrypt(cookieValue, this.config.getFlashCookieEncryptionKey()); JwtConsumer jwtConsumer = new JwtConsumerBuilder() .setVerificationKey(new HmacKey(this.config.getFlashCookieSignKey().getBytes(StandardCharsets.UTF_8))) .setJwsAlgorithmConstraints(new AlgorithmConstraints(ConstraintType.WHITELIST, AlgorithmIdentifiers.HMAC_SHA512)) .build(); JwtClaims jwtClaims = jwtConsumer.processToClaims(decryptedValue); LocalDateTime expires = LocalDateTime.parse(jwtClaims.getClaimValue(ClaimKey.EXPIRES.toString(), String.class), DateUtils.formatter); if (expires.isAfter(LocalDateTime.now())) { if (jwtClaims.hasClaim(ClaimKey.FORM.toString())) { this.form = CodecUtils.deserializeFromBase64(jwtClaims.getClaimValue(ClaimKey.FORM.toString(), String.class)); } flash = Flash.create() .withContent(MangooUtils.copyMap(jwtClaims.getClaimValue(ClaimKey.DATA.toString(), Map.class))).setDiscard(true); } } catch (MalformedClaimException | InvalidJwtException e) { LOG.error("Failed to parse flash cookie", e); flash.invalidate(); } } return flash; }
class class_name[name] begin[{] method[getFlashCookie, return_type[type[Flash]], modifier[protected], parameter[exchange]] begin[{] local_variable[type[Flash], flash] local_variable[type[String], cookieValue] if[call[StringUtils.isNotBlank, parameter[member[.cookieValue]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Crypto, sub_type=None))], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Application, selectors=[MethodInvocation(arguments=[MemberReference(member=cookieValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getFlashCookieEncryptionKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=decrypt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=decryptedValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getFlashCookieSignKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], member=getBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HmacKey, sub_type=None))], member=setVerificationKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=WHITELIST, postfix_operators=[], prefix_operators=[], qualifier=ConstraintType, selectors=[]), MemberReference(member=HMAC_SHA512, postfix_operators=[], prefix_operators=[], qualifier=AlgorithmIdentifiers, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AlgorithmConstraints, sub_type=None))], member=setJwsAlgorithmConstraints, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=JwtConsumerBuilder, sub_type=None)), name=jwtConsumer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JwtConsumer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=decryptedValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processToClaims, postfix_operators=[], prefix_operators=[], qualifier=jwtConsumer, selectors=[], type_arguments=None), name=jwtClaims)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JwtClaims, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ClaimKey.EXPIRES, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getClaimValue, postfix_operators=[], prefix_operators=[], qualifier=jwtClaims, selectors=[], type_arguments=None), MemberReference(member=formatter, postfix_operators=[], prefix_operators=[], qualifier=DateUtils, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=LocalDateTime, selectors=[], type_arguments=None), name=expires)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalDateTime, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=now, postfix_operators=[], prefix_operators=[], qualifier=LocalDateTime, selectors=[], type_arguments=None)], member=isAfter, postfix_operators=[], prefix_operators=[], qualifier=expires, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ClaimKey.FORM, selectors=[], type_arguments=None)], member=hasClaim, postfix_operators=[], prefix_operators=[], qualifier=jwtClaims, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=form, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ClaimKey.FORM, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getClaimValue, postfix_operators=[], prefix_operators=[], qualifier=jwtClaims, selectors=[], type_arguments=None)], member=deserializeFromBase64, postfix_operators=[], prefix_operators=[], qualifier=CodecUtils, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=flash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=create, postfix_operators=[], prefix_operators=[], qualifier=Flash, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ClaimKey.DATA, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None))], member=getClaimValue, postfix_operators=[], prefix_operators=[], qualifier=jwtClaims, selectors=[], type_arguments=None)], member=copyMap, postfix_operators=[], prefix_operators=[], qualifier=MangooUtils, selectors=[], type_arguments=None)], member=withContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setDiscard, 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="Failed to parse flash cookie"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=invalidate, postfix_operators=[], prefix_operators=[], qualifier=flash, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedClaimException', 'InvalidJwtException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.flash]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Flash] identifier[getFlashCookie] operator[SEP] identifier[HttpServerExchange] identifier[exchange] operator[SEP] { identifier[Flash] identifier[flash] operator[=] identifier[Flash] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[cookieValue] operator[=] identifier[getCookieValue] operator[SEP] identifier[exchange] , Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getFlashCookieName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[cookieValue] operator[SEP] operator[SEP] { Keyword[try] { identifier[String] identifier[decryptedValue] operator[=] identifier[Application] operator[SEP] identifier[getInstance] operator[SEP] identifier[Crypto] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[decrypt] operator[SEP] identifier[cookieValue] , Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getFlashCookieEncryptionKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JwtConsumer] identifier[jwtConsumer] operator[=] Keyword[new] identifier[JwtConsumerBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setVerificationKey] operator[SEP] Keyword[new] identifier[HmacKey] operator[SEP] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getFlashCookieSignKey] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setJwsAlgorithmConstraints] operator[SEP] Keyword[new] identifier[AlgorithmConstraints] operator[SEP] identifier[ConstraintType] operator[SEP] identifier[WHITELIST] , identifier[AlgorithmIdentifiers] operator[SEP] identifier[HMAC_SHA512] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[JwtClaims] identifier[jwtClaims] operator[=] identifier[jwtConsumer] operator[SEP] identifier[processToClaims] operator[SEP] identifier[decryptedValue] operator[SEP] operator[SEP] identifier[LocalDateTime] identifier[expires] operator[=] identifier[LocalDateTime] operator[SEP] identifier[parse] operator[SEP] identifier[jwtClaims] operator[SEP] identifier[getClaimValue] operator[SEP] identifier[ClaimKey] operator[SEP] identifier[EXPIRES] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[String] operator[SEP] Keyword[class] operator[SEP] , identifier[DateUtils] operator[SEP] identifier[formatter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[expires] operator[SEP] identifier[isAfter] operator[SEP] identifier[LocalDateTime] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[jwtClaims] operator[SEP] identifier[hasClaim] operator[SEP] identifier[ClaimKey] operator[SEP] identifier[FORM] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[form] operator[=] identifier[CodecUtils] operator[SEP] identifier[deserializeFromBase64] operator[SEP] identifier[jwtClaims] operator[SEP] identifier[getClaimValue] operator[SEP] identifier[ClaimKey] operator[SEP] identifier[FORM] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } identifier[flash] operator[=] identifier[Flash] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[withContent] operator[SEP] identifier[MangooUtils] operator[SEP] identifier[copyMap] operator[SEP] identifier[jwtClaims] operator[SEP] identifier[getClaimValue] operator[SEP] identifier[ClaimKey] operator[SEP] identifier[DATA] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setDiscard] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[MalformedClaimException] operator[|] identifier[InvalidJwtException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[flash] operator[SEP] identifier[invalidate] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[flash] operator[SEP] }
public static <T extends TypeDescription> ElementMatcher.Junction<T> isAnnotation() { return new ModifierMatcher<T>(ModifierMatcher.Mode.ANNOTATION); }
class class_name[name] begin[{] method[isAnnotation, return_type[type[ElementMatcher]], modifier[public static], parameter[]] begin[{] return[ClassCreator(arguments=[MemberReference(member=ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=ModifierMatcher.Mode, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ModifierMatcher, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TypeDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isAnnotation] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ModifierMatcher] operator[<] identifier[T] operator[>] operator[SEP] identifier[ModifierMatcher] operator[SEP] identifier[Mode] operator[SEP] identifier[ANNOTATION] operator[SEP] operator[SEP] }
public void updateMode(ConnectionMode connectionMode) { switch (connectionMode) { case SEND_ONLY: this.rtpHandler.setReceivable(false); this.rtpHandler.setLoopable(false); audioComponent.updateMode(false, true); oobComponent.updateMode(false, true); this.rtpHandler.deactivate(); this.transmitter.activate(); break; case RECV_ONLY: this.rtpHandler.setReceivable(true); this.rtpHandler.setLoopable(false); audioComponent.updateMode(true, false); oobComponent.updateMode(true, false); this.rtpHandler.activate(); this.transmitter.deactivate(); break; case INACTIVE: this.rtpHandler.setReceivable(false); this.rtpHandler.setLoopable(false); audioComponent.updateMode(false, false); oobComponent.updateMode(false, false); this.rtpHandler.deactivate(); this.transmitter.deactivate(); break; case SEND_RECV: case CONFERENCE: this.rtpHandler.setReceivable(true); this.rtpHandler.setLoopable(false); audioComponent.updateMode(true, true); oobComponent.updateMode(true, true); this.rtpHandler.activate(); this.transmitter.activate(); break; case NETWORK_LOOPBACK: this.rtpHandler.setReceivable(false); this.rtpHandler.setLoopable(true); audioComponent.updateMode(false, false); oobComponent.updateMode(false, false); this.rtpHandler.deactivate(); this.transmitter.deactivate(); break; default: break; } boolean connectImmediately = false; if (this.remotePeer != null) { connectImmediately = udpManager.connectImmediately((InetSocketAddress) this.remotePeer); } if (udpManager.getRtpTimeout() > 0 && this.remotePeer != null && !connectImmediately) { if (this.rtpHandler.isReceivable()) { this.statistics.setLastHeartbeat(scheduler.getClock().getTime()); scheduler.submitHeatbeat(heartBeat); } else { heartBeat.cancel(); } } }
class class_name[name] begin[{] method[updateMode, return_type[void], modifier[public], parameter[connectionMode]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['SEND_ONLY'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setReceivable, 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=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setLoopable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=audioComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=oobComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, 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=transmitter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=activate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RECV_ONLY'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setReceivable, 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=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setLoopable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=audioComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=oobComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=activate, 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=transmitter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['INACTIVE'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setReceivable, 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=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setLoopable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=audioComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=oobComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, 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=transmitter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SEND_RECV', 'CONFERENCE'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setReceivable, 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=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setLoopable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=audioComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=oobComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=activate, 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=transmitter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=activate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NETWORK_LOOPBACK'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setReceivable, 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=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setLoopable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=audioComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=updateMode, postfix_operators=[], prefix_operators=[], qualifier=oobComponent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rtpHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, 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=transmitter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=deactivate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=connectionMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[boolean], connectImmediately] if[binary_operation[THIS[member[None.remotePeer]], !=, literal[null]]] begin[{] assign[member[.connectImmediately], call[udpManager.connectImmediately, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=remotePeer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=InetSocketAddress, sub_type=None))]]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[udpManager.getRtpTimeout, parameter[]], >, literal[0]], &&, binary_operation[THIS[member[None.remotePeer]], !=, literal[null]]], &&, member[.connectImmediately]]] begin[{] if[THIS[member[None.rtpHandler]call[None.isReceivable, parameter[]]]] begin[{] THIS[member[None.statistics]call[None.setLastHeartbeat, parameter[call[scheduler.getClock, parameter[]]]]] call[scheduler.submitHeatbeat, parameter[member[.heartBeat]]] else begin[{] call[heartBeat.cancel, parameter[]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateMode] operator[SEP] identifier[ConnectionMode] identifier[connectionMode] operator[SEP] { Keyword[switch] operator[SEP] identifier[connectionMode] operator[SEP] { Keyword[case] identifier[SEND_ONLY] operator[:] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setReceivable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setLoopable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[audioComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[oobComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transmitter] operator[SEP] identifier[activate] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RECV_ONLY] operator[:] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setReceivable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setLoopable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[audioComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[oobComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[activate] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transmitter] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[INACTIVE] operator[:] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setReceivable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setLoopable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[audioComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[oobComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transmitter] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SEND_RECV] operator[:] Keyword[case] identifier[CONFERENCE] operator[:] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setReceivable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setLoopable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[audioComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[oobComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[activate] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transmitter] operator[SEP] identifier[activate] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NETWORK_LOOPBACK] operator[:] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setReceivable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[setLoopable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[audioComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[oobComponent] operator[SEP] identifier[updateMode] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[transmitter] operator[SEP] identifier[deactivate] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[boolean] identifier[connectImmediately] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[remotePeer] operator[!=] Other[null] operator[SEP] { identifier[connectImmediately] operator[=] identifier[udpManager] operator[SEP] identifier[connectImmediately] operator[SEP] operator[SEP] identifier[InetSocketAddress] operator[SEP] Keyword[this] operator[SEP] identifier[remotePeer] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[udpManager] operator[SEP] identifier[getRtpTimeout] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] Keyword[this] operator[SEP] identifier[remotePeer] operator[!=] Other[null] operator[&&] operator[!] identifier[connectImmediately] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[rtpHandler] operator[SEP] identifier[isReceivable] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[statistics] operator[SEP] identifier[setLastHeartbeat] operator[SEP] identifier[scheduler] operator[SEP] identifier[getClock] operator[SEP] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[scheduler] operator[SEP] identifier[submitHeatbeat] operator[SEP] identifier[heartBeat] operator[SEP] operator[SEP] } Keyword[else] { identifier[heartBeat] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] } } }
public static String UUID( long lo, long hi ) { long lo0 = (lo>>32)&0xFFFFFFFFL; long lo1 = (lo>>16)&0xFFFFL; long lo2 = (lo>> 0)&0xFFFFL; long hi0 = (hi>>48)&0xFFFFL; long hi1 = (hi>> 0)&0xFFFFFFFFFFFFL; return String.format("%08X-%04X-%04X-%04X-%012X",lo0,lo1,lo2,hi0,hi1); }
class class_name[name] begin[{] method[UUID, return_type[type[String]], modifier[public static], parameter[lo, hi]] begin[{] local_variable[type[long], lo0] local_variable[type[long], lo1] local_variable[type[long], lo2] local_variable[type[long], hi0] local_variable[type[long], hi1] return[call[String.format, parameter[literal["%08X-%04X-%04X-%04X-%012X"], member[.lo0], member[.lo1], member[.lo2], member[.hi0], member[.hi1]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[UUID] operator[SEP] Keyword[long] identifier[lo] , Keyword[long] identifier[hi] operator[SEP] { Keyword[long] identifier[lo0] operator[=] operator[SEP] identifier[lo] operator[>] operator[>] Other[32] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[long] identifier[lo1] operator[=] operator[SEP] identifier[lo] operator[>] operator[>] Other[16] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[long] identifier[lo2] operator[=] operator[SEP] identifier[lo] operator[>] operator[>] Other[0] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[long] identifier[hi0] operator[=] operator[SEP] identifier[hi] operator[>] operator[>] Other[48] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[long] identifier[hi1] operator[=] operator[SEP] identifier[hi] operator[>] operator[>] Other[0] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[lo0] , identifier[lo1] , identifier[lo2] , identifier[hi0] , identifier[hi1] operator[SEP] operator[SEP] }
public static boolean isPortAvailable(final int port) { try (ServerSocket tcp = new ServerSocket(port); DatagramSocket udp = new DatagramSocket(port)) { return tcp.isBound() && udp.isBound(); } catch (Exception e) { //NOSONAR return false; } }
class class_name[name] begin[{] method[isPortAvailable, return_type[type[boolean]], modifier[public static], parameter[port]] begin[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isBound, postfix_operators=[], prefix_operators=[], qualifier=tcp, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isBound, postfix_operators=[], prefix_operators=[], qualifier=udp, selectors=[], type_arguments=None), operator=&&), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=tcp, type=ReferenceType(arguments=None, dimensions=[], name=ServerSocket, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=port, 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=ServerSocket, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=udp, type=ReferenceType(arguments=None, dimensions=[], name=DatagramSocket, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=port, 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=DatagramSocket, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPortAvailable] operator[SEP] Keyword[final] Keyword[int] identifier[port] operator[SEP] { Keyword[try] operator[SEP] identifier[ServerSocket] identifier[tcp] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] identifier[port] operator[SEP] operator[SEP] identifier[DatagramSocket] identifier[udp] operator[=] Keyword[new] identifier[DatagramSocket] operator[SEP] identifier[port] operator[SEP] operator[SEP] { Keyword[return] identifier[tcp] operator[SEP] identifier[isBound] operator[SEP] operator[SEP] operator[&&] identifier[udp] operator[SEP] identifier[isBound] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
@Override public DescribeSMBSettingsResult describeSMBSettings(DescribeSMBSettingsRequest request) { request = beforeClientExecution(request); return executeDescribeSMBSettings(request); }
class class_name[name] begin[{] method[describeSMBSettings, return_type[type[DescribeSMBSettingsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeSMBSettings, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeSMBSettingsResult] identifier[describeSMBSettings] operator[SEP] identifier[DescribeSMBSettingsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeSMBSettings] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
static boolean memequal(byte[] b1, byte[] b2, int len) { if(b1 == b2) return true; if(b1 == null || b2 == null) return false; if(b1.length < len || b2.length < len) return false; for(int i = 0; i < len; i++) { if(b1[i] != b2[i]) return false; } return true; }
class class_name[name] begin[{] method[memequal, return_type[type[boolean]], modifier[static], parameter[b1, b2, len]] begin[{] if[binary_operation[member[.b1], ==, member[.b2]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.b1], ==, literal[null]], ||, binary_operation[member[.b2], ==, literal[null]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[b1.length], <, member[.len]], ||, binary_operation[member[b2.length], <, member[.len]]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=b2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, 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[literal[true]] end[}] END[}]
Keyword[static] Keyword[boolean] identifier[memequal] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b1] , Keyword[byte] operator[SEP] operator[SEP] identifier[b2] , Keyword[int] identifier[len] operator[SEP] { Keyword[if] operator[SEP] identifier[b1] operator[==] identifier[b2] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[b1] operator[==] Other[null] operator[||] identifier[b2] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[b1] operator[SEP] identifier[length] operator[<] identifier[len] operator[||] identifier[b2] operator[SEP] identifier[length] operator[<] identifier[len] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[b1] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[b2] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static void saveBmp(Bitmap src, String fileName) throws ImageSaveException { try { BitmapUtil.save(src, fileName); } catch (IOException e) { throw new ImageSaveException(e); } }
class class_name[name] begin[{] method[saveBmp, return_type[void], modifier[public static], parameter[src, fileName]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=save, postfix_operators=[], prefix_operators=[], qualifier=BitmapUtil, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ImageSaveException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[saveBmp] operator[SEP] identifier[Bitmap] identifier[src] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[ImageSaveException] { Keyword[try] { identifier[BitmapUtil] operator[SEP] identifier[save] operator[SEP] identifier[src] , identifier[fileName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ImageSaveException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public boolean containsKey(Object key) { if (key==null) return _nullEntry!=null; return getEntry(key.toString(),0,key==null?0:key.toString().length())!=null; }
class class_name[name] begin[{] method[containsKey, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] return[binary_operation[member[._nullEntry], !=, literal[null]]] else begin[{] None end[}] return[binary_operation[call[.getEntry, parameter[call[key.toString, parameter[]], literal[0], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=key, 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=key, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]], !=, literal[null]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[return] identifier[_nullEntry] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[getEntry] operator[SEP] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[0] , identifier[key] operator[==] Other[null] operator[?] Other[0] operator[:] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] }
public void setController(@Nullable DraweeController draweeController) { boolean wasAttached = mIsControllerAttached; if (wasAttached) { detachController(); } // Clear the old controller if (isControllerValid()) { mEventTracker.recordEvent(Event.ON_CLEAR_OLD_CONTROLLER); mController.setHierarchy(null); } mController = draweeController; if (mController != null) { mEventTracker.recordEvent(Event.ON_SET_CONTROLLER); mController.setHierarchy(mHierarchy); } else { mEventTracker.recordEvent(Event.ON_CLEAR_CONTROLLER); } if (wasAttached) { attachController(); } }
class class_name[name] begin[{] method[setController, return_type[void], modifier[public], parameter[draweeController]] begin[{] local_variable[type[boolean], wasAttached] if[member[.wasAttached]] begin[{] call[.detachController, parameter[]] else begin[{] None end[}] if[call[.isControllerValid, parameter[]]] begin[{] call[mEventTracker.recordEvent, parameter[member[Event.ON_CLEAR_OLD_CONTROLLER]]] call[mController.setHierarchy, parameter[literal[null]]] else begin[{] None end[}] assign[member[.mController], member[.draweeController]] if[binary_operation[member[.mController], !=, literal[null]]] begin[{] call[mEventTracker.recordEvent, parameter[member[Event.ON_SET_CONTROLLER]]] call[mController.setHierarchy, parameter[member[.mHierarchy]]] else begin[{] call[mEventTracker.recordEvent, parameter[member[Event.ON_CLEAR_CONTROLLER]]] end[}] if[member[.wasAttached]] begin[{] call[.attachController, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setController] operator[SEP] annotation[@] identifier[Nullable] identifier[DraweeController] identifier[draweeController] operator[SEP] { Keyword[boolean] identifier[wasAttached] operator[=] identifier[mIsControllerAttached] operator[SEP] Keyword[if] operator[SEP] identifier[wasAttached] operator[SEP] { identifier[detachController] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isControllerValid] operator[SEP] operator[SEP] operator[SEP] { identifier[mEventTracker] operator[SEP] identifier[recordEvent] operator[SEP] identifier[Event] operator[SEP] identifier[ON_CLEAR_OLD_CONTROLLER] operator[SEP] operator[SEP] identifier[mController] operator[SEP] identifier[setHierarchy] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[mController] operator[=] identifier[draweeController] operator[SEP] Keyword[if] operator[SEP] identifier[mController] operator[!=] Other[null] operator[SEP] { identifier[mEventTracker] operator[SEP] identifier[recordEvent] operator[SEP] identifier[Event] operator[SEP] identifier[ON_SET_CONTROLLER] operator[SEP] operator[SEP] identifier[mController] operator[SEP] identifier[setHierarchy] operator[SEP] identifier[mHierarchy] operator[SEP] operator[SEP] } Keyword[else] { identifier[mEventTracker] operator[SEP] identifier[recordEvent] operator[SEP] identifier[Event] operator[SEP] identifier[ON_CLEAR_CONTROLLER] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[wasAttached] operator[SEP] { identifier[attachController] operator[SEP] operator[SEP] operator[SEP] } }
@Override protected Conduit getInbuiltBackChannel(Message inMessage) { if (inMessage.getExchange().isOneWay()) { return null; } final UDPConnectionInfo info = inMessage.get(UDPConnectionInfo.class); return new AbstractBackChannelConduit() { public void prepare(Message message) throws IOException { message.setContent(OutputStream.class, info.out); } }; }
class class_name[name] begin[{] method[getInbuiltBackChannel, return_type[type[Conduit]], modifier[protected], parameter[inMessage]] begin[{] if[call[inMessage.getExchange, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[UDPConnectionInfo], info] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OutputStream, sub_type=None)), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[])], member=setContent, postfix_operators=[], prefix_operators=[], qualifier=message, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=prepare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=message, type=ReferenceType(arguments=None, dimensions=[], name=Message, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractBackChannelConduit, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Conduit] identifier[getInbuiltBackChannel] operator[SEP] identifier[Message] identifier[inMessage] operator[SEP] { Keyword[if] operator[SEP] identifier[inMessage] operator[SEP] identifier[getExchange] operator[SEP] operator[SEP] operator[SEP] identifier[isOneWay] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[UDPConnectionInfo] identifier[info] operator[=] identifier[inMessage] operator[SEP] identifier[get] operator[SEP] identifier[UDPConnectionInfo] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[AbstractBackChannelConduit] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[prepare] operator[SEP] identifier[Message] identifier[message] operator[SEP] Keyword[throws] identifier[IOException] { identifier[message] operator[SEP] identifier[setContent] operator[SEP] identifier[OutputStream] operator[SEP] Keyword[class] , identifier[info] operator[SEP] identifier[out] operator[SEP] operator[SEP] } } operator[SEP] }
public void setFfdcAlready(boolean ffdcAlready) { this.ffdcAlready = ffdcAlready; if (tc.isDebugEnabled()) { Tr.debug(tc, "ffdc already handled? " + ffdcAlready); } }
class class_name[name] begin[{] method[setFfdcAlready, return_type[void], modifier[public], parameter[ffdcAlready]] begin[{] assign[THIS[member[None.ffdcAlready]], member[.ffdcAlready]] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["ffdc already handled? "], +, member[.ffdcAlready]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFfdcAlready] operator[SEP] Keyword[boolean] identifier[ffdcAlready] operator[SEP] { Keyword[this] operator[SEP] identifier[ffdcAlready] operator[=] identifier[ffdcAlready] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[ffdcAlready] operator[SEP] operator[SEP] } }
protected void renderTextAreaBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); writer.startElement(HTML.TEXTAREA_ELEM, uiComponent); Map<String, List<ClientBehavior>> behaviors = null; if (uiComponent instanceof ClientBehaviorHolder) { behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors(); if (!behaviors.isEmpty()) { HtmlRendererUtils.writeIdAndName(writer, uiComponent, facesContext); } else { HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext); writer.writeAttribute(HTML.NAME_ATTR, uiComponent.getClientId(facesContext), null); } long commonPropertiesMarked = 0L; if (isCommonPropertiesOptimizationEnabled(facesContext)) { commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent); } if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext)) { CommonPropertyUtils.renderChangeEventProperty(writer, commonPropertiesMarked, uiComponent); CommonPropertyUtils.renderEventProperties(writer, commonPropertiesMarked, uiComponent); CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange(writer, commonPropertiesMarked, uiComponent); } else { HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, behaviors); if (isCommonEventsOptimizationEnabled(facesContext)) { Long commonEventsMarked = CommonEventUtils.getCommonEventsMarked(uiComponent); CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors); CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange( facesContext, writer, commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors); } else { HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors); HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange( facesContext, writer, uiComponent, behaviors); } } if (isCommonPropertiesOptimizationEnabled(facesContext)) { CommonPropertyUtils.renderCommonFieldPassthroughPropertiesWithoutDisabledAndEvents(writer, CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent); HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_ATTRIBUTES); } else { HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS); } } else { HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext); writer.writeAttribute(HTML.NAME_ATTR, uiComponent.getClientId(facesContext), null); if (isCommonPropertiesOptimizationEnabled(facesContext)) { CommonPropertyUtils.renderCommonFieldPassthroughPropertiesWithoutDisabled(writer, CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent); HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_ATTRIBUTES); } else { HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED); } } if (isDisabled(facesContext, uiComponent)) { writer.writeAttribute(org.apache.myfaces.shared.renderkit.html.HTML.DISABLED_ATTR, Boolean.TRUE, null); } }
class class_name[name] begin[{] method[renderTextAreaBegin, return_type[void], modifier[protected], parameter[facesContext, uiComponent]] begin[{] local_variable[type[ResponseWriter], writer] call[writer.startElement, parameter[member[HTML.TEXTAREA_ELEM], member[.uiComponent]]] local_variable[type[Map], behaviors] if[binary_operation[member[.uiComponent], instanceof, type[ClientBehaviorHolder]]] begin[{] assign[member[.behaviors], Cast(expression=MemberReference(member=uiComponent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ClientBehaviorHolder, sub_type=None))] if[call[behaviors.isEmpty, parameter[]]] begin[{] call[HtmlRendererUtils.writeIdAndName, parameter[member[.writer], member[.uiComponent], member[.facesContext]]] else begin[{] call[HtmlRendererUtils.writeIdIfNecessary, parameter[member[.writer], member[.uiComponent], member[.facesContext]]] call[writer.writeAttribute, parameter[member[HTML.NAME_ATTR], call[uiComponent.getClientId, parameter[member[.facesContext]]], literal[null]]] end[}] local_variable[type[long], commonPropertiesMarked] if[call[.isCommonPropertiesOptimizationEnabled, parameter[member[.facesContext]]]] begin[{] assign[member[.commonPropertiesMarked], call[CommonPropertyUtils.getCommonPropertiesMarked, parameter[member[.uiComponent]]]] else begin[{] None end[}] if[binary_operation[call[behaviors.isEmpty, parameter[]], &&, call[.isCommonPropertiesOptimizationEnabled, parameter[member[.facesContext]]]]] begin[{] call[CommonPropertyUtils.renderChangeEventProperty, parameter[member[.writer], member[.commonPropertiesMarked], member[.uiComponent]]] call[CommonPropertyUtils.renderEventProperties, parameter[member[.writer], member[.commonPropertiesMarked], member[.uiComponent]]] call[CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange, parameter[member[.writer], member[.commonPropertiesMarked], member[.uiComponent]]] else begin[{] call[HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler, parameter[member[.facesContext], member[.writer], member[.uiComponent], member[.behaviors]]] if[call[.isCommonEventsOptimizationEnabled, parameter[member[.facesContext]]]] begin[{] local_variable[type[Long], commonEventsMarked] call[CommonEventUtils.renderBehaviorizedEventHandlers, parameter[member[.facesContext], member[.writer], member[.commonPropertiesMarked], member[.commonEventsMarked], member[.uiComponent], member[.behaviors]]] call[CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange, parameter[member[.facesContext], member[.writer], member[.commonPropertiesMarked], member[.commonEventsMarked], member[.uiComponent], member[.behaviors]]] else begin[{] call[HtmlRendererUtils.renderBehaviorizedEventHandlers, parameter[member[.facesContext], member[.writer], member[.uiComponent], member[.behaviors]]] call[HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange, parameter[member[.facesContext], member[.writer], member[.uiComponent], member[.behaviors]]] end[}] end[}] if[call[.isCommonPropertiesOptimizationEnabled, parameter[member[.facesContext]]]] begin[{] call[CommonPropertyUtils.renderCommonFieldPassthroughPropertiesWithoutDisabledAndEvents, parameter[member[.writer], call[CommonPropertyUtils.getCommonPropertiesMarked, parameter[member[.uiComponent]]], member[.uiComponent]]] call[HtmlRendererUtils.renderHTMLAttributes, parameter[member[.writer], member[.uiComponent], member[HTML.TEXTAREA_ATTRIBUTES]]] else begin[{] call[HtmlRendererUtils.renderHTMLAttributes, parameter[member[.writer], member[.uiComponent], member[HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS]]] end[}] else begin[{] call[HtmlRendererUtils.writeIdIfNecessary, parameter[member[.writer], member[.uiComponent], member[.facesContext]]] call[writer.writeAttribute, parameter[member[HTML.NAME_ATTR], call[uiComponent.getClientId, parameter[member[.facesContext]]], literal[null]]] if[call[.isCommonPropertiesOptimizationEnabled, parameter[member[.facesContext]]]] begin[{] call[CommonPropertyUtils.renderCommonFieldPassthroughPropertiesWithoutDisabled, parameter[member[.writer], call[CommonPropertyUtils.getCommonPropertiesMarked, parameter[member[.uiComponent]]], member[.uiComponent]]] call[HtmlRendererUtils.renderHTMLAttributes, parameter[member[.writer], member[.uiComponent], member[HTML.TEXTAREA_ATTRIBUTES]]] else begin[{] call[HtmlRendererUtils.renderHTMLAttributes, parameter[member[.writer], member[.uiComponent], member[HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED]]] end[}] end[}] if[call[.isDisabled, parameter[member[.facesContext], member[.uiComponent]]]] begin[{] call[writer.writeAttribute, parameter[member[org.apache.myfaces.shared.renderkit.html.HTML.DISABLED_ATTR], member[Boolean.TRUE], literal[null]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[renderTextAreaBegin] operator[SEP] identifier[FacesContext] identifier[facesContext] , identifier[UIComponent] identifier[uiComponent] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ResponseWriter] identifier[writer] operator[=] identifier[facesContext] operator[SEP] identifier[getResponseWriter] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[startElement] operator[SEP] identifier[HTML] operator[SEP] identifier[TEXTAREA_ELEM] , identifier[uiComponent] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[ClientBehavior] operator[>] operator[>] identifier[behaviors] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[uiComponent] Keyword[instanceof] identifier[ClientBehaviorHolder] operator[SEP] { identifier[behaviors] operator[=] operator[SEP] operator[SEP] identifier[ClientBehaviorHolder] operator[SEP] identifier[uiComponent] operator[SEP] operator[SEP] identifier[getClientBehaviors] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[behaviors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[HtmlRendererUtils] operator[SEP] identifier[writeIdAndName] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[facesContext] operator[SEP] operator[SEP] } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[writeIdIfNecessary] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[facesContext] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[writeAttribute] operator[SEP] identifier[HTML] operator[SEP] identifier[NAME_ATTR] , identifier[uiComponent] operator[SEP] identifier[getClientId] operator[SEP] identifier[facesContext] operator[SEP] , Other[null] operator[SEP] operator[SEP] } Keyword[long] identifier[commonPropertiesMarked] operator[=] Other[0L] operator[SEP] Keyword[if] operator[SEP] identifier[isCommonPropertiesOptimizationEnabled] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] { identifier[commonPropertiesMarked] operator[=] identifier[CommonPropertyUtils] operator[SEP] identifier[getCommonPropertiesMarked] operator[SEP] identifier[uiComponent] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[behaviors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[isCommonPropertiesOptimizationEnabled] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] { identifier[CommonPropertyUtils] operator[SEP] identifier[renderChangeEventProperty] operator[SEP] identifier[writer] , identifier[commonPropertiesMarked] , identifier[uiComponent] operator[SEP] operator[SEP] identifier[CommonPropertyUtils] operator[SEP] identifier[renderEventProperties] operator[SEP] identifier[writer] , identifier[commonPropertiesMarked] , identifier[uiComponent] operator[SEP] operator[SEP] identifier[CommonPropertyUtils] operator[SEP] identifier[renderFieldEventPropertiesWithoutOnchange] operator[SEP] identifier[writer] , identifier[commonPropertiesMarked] , identifier[uiComponent] operator[SEP] operator[SEP] } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[renderBehaviorizedOnchangeEventHandler] operator[SEP] identifier[facesContext] , identifier[writer] , identifier[uiComponent] , identifier[behaviors] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isCommonEventsOptimizationEnabled] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] { identifier[Long] identifier[commonEventsMarked] operator[=] identifier[CommonEventUtils] operator[SEP] identifier[getCommonEventsMarked] operator[SEP] identifier[uiComponent] operator[SEP] operator[SEP] identifier[CommonEventUtils] operator[SEP] identifier[renderBehaviorizedEventHandlers] operator[SEP] identifier[facesContext] , identifier[writer] , identifier[commonPropertiesMarked] , identifier[commonEventsMarked] , identifier[uiComponent] , identifier[behaviors] operator[SEP] operator[SEP] identifier[CommonEventUtils] operator[SEP] identifier[renderBehaviorizedFieldEventHandlersWithoutOnchange] operator[SEP] identifier[facesContext] , identifier[writer] , identifier[commonPropertiesMarked] , identifier[commonEventsMarked] , identifier[uiComponent] , identifier[behaviors] operator[SEP] operator[SEP] } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[renderBehaviorizedEventHandlers] operator[SEP] identifier[facesContext] , identifier[writer] , identifier[uiComponent] , identifier[behaviors] operator[SEP] operator[SEP] identifier[HtmlRendererUtils] operator[SEP] identifier[renderBehaviorizedFieldEventHandlersWithoutOnchange] operator[SEP] identifier[facesContext] , identifier[writer] , identifier[uiComponent] , identifier[behaviors] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isCommonPropertiesOptimizationEnabled] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] { identifier[CommonPropertyUtils] operator[SEP] identifier[renderCommonFieldPassthroughPropertiesWithoutDisabledAndEvents] operator[SEP] identifier[writer] , identifier[CommonPropertyUtils] operator[SEP] identifier[getCommonPropertiesMarked] operator[SEP] identifier[uiComponent] operator[SEP] , identifier[uiComponent] operator[SEP] operator[SEP] identifier[HtmlRendererUtils] operator[SEP] identifier[renderHTMLAttributes] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[HTML] operator[SEP] identifier[TEXTAREA_ATTRIBUTES] operator[SEP] operator[SEP] } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[renderHTMLAttributes] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[HTML] operator[SEP] identifier[TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS] operator[SEP] operator[SEP] } } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[writeIdIfNecessary] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[facesContext] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[writeAttribute] operator[SEP] identifier[HTML] operator[SEP] identifier[NAME_ATTR] , identifier[uiComponent] operator[SEP] identifier[getClientId] operator[SEP] identifier[facesContext] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isCommonPropertiesOptimizationEnabled] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] { identifier[CommonPropertyUtils] operator[SEP] identifier[renderCommonFieldPassthroughPropertiesWithoutDisabled] operator[SEP] identifier[writer] , identifier[CommonPropertyUtils] operator[SEP] identifier[getCommonPropertiesMarked] operator[SEP] identifier[uiComponent] operator[SEP] , identifier[uiComponent] operator[SEP] operator[SEP] identifier[HtmlRendererUtils] operator[SEP] identifier[renderHTMLAttributes] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[HTML] operator[SEP] identifier[TEXTAREA_ATTRIBUTES] operator[SEP] operator[SEP] } Keyword[else] { identifier[HtmlRendererUtils] operator[SEP] identifier[renderHTMLAttributes] operator[SEP] identifier[writer] , identifier[uiComponent] , identifier[HTML] operator[SEP] identifier[TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isDisabled] operator[SEP] identifier[facesContext] , identifier[uiComponent] operator[SEP] operator[SEP] { identifier[writer] operator[SEP] identifier[writeAttribute] operator[SEP] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[myfaces] operator[SEP] identifier[shared] operator[SEP] identifier[renderkit] operator[SEP] identifier[html] operator[SEP] identifier[HTML] operator[SEP] identifier[DISABLED_ATTR] , identifier[Boolean] operator[SEP] identifier[TRUE] , Other[null] operator[SEP] operator[SEP] } }
private void doConnect() throws SessionTimeOutException{ long to = getConnectTimeOut(); if(clientSocket.isConnected()){ ErrorCode ec = sendConnectProtocol(to); // CONNECTION_LOSS means client data is inconsistence with server. now we check the last dxid of client. // if dxid of the client is bigger than server actual dxid, return CONNECTION_LOSS. if(ErrorCode.SESSION_EXPIRED.equals(ec) || ErrorCode.CONNECTION_LOSS.equals(equals(ec))){ LOGGER.info("Session Expired, cleanup the client session."); cleanupSession(); } } }
class class_name[name] begin[{] method[doConnect, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[long], to] if[call[clientSocket.isConnected, parameter[]]] begin[{] local_variable[type[ErrorCode], ec] if[binary_operation[call[ErrorCode.SESSION_EXPIRED.equals, parameter[member[.ec]]], ||, call[ErrorCode.CONNECTION_LOSS.equals, parameter[call[.equals, parameter[member[.ec]]]]]]] begin[{] call[LOGGER.info, parameter[literal["Session Expired, cleanup the client session."]]] call[.cleanupSession, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[doConnect] operator[SEP] operator[SEP] Keyword[throws] identifier[SessionTimeOutException] { Keyword[long] identifier[to] operator[=] identifier[getConnectTimeOut] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clientSocket] operator[SEP] identifier[isConnected] operator[SEP] operator[SEP] operator[SEP] { identifier[ErrorCode] identifier[ec] operator[=] identifier[sendConnectProtocol] operator[SEP] identifier[to] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[SESSION_EXPIRED] operator[SEP] identifier[equals] operator[SEP] identifier[ec] operator[SEP] operator[||] identifier[ErrorCode] operator[SEP] identifier[CONNECTION_LOSS] operator[SEP] identifier[equals] operator[SEP] identifier[equals] operator[SEP] identifier[ec] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cleanupSession] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public void removedService(ServiceReference<ServiceType> reference, ServiceType service) { for (int i = children.length - 1; i >= 0; i--) { children[i].removedService(reference, service); } super.removedService(reference, service); }
class class_name[name] begin[{] method[removedService, return_type[void], modifier[public], parameter[reference, service]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removedService, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removedService, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removedService] operator[SEP] identifier[ServiceReference] operator[<] identifier[ServiceType] operator[>] identifier[reference] , identifier[ServiceType] identifier[service] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[children] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[children] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[removedService] operator[SEP] identifier[reference] , identifier[service] operator[SEP] operator[SEP] } Keyword[super] operator[SEP] identifier[removedService] operator[SEP] identifier[reference] , identifier[service] operator[SEP] operator[SEP] }
public DescribeAddressesResult withAddresses(Address... addresses) { if (this.addresses == null) { setAddresses(new java.util.ArrayList<Address>(addresses.length)); } for (Address ele : addresses) { this.addresses.add(ele); } return this; }
class class_name[name] begin[{] method[withAddresses, return_type[type[DescribeAddressesResult]], modifier[public], parameter[addresses]] begin[{] if[binary_operation[THIS[member[None.addresses]], ==, literal[null]]] begin[{] call[.setAddresses, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=addresses, 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=Address, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=addresses, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Address, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeAddressesResult] identifier[withAddresses] operator[SEP] identifier[Address] operator[...] identifier[addresses] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[addresses] operator[==] Other[null] operator[SEP] { identifier[setAddresses] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Address] operator[>] operator[SEP] identifier[addresses] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Address] identifier[ele] operator[:] identifier[addresses] operator[SEP] { Keyword[this] operator[SEP] identifier[addresses] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void addDataElement(String elemName, String content, String attrName, String attrValue) { AttributesImpl attrs = new AttributesImpl(); attrs.addAttribute("", attrName, "", "CDATA", attrValue); writeDataElement(elemName, attrs, content); }
class class_name[name] begin[{] method[addDataElement, return_type[void], modifier[public], parameter[elemName, content, attrName, attrValue]] begin[{] local_variable[type[AttributesImpl], attrs] call[attrs.addAttribute, parameter[literal[""], member[.attrName], literal[""], literal["CDATA"], member[.attrValue]]] call[.writeDataElement, parameter[member[.elemName], member[.attrs], member[.content]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addDataElement] operator[SEP] identifier[String] identifier[elemName] , identifier[String] identifier[content] , identifier[String] identifier[attrName] , identifier[String] identifier[attrValue] operator[SEP] { identifier[AttributesImpl] identifier[attrs] operator[=] Keyword[new] identifier[AttributesImpl] operator[SEP] operator[SEP] operator[SEP] identifier[attrs] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , identifier[attrName] , literal[String] , literal[String] , identifier[attrValue] operator[SEP] operator[SEP] identifier[writeDataElement] operator[SEP] identifier[elemName] , identifier[attrs] , identifier[content] operator[SEP] operator[SEP] }
public void marshall(ResourceTagMapping resourceTagMapping, ProtocolMarshaller protocolMarshaller) { if (resourceTagMapping == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(resourceTagMapping.getResourceARN(), RESOURCEARN_BINDING); protocolMarshaller.marshall(resourceTagMapping.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[resourceTagMapping, protocolMarshaller]] begin[{] if[binary_operation[member[.resourceTagMapping], ==, 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=getResourceARN, postfix_operators=[], prefix_operators=[], qualifier=resourceTagMapping, selectors=[], type_arguments=None), MemberReference(member=RESOURCEARN_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=resourceTagMapping, 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[ResourceTagMapping] identifier[resourceTagMapping] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceTagMapping] 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[resourceTagMapping] operator[SEP] identifier[getResourceARN] operator[SEP] operator[SEP] , identifier[RESOURCEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[resourceTagMapping] 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 Object callMethod(Object o, String method, Object[] params) { // Get the objects class. Class cls = o.getClass(); // Get the classes of the parameters. Class[] paramClasses = new Class[params.length]; for (int i = 0; i < params.length; i++) { paramClasses[i] = params[i].getClass(); } try { // Try to find the matching method on the class. Method m = cls.getMethod(method, paramClasses); // Invoke it with the parameters. return m.invoke(o, params); } catch (NoSuchMethodException e) { throw new IllegalStateException(e); } catch (IllegalAccessException e) { throw new IllegalStateException(e); } catch (InvocationTargetException e) { throw new IllegalStateException(e); } }
class class_name[name] begin[{] method[callMethod, return_type[type[Object]], modifier[public static], parameter[o, method, params]] begin[{] local_variable[type[Class], cls] local_variable[type[Class], paramClasses] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paramClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=params, 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) TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=paramClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[callMethod] operator[SEP] identifier[Object] identifier[o] , identifier[String] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] { identifier[Class] identifier[cls] operator[=] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[SEP] operator[SEP] identifier[paramClasses] operator[=] Keyword[new] identifier[Class] operator[SEP] identifier[params] 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[params] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[paramClasses] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[params] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[Method] identifier[m] operator[=] identifier[cls] operator[SEP] identifier[getMethod] operator[SEP] identifier[method] , identifier[paramClasses] operator[SEP] operator[SEP] Keyword[return] identifier[m] operator[SEP] identifier[invoke] operator[SEP] identifier[o] , identifier[params] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Observable<ManagedInstanceVulnerabilityAssessmentInner> createOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceVulnerabilityAssessmentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, parameters).map(new Func1<ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner>, ManagedInstanceVulnerabilityAssessmentInner>() { @Override public ManagedInstanceVulnerabilityAssessmentInner call(ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, managedInstanceName, parameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.managedInstanceName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ManagedInstanceVulnerabilityAssessmentInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[managedInstanceName] , identifier[ManagedInstanceVulnerabilityAssessmentInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[managedInstanceName] , identifier[parameters] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ManagedInstanceVulnerabilityAssessmentInner] operator[>] , identifier[ManagedInstanceVulnerabilityAssessmentInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ManagedInstanceVulnerabilityAssessmentInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ManagedInstanceVulnerabilityAssessmentInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override protected void defineWidgets() { // initialize the project object to use for the dialog initSessionObject(); setKeyPrefix(KEY_PREFIX); // widgets to display addWidget(new CmsWidgetDialogParameter( this, "resources", "/", PAGES[0], new CmsVfsFileWidget(false, null), 1, CmsWidgetDialogParameter.MAX_OCCURENCES)); }
class class_name[name] begin[{] method[defineWidgets, return_type[void], modifier[protected], parameter[]] begin[{] call[.initSessionObject, parameter[]] call[.setKeyPrefix, parameter[member[.KEY_PREFIX]]] call[.addWidget, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resources"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), MemberReference(member=PAGES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), 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=CmsVfsFileWidget, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=MAX_OCCURENCES, postfix_operators=[], prefix_operators=[], qualifier=CmsWidgetDialogParameter, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsWidgetDialogParameter, sub_type=None))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[defineWidgets] operator[SEP] operator[SEP] { identifier[initSessionObject] operator[SEP] operator[SEP] operator[SEP] identifier[setKeyPrefix] operator[SEP] identifier[KEY_PREFIX] operator[SEP] operator[SEP] identifier[addWidget] operator[SEP] Keyword[new] identifier[CmsWidgetDialogParameter] operator[SEP] Keyword[this] , literal[String] , literal[String] , identifier[PAGES] operator[SEP] Other[0] operator[SEP] , Keyword[new] identifier[CmsVfsFileWidget] operator[SEP] literal[boolean] , Other[null] operator[SEP] , Other[1] , identifier[CmsWidgetDialogParameter] operator[SEP] identifier[MAX_OCCURENCES] operator[SEP] operator[SEP] operator[SEP] }
public static void addInt(int value, int count, int startPos, int[] dest) { assert(count <= 32); assert(count > 0); assert(startPos >= 0); //System.err.println("addInt("+value+", "+count + ", "+startPos+")"); /* * Because we're using both 32 bit input and 32 bit output, we only have * two cases to handle: * 1) All bits fit in one index, appropriately shifted up first. * Mask upper bits we'll merge with(Ones in upper). * Mask lower bits we'll merge with(Ones in lower). * destMask = OR Upper and lower masks together. * currentIndex = currentIndex & destMask * destMask = ~destMask; * upshift by 32-count-currentOffset; * inputValue = inputValue & destMask; * currentIndex = currentIndex | inputValue * 2) Some bits merge in top of one index, remaining bits merge in * bottom of second index * A) CurrentIndex * Create inputValueHigh, with high order bits which will enter * currentIndex. * Handle this as we handled case one(pretend it's a new value) * B) CurrentIndex++ * We fill from upper edge. No upper mask needed. * upshift value by 32-count; * Mask lower bits we'll merge with(Ones in lower) * currentIndex = currentIndex & destMask * currentIndex = currentIndex | destMask */ int currentIndex = startPos/32; int currentOffset = startPos%32; int totalSize = count+currentOffset; if(totalSize > 32) { //System.err.println("totalSize > 32"); int secondIndex = currentIndex + 1; int secondSize = totalSize - 32; int secondValue = value << (32-secondSize); int lowerMask = -1 >>> secondSize; int temp = dest[secondIndex] & lowerMask; dest[secondIndex] = temp | secondValue; totalSize = 32; value = value >>> secondSize; } if(totalSize <= 32) {//Case 1 int upperMask = -2 << (31-currentOffset); //int lowerMask = Integer.MAX_VALUE >>> (totalSize-1); int lowerMask = 0x7FFFFFFF >>> (totalSize-1); int destMask = upperMask | lowerMask; int temp = dest[currentIndex] & destMask; destMask = ~destMask; value = value << (32-totalSize); value = value & destMask; dest[currentIndex] = temp | value; } }
class class_name[name] begin[{] method[addInt, return_type[void], modifier[public static], parameter[value, count, startPos, dest]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=<=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=None) local_variable[type[int], currentIndex] local_variable[type[int], currentOffset] local_variable[type[int], totalSize] if[binary_operation[member[.totalSize], >, literal[32]]] begin[{] local_variable[type[int], secondIndex] local_variable[type[int], secondSize] local_variable[type[int], secondValue] local_variable[type[int], lowerMask] local_variable[type[int], temp] assign[member[.dest], binary_operation[member[.temp], |, member[.secondValue]]] assign[member[.totalSize], literal[32]] assign[member[.value], binary_operation[member[.value], >>>, member[.secondSize]]] else begin[{] None end[}] if[binary_operation[member[.totalSize], <=, literal[32]]] begin[{] local_variable[type[int], upperMask] local_variable[type[int], lowerMask] local_variable[type[int], destMask] local_variable[type[int], temp] assign[member[.destMask], member[.destMask]] assign[member[.value], binary_operation[member[.value], <<, binary_operation[literal[32], -, member[.totalSize]]]] assign[member[.value], binary_operation[member[.value], &, member[.destMask]]] assign[member[.dest], binary_operation[member[.temp], |, member[.value]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addInt] operator[SEP] Keyword[int] identifier[value] , Keyword[int] identifier[count] , Keyword[int] identifier[startPos] , Keyword[int] operator[SEP] operator[SEP] identifier[dest] operator[SEP] { Keyword[assert] operator[SEP] identifier[count] operator[<=] Other[32] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[count] operator[>] Other[0] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[startPos] operator[>=] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[currentIndex] operator[=] identifier[startPos] operator[/] Other[32] operator[SEP] Keyword[int] identifier[currentOffset] operator[=] identifier[startPos] operator[%] Other[32] operator[SEP] Keyword[int] identifier[totalSize] operator[=] identifier[count] operator[+] identifier[currentOffset] operator[SEP] Keyword[if] operator[SEP] identifier[totalSize] operator[>] Other[32] operator[SEP] { Keyword[int] identifier[secondIndex] operator[=] identifier[currentIndex] operator[+] Other[1] operator[SEP] Keyword[int] identifier[secondSize] operator[=] identifier[totalSize] operator[-] Other[32] operator[SEP] Keyword[int] identifier[secondValue] operator[=] identifier[value] operator[<<] operator[SEP] Other[32] operator[-] identifier[secondSize] operator[SEP] operator[SEP] Keyword[int] identifier[lowerMask] operator[=] operator[-] Other[1] operator[>] operator[>] operator[>] identifier[secondSize] operator[SEP] Keyword[int] identifier[temp] operator[=] identifier[dest] operator[SEP] identifier[secondIndex] operator[SEP] operator[&] identifier[lowerMask] operator[SEP] identifier[dest] operator[SEP] identifier[secondIndex] operator[SEP] operator[=] identifier[temp] operator[|] identifier[secondValue] operator[SEP] identifier[totalSize] operator[=] Other[32] operator[SEP] identifier[value] operator[=] identifier[value] operator[>] operator[>] operator[>] identifier[secondSize] operator[SEP] } Keyword[if] operator[SEP] identifier[totalSize] operator[<=] Other[32] operator[SEP] { Keyword[int] identifier[upperMask] operator[=] operator[-] Other[2] operator[<<] operator[SEP] Other[31] operator[-] identifier[currentOffset] operator[SEP] operator[SEP] Keyword[int] identifier[lowerMask] operator[=] literal[Integer] operator[>] operator[>] operator[>] operator[SEP] identifier[totalSize] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[destMask] operator[=] identifier[upperMask] operator[|] identifier[lowerMask] operator[SEP] Keyword[int] identifier[temp] operator[=] identifier[dest] operator[SEP] identifier[currentIndex] operator[SEP] operator[&] identifier[destMask] operator[SEP] identifier[destMask] operator[=] operator[~] identifier[destMask] operator[SEP] identifier[value] operator[=] identifier[value] operator[<<] operator[SEP] Other[32] operator[-] identifier[totalSize] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[value] operator[&] identifier[destMask] operator[SEP] identifier[dest] operator[SEP] identifier[currentIndex] operator[SEP] operator[=] identifier[temp] operator[|] identifier[value] operator[SEP] } }
public void setStreamWriteSizeInBytes(final int streamWriteSizeInBytes) { if (streamWriteSizeInBytes > Constants.MAX_BLOCK_SIZE || streamWriteSizeInBytes < Constants.PAGE_SIZE) { throw new IllegalArgumentException("StreamWriteSizeInBytes"); } this.streamWriteSizeInBytes = streamWriteSizeInBytes; }
class class_name[name] begin[{] method[setStreamWriteSizeInBytes, return_type[void], modifier[public], parameter[streamWriteSizeInBytes]] begin[{] if[binary_operation[binary_operation[member[.streamWriteSizeInBytes], >, member[Constants.MAX_BLOCK_SIZE]], ||, binary_operation[member[.streamWriteSizeInBytes], <, member[Constants.PAGE_SIZE]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="StreamWriteSizeInBytes")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.streamWriteSizeInBytes]], member[.streamWriteSizeInBytes]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStreamWriteSizeInBytes] operator[SEP] Keyword[final] Keyword[int] identifier[streamWriteSizeInBytes] operator[SEP] { Keyword[if] operator[SEP] identifier[streamWriteSizeInBytes] operator[>] identifier[Constants] operator[SEP] identifier[MAX_BLOCK_SIZE] operator[||] identifier[streamWriteSizeInBytes] operator[<] identifier[Constants] operator[SEP] identifier[PAGE_SIZE] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[streamWriteSizeInBytes] operator[=] identifier[streamWriteSizeInBytes] operator[SEP] }
<T> void query(Query<T> query, IOConsumer<T> f) throws IOException { run(() -> rw.run(query).forEachRemaining(IOConsumer.unchecked(f))); }
class class_name[name] begin[{] method[query, return_type[void], modifier[default], parameter[query, f]] begin[{] call[.run, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=run, postfix_operators=[], prefix_operators=[], qualifier=rw, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unchecked, postfix_operators=[], prefix_operators=[], qualifier=IOConsumer, selectors=[], type_arguments=None)], member=forEachRemaining, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[])]] end[}] END[}]
operator[<] identifier[T] operator[>] Keyword[void] identifier[query] operator[SEP] identifier[Query] operator[<] identifier[T] operator[>] identifier[query] , identifier[IOConsumer] operator[<] identifier[T] operator[>] identifier[f] operator[SEP] Keyword[throws] identifier[IOException] { identifier[run] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[rw] operator[SEP] identifier[run] operator[SEP] identifier[query] operator[SEP] operator[SEP] identifier[forEachRemaining] operator[SEP] identifier[IOConsumer] operator[SEP] identifier[unchecked] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static base_responses Import(nitro_service client, appqoecustomresp resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appqoecustomresp Importresources[] = new appqoecustomresp[resources.length]; for (int i=0;i<resources.length;i++){ Importresources[i] = new appqoecustomresp(); Importresources[i].src = resources[i].src; Importresources[i].name = resources[i].name; } result = perform_operation_bulk_request(client, Importresources,"Import"); } return result; }
class class_name[name] begin[{] method[Import, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[member[resources.length], >, literal[0]]]] begin[{] local_variable[type[appqoecustomresp], Importresources] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=Importresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=appqoecustomresp, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Importresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=src, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=src, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Importresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=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=resources, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.result], call[.perform_operation_bulk_request, parameter[member[.client], member[.Importresources], literal["Import"]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_responses] identifier[Import] operator[SEP] identifier[nitro_service] identifier[client] , identifier[appqoecustomresp] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] identifier[resources] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[appqoecustomresp] identifier[Importresources] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[appqoecustomresp] operator[SEP] identifier[resources] 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[resources] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Importresources] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[appqoecustomresp] operator[SEP] operator[SEP] operator[SEP] identifier[Importresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[src] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[src] operator[SEP] identifier[Importresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[SEP] } identifier[result] operator[=] identifier[perform_operation_bulk_request] operator[SEP] identifier[client] , identifier[Importresources] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@BetaApi public final Operation insertInstanceGroupManager( String zone, InstanceGroupManager instanceGroupManagerResource) { InsertInstanceGroupManagerHttpRequest request = InsertInstanceGroupManagerHttpRequest.newBuilder() .setZone(zone) .setInstanceGroupManagerResource(instanceGroupManagerResource) .build(); return insertInstanceGroupManager(request); }
class class_name[name] begin[{] method[insertInstanceGroupManager, return_type[type[Operation]], modifier[final public], parameter[zone, instanceGroupManagerResource]] begin[{] local_variable[type[InsertInstanceGroupManagerHttpRequest], request] return[call[.insertInstanceGroupManager, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertInstanceGroupManager] operator[SEP] identifier[String] identifier[zone] , identifier[InstanceGroupManager] identifier[instanceGroupManagerResource] operator[SEP] { identifier[InsertInstanceGroupManagerHttpRequest] identifier[request] operator[=] identifier[InsertInstanceGroupManagerHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setZone] operator[SEP] identifier[zone] operator[SEP] operator[SEP] identifier[setInstanceGroupManagerResource] operator[SEP] identifier[instanceGroupManagerResource] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[insertInstanceGroupManager] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public GetDomainNamesResult getDomainNames(GetDomainNamesRequest request) { request = beforeClientExecution(request); return executeGetDomainNames(request); }
class class_name[name] begin[{] method[getDomainNames, return_type[type[GetDomainNamesResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetDomainNames, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetDomainNamesResult] identifier[getDomainNames] operator[SEP] identifier[GetDomainNamesRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetDomainNames] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static boolean polylineRelatePoint_(Polyline polyline_a, Point point_b, double tolerance, int relation, ProgressTracker progress_tracker) { switch (relation) { case Relation.disjoint: return polylineDisjointPoint_(polyline_a, point_b, tolerance, progress_tracker); case Relation.contains: return polylineContainsPoint_(polyline_a, point_b, tolerance, progress_tracker); case Relation.touches: return polylineTouchesPoint_(polyline_a, point_b, tolerance, progress_tracker); default: break; // warning fix } return false; }
class class_name[name] begin[{] method[polylineRelatePoint_, return_type[type[boolean]], modifier[private static], parameter[polyline_a, point_b, tolerance, relation, progress_tracker]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=disjoint, postfix_operators=[], prefix_operators=[], qualifier=Relation, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=polyline_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=point_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=progress_tracker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=polylineDisjointPoint_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=contains, postfix_operators=[], prefix_operators=[], qualifier=Relation, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=polyline_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=point_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=progress_tracker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=polylineContainsPoint_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=touches, postfix_operators=[], prefix_operators=[], qualifier=Relation, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=polyline_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=point_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=progress_tracker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=polylineTouchesPoint_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=relation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[polylineRelatePoint_] operator[SEP] identifier[Polyline] identifier[polyline_a] , identifier[Point] identifier[point_b] , Keyword[double] identifier[tolerance] , Keyword[int] identifier[relation] , identifier[ProgressTracker] identifier[progress_tracker] operator[SEP] { Keyword[switch] operator[SEP] identifier[relation] operator[SEP] { Keyword[case] identifier[Relation] operator[SEP] identifier[disjoint] operator[:] Keyword[return] identifier[polylineDisjointPoint_] operator[SEP] identifier[polyline_a] , identifier[point_b] , identifier[tolerance] , identifier[progress_tracker] operator[SEP] operator[SEP] Keyword[case] identifier[Relation] operator[SEP] identifier[contains] operator[:] Keyword[return] identifier[polylineContainsPoint_] operator[SEP] identifier[polyline_a] , identifier[point_b] , identifier[tolerance] , identifier[progress_tracker] operator[SEP] operator[SEP] Keyword[case] identifier[Relation] operator[SEP] identifier[touches] operator[:] Keyword[return] identifier[polylineTouchesPoint_] operator[SEP] identifier[polyline_a] , identifier[point_b] , identifier[tolerance] , identifier[progress_tracker] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
void deleteUserIndexForChains(int userIndex) { assert (m_chainIndices.get(userIndex) != null); m_chainIndices.set(userIndex, null); }
class class_name[name] begin[{] method[deleteUserIndexForChains, return_type[void], modifier[default], parameter[userIndex]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=userIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m_chainIndices, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) call[m_chainIndices.set, parameter[member[.userIndex], literal[null]]] end[}] END[}]
Keyword[void] identifier[deleteUserIndexForChains] operator[SEP] Keyword[int] identifier[userIndex] operator[SEP] { Keyword[assert] operator[SEP] identifier[m_chainIndices] operator[SEP] identifier[get] operator[SEP] identifier[userIndex] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[m_chainIndices] operator[SEP] identifier[set] operator[SEP] identifier[userIndex] , Other[null] operator[SEP] operator[SEP] }
public void encode(DerOutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); for (int i = 0; i < ids.size(); i++) { ids.elementAt(i).encode(tmp); } out.write(DerValue.tag_Sequence,tmp); }
class class_name[name] begin[{] method[encode, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[DerOutputStream], tmp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=elementAt, postfix_operators=[], prefix_operators=[], qualifier=ids, selectors=[MethodInvocation(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=ids, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[out.write, parameter[member[DerValue.tag_Sequence], member[.tmp]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[encode] operator[SEP] identifier[DerOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[DerOutputStream] identifier[tmp] operator[=] Keyword[new] identifier[DerOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ids] operator[SEP] identifier[elementAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[encode] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[DerValue] operator[SEP] identifier[tag_Sequence] , identifier[tmp] operator[SEP] operator[SEP] }
@Override public boolean include(ArchivePath path) { if (paths.contains(path.get())) { return false; } return true; }
class class_name[name] begin[{] method[include, return_type[type[boolean]], modifier[public], parameter[path]] begin[{] if[call[paths.contains, parameter[call[path.get, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[include] operator[SEP] identifier[ArchivePath] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[paths] operator[SEP] identifier[contains] operator[SEP] identifier[path] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static String generateMD5(final byte[] input) { try { final MessageDigest messageDigest = MessageDigest.getInstance("MD5"); messageDigest.reset(); byte[] digest = messageDigest.digest(input); return new String(Hex.encodeHex(digest)); } catch (Exception e) { LOG.debug("An error occurred generating the MD5 Hash of the input string", e); return null; } }
class class_name[name] begin[{] method[generateMD5, return_type[type[String]], modifier[public static], parameter[input]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MD5")], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=MessageDigest, selectors=[], type_arguments=None), name=messageDigest)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MessageDigest, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=messageDigest, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=digest, postfix_operators=[], prefix_operators=[], qualifier=messageDigest, selectors=[], type_arguments=None), name=digest)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=digest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodeHex, postfix_operators=[], prefix_operators=[], qualifier=Hex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An error occurred generating the MD5 Hash of the input string"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, 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=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[generateMD5] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[input] operator[SEP] { Keyword[try] { Keyword[final] identifier[MessageDigest] identifier[messageDigest] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[messageDigest] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[digest] operator[=] identifier[messageDigest] operator[SEP] identifier[digest] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[Hex] operator[SEP] identifier[encodeHex] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
private static double contClassicLB(final double numSamplesF, final double theta, final double numSDev) { final double nHat = (numSamplesF - 0.5) / theta; final double b = numSDev * Math.sqrt((1.0 - theta) / theta); final double d = 0.5 * b * Math.sqrt((b * b) + (4.0 * nHat)); final double center = nHat + (0.5 * (b * b)); return (center - d); }
class class_name[name] begin[{] method[contClassicLB, return_type[type[double]], modifier[private static], parameter[numSamplesF, theta, numSDev]] begin[{] local_variable[type[double], nHat] local_variable[type[double], b] local_variable[type[double], d] local_variable[type[double], center] return[binary_operation[member[.center], -, member[.d]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[double] identifier[contClassicLB] operator[SEP] Keyword[final] Keyword[double] identifier[numSamplesF] , Keyword[final] Keyword[double] identifier[theta] , Keyword[final] Keyword[double] identifier[numSDev] operator[SEP] { Keyword[final] Keyword[double] identifier[nHat] operator[=] operator[SEP] identifier[numSamplesF] operator[-] literal[Float] operator[SEP] operator[/] identifier[theta] operator[SEP] Keyword[final] Keyword[double] identifier[b] operator[=] identifier[numSDev] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] literal[Float] operator[-] identifier[theta] operator[SEP] operator[/] identifier[theta] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[d] operator[=] literal[Float] operator[*] identifier[b] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[b] operator[*] identifier[b] operator[SEP] operator[+] operator[SEP] literal[Float] operator[*] identifier[nHat] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[center] operator[=] identifier[nHat] operator[+] operator[SEP] literal[Float] operator[*] operator[SEP] identifier[b] operator[*] identifier[b] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[center] operator[-] identifier[d] operator[SEP] operator[SEP] }
@Contract(pure = true) @NotNull public static <T> Promise<List<T>> toList() { return Promise.of(emptyList()); }
class class_name[name] begin[{] method[toList, return_type[type[Promise]], modifier[public static], parameter[]] begin[{] return[call[Promise.of, parameter[call[.emptyList, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[NotNull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Promise] operator[<] identifier[List] operator[<] identifier[T] operator[>] operator[>] identifier[toList] operator[SEP] operator[SEP] { Keyword[return] identifier[Promise] operator[SEP] identifier[of] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Transport newTransport(ApitraryApi apitraryApi) { List<Class<Transport>> knownTransports = getAvailableTransports(); if (knownTransports.isEmpty()) { throw new ApiTransportException("No transport provider available. Is there one on the classpath?"); } return newTransport(apitraryApi, knownTransports.get(knownTransports.size() - 1)); }
class class_name[name] begin[{] method[newTransport, return_type[type[Transport]], modifier[public], parameter[apitraryApi]] begin[{] local_variable[type[List], knownTransports] if[call[knownTransports.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No transport provider available. Is there one on the classpath?")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApiTransportException, sub_type=None)), label=None) else begin[{] None end[}] return[call[.newTransport, parameter[member[.apitraryApi], call[knownTransports.get, parameter[binary_operation[call[knownTransports.size, parameter[]], -, literal[1]]]]]]] end[}] END[}]
Keyword[public] identifier[Transport] identifier[newTransport] operator[SEP] identifier[ApitraryApi] identifier[apitraryApi] operator[SEP] { identifier[List] operator[<] identifier[Class] operator[<] identifier[Transport] operator[>] operator[>] identifier[knownTransports] operator[=] identifier[getAvailableTransports] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[knownTransports] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ApiTransportException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[newTransport] operator[SEP] identifier[apitraryApi] , identifier[knownTransports] operator[SEP] identifier[get] operator[SEP] identifier[knownTransports] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] }
public static int[] arraySlice(int[] source, int start, int count) { int[] slice = new int[count]; System.arraycopy(source, start, slice, 0, count); return slice; }
class class_name[name] begin[{] method[arraySlice, return_type[type[int]], modifier[public static], parameter[source, start, count]] begin[{] local_variable[type[int], slice] call[System.arraycopy, parameter[member[.source], member[.start], member[.slice], literal[0], member[.count]]] return[member[.slice]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[arraySlice] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[start] , Keyword[int] identifier[count] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[slice] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[count] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[source] , identifier[start] , identifier[slice] , Other[0] , identifier[count] operator[SEP] operator[SEP] Keyword[return] identifier[slice] operator[SEP] }
protected int extractDigit(final char value) throws NumberFormatException { if (Character.isDigit(value)) { return Character.digit(value, DEC_RADIX); } else { throw LOG.getCharacterIsNotADigitException(value); } }
class class_name[name] begin[{] method[extractDigit, return_type[type[int]], modifier[protected], parameter[value]] begin[{] if[call[Character.isDigit, parameter[member[.value]]]] begin[{] return[call[Character.digit, parameter[member[.value], member[.DEC_RADIX]]]] else begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCharacterIsNotADigitException, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None) end[}] end[}] END[}]
Keyword[protected] Keyword[int] identifier[extractDigit] operator[SEP] Keyword[final] Keyword[char] identifier[value] operator[SEP] Keyword[throws] identifier[NumberFormatException] { Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[return] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[value] , identifier[DEC_RADIX] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] identifier[LOG] operator[SEP] identifier[getCharacterIsNotADigitException] operator[SEP] identifier[value] operator[SEP] operator[SEP] } }
public static byte[] computeHash(String passwd) throws NoSuchAlgorithmException { java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-1"); md.reset(); md.update(passwd.getBytes()); return md.digest(); }
class class_name[name] begin[{] method[computeHash, return_type[type[byte]], modifier[public static], parameter[passwd]] begin[{] local_variable[type[java], md] call[md.reset, parameter[]] call[md.update, parameter[call[passwd.getBytes, parameter[]]]] return[call[md.digest, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[computeHash] operator[SEP] identifier[String] identifier[passwd] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[MessageDigest] identifier[md] operator[=] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[md] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[md] operator[SEP] identifier[update] operator[SEP] identifier[passwd] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[md] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] }
public static <T extends Annotation> T getAnnotation(Method method, Class<T> annotationClass) { T t = method.getAnnotation(annotationClass); if (t == null) { t = getAnnotation(method.getDeclaringClass(), annotationClass); } return t; }
class class_name[name] begin[{] method[getAnnotation, return_type[type[T]], modifier[public static], parameter[method, annotationClass]] begin[{] local_variable[type[T], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] assign[member[.t], call[.getAnnotation, parameter[call[method.getDeclaringClass, parameter[]], member[.annotationClass]]]] else begin[{] None end[}] return[member[.t]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Annotation] operator[>] identifier[T] identifier[getAnnotation] operator[SEP] identifier[Method] identifier[method] , identifier[Class] operator[<] identifier[T] operator[>] identifier[annotationClass] operator[SEP] { identifier[T] identifier[t] operator[=] identifier[method] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[annotationClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { identifier[t] operator[=] identifier[getAnnotation] operator[SEP] identifier[method] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] , identifier[annotationClass] operator[SEP] operator[SEP] } Keyword[return] identifier[t] operator[SEP] }
public com.google.protobuf.ByteString getSortingCodeBytes() { java.lang.Object ref = sortingCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); sortingCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
class class_name[name] begin[{] method[getSortingCodeBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] assign[member[.sortingCode_], member[.b]] return[member[.b]] else begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=protobuf, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteString, sub_type=None)))))] end[}] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getSortingCodeBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[sortingCode_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[b] operator[=] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[copyFromUtf8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[sortingCode_] operator[=] identifier[b] operator[SEP] Keyword[return] identifier[b] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] } }
public static EObject getFirstContainerForPredicate(EObject element, Function1<? super EObject, ? extends Boolean> predicate) { if (predicate == null || element == null) { return null; } EObject elt = element.eContainer(); while (elt != null) { if (predicate.apply(elt)) { return elt; } elt = elt.eContainer(); } return null; }
class class_name[name] begin[{] method[getFirstContainerForPredicate, return_type[type[EObject]], modifier[public static], parameter[element, predicate]] begin[{] if[binary_operation[binary_operation[member[.predicate], ==, literal[null]], ||, binary_operation[member[.element], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[EObject], elt] while[binary_operation[member[.elt], !=, literal[null]]] begin[{] if[call[predicate.apply, parameter[member[.elt]]]] begin[{] return[member[.elt]] else begin[{] None end[}] assign[member[.elt], call[elt.eContainer, parameter[]]] end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[EObject] identifier[getFirstContainerForPredicate] operator[SEP] identifier[EObject] identifier[element] , identifier[Function1] operator[<] operator[?] Keyword[super] identifier[EObject] , operator[?] Keyword[extends] identifier[Boolean] operator[>] identifier[predicate] operator[SEP] { Keyword[if] operator[SEP] identifier[predicate] operator[==] Other[null] operator[||] identifier[element] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[EObject] identifier[elt] operator[=] identifier[element] operator[SEP] identifier[eContainer] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[elt] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[predicate] operator[SEP] identifier[apply] operator[SEP] identifier[elt] operator[SEP] operator[SEP] { Keyword[return] identifier[elt] operator[SEP] } identifier[elt] operator[=] identifier[elt] operator[SEP] identifier[eContainer] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private static void reallyValidatePseudoScopedBean(Bean<?> bean, BeanManagerImpl beanManager, Set<Object> dependencyPath, Set<Bean<?>> validatedBeans) { // see if we have already seen this bean in the dependency path if (dependencyPath.contains(bean)) { // create a list that shows the path to the bean List<Object> realDependencyPath = new ArrayList<Object>(dependencyPath); realDependencyPath.add(bean); throw ValidatorLogger.LOG.pseudoScopedBeanHasCircularReferences(WeldCollections.toMultiRowString(realDependencyPath)); } if (validatedBeans.contains(bean)) { return; } dependencyPath.add(bean); for (InjectionPoint injectionPoint : bean.getInjectionPoints()) { if (!injectionPoint.isDelegate()) { dependencyPath.add(injectionPoint); validatePseudoScopedInjectionPoint(injectionPoint, beanManager, dependencyPath, validatedBeans); dependencyPath.remove(injectionPoint); } } if (bean instanceof DecorableBean<?>) { final List<Decorator<?>> decorators = Reflections.<DecorableBean<?>>cast(bean).getDecorators(); if (!decorators.isEmpty()) { for (final Decorator<?> decorator : decorators) { reallyValidatePseudoScopedBean(decorator, beanManager, dependencyPath, validatedBeans); } } } if (bean instanceof AbstractProducerBean<?, ?, ?> && !(bean instanceof EEResourceProducerField<?, ?>)) { AbstractProducerBean<?, ?, ?> producer = (AbstractProducerBean<?, ?, ?>) bean; if (!beanManager.isNormalScope(producer.getDeclaringBean().getScope()) && !producer.getAnnotated().isStatic()) { reallyValidatePseudoScopedBean(producer.getDeclaringBean(), beanManager, dependencyPath, validatedBeans); } } validatedBeans.add(bean); dependencyPath.remove(bean); }
class class_name[name] begin[{] method[reallyValidatePseudoScopedBean, return_type[void], modifier[private static], parameter[bean, beanManager, dependencyPath, validatedBeans]] begin[{] if[call[dependencyPath.contains, parameter[member[.bean]]]] begin[{] local_variable[type[List], realDependencyPath] call[realDependencyPath.add, parameter[member[.bean]]] ThrowStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=realDependencyPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toMultiRowString, postfix_operators=[], prefix_operators=[], qualifier=WeldCollections, selectors=[], type_arguments=None)], member=pseudoScopedBeanHasCircularReferences, postfix_operators=[], prefix_operators=[], qualifier=ValidatorLogger.LOG, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[call[validatedBeans.contains, parameter[member[.bean]]]] begin[{] return[None] else begin[{] None end[}] call[dependencyPath.add, parameter[member[.bean]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDelegate, postfix_operators=[], prefix_operators=['!'], qualifier=injectionPoint, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=injectionPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=dependencyPath, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=injectionPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beanManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dependencyPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=validatedBeans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validatePseudoScopedInjectionPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=injectionPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=dependencyPath, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getInjectionPoints, postfix_operators=[], prefix_operators=[], qualifier=bean, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=injectionPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InjectionPoint, sub_type=None))), label=None) if[binary_operation[member[.bean], instanceof, type[DecorableBean]]] begin[{] local_variable[type[List], decorators] if[call[decorators.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=decorator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beanManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dependencyPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=validatedBeans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reallyValidatePseudoScopedBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=decorators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=decorator)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Decorator, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[member[.bean], instanceof, type[AbstractProducerBean]], &&, binary_operation[member[.bean], instanceof, type[EEResourceProducerField]]]] begin[{] local_variable[type[AbstractProducerBean], producer] if[binary_operation[call[beanManager.isNormalScope, parameter[call[producer.getDeclaringBean, parameter[]]]], &&, call[producer.getAnnotated, parameter[]]]] begin[{] call[.reallyValidatePseudoScopedBean, parameter[call[producer.getDeclaringBean, parameter[]], member[.beanManager], member[.dependencyPath], member[.validatedBeans]]] else begin[{] None end[}] else begin[{] None end[}] call[validatedBeans.add, parameter[member[.bean]]] call[dependencyPath.remove, parameter[member[.bean]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[reallyValidatePseudoScopedBean] operator[SEP] identifier[Bean] operator[<] operator[?] operator[>] identifier[bean] , identifier[BeanManagerImpl] identifier[beanManager] , identifier[Set] operator[<] identifier[Object] operator[>] identifier[dependencyPath] , identifier[Set] operator[<] identifier[Bean] operator[<] operator[?] operator[>] operator[>] identifier[validatedBeans] operator[SEP] { Keyword[if] operator[SEP] identifier[dependencyPath] operator[SEP] identifier[contains] operator[SEP] identifier[bean] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[realDependencyPath] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] identifier[dependencyPath] operator[SEP] operator[SEP] identifier[realDependencyPath] operator[SEP] identifier[add] operator[SEP] identifier[bean] operator[SEP] operator[SEP] Keyword[throw] identifier[ValidatorLogger] operator[SEP] identifier[LOG] operator[SEP] identifier[pseudoScopedBeanHasCircularReferences] operator[SEP] identifier[WeldCollections] operator[SEP] identifier[toMultiRowString] operator[SEP] identifier[realDependencyPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[validatedBeans] operator[SEP] identifier[contains] operator[SEP] identifier[bean] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[dependencyPath] operator[SEP] identifier[add] operator[SEP] identifier[bean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[InjectionPoint] identifier[injectionPoint] operator[:] identifier[bean] operator[SEP] identifier[getInjectionPoints] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[injectionPoint] operator[SEP] identifier[isDelegate] operator[SEP] operator[SEP] operator[SEP] { identifier[dependencyPath] operator[SEP] identifier[add] operator[SEP] identifier[injectionPoint] operator[SEP] operator[SEP] identifier[validatePseudoScopedInjectionPoint] operator[SEP] identifier[injectionPoint] , identifier[beanManager] , identifier[dependencyPath] , identifier[validatedBeans] operator[SEP] operator[SEP] identifier[dependencyPath] operator[SEP] identifier[remove] operator[SEP] identifier[injectionPoint] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[bean] Keyword[instanceof] identifier[DecorableBean] operator[<] operator[?] operator[>] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Decorator] operator[<] operator[?] operator[>] operator[>] identifier[decorators] operator[=] identifier[Reflections] operator[SEP] operator[<] identifier[DecorableBean] operator[<] operator[?] operator[>] operator[>] identifier[cast] operator[SEP] identifier[bean] operator[SEP] operator[SEP] identifier[getDecorators] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[decorators] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Decorator] operator[<] operator[?] operator[>] identifier[decorator] operator[:] identifier[decorators] operator[SEP] { identifier[reallyValidatePseudoScopedBean] operator[SEP] identifier[decorator] , identifier[beanManager] , identifier[dependencyPath] , identifier[validatedBeans] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[bean] Keyword[instanceof] identifier[AbstractProducerBean] operator[<] operator[?] , operator[?] , operator[?] operator[>] operator[&&] operator[!] operator[SEP] identifier[bean] Keyword[instanceof] identifier[EEResourceProducerField] operator[<] operator[?] , operator[?] operator[>] operator[SEP] operator[SEP] { identifier[AbstractProducerBean] operator[<] operator[?] , operator[?] , operator[?] operator[>] identifier[producer] operator[=] operator[SEP] identifier[AbstractProducerBean] operator[<] operator[?] , operator[?] , operator[?] operator[>] operator[SEP] identifier[bean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[beanManager] operator[SEP] identifier[isNormalScope] operator[SEP] identifier[producer] operator[SEP] identifier[getDeclaringBean] operator[SEP] operator[SEP] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[producer] operator[SEP] identifier[getAnnotated] operator[SEP] operator[SEP] operator[SEP] identifier[isStatic] operator[SEP] operator[SEP] operator[SEP] { identifier[reallyValidatePseudoScopedBean] operator[SEP] identifier[producer] operator[SEP] identifier[getDeclaringBean] operator[SEP] operator[SEP] , identifier[beanManager] , identifier[dependencyPath] , identifier[validatedBeans] operator[SEP] operator[SEP] } } identifier[validatedBeans] operator[SEP] identifier[add] operator[SEP] identifier[bean] operator[SEP] operator[SEP] identifier[dependencyPath] operator[SEP] identifier[remove] operator[SEP] identifier[bean] operator[SEP] operator[SEP] }
private static void main(String[] args) { IPAccessHandler ipah = new IPAccessHandler(); ipah.setStandard("deny"); ipah.setAllowIP("217.215.71.167"); ipah.setDenyIP("217.215.71.149"); System.out.println(ipah.checkIP("217.215.71.245") + " = false"); System.out.println(ipah.checkIP("217.215.71.167") + " = true"); System.out.println(ipah.checkIP("217.215.71.149") + " = false"); System.out.println(ipah.checkIP("0.0.0.0") + " = false"); IPAccessHandler ipah2 = new IPAccessHandler(); ipah2.setStandard("allow"); ipah2.setAllowIP("217.215.71.167"); ipah2.setDenyIP("217.215.71.149"); System.out.println(ipah2.checkIP("217.215.71.245") + " = true"); System.out.println(ipah2.checkIP("217.215.71.167") + " = true"); System.out.println(ipah2.checkIP("217.215.71.149") + " = false"); System.out.println(ipah2.checkIP("0.0.0.0") + " = true"); }
class class_name[name] begin[{] method[main, return_type[void], modifier[private static], parameter[args]] begin[{] local_variable[type[IPAccessHandler], ipah] call[ipah.setStandard, parameter[literal["deny"]]] call[ipah.setAllowIP, parameter[literal["217.215.71.167"]]] call[ipah.setDenyIP, parameter[literal["217.215.71.149"]]] call[System.out.println, parameter[binary_operation[call[ipah.checkIP, parameter[literal["217.215.71.245"]]], +, literal[" = false"]]]] call[System.out.println, parameter[binary_operation[call[ipah.checkIP, parameter[literal["217.215.71.167"]]], +, literal[" = true"]]]] call[System.out.println, parameter[binary_operation[call[ipah.checkIP, parameter[literal["217.215.71.149"]]], +, literal[" = false"]]]] call[System.out.println, parameter[binary_operation[call[ipah.checkIP, parameter[literal["0.0.0.0"]]], +, literal[" = false"]]]] local_variable[type[IPAccessHandler], ipah2] call[ipah2.setStandard, parameter[literal["allow"]]] call[ipah2.setAllowIP, parameter[literal["217.215.71.167"]]] call[ipah2.setDenyIP, parameter[literal["217.215.71.149"]]] call[System.out.println, parameter[binary_operation[call[ipah2.checkIP, parameter[literal["217.215.71.245"]]], +, literal[" = true"]]]] call[System.out.println, parameter[binary_operation[call[ipah2.checkIP, parameter[literal["217.215.71.167"]]], +, literal[" = true"]]]] call[System.out.println, parameter[binary_operation[call[ipah2.checkIP, parameter[literal["217.215.71.149"]]], +, literal[" = false"]]]] call[System.out.println, parameter[binary_operation[call[ipah2.checkIP, parameter[literal["0.0.0.0"]]], +, literal[" = true"]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[IPAccessHandler] identifier[ipah] operator[=] Keyword[new] identifier[IPAccessHandler] operator[SEP] operator[SEP] operator[SEP] identifier[ipah] operator[SEP] identifier[setStandard] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ipah] operator[SEP] identifier[setAllowIP] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ipah] operator[SEP] identifier[setDenyIP] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[IPAccessHandler] identifier[ipah2] operator[=] Keyword[new] identifier[IPAccessHandler] operator[SEP] operator[SEP] operator[SEP] identifier[ipah2] operator[SEP] identifier[setStandard] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ipah2] operator[SEP] identifier[setAllowIP] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ipah2] operator[SEP] identifier[setDenyIP] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah2] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah2] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah2] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[ipah2] operator[SEP] identifier[checkIP] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
public static Color getColorProperty(String base, String property, boolean required) { return getColorProperty(base + JavaPropertyConstants.PROPERTY_DIVIDER + property, required); }
class class_name[name] begin[{] method[getColorProperty, return_type[type[Color]], modifier[public static], parameter[base, property, required]] begin[{] return[call[.getColorProperty, parameter[binary_operation[binary_operation[member[.base], +, member[JavaPropertyConstants.PROPERTY_DIVIDER]], +, member[.property]], member[.required]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Color] identifier[getColorProperty] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[property] , Keyword[boolean] identifier[required] operator[SEP] { Keyword[return] identifier[getColorProperty] operator[SEP] identifier[base] operator[+] identifier[JavaPropertyConstants] operator[SEP] identifier[PROPERTY_DIVIDER] operator[+] identifier[property] , identifier[required] operator[SEP] operator[SEP] }
public static boolean isLocalTimeInRange(LocalTime value, LocalTime optionalMinimum, LocalTime optionalMaximum, boolean inclusiveOfEndpoints) { // If either bounding time does does not already exist, then set it to the maximum range. LocalTime minimum = (optionalMinimum == null) ? LocalTime.MIN : optionalMinimum; LocalTime maximum = (optionalMaximum == null) ? LocalTime.MAX : optionalMaximum; // Null is never considered to be inside of a range. if (value == null) { return false; } // Return false if the range does not contain any times. if (maximum.isBefore(minimum) || maximum.equals(minimum)) { return false; } if (inclusiveOfEndpoints) { return ((value.isAfter(minimum) || value.equals(minimum)) && (value.isBefore(maximum) || value.equals(maximum))); } else { return (value.isAfter(minimum) && value.isBefore(maximum)); } }
class class_name[name] begin[{] method[isLocalTimeInRange, return_type[type[boolean]], modifier[public static], parameter[value, optionalMinimum, optionalMaximum, inclusiveOfEndpoints]] begin[{] local_variable[type[LocalTime], minimum] local_variable[type[LocalTime], maximum] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[maximum.isBefore, parameter[member[.minimum]]], ||, call[maximum.equals, parameter[member[.minimum]]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[member[.inclusiveOfEndpoints]] begin[{] return[binary_operation[binary_operation[call[value.isAfter, parameter[member[.minimum]]], ||, call[value.equals, parameter[member[.minimum]]]], &&, binary_operation[call[value.isBefore, parameter[member[.maximum]]], ||, call[value.equals, parameter[member[.maximum]]]]]] else begin[{] return[binary_operation[call[value.isAfter, parameter[member[.minimum]]], &&, call[value.isBefore, parameter[member[.maximum]]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isLocalTimeInRange] operator[SEP] identifier[LocalTime] identifier[value] , identifier[LocalTime] identifier[optionalMinimum] , identifier[LocalTime] identifier[optionalMaximum] , Keyword[boolean] identifier[inclusiveOfEndpoints] operator[SEP] { identifier[LocalTime] identifier[minimum] operator[=] operator[SEP] identifier[optionalMinimum] operator[==] Other[null] operator[SEP] operator[?] identifier[LocalTime] operator[SEP] identifier[MIN] operator[:] identifier[optionalMinimum] operator[SEP] identifier[LocalTime] identifier[maximum] operator[=] operator[SEP] identifier[optionalMaximum] operator[==] Other[null] operator[SEP] operator[?] identifier[LocalTime] operator[SEP] identifier[MAX] operator[:] identifier[optionalMaximum] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[maximum] operator[SEP] identifier[isBefore] operator[SEP] identifier[minimum] operator[SEP] operator[||] identifier[maximum] operator[SEP] identifier[equals] operator[SEP] identifier[minimum] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[inclusiveOfEndpoints] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[isAfter] operator[SEP] identifier[minimum] operator[SEP] operator[||] identifier[value] operator[SEP] identifier[equals] operator[SEP] identifier[minimum] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[value] operator[SEP] identifier[isBefore] operator[SEP] identifier[maximum] operator[SEP] operator[||] identifier[value] operator[SEP] identifier[equals] operator[SEP] identifier[maximum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[value] operator[SEP] identifier[isAfter] operator[SEP] identifier[minimum] operator[SEP] operator[&&] identifier[value] operator[SEP] identifier[isBefore] operator[SEP] identifier[maximum] operator[SEP] operator[SEP] operator[SEP] } }
private static String getFileExtension(Resource file) { String name = file.getName(); int index = name.lastIndexOf('.'); if (index == -1) return null; return name.substring(index + 1).trim(); }
class class_name[name] begin[{] method[getFileExtension, return_type[type[String]], modifier[private static], parameter[file]] begin[{] local_variable[type[String], name] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[1]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[name.substring, parameter[binary_operation[member[.index], +, literal[1]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getFileExtension] operator[SEP] identifier[Resource] identifier[file] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] operator[-] Other[1] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] }
private void setColumnsSize(final double min, final double max, final String... columnPropertyIds) { for (final String columnPropertyId : columnPropertyIds) { getColumn(columnPropertyId).setMinimumWidth(min); getColumn(columnPropertyId).setMaximumWidth(max); } }
class class_name[name] begin[{] method[setColumnsSize, return_type[void], modifier[private], parameter[min, max, columnPropertyIds]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnPropertyId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMinimumWidth, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnPropertyId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMaximumWidth, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=columnPropertyIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=columnPropertyId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[setColumnsSize] operator[SEP] Keyword[final] Keyword[double] identifier[min] , Keyword[final] Keyword[double] identifier[max] , Keyword[final] identifier[String] operator[...] identifier[columnPropertyIds] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[columnPropertyId] operator[:] identifier[columnPropertyIds] operator[SEP] { identifier[getColumn] operator[SEP] identifier[columnPropertyId] operator[SEP] operator[SEP] identifier[setMinimumWidth] operator[SEP] identifier[min] operator[SEP] operator[SEP] identifier[getColumn] operator[SEP] identifier[columnPropertyId] operator[SEP] operator[SEP] identifier[setMaximumWidth] operator[SEP] identifier[max] operator[SEP] operator[SEP] } }
public Map<String, String> getUploadParameters() { Map<String, String> parameters = new TreeMap<>(); String title = getTitle(); if (title != null) { parameters.put("title", title); } String description = getDescription(); if (description != null) { parameters.put("description", description); } Collection<String> tags = getTags(); if (tags != null) { parameters.put("tags", StringUtilities.join(tags, " ")); } if (isHidden() != null) { parameters.put("hidden", isHidden().booleanValue() ? "1" : "0"); } if (getSafetyLevel() != null) { parameters.put("safety_level", getSafetyLevel()); } if (getContentType() != null) { parameters.put("content_type", getContentType()); } if (getPhotoId() != null) { parameters.put("photo_id", getPhotoId()); } parameters.put("is_public", isPublicFlag() ? "1" : "0"); parameters.put("is_family", isFamilyFlag() ? "1" : "0"); parameters.put("is_friend", isFriendFlag() ? "1" : "0"); parameters.put("async", isAsync() ? "1" : "0"); return parameters; }
class class_name[name] begin[{] method[getUploadParameters, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], parameters] local_variable[type[String], title] if[binary_operation[member[.title], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["title"], member[.title]]] else begin[{] None end[}] local_variable[type[String], description] if[binary_operation[member[.description], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["description"], member[.description]]] else begin[{] None end[}] local_variable[type[Collection], tags] if[binary_operation[member[.tags], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["tags"], call[StringUtilities.join, parameter[member[.tags], literal[" "]]]]] else begin[{] None end[}] if[binary_operation[call[.isHidden, parameter[]], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["hidden"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isHidden, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=booleanValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1"))]] else begin[{] None end[}] if[binary_operation[call[.getSafetyLevel, parameter[]], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["safety_level"], call[.getSafetyLevel, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[.getContentType, parameter[]], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["content_type"], call[.getContentType, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[.getPhotoId, parameter[]], !=, literal[null]]] begin[{] call[parameters.put, parameter[literal["photo_id"], call[.getPhotoId, parameter[]]]] else begin[{] None end[}] call[parameters.put, parameter[literal["is_public"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isPublicFlag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1"))]] call[parameters.put, parameter[literal["is_family"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isFamilyFlag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1"))]] call[parameters.put, parameter[literal["is_friend"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isFriendFlag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1"))]] call[parameters.put, parameter[literal["async"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isAsync, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1"))]] return[member[.parameters]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getUploadParameters] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[title] operator[=] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[title] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[title] operator[SEP] operator[SEP] } identifier[String] identifier[description] operator[=] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[description] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[description] operator[SEP] operator[SEP] } identifier[Collection] operator[<] identifier[String] operator[>] identifier[tags] operator[=] identifier[getTags] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tags] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[StringUtilities] operator[SEP] identifier[join] operator[SEP] identifier[tags] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isHidden] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[isHidden] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getSafetyLevel] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[getSafetyLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getContentType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[getContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getPhotoId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[getPhotoId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[isPublicFlag] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[isFamilyFlag] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[isFriendFlag] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[isAsync] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[parameters] operator[SEP] }
public static void main(String[] args) throws IOException { if (args.length == 0 || args[0].equals("--help")) { help(); return; } for (String a : args) { countFile(a); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[binary_operation[member[args.length], ==, literal[0]], ||, member[.args]]] begin[{] call[.help, parameter[]] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=countFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[||] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[help] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[a] operator[:] identifier[args] operator[SEP] { identifier[countFile] operator[SEP] identifier[a] operator[SEP] operator[SEP] } }
public static OffsetTime leftShift(final LocalTime self, ZoneOffset offset) { return OffsetTime.of(self, offset); }
class class_name[name] begin[{] method[leftShift, return_type[type[OffsetTime]], modifier[public static], parameter[self, offset]] begin[{] return[call[OffsetTime.of, parameter[member[.self], member[.offset]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OffsetTime] identifier[leftShift] operator[SEP] Keyword[final] identifier[LocalTime] identifier[self] , identifier[ZoneOffset] identifier[offset] operator[SEP] { Keyword[return] identifier[OffsetTime] operator[SEP] identifier[of] operator[SEP] identifier[self] , identifier[offset] operator[SEP] operator[SEP] }
public void marshall(OutputArtifact outputArtifact, ProtocolMarshaller protocolMarshaller) { if (outputArtifact == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(outputArtifact.getName(), NAME_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[outputArtifact, protocolMarshaller]] begin[{] if[binary_operation[member[.outputArtifact], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=outputArtifact, 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)], 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[OutputArtifact] identifier[outputArtifact] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[outputArtifact] 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[outputArtifact] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_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 double logpdf(double val, double loc, double scale) { val = Math.abs((val - loc) / scale); double f = 1.0 + FastMath.exp(-val); return -val - FastMath.log(scale * f * f); }
class class_name[name] begin[{] method[logpdf, return_type[type[double]], modifier[public static], parameter[val, loc, scale]] begin[{] assign[member[.val], call[Math.abs, parameter[binary_operation[binary_operation[member[.val], -, member[.loc]], /, member[.scale]]]]] local_variable[type[double], f] return[binary_operation[member[.val], -, call[FastMath.log, parameter[binary_operation[binary_operation[member[.scale], *, member[.f]], *, member[.f]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[logpdf] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[loc] , Keyword[double] identifier[scale] operator[SEP] { identifier[val] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] operator[SEP] identifier[val] operator[-] identifier[loc] operator[SEP] operator[/] identifier[scale] operator[SEP] operator[SEP] Keyword[double] identifier[f] operator[=] literal[Float] operator[+] identifier[FastMath] operator[SEP] identifier[exp] operator[SEP] operator[-] identifier[val] operator[SEP] operator[SEP] Keyword[return] operator[-] identifier[val] operator[-] identifier[FastMath] operator[SEP] identifier[log] operator[SEP] identifier[scale] operator[*] identifier[f] operator[*] identifier[f] operator[SEP] operator[SEP] }
@Override public AbstractLessLockingUniversalSingleStorageJdbcQueue init() throws Exception { super.init(); if (getMessageFactory() == null) { setMessageFactory(UniversalIdIntQueueMessageFactory.INSTANCE); } SQL_COUNT = MessageFormat.format(SQL_COUNT, getTableName()); SQL_COUNT_EPHEMERAL = MessageFormat.format(SQL_COUNT_EPHEMERAL, getTableNameEphemeral()); return this; }
class class_name[name] begin[{] method[init, return_type[type[AbstractLessLockingUniversalSingleStorageJdbcQueue]], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[call[.getMessageFactory, parameter[]], ==, literal[null]]] begin[{] call[.setMessageFactory, parameter[member[UniversalIdIntQueueMessageFactory.INSTANCE]]] else begin[{] None end[}] assign[member[.SQL_COUNT], call[MessageFormat.format, parameter[member[.SQL_COUNT], call[.getTableName, parameter[]]]]] assign[member[.SQL_COUNT_EPHEMERAL], call[MessageFormat.format, parameter[member[.SQL_COUNT_EPHEMERAL], call[.getTableNameEphemeral, parameter[]]]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AbstractLessLockingUniversalSingleStorageJdbcQueue] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getMessageFactory] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[setMessageFactory] operator[SEP] identifier[UniversalIdIntQueueMessageFactory] operator[SEP] identifier[INSTANCE] operator[SEP] operator[SEP] } identifier[SQL_COUNT] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[SQL_COUNT] , identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[SQL_COUNT_EPHEMERAL] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[SQL_COUNT_EPHEMERAL] , identifier[getTableNameEphemeral] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static double requiredDoubleAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { return requiredDoubleAttribute(reader, null, localName); }
class class_name[name] begin[{] method[requiredDoubleAttribute, return_type[type[double]], modifier[public static], parameter[reader, localName]] begin[{] return[call[.requiredDoubleAttribute, parameter[member[.reader], literal[null], member[.localName]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[requiredDoubleAttribute] operator[SEP] Keyword[final] identifier[XMLStreamReader] identifier[reader] , Keyword[final] identifier[String] identifier[localName] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[return] identifier[requiredDoubleAttribute] operator[SEP] identifier[reader] , Other[null] , identifier[localName] operator[SEP] operator[SEP] }
private QueryRequest createQueryRequest(String[] elements) { QueryRequest request = QueryRequest.create(); for (String element : elements) { String[] parts = StringUtils.split(element, ":", 2); parts[0] = parts[0].replace("\\", "\\\\"); parts[1] = parts[1].replace("\\", "\\\\"); request.addParameter(parts[0], parts[1].substring(1, parts[1].length() - 1)); } return request; }
class class_name[name] begin[{] method[createQueryRequest, return_type[type[QueryRequest]], modifier[private], parameter[elements]] begin[{] local_variable[type[QueryRequest], request] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=split, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), name=parts)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\\\")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\\\")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=addParameter, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.request]] end[}] END[}]
Keyword[private] identifier[QueryRequest] identifier[createQueryRequest] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[elements] operator[SEP] { identifier[QueryRequest] identifier[request] operator[=] identifier[QueryRequest] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[element] operator[:] identifier[elements] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[parts] operator[=] identifier[StringUtils] operator[SEP] identifier[split] operator[SEP] identifier[element] , literal[String] , Other[2] operator[SEP] operator[SEP] identifier[parts] operator[SEP] Other[0] operator[SEP] operator[=] identifier[parts] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[parts] operator[SEP] Other[1] operator[SEP] operator[=] identifier[parts] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addParameter] operator[SEP] identifier[parts] operator[SEP] Other[0] operator[SEP] , identifier[parts] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[parts] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[request] operator[SEP] }
public Double getProgress() { if (state.equals(ParallelTaskState.IN_PROGRESS)) { if (requestNum != 0) { return 100.0 * ((double) responsedNum / (double) requestNumActual); } else { return 0.0; } } if (state.equals(ParallelTaskState.WAITING)) { return 0.0; } // fix task if fail validation, still try to poll progress 0901 if (state.equals(ParallelTaskState.COMPLETED_WITH_ERROR) || state.equals(ParallelTaskState.COMPLETED_WITHOUT_ERROR)) { return 100.0; } return 0.0; }
class class_name[name] begin[{] method[getProgress, return_type[type[Double]], modifier[public], parameter[]] begin[{] if[call[state.equals, parameter[member[ParallelTaskState.IN_PROGRESS]]]] begin[{] if[binary_operation[member[.requestNum], !=, literal[0]]] begin[{] return[binary_operation[literal[100.0], *, binary_operation[Cast(expression=MemberReference(member=responsedNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), /, Cast(expression=MemberReference(member=requestNumActual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double))]]] else begin[{] return[literal[0.0]] end[}] else begin[{] None end[}] if[call[state.equals, parameter[member[ParallelTaskState.WAITING]]]] begin[{] return[literal[0.0]] else begin[{] None end[}] if[binary_operation[call[state.equals, parameter[member[ParallelTaskState.COMPLETED_WITH_ERROR]]], ||, call[state.equals, parameter[member[ParallelTaskState.COMPLETED_WITHOUT_ERROR]]]]] begin[{] return[literal[100.0]] else begin[{] None end[}] return[literal[0.0]] end[}] END[}]
Keyword[public] identifier[Double] identifier[getProgress] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] identifier[ParallelTaskState] operator[SEP] identifier[IN_PROGRESS] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[requestNum] operator[!=] Other[0] operator[SEP] { Keyword[return] literal[Float] operator[*] operator[SEP] operator[SEP] Keyword[double] operator[SEP] identifier[responsedNum] operator[/] operator[SEP] Keyword[double] operator[SEP] identifier[requestNumActual] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[Float] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] identifier[ParallelTaskState] operator[SEP] identifier[WAITING] operator[SEP] operator[SEP] { Keyword[return] literal[Float] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] identifier[ParallelTaskState] operator[SEP] identifier[COMPLETED_WITH_ERROR] operator[SEP] operator[||] identifier[state] operator[SEP] identifier[equals] operator[SEP] identifier[ParallelTaskState] operator[SEP] identifier[COMPLETED_WITHOUT_ERROR] operator[SEP] operator[SEP] { Keyword[return] literal[Float] operator[SEP] } Keyword[return] literal[Float] operator[SEP] }
public static void sleep(final TimeUnit timeUnit, final long units){ try{ timeUnit.sleep(units); }catch(final InterruptedException ignored){ ignore(ignored); } }
class class_name[name] begin[{] method[sleep, return_type[void], modifier[public static], parameter[timeUnit, units]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=units, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=timeUnit, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ignored, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sleep] operator[SEP] Keyword[final] identifier[TimeUnit] identifier[timeUnit] , Keyword[final] Keyword[long] identifier[units] operator[SEP] { Keyword[try] { identifier[timeUnit] operator[SEP] identifier[sleep] operator[SEP] identifier[units] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[InterruptedException] identifier[ignored] operator[SEP] { identifier[ignore] operator[SEP] identifier[ignored] operator[SEP] operator[SEP] } }
private List<PackageDescr> getPackageDescrs(Resource resource) throws DroolsParserException, IOException { List<PMMLResource> resources = pmmlCompiler.precompile(resource.getInputStream(), null, null); if (resources != null && !resources.isEmpty()) { return generatedResourcesToPackageDescr(resource, resources); } return null; }
class class_name[name] begin[{] method[getPackageDescrs, return_type[type[List]], modifier[private], parameter[resource]] begin[{] local_variable[type[List], resources] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, call[resources.isEmpty, parameter[]]]] begin[{] return[call[.generatedResourcesToPackageDescr, parameter[member[.resource], member[.resources]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[PackageDescr] operator[>] identifier[getPackageDescrs] operator[SEP] identifier[Resource] identifier[resource] operator[SEP] Keyword[throws] identifier[DroolsParserException] , identifier[IOException] { identifier[List] operator[<] identifier[PMMLResource] operator[>] identifier[resources] operator[=] identifier[pmmlCompiler] operator[SEP] identifier[precompile] operator[SEP] identifier[resource] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] operator[!] identifier[resources] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[generatedResourcesToPackageDescr] operator[SEP] identifier[resource] , identifier[resources] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@SuppressWarnings("unchecked") public String saveProfile() { List<SessionProfileBean> profiles = (List<SessionProfileBean>) categoryProfileService.getProfiles(); for (final SessionProfileBean profile : profiles) { Integer roleId = profile.getRole().getId(); Integer max = getInt("max_" + roleId); Short maxSessions = getShort("maxSessions_" + roleId); Short inactiveInterval = getShort("inactiveInterval_" + roleId); if (null != max && null != maxSessions && null != inactiveInterval) { profile.setCapacity(max); profile.setUserMaxSessions(maxSessions); profile.setInactiveInterval(inactiveInterval); } } Integer roleId = getInt("roleId_new"); Integer max = getInt("max_new"); Short maxSessions = getShort("maxSessions_new"); Short inactiveInterval = getShort("inactiveInterval_new"); if (null != max && null != maxSessions && null != inactiveInterval) { SessionProfileBean newProfile = new SessionProfileBean(); newProfile.setRole(roleService.get(roleId)); newProfile.setCapacity(max); newProfile.setUserMaxSessions(maxSessions); newProfile.setInactiveInterval(inactiveInterval); profiles.add(newProfile); } categoryProfileService.saveOrUpdate(profiles); return redirect("profiles", "info.save.success"); }
class class_name[name] begin[{] method[saveProfile, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[List], profiles] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRole, postfix_operators=[], prefix_operators=[], qualifier=profile, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=roleId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="max_"), operandr=MemberReference(member=roleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=max)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="maxSessions_"), operandr=MemberReference(member=roleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=maxSessions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Short, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="inactiveInterval_"), operandr=MemberReference(member=roleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=inactiveInterval)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Short, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=maxSessions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=inactiveInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCapacity, postfix_operators=[], prefix_operators=[], qualifier=profile, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=maxSessions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setUserMaxSessions, postfix_operators=[], prefix_operators=[], qualifier=profile, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inactiveInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInactiveInterval, postfix_operators=[], prefix_operators=[], qualifier=profile, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=profiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=profile)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SessionProfileBean, sub_type=None))), label=None) local_variable[type[Integer], roleId] local_variable[type[Integer], max] local_variable[type[Short], maxSessions] local_variable[type[Short], inactiveInterval] if[binary_operation[binary_operation[binary_operation[literal[null], !=, member[.max]], &&, binary_operation[literal[null], !=, member[.maxSessions]]], &&, binary_operation[literal[null], !=, member[.inactiveInterval]]]] begin[{] local_variable[type[SessionProfileBean], newProfile] call[newProfile.setRole, parameter[call[roleService.get, parameter[member[.roleId]]]]] call[newProfile.setCapacity, parameter[member[.max]]] call[newProfile.setUserMaxSessions, parameter[member[.maxSessions]]] call[newProfile.setInactiveInterval, parameter[member[.inactiveInterval]]] call[profiles.add, parameter[member[.newProfile]]] else begin[{] None end[}] call[categoryProfileService.saveOrUpdate, parameter[member[.profiles]]] return[call[.redirect, parameter[literal["profiles"], literal["info.save.success"]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[saveProfile] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[SessionProfileBean] operator[>] identifier[profiles] operator[=] operator[SEP] identifier[List] operator[<] identifier[SessionProfileBean] operator[>] operator[SEP] identifier[categoryProfileService] operator[SEP] identifier[getProfiles] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[SessionProfileBean] identifier[profile] operator[:] identifier[profiles] operator[SEP] { identifier[Integer] identifier[roleId] operator[=] identifier[profile] operator[SEP] identifier[getRole] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[max] operator[=] identifier[getInt] operator[SEP] literal[String] operator[+] identifier[roleId] operator[SEP] operator[SEP] identifier[Short] identifier[maxSessions] operator[=] identifier[getShort] operator[SEP] literal[String] operator[+] identifier[roleId] operator[SEP] operator[SEP] identifier[Short] identifier[inactiveInterval] operator[=] identifier[getShort] operator[SEP] literal[String] operator[+] identifier[roleId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[max] operator[&&] Other[null] operator[!=] identifier[maxSessions] operator[&&] Other[null] operator[!=] identifier[inactiveInterval] operator[SEP] { identifier[profile] operator[SEP] identifier[setCapacity] operator[SEP] identifier[max] operator[SEP] operator[SEP] identifier[profile] operator[SEP] identifier[setUserMaxSessions] operator[SEP] identifier[maxSessions] operator[SEP] operator[SEP] identifier[profile] operator[SEP] identifier[setInactiveInterval] operator[SEP] identifier[inactiveInterval] operator[SEP] operator[SEP] } } identifier[Integer] identifier[roleId] operator[=] identifier[getInt] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Integer] identifier[max] operator[=] identifier[getInt] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Short] identifier[maxSessions] operator[=] identifier[getShort] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Short] identifier[inactiveInterval] operator[=] identifier[getShort] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[max] operator[&&] Other[null] operator[!=] identifier[maxSessions] operator[&&] Other[null] operator[!=] identifier[inactiveInterval] operator[SEP] { identifier[SessionProfileBean] identifier[newProfile] operator[=] Keyword[new] identifier[SessionProfileBean] operator[SEP] operator[SEP] operator[SEP] identifier[newProfile] operator[SEP] identifier[setRole] operator[SEP] identifier[roleService] operator[SEP] identifier[get] operator[SEP] identifier[roleId] operator[SEP] operator[SEP] operator[SEP] identifier[newProfile] operator[SEP] identifier[setCapacity] operator[SEP] identifier[max] operator[SEP] operator[SEP] identifier[newProfile] operator[SEP] identifier[setUserMaxSessions] operator[SEP] identifier[maxSessions] operator[SEP] operator[SEP] identifier[newProfile] operator[SEP] identifier[setInactiveInterval] operator[SEP] identifier[inactiveInterval] operator[SEP] operator[SEP] identifier[profiles] operator[SEP] identifier[add] operator[SEP] identifier[newProfile] operator[SEP] operator[SEP] } identifier[categoryProfileService] operator[SEP] identifier[saveOrUpdate] operator[SEP] identifier[profiles] operator[SEP] operator[SEP] Keyword[return] identifier[redirect] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] }
public static void byCorrelation(Matrix m, boolean saveNegatives) { double totalSum = 0; // Generate the total value in each row and column. double[] rowSums = new double[m.rows()]; double[] colSums = new double[m.columns()]; for (int i = 0; i < m.rows(); ++i) { for (int j = 0; j < m.columns(); ++j) { totalSum += m.get(i,j); colSums[j] += m.get(i,j); rowSums[i] += m.get(i,j); } } // Use the row and column totals to compute the correlation. for (int i = 0; i < m.rows(); ++i) { for (int j = 0; j< m.columns(); ++j) { double newVal = (totalSum * m.get(i,j) - rowSums[i] * colSums[j]) / Math.sqrt(rowSums[i] * (totalSum - rowSums[i]) * colSums[j] * (totalSum - colSums[j])); // Store the computed value. if (saveNegatives) m.set(i,j, newVal); else m.set(i,j, newVal > 0 ? newVal : 0); } } }
class class_name[name] begin[{] method[byCorrelation, return_type[void], modifier[public static], parameter[m, saveNegatives]] begin[{] local_variable[type[double], totalSum] local_variable[type[double], rowSums] local_variable[type[double], colSums] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=totalSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=colSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=rowSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=columns, postfix_operators=[], prefix_operators=[], qualifier=m, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=rows, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=totalSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=rowSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=colSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=-), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=rowSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=BinaryOperation(operandl=MemberReference(member=totalSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rowSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-), operator=*), operandr=MemberReference(member=colSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=totalSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=colSums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-), operator=*)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), name=newVal)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=MemberReference(member=saveNegatives, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=newVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=MemberReference(member=newVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], member=set, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=columns, postfix_operators=[], prefix_operators=[], qualifier=m, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=rows, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[byCorrelation] operator[SEP] identifier[Matrix] identifier[m] , Keyword[boolean] identifier[saveNegatives] operator[SEP] { Keyword[double] identifier[totalSum] operator[=] Other[0] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rowSums] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] identifier[rows] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[colSums] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] identifier[columns] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m] operator[SEP] identifier[rows] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[m] operator[SEP] identifier[columns] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[j] operator[SEP] { identifier[totalSum] operator[+=] identifier[m] operator[SEP] identifier[get] operator[SEP] identifier[i] , identifier[j] operator[SEP] operator[SEP] identifier[colSums] operator[SEP] identifier[j] operator[SEP] operator[+=] identifier[m] operator[SEP] identifier[get] operator[SEP] identifier[i] , identifier[j] operator[SEP] operator[SEP] identifier[rowSums] operator[SEP] identifier[i] operator[SEP] operator[+=] identifier[m] operator[SEP] identifier[get] operator[SEP] identifier[i] , identifier[j] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m] operator[SEP] identifier[rows] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[m] operator[SEP] identifier[columns] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[double] identifier[newVal] operator[=] operator[SEP] identifier[totalSum] operator[*] identifier[m] operator[SEP] identifier[get] operator[SEP] identifier[i] , identifier[j] operator[SEP] operator[-] identifier[rowSums] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[colSums] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[/] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[rowSums] operator[SEP] identifier[i] operator[SEP] operator[*] operator[SEP] identifier[totalSum] operator[-] identifier[rowSums] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[*] identifier[colSums] operator[SEP] identifier[j] operator[SEP] operator[*] operator[SEP] identifier[totalSum] operator[-] identifier[colSums] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[saveNegatives] operator[SEP] identifier[m] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[j] , identifier[newVal] operator[SEP] operator[SEP] Keyword[else] identifier[m] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[j] , identifier[newVal] operator[>] Other[0] operator[?] identifier[newVal] operator[:] Other[0] operator[SEP] operator[SEP] } } }
public boolean validateGlobalType(GlobalType globalType, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate_EveryDefaultConstraint(globalType, diagnostics, context); }
class class_name[name] begin[{] method[validateGlobalType, return_type[type[boolean]], modifier[public], parameter[globalType, diagnostics, context]] begin[{] return[call[.validate_EveryDefaultConstraint, parameter[member[.globalType], member[.diagnostics], member[.context]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[validateGlobalType] operator[SEP] identifier[GlobalType] identifier[globalType] , identifier[DiagnosticChain] identifier[diagnostics] , identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] operator[SEP] { Keyword[return] identifier[validate_EveryDefaultConstraint] operator[SEP] identifier[globalType] , identifier[diagnostics] , identifier[context] operator[SEP] operator[SEP] }
@Override public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { String body = req.getReader().readLine().trim(); // Simple JSON -- Use Jackson for more complex structure // Message looks like { "author" : "foo", "message" : "bar" } String author = body.substring(body.indexOf(":") + 2, body.indexOf(",") - 1); String message = body.substring(body.lastIndexOf(":") + 2, body.length() - 2); broadcaster.broadcast(new Data(author, message).toString()); }
class class_name[name] begin[{] method[doPost, return_type[void], modifier[public], parameter[req, res]] begin[{] local_variable[type[String], body] local_variable[type[String], author] local_variable[type[String], message] call[broadcaster.broadcast, parameter[ClassCreator(arguments=[MemberReference(member=author, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=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=Data, sub_type=None))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doPost] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[body] operator[=] identifier[req] operator[SEP] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[author] operator[=] identifier[body] operator[SEP] identifier[substring] operator[SEP] identifier[body] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[2] , identifier[body] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[message] operator[=] identifier[body] operator[SEP] identifier[substring] operator[SEP] identifier[body] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[2] , identifier[body] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[2] operator[SEP] operator[SEP] identifier[broadcaster] operator[SEP] identifier[broadcast] operator[SEP] Keyword[new] identifier[Data] operator[SEP] identifier[author] , identifier[message] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void doPut(String path) throws ClientException { this.readLock.lock(); try { ClientResponse response = this.getResourceWrapper() .rewritten(path, HttpMethod.PUT) .put(ClientResponse.class); errorIfStatusNotEqualTo(response, ClientResponse.Status.OK, ClientResponse.Status.NO_CONTENT); response.close(); } catch (ClientHandlerException ex) { throw new ClientException(ClientResponse.Status.INTERNAL_SERVER_ERROR, ex.getMessage()); } finally { this.readLock.unlock(); } }
class class_name[name] begin[{] method[doPut, return_type[void], modifier[protected], parameter[path]] begin[{] THIS[member[None.readLock]call[None.lock, parameter[]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getResourceWrapper, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PUT, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[])], member=rewritten, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientResponse, sub_type=None))], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClientResponse, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OK, postfix_operators=[], prefix_operators=[], qualifier=ClientResponse.Status, selectors=[]), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=ClientResponse.Status, selectors=[])], member=errorIfStatusNotEqualTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ClientResponse.Status, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClientHandlerException']))], finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=readLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[doPut] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[ClientException] { Keyword[this] operator[SEP] identifier[readLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ClientResponse] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[getResourceWrapper] operator[SEP] operator[SEP] operator[SEP] identifier[rewritten] operator[SEP] identifier[path] , identifier[HttpMethod] operator[SEP] identifier[PUT] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[ClientResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[errorIfStatusNotEqualTo] operator[SEP] identifier[response] , identifier[ClientResponse] operator[SEP] identifier[Status] operator[SEP] identifier[OK] , identifier[ClientResponse] operator[SEP] identifier[Status] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClientHandlerException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[ClientException] operator[SEP] identifier[ClientResponse] operator[SEP] identifier[Status] operator[SEP] identifier[INTERNAL_SERVER_ERROR] , identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[readLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public static void addAcidicOxygen(IAminoAcid acid) throws CDKException { if (acid.getCTerminus() == null) throw new CDKException("Cannot add oxygen: C-terminus is not defined!"); IAtom acidicOxygen = acid.getBuilder().newInstance(IAtom.class, "O"); acid.addAtom(acidicOxygen); acid.addBond(acid.getBuilder().newInstance(IBond.class, acid.getCTerminus(), acidicOxygen, Order.SINGLE)); }
class class_name[name] begin[{] method[addAcidicOxygen, return_type[void], modifier[public static], parameter[acid]] begin[{] if[binary_operation[call[acid.getCTerminus, parameter[]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot add oxygen: C-terminus is not defined!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CDKException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[IAtom], acidicOxygen] call[acid.addAtom, parameter[member[.acidicOxygen]]] call[acid.addBond, parameter[call[acid.getBuilder, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addAcidicOxygen] operator[SEP] identifier[IAminoAcid] identifier[acid] operator[SEP] Keyword[throws] identifier[CDKException] { Keyword[if] operator[SEP] identifier[acid] operator[SEP] identifier[getCTerminus] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[CDKException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[IAtom] identifier[acidicOxygen] operator[=] identifier[acid] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IAtom] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[acid] operator[SEP] identifier[addAtom] operator[SEP] identifier[acidicOxygen] operator[SEP] operator[SEP] identifier[acid] operator[SEP] identifier[addBond] operator[SEP] identifier[acid] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IBond] operator[SEP] Keyword[class] , identifier[acid] operator[SEP] identifier[getCTerminus] operator[SEP] operator[SEP] , identifier[acidicOxygen] , identifier[Order] operator[SEP] identifier[SINGLE] operator[SEP] operator[SEP] operator[SEP] }
private boolean popFile() throws JasperException { // Is stack created ? (will happen if the Jsp file we're looking at is // missing. if (current == null || currFileId < 0) { return false; } // Restore parser state: String fName = getFile(currFileId); currFileId = unregisterSourceFile(fName); if (currFileId < -1) { err.jspError("jsp.error.file.not.registered", fName); } Mark previous = current.popStream(); if (previous != null) { master = current.baseDir; current = previous; return true; } // Note that although the current file is undefined here, "current" // is not set to null just for convience, for it maybe used to // set the current (undefined) position. return false; }
class class_name[name] begin[{] method[popFile, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[member[.current], ==, literal[null]], ||, binary_operation[member[.currFileId], <, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[String], fName] assign[member[.currFileId], call[.unregisterSourceFile, parameter[member[.fName]]]] if[binary_operation[member[.currFileId], <, literal[1]]] begin[{] call[err.jspError, parameter[literal["jsp.error.file.not.registered"], member[.fName]]] else begin[{] None end[}] local_variable[type[Mark], previous] if[binary_operation[member[.previous], !=, literal[null]]] begin[{] assign[member[.master], member[current.baseDir]] assign[member[.current], member[.previous]] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[popFile] operator[SEP] operator[SEP] Keyword[throws] identifier[JasperException] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[||] identifier[currFileId] operator[<] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[fName] operator[=] identifier[getFile] operator[SEP] identifier[currFileId] operator[SEP] operator[SEP] identifier[currFileId] operator[=] identifier[unregisterSourceFile] operator[SEP] identifier[fName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currFileId] operator[<] operator[-] Other[1] operator[SEP] { identifier[err] operator[SEP] identifier[jspError] operator[SEP] literal[String] , identifier[fName] operator[SEP] operator[SEP] } identifier[Mark] identifier[previous] operator[=] identifier[current] operator[SEP] identifier[popStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[previous] operator[!=] Other[null] operator[SEP] { identifier[master] operator[=] identifier[current] operator[SEP] identifier[baseDir] operator[SEP] identifier[current] operator[=] identifier[previous] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static Style deepOrange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_ORANGE); return style; }
class class_name[name] begin[{] method[deepOrange, return_type[type[Style]], modifier[public static], parameter[]] begin[{] local_variable[type[Style], style] assign[member[style.color], call[PaletteUtils.getSolidColor, parameter[member[PaletteUtils.MATERIAL_DEEP_ORANGE]]]] return[member[.style]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Style] identifier[deepOrange] operator[SEP] operator[SEP] { Keyword[final] identifier[Style] identifier[style] operator[=] Keyword[new] identifier[Style] operator[SEP] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[color] operator[=] identifier[PaletteUtils] operator[SEP] identifier[getSolidColor] operator[SEP] identifier[PaletteUtils] operator[SEP] identifier[MATERIAL_DEEP_ORANGE] operator[SEP] operator[SEP] Keyword[return] identifier[style] operator[SEP] }
@Override public DTDSubset combineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset) throws XMLStreamException { /* First let's see if we can just reuse GE Map used by int or ext * subset; (if only one has contents), or if not, combine them. */ HashMap<String,EntityDecl> ge1 = getGeneralEntityMap(); HashMap<String,EntityDecl> ge2 = extSubset.getGeneralEntityMap(); if (ge1 == null || ge1.isEmpty()) { ge1 = ge2; } else { if (ge2 != null && !ge2.isEmpty()) { /* Internal subset Objects are never shared or reused (and by * extension, neither are objects they contain), so we can just * modify GE map if necessary */ combineMaps(ge1, ge2); } } // Ok, then, let's combine notations similarly HashMap<String,NotationDeclaration> n1 = getNotationMap(); HashMap<String,NotationDeclaration> n2 = extSubset.getNotationMap(); if (n1 == null || n1.isEmpty()) { n1 = n2; } else { if (n2 != null && !n2.isEmpty()) { /* First; let's make sure there are no colliding notation * definitions: it's an error to try to redefine notations. */ checkNotations(n1, n2); /* Internal subset Objects are never shared or reused (and by * extension, neither are objects they contain), so we can just * modify notation map if necessary */ combineMaps(n1, n2); } } // And finally elements, rather similarly: HashMap<PrefixedName,DTDElement> e1 = getElementMap(); HashMap<PrefixedName,DTDElement> e2 = extSubset.getElementMap(); if (e1 == null || e1.isEmpty()) { e1 = e2; } else { if (e2 != null && !e2.isEmpty()) { /* Internal subset Objects are never shared or reused (and by * extension, neither are objects they contain), so we can just * modify element map if necessary */ combineElements(rep, e1, e2); } } /* Combos are not cachable, and because of that, there's no point * in storing any PE info either. */ return constructInstance(false, ge1, null, null, null, n1, e1, mFullyValidating); }
class class_name[name] begin[{] method[combineWithExternalSubset, return_type[type[DTDSubset]], modifier[public], parameter[rep, extSubset]] begin[{] local_variable[type[HashMap], ge1] local_variable[type[HashMap], ge2] if[binary_operation[binary_operation[member[.ge1], ==, literal[null]], ||, call[ge1.isEmpty, parameter[]]]] begin[{] assign[member[.ge1], member[.ge2]] else begin[{] if[binary_operation[binary_operation[member[.ge2], !=, literal[null]], &&, call[ge2.isEmpty, parameter[]]]] begin[{] call[.combineMaps, parameter[member[.ge1], member[.ge2]]] else begin[{] None end[}] end[}] local_variable[type[HashMap], n1] local_variable[type[HashMap], n2] if[binary_operation[binary_operation[member[.n1], ==, literal[null]], ||, call[n1.isEmpty, parameter[]]]] begin[{] assign[member[.n1], member[.n2]] else begin[{] if[binary_operation[binary_operation[member[.n2], !=, literal[null]], &&, call[n2.isEmpty, parameter[]]]] begin[{] call[.checkNotations, parameter[member[.n1], member[.n2]]] call[.combineMaps, parameter[member[.n1], member[.n2]]] else begin[{] None end[}] end[}] local_variable[type[HashMap], e1] local_variable[type[HashMap], e2] if[binary_operation[binary_operation[member[.e1], ==, literal[null]], ||, call[e1.isEmpty, parameter[]]]] begin[{] assign[member[.e1], member[.e2]] else begin[{] if[binary_operation[binary_operation[member[.e2], !=, literal[null]], &&, call[e2.isEmpty, parameter[]]]] begin[{] call[.combineElements, parameter[member[.rep], member[.e1], member[.e2]]] else begin[{] None end[}] end[}] return[call[.constructInstance, parameter[literal[false], member[.ge1], literal[null], literal[null], literal[null], member[.n1], member[.e1], member[.mFullyValidating]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DTDSubset] identifier[combineWithExternalSubset] operator[SEP] identifier[InputProblemReporter] identifier[rep] , identifier[DTDSubset] identifier[extSubset] operator[SEP] Keyword[throws] identifier[XMLStreamException] { identifier[HashMap] operator[<] identifier[String] , identifier[EntityDecl] operator[>] identifier[ge1] operator[=] identifier[getGeneralEntityMap] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[EntityDecl] operator[>] identifier[ge2] operator[=] identifier[extSubset] operator[SEP] identifier[getGeneralEntityMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ge1] operator[==] Other[null] operator[||] identifier[ge1] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[ge1] operator[=] identifier[ge2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[ge2] operator[!=] Other[null] operator[&&] operator[!] identifier[ge2] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[combineMaps] operator[SEP] identifier[ge1] , identifier[ge2] operator[SEP] operator[SEP] } } identifier[HashMap] operator[<] identifier[String] , identifier[NotationDeclaration] operator[>] identifier[n1] operator[=] identifier[getNotationMap] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[NotationDeclaration] operator[>] identifier[n2] operator[=] identifier[extSubset] operator[SEP] identifier[getNotationMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n1] operator[==] Other[null] operator[||] identifier[n1] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[n1] operator[=] identifier[n2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[n2] operator[!=] Other[null] operator[&&] operator[!] identifier[n2] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[checkNotations] operator[SEP] identifier[n1] , identifier[n2] operator[SEP] operator[SEP] identifier[combineMaps] operator[SEP] identifier[n1] , identifier[n2] operator[SEP] operator[SEP] } } identifier[HashMap] operator[<] identifier[PrefixedName] , identifier[DTDElement] operator[>] identifier[e1] operator[=] identifier[getElementMap] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[PrefixedName] , identifier[DTDElement] operator[>] identifier[e2] operator[=] identifier[extSubset] operator[SEP] identifier[getElementMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e1] operator[==] Other[null] operator[||] identifier[e1] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[e1] operator[=] identifier[e2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[e2] operator[!=] Other[null] operator[&&] operator[!] identifier[e2] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[combineElements] operator[SEP] identifier[rep] , identifier[e1] , identifier[e2] operator[SEP] operator[SEP] } } Keyword[return] identifier[constructInstance] operator[SEP] literal[boolean] , identifier[ge1] , Other[null] , Other[null] , Other[null] , identifier[n1] , identifier[e1] , identifier[mFullyValidating] operator[SEP] operator[SEP] }
protected void addJsFiles(JavaScriptObject files) { JsArray<CmsFileInfo> cmsFiles = files.cast(); List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>(); for (int i = 0; i < cmsFiles.length(); ++i) { fileObjects.add(cmsFiles.get(i)); } addFiles(fileObjects); }
class class_name[name] begin[{] method[addJsFiles, return_type[void], modifier[protected], parameter[files]] begin[{] local_variable[type[JsArray], cmsFiles] local_variable[type[List], fileObjects] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cmsFiles, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=fileObjects, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=cmsFiles, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) call[.addFiles, parameter[member[.fileObjects]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addJsFiles] operator[SEP] identifier[JavaScriptObject] identifier[files] operator[SEP] { identifier[JsArray] operator[<] identifier[CmsFileInfo] operator[>] identifier[cmsFiles] operator[=] identifier[files] operator[SEP] identifier[cast] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CmsFileInfo] operator[>] identifier[fileObjects] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsFileInfo] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[cmsFiles] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[fileObjects] operator[SEP] identifier[add] operator[SEP] identifier[cmsFiles] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[addFiles] operator[SEP] identifier[fileObjects] operator[SEP] operator[SEP] }
public static <S> PAreaSizeL<S> toPAreaSizeL(final AreaSizeL a) { Objects.requireNonNull(a, "area size"); return PAreaSizeL.of(a.sizeX(), a.sizeY()); }
class class_name[name] begin[{] method[toPAreaSizeL, return_type[type[PAreaSizeL]], modifier[public static], parameter[a]] begin[{] call[Objects.requireNonNull, parameter[member[.a], literal["area size"]]] return[call[PAreaSizeL.of, parameter[call[a.sizeX, parameter[]], call[a.sizeY, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[PAreaSizeL] operator[<] identifier[S] operator[>] identifier[toPAreaSizeL] operator[SEP] Keyword[final] identifier[AreaSizeL] identifier[a] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[a] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[PAreaSizeL] operator[SEP] identifier[of] operator[SEP] identifier[a] operator[SEP] identifier[sizeX] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[sizeY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public File lookupBundleFile(String bundleId) { if ((mirrors != null) && (!mirrors.isEmpty())) { String realBundleId = mirrors.remove(bundleId); if (realBundleId != null) { bundleId = realBundleId; } } return createBundleFile(bundleId); }
class class_name[name] begin[{] method[lookupBundleFile, return_type[type[File]], modifier[public], parameter[bundleId]] begin[{] if[binary_operation[binary_operation[member[.mirrors], !=, literal[null]], &&, call[mirrors.isEmpty, parameter[]]]] begin[{] local_variable[type[String], realBundleId] if[binary_operation[member[.realBundleId], !=, literal[null]]] begin[{] assign[member[.bundleId], member[.realBundleId]] else begin[{] None end[}] else begin[{] None end[}] return[call[.createBundleFile, parameter[member[.bundleId]]]] end[}] END[}]
Keyword[public] identifier[File] identifier[lookupBundleFile] operator[SEP] identifier[String] identifier[bundleId] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[mirrors] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] operator[!] identifier[mirrors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[realBundleId] operator[=] identifier[mirrors] operator[SEP] identifier[remove] operator[SEP] identifier[bundleId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[realBundleId] operator[!=] Other[null] operator[SEP] { identifier[bundleId] operator[=] identifier[realBundleId] operator[SEP] } } Keyword[return] identifier[createBundleFile] operator[SEP] identifier[bundleId] operator[SEP] operator[SEP] }
public static byte[] invoke(byte[] bytesIn, String... descriptors) { ClassReader cr = new ClassReader(bytesIn); EmptyCtor ca = new EmptyCtor(descriptors); cr.accept(ca, 0); byte[] newbytes = ca.getBytes(); return newbytes; }
class class_name[name] begin[{] method[invoke, return_type[type[byte]], modifier[public static], parameter[bytesIn, descriptors]] begin[{] local_variable[type[ClassReader], cr] local_variable[type[EmptyCtor], ca] call[cr.accept, parameter[member[.ca], literal[0]]] local_variable[type[byte], newbytes] return[member[.newbytes]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[invoke] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytesIn] , identifier[String] operator[...] identifier[descriptors] operator[SEP] { identifier[ClassReader] identifier[cr] operator[=] Keyword[new] identifier[ClassReader] operator[SEP] identifier[bytesIn] operator[SEP] operator[SEP] identifier[EmptyCtor] identifier[ca] operator[=] Keyword[new] identifier[EmptyCtor] operator[SEP] identifier[descriptors] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[accept] operator[SEP] identifier[ca] , Other[0] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[newbytes] operator[=] identifier[ca] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[newbytes] operator[SEP] }