code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static String escapeForXML(String inString) { if (inString == null) return null; String outString = inString; outString = replace(outString, "&", "&amp;"); outString = replace(outString, "<", "&lt;"); outString = replace(outString, ">", "&gt;"); outString = replace(outString, "\"", "&quot;"); outString = replace(outString, "'", "&apos;"); // We'll escape all chars not in this set (Safe) String validChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 &#;-_=+:,.?/"; for (int i = 0; i < outString.length(); i++) { char c = outString.charAt(i); if (validChars.indexOf(c) == -1) { // Escape the character outString = replace(outString, "" + c, "&#" + ((int) c) + ";"); } } return outString; }
class class_name[name] begin[{] method[escapeForXML, return_type[type[String]], modifier[public static], parameter[inString]] begin[{] if[binary_operation[member[.inString], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], outString] assign[member[.outString], call[.replace, parameter[member[.outString], literal["&"], literal["&amp;"]]]] assign[member[.outString], call[.replace, parameter[member[.outString], literal["<"], literal["&lt;"]]]] assign[member[.outString], call[.replace, parameter[member[.outString], literal[">"], literal["&gt;"]]]] assign[member[.outString], call[.replace, parameter[member[.outString], literal["\""], literal["&quot;"]]]] assign[member[.outString], call[.replace, parameter[member[.outString], literal["'"], literal["&apos;"]]]] local_variable[type[String], validChars] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=outString, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=validChars, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=outString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&#"), operandr=Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";"), operator=+)], member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=outString, 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) return[member[.outString]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[escapeForXML] operator[SEP] identifier[String] identifier[inString] operator[SEP] { Keyword[if] operator[SEP] identifier[inString] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] identifier[outString] operator[=] identifier[inString] operator[SEP] identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[validChars] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[outString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[outString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[validChars] operator[SEP] identifier[indexOf] operator[SEP] identifier[c] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] { identifier[outString] operator[=] identifier[replace] operator[SEP] identifier[outString] , literal[String] operator[+] identifier[c] , literal[String] operator[+] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[outString] operator[SEP] }
public GitlabBuildVariable updateBuildVariable(Integer projectId, String key, String newValue) throws IOException { String tailUrl = GitlabProject.URL + "/" + projectId + GitlabBuildVariable.URL + "/" + key; GitlabHTTPRequestor requestor = retrieve().method(PUT); if (newValue != null) { requestor = requestor.with("value", newValue); } return requestor.to(tailUrl, GitlabBuildVariable.class); }
class class_name[name] begin[{] method[updateBuildVariable, return_type[type[GitlabBuildVariable]], modifier[public], parameter[projectId, key, newValue]] begin[{] local_variable[type[String], tailUrl] local_variable[type[GitlabHTTPRequestor], requestor] if[binary_operation[member[.newValue], !=, literal[null]]] begin[{] assign[member[.requestor], call[requestor.with, parameter[literal["value"], member[.newValue]]]] else begin[{] None end[}] return[call[requestor.to, parameter[member[.tailUrl], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GitlabBuildVariable, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[GitlabBuildVariable] identifier[updateBuildVariable] operator[SEP] identifier[Integer] identifier[projectId] , identifier[String] identifier[key] , identifier[String] identifier[newValue] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[tailUrl] operator[=] identifier[GitlabProject] operator[SEP] identifier[URL] operator[+] literal[String] operator[+] identifier[projectId] operator[+] identifier[GitlabBuildVariable] operator[SEP] identifier[URL] operator[+] literal[String] operator[+] identifier[key] operator[SEP] identifier[GitlabHTTPRequestor] identifier[requestor] operator[=] identifier[retrieve] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[PUT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newValue] operator[!=] Other[null] operator[SEP] { identifier[requestor] operator[=] identifier[requestor] operator[SEP] identifier[with] operator[SEP] literal[String] , identifier[newValue] operator[SEP] operator[SEP] } Keyword[return] identifier[requestor] operator[SEP] identifier[to] operator[SEP] identifier[tailUrl] , identifier[GitlabBuildVariable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private InputSplitAssigner loadInputSplitAssigner(final Class<? extends InputSplit> inputSplitType) { final String className = inputSplitType.getName(); final String assignerKey = INPUT_SPLIT_CONFIG_KEY_PREFIX + className; LOG.info("Trying to load input split assigner for type " + className); String assignerClassName = GlobalConfiguration.getString(assignerKey, null); // Provide hard-wired default configuration for FileInputSplit objects to make configuration more robust if (assignerClassName == null) { if (FileInputSplit.class == inputSplitType) { return new FileInputSplitAssigner(); } else if (GenericInputSplit.class == inputSplitType) { return new DefaultInputSplitAssigner(); } else { return null; } } try { final Class<? extends InputSplitAssigner> assignerClass = Class.forName(assignerClassName).asSubclass(InputSplitAssigner.class); return assignerClass.newInstance(); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); } return null; }
class class_name[name] begin[{] method[loadInputSplitAssigner, return_type[type[InputSplitAssigner]], modifier[private], parameter[inputSplitType]] begin[{] local_variable[type[String], className] local_variable[type[String], assignerKey] call[LOG.info, parameter[binary_operation[literal["Trying to load input split assigner for type "], +, member[.className]]]] local_variable[type[String], assignerClassName] if[binary_operation[member[.assignerClassName], ==, literal[null]]] begin[{] if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputSplit, sub_type=None)), ==, member[.inputSplitType]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputSplitAssigner, sub_type=None))] else begin[{] if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GenericInputSplit, sub_type=None)), ==, member[.inputSplitType]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultInputSplitAssigner, sub_type=None))] else begin[{] return[literal[null]] end[}] end[}] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=assignerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputSplitAssigner, sub_type=None))], member=asSubclass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=assignerClass)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=InputSplitAssigner, sub_type=None))], dimensions=[], name=Class, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=assignerClass, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stringifyException, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[InputSplitAssigner] identifier[loadInputSplitAssigner] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[InputSplit] operator[>] identifier[inputSplitType] operator[SEP] { Keyword[final] identifier[String] identifier[className] operator[=] identifier[inputSplitType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[assignerKey] operator[=] identifier[INPUT_SPLIT_CONFIG_KEY_PREFIX] operator[+] identifier[className] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[className] operator[SEP] operator[SEP] identifier[String] identifier[assignerClassName] operator[=] identifier[GlobalConfiguration] operator[SEP] identifier[getString] operator[SEP] identifier[assignerKey] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[assignerClassName] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[FileInputSplit] operator[SEP] Keyword[class] operator[==] identifier[inputSplitType] operator[SEP] { Keyword[return] Keyword[new] identifier[FileInputSplitAssigner] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[GenericInputSplit] operator[SEP] Keyword[class] operator[==] identifier[inputSplitType] operator[SEP] { Keyword[return] Keyword[new] identifier[DefaultInputSplitAssigner] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } Keyword[try] { Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[InputSplitAssigner] operator[>] identifier[assignerClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[assignerClassName] operator[SEP] operator[SEP] identifier[asSubclass] operator[SEP] identifier[InputSplitAssigner] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[assignerClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[StringUtils] operator[SEP] identifier[stringifyException] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
protected String addCommonContextVars(ModelMap model, HttpServletRequest request, String overrideName, String overrideTarget) { LOGGER.debug(String.format("receiving request: ctxPath: %s, uri: %s", request.getContextPath(), request.getRequestURI())); final String name = menuUtils.getMenuName(request, overrideName); //get menu entry by name MenuEntrySearchResult result = adminTool.searchComponent(name); model.put("internationalizationEnabled", coreConfig.isInternationalizationEnabled()); model.put("rootContext", getRootContext(request)); model.put("adminToolContext", AdminTool.ROOTCONTEXT); String targetTpl = coreConfig.isEnabled() ? "content/error404" : AdminTool.GENERIC_DEACTIVATED_TEMPLATE_NAME; if (null != result) { LOGGER.trace("Component found: " + String.valueOf(null != result.getComponent()) + " | menu found: " + String.valueOf(result.getMenuEntry())); model.put(MenuEntrySearchResult.NAME, result); MenuEntry entry = result.getMenuEntry(); //set alternative target targetTpl = (StringUtils.isEmpty(overrideTarget) ? entry.getTarget() : AdminToolMenuUtils.normalizeTarget(overrideTarget)); model.put("contentPage", AdminTool.ROOTCONTEXT_NAME + AdminTool.SLASH + targetTpl); if (null != entry.getVariables()) { model.putAll(entry.getVariables()); } model.put("activeMenu", entry); //since 1.1.6 String overriddenActive = entry.getActiveName(); if (!StringUtils.isEmpty(overriddenActive)) { MenuEntrySearchResult overriddenResult = adminTool.searchComponent(overriddenActive); if (null != overriddenResult) { model.put("activeMenu", overriddenResult.getMenuEntry()); } } } else { model.put("contentPage", AdminTool.ROOTCONTEXT_NAME + AdminTool.SLASH + targetTpl); } return targetTpl; }
class class_name[name] begin[{] method[addCommonContextVars, return_type[type[String]], modifier[protected], parameter[model, request, overrideName, overrideTarget]] begin[{] call[LOGGER.debug, parameter[call[String.format, parameter[literal["receiving request: ctxPath: %s, uri: %s"], call[request.getContextPath, parameter[]], call[request.getRequestURI, parameter[]]]]]] local_variable[type[String], name] local_variable[type[MenuEntrySearchResult], result] call[model.put, parameter[literal["internationalizationEnabled"], call[coreConfig.isInternationalizationEnabled, parameter[]]]] call[model.put, parameter[literal["rootContext"], call[.getRootContext, parameter[member[.request]]]]] call[model.put, parameter[literal["adminToolContext"], member[AdminTool.ROOTCONTEXT]]] local_variable[type[String], targetTpl] if[binary_operation[literal[null], !=, member[.result]]] begin[{] call[LOGGER.trace, parameter[binary_operation[binary_operation[binary_operation[literal["Component found: "], +, call[String.valueOf, parameter[binary_operation[literal[null], !=, call[result.getComponent, parameter[]]]]]], +, literal[" | menu found: "]], +, call[String.valueOf, parameter[call[result.getMenuEntry, parameter[]]]]]]] call[model.put, parameter[member[MenuEntrySearchResult.NAME], member[.result]]] local_variable[type[MenuEntry], entry] assign[member[.targetTpl], TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=overrideTarget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[MemberReference(member=overrideTarget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=normalizeTarget, postfix_operators=[], prefix_operators=[], qualifier=AdminToolMenuUtils, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getTarget, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None))] call[model.put, parameter[literal["contentPage"], binary_operation[binary_operation[member[AdminTool.ROOTCONTEXT_NAME], +, member[AdminTool.SLASH]], +, member[.targetTpl]]]] if[binary_operation[literal[null], !=, call[entry.getVariables, parameter[]]]] begin[{] call[model.putAll, parameter[call[entry.getVariables, parameter[]]]] else begin[{] None end[}] call[model.put, parameter[literal["activeMenu"], member[.entry]]] local_variable[type[String], overriddenActive] if[call[StringUtils.isEmpty, parameter[member[.overriddenActive]]]] begin[{] local_variable[type[MenuEntrySearchResult], overriddenResult] if[binary_operation[literal[null], !=, member[.overriddenResult]]] begin[{] call[model.put, parameter[literal["activeMenu"], call[overriddenResult.getMenuEntry, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] call[model.put, parameter[literal["contentPage"], binary_operation[binary_operation[member[AdminTool.ROOTCONTEXT_NAME], +, member[AdminTool.SLASH]], +, member[.targetTpl]]]] end[}] return[member[.targetTpl]] end[}] END[}]
Keyword[protected] identifier[String] identifier[addCommonContextVars] operator[SEP] identifier[ModelMap] identifier[model] , identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[overrideName] , identifier[String] identifier[overrideTarget] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[request] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] , identifier[request] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[=] identifier[menuUtils] operator[SEP] identifier[getMenuName] operator[SEP] identifier[request] , identifier[overrideName] operator[SEP] operator[SEP] identifier[MenuEntrySearchResult] identifier[result] operator[=] identifier[adminTool] operator[SEP] identifier[searchComponent] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[coreConfig] operator[SEP] identifier[isInternationalizationEnabled] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[getRootContext] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[AdminTool] operator[SEP] identifier[ROOTCONTEXT] operator[SEP] operator[SEP] identifier[String] identifier[targetTpl] operator[=] identifier[coreConfig] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] identifier[AdminTool] operator[SEP] identifier[GENERIC_DEACTIVATED_TEMPLATE_NAME] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[result] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] Other[null] operator[!=] identifier[result] operator[SEP] identifier[getComponent] operator[SEP] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[result] operator[SEP] identifier[getMenuEntry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[put] operator[SEP] identifier[MenuEntrySearchResult] operator[SEP] identifier[NAME] , identifier[result] operator[SEP] operator[SEP] identifier[MenuEntry] identifier[entry] operator[=] identifier[result] operator[SEP] identifier[getMenuEntry] operator[SEP] operator[SEP] operator[SEP] identifier[targetTpl] operator[=] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[overrideTarget] operator[SEP] operator[?] identifier[entry] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[:] identifier[AdminToolMenuUtils] operator[SEP] identifier[normalizeTarget] operator[SEP] identifier[overrideTarget] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[AdminTool] operator[SEP] identifier[ROOTCONTEXT_NAME] operator[+] identifier[AdminTool] operator[SEP] identifier[SLASH] operator[+] identifier[targetTpl] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[entry] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] { identifier[model] operator[SEP] identifier[putAll] operator[SEP] identifier[entry] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entry] operator[SEP] operator[SEP] identifier[String] identifier[overriddenActive] operator[=] identifier[entry] operator[SEP] identifier[getActiveName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[overriddenActive] operator[SEP] operator[SEP] { identifier[MenuEntrySearchResult] identifier[overriddenResult] operator[=] identifier[adminTool] operator[SEP] identifier[searchComponent] operator[SEP] identifier[overriddenActive] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[overriddenResult] operator[SEP] { identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[overriddenResult] operator[SEP] identifier[getMenuEntry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[model] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[AdminTool] operator[SEP] identifier[ROOTCONTEXT_NAME] operator[+] identifier[AdminTool] operator[SEP] identifier[SLASH] operator[+] identifier[targetTpl] operator[SEP] operator[SEP] } Keyword[return] identifier[targetTpl] operator[SEP] }
public AT_Row setPaddingBottom(int paddingBottom) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingBottom(paddingBottom); } } return this; }
class class_name[name] begin[{] method[setPaddingBottom, return_type[type[AT_Row]], modifier[public], parameter[paddingBottom]] begin[{] if[THIS[call[None.hasCells, parameter[]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[MethodInvocation(arguments=[MemberReference(member=paddingBottom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPaddingBottom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getCells, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cell)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AT_Cell, sub_type=None))), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[AT_Row] identifier[setPaddingBottom] operator[SEP] Keyword[int] identifier[paddingBottom] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hasCells] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[AT_Cell] identifier[cell] operator[:] Keyword[this] operator[SEP] identifier[getCells] operator[SEP] operator[SEP] operator[SEP] { identifier[cell] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[setPaddingBottom] operator[SEP] identifier[paddingBottom] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] }
public <T> BufferOutput<?> writeObject(T object, BufferOutput<?> buffer) { if (object == null) { return buffer.writeByte(Identifier.NULL.code()); } Class<?> type = object.getClass(); // get the enclosing class from a cache. Class<?> enclosingClass = enclosingClasses.computeIfAbsent(type, clazz -> Optional.ofNullable(clazz.getEnclosingClass())).orElse(null); // Enums that implement interfaces or methods are generated as inner classes. For this reason, // we need to get the enclosing class if it's an enum. if (enclosingClass != null && enclosingClass.isEnum()) type = enclosingClass; // Look up the serializer for the given object type. TypeSerializer serializer = getSerializer(type); // If no serializer was found, throw a serialization exception. if (serializer == null) { throw new SerializationException("cannot serialize unregistered type: " + type); } // Cache the serializable type ID if necessary. if (!ids.containsKey(type)) { ids.put(type, registry.id(type)); } // Lookup the serializable type ID for the type. int typeId = registry.id(type); if (typeId == 0) { return writeByClass(type, object, buffer, serializer); } return writeById(typeId, object, buffer, serializer); }
class class_name[name] begin[{] method[writeObject, return_type[type[BufferOutput]], modifier[public], parameter[object, buffer]] begin[{] if[binary_operation[member[.object], ==, literal[null]]] begin[{] return[call[buffer.writeByte, parameter[call[Identifier.NULL.code, parameter[]]]]] else begin[{] None end[}] local_variable[type[Class], type] local_variable[type[Class], enclosingClass] if[binary_operation[binary_operation[member[.enclosingClass], !=, literal[null]], &&, call[enclosingClass.isEnum, parameter[]]]] begin[{] assign[member[.type], member[.enclosingClass]] else begin[{] None end[}] local_variable[type[TypeSerializer], serializer] if[binary_operation[member[.serializer], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cannot serialize unregistered type: "), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SerializationException, sub_type=None)), label=None) else begin[{] None end[}] if[call[ids.containsKey, parameter[member[.type]]]] begin[{] call[ids.put, parameter[member[.type], call[registry.id, parameter[member[.type]]]]] else begin[{] None end[}] local_variable[type[int], typeId] if[binary_operation[member[.typeId], ==, literal[0]]] begin[{] return[call[.writeByClass, parameter[member[.type], member[.object], member[.buffer], member[.serializer]]]] else begin[{] None end[}] return[call[.writeById, parameter[member[.typeId], member[.object], member[.buffer], member[.serializer]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[BufferOutput] operator[<] operator[?] operator[>] identifier[writeObject] operator[SEP] identifier[T] identifier[object] , identifier[BufferOutput] operator[<] operator[?] operator[>] identifier[buffer] operator[SEP] { Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[buffer] operator[SEP] identifier[writeByte] operator[SEP] identifier[Identifier] operator[SEP] identifier[NULL] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[object] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[enclosingClass] operator[=] identifier[enclosingClasses] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[type] , identifier[clazz] operator[->] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[clazz] operator[SEP] identifier[getEnclosingClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[enclosingClass] operator[!=] Other[null] operator[&&] identifier[enclosingClass] operator[SEP] identifier[isEnum] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[=] identifier[enclosingClass] operator[SEP] identifier[TypeSerializer] identifier[serializer] operator[=] identifier[getSerializer] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serializer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SerializationException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[ids] operator[SEP] identifier[containsKey] operator[SEP] identifier[type] operator[SEP] operator[SEP] { identifier[ids] operator[SEP] identifier[put] operator[SEP] identifier[type] , identifier[registry] operator[SEP] identifier[id] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[typeId] operator[=] identifier[registry] operator[SEP] identifier[id] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typeId] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[writeByClass] operator[SEP] identifier[type] , identifier[object] , identifier[buffer] , identifier[serializer] operator[SEP] operator[SEP] } Keyword[return] identifier[writeById] operator[SEP] identifier[typeId] , identifier[object] , identifier[buffer] , identifier[serializer] operator[SEP] operator[SEP] }
public static int getGCD(int... arg) throws Exception { if (arg == null || arg.length == 0) { throw new Exception("parameters must more than one."); } if (arg.length == 1) { return Math.abs(arg[0]); } int tmp = gcd(arg[0], arg[1]); for (int i = 2; i < arg.length; i++) { tmp = gcd(tmp, arg[i]); } return tmp; }
class class_name[name] begin[{] method[getGCD, return_type[type[int]], modifier[public static], parameter[arg]] begin[{] if[binary_operation[binary_operation[member[.arg], ==, literal[null]], ||, binary_operation[member[arg.length], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parameters must more than one.")], 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[}] if[binary_operation[member[arg.length], ==, literal[1]]] begin[{] return[call[Math.abs, parameter[member[.arg]]]] else begin[{] None end[}] local_variable[type[int], tmp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=gcd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.tmp]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getGCD] operator[SEP] Keyword[int] operator[...] identifier[arg] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[arg] operator[==] Other[null] operator[||] identifier[arg] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[arg] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[tmp] operator[=] identifier[gcd] operator[SEP] identifier[arg] operator[SEP] Other[0] operator[SEP] , identifier[arg] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[2] operator[SEP] identifier[i] operator[<] identifier[arg] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[tmp] operator[=] identifier[gcd] operator[SEP] identifier[tmp] , identifier[arg] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tmp] operator[SEP] }
protected final void assertContains(@NotNull Object... objects) { isNotNull(); checkNotNull(objects); Collection<Object> notFound = notFoundInActual(objects); if (notFound.isEmpty()) { return; } throw failureIfExpectedElementsNotFound(notFound); }
class class_name[name] begin[{] method[assertContains, return_type[void], modifier[final protected], parameter[objects]] begin[{] call[.isNotNull, parameter[]] call[.checkNotNull, parameter[member[.objects]]] local_variable[type[Collection], notFound] if[call[notFound.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=notFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=failureIfExpectedElementsNotFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[assertContains] operator[SEP] annotation[@] identifier[NotNull] identifier[Object] operator[...] identifier[objects] operator[SEP] { identifier[isNotNull] operator[SEP] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[objects] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[notFound] operator[=] identifier[notFoundInActual] operator[SEP] identifier[objects] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[notFound] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[throw] identifier[failureIfExpectedElementsNotFound] operator[SEP] identifier[notFound] operator[SEP] operator[SEP] }
boolean next() { index_++; while (index_ < maxEntries_) { if (couponsArr_[offset_ + index_] != 0) { return true; } index_++; } return false; }
class class_name[name] begin[{] method[next, return_type[type[boolean]], modifier[default], parameter[]] begin[{] member[.index_] while[binary_operation[member[.index_], <, member[.maxEntries_]]] begin[{] if[binary_operation[member[.couponsArr_], !=, literal[0]]] begin[{] return[literal[true]] else begin[{] None end[}] member[.index_] end[}] return[literal[false]] end[}] END[}]
Keyword[boolean] identifier[next] operator[SEP] operator[SEP] { identifier[index_] operator[++] operator[SEP] Keyword[while] operator[SEP] identifier[index_] operator[<] identifier[maxEntries_] operator[SEP] { Keyword[if] operator[SEP] identifier[couponsArr_] operator[SEP] identifier[offset_] operator[+] identifier[index_] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[index_] operator[++] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void write(byte b[], int off, int len) throws IOException { len=prepareOutput(len); if (!_nulled) _out.write(b,off,len); if (_bytes==_contentLength) flush(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[b, off, len]] begin[{] assign[member[.len], call[.prepareOutput, parameter[member[.len]]]] if[member[._nulled]] begin[{] call[_out.write, parameter[member[.b], member[.off], member[.len]]] else begin[{] None end[}] if[binary_operation[member[._bytes], ==, member[._contentLength]]] begin[{] call[.flush, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] identifier[b] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { identifier[len] operator[=] identifier[prepareOutput] operator[SEP] identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_nulled] operator[SEP] identifier[_out] operator[SEP] identifier[write] operator[SEP] identifier[b] , identifier[off] , identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_bytes] operator[==] identifier[_contentLength] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
private Set<ConnectionKey> getStaleConnectionKeys() { Map<ConnectionKey, StatefulRedisConnection<K, V>> map = new ConcurrentHashMap<>(); connectionProvider.forEach(map::put); Set<ConnectionKey> stale = new HashSet<>(); for (ConnectionKey connectionKey : map.keySet()) { if (connectionKey.host != null && findNodeByHostAndPort(knownNodes, connectionKey.host, connectionKey.port) != null) { continue; } stale.add(connectionKey); } return stale; }
class class_name[name] begin[{] method[getStaleConnectionKeys, return_type[type[Set]], modifier[private], parameter[]] begin[{] local_variable[type[Map], map] call[connectionProvider.forEach, parameter[MethodReference(expression=MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] local_variable[type[Set], stale] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=connectionKey, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=knownNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=connectionKey, selectors=[]), MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=connectionKey, selectors=[])], member=findNodeByHostAndPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connectionKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=stale, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=connectionKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConnectionKey, sub_type=None))), label=None) return[member[.stale]] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[ConnectionKey] operator[>] identifier[getStaleConnectionKeys] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[ConnectionKey] , identifier[StatefulRedisConnection] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[map] operator[=] Keyword[new] identifier[ConcurrentHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[connectionProvider] operator[SEP] identifier[forEach] operator[SEP] identifier[map] operator[::] identifier[put] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[ConnectionKey] operator[>] identifier[stale] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ConnectionKey] identifier[connectionKey] operator[:] identifier[map] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[connectionKey] operator[SEP] identifier[host] operator[!=] Other[null] operator[&&] identifier[findNodeByHostAndPort] operator[SEP] identifier[knownNodes] , identifier[connectionKey] operator[SEP] identifier[host] , identifier[connectionKey] operator[SEP] identifier[port] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[stale] operator[SEP] identifier[add] operator[SEP] identifier[connectionKey] operator[SEP] operator[SEP] } Keyword[return] identifier[stale] operator[SEP] }
@Override public Object fromByteBuffer(ByteBuffer bytes) { if (bytes == null || !bytes.hasRemaining()) { return null; } ByteBuffer dup = bytes.duplicate(); ByteArrayInputStream bais = new ByteArrayInputStream(dup.array()); try { XMLStreamReader reader = createStreamReader(bais); Object ret = unmarshaller.get().unmarshal(reader); reader.close(); return ret; } catch (JAXBException e) { throw new SerializationException("Jaxb exception occurred during deserialization.", e); } catch (XMLStreamException e) { throw new SerializationException("Exception reading XML stream.", e); } }
class class_name[name] begin[{] method[fromByteBuffer, return_type[type[Object]], modifier[public], parameter[bytes]] begin[{] if[binary_operation[binary_operation[member[.bytes], ==, literal[null]], ||, call[bytes.hasRemaining, parameter[]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[ByteBuffer], dup] local_variable[type[ByteArrayInputStream], bais] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=bais, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createStreamReader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=reader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XMLStreamReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=unmarshaller, selectors=[MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmarshal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=ret)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Jaxb exception occurred during deserialization."), 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=SerializationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JAXBException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception reading XML stream."), 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=SerializationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['XMLStreamException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[fromByteBuffer] operator[SEP] identifier[ByteBuffer] identifier[bytes] operator[SEP] { Keyword[if] operator[SEP] identifier[bytes] operator[==] Other[null] operator[||] operator[!] identifier[bytes] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[ByteBuffer] identifier[dup] operator[=] identifier[bytes] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[ByteArrayInputStream] identifier[bais] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[dup] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[XMLStreamReader] identifier[reader] operator[=] identifier[createStreamReader] operator[SEP] identifier[bais] operator[SEP] operator[SEP] identifier[Object] identifier[ret] operator[=] identifier[unmarshaller] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[unmarshal] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] } Keyword[catch] operator[SEP] identifier[JAXBException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SerializationException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[XMLStreamException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SerializationException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public MachineTime<SI> getRealDuration() { Moment tsp = this.getTemporalOfOpenEnd(); boolean max = (tsp == null); if (max) { // max reached tsp = this.getEnd().getTemporal(); } MachineTime<SI> result = MachineTime.ON_UTC_SCALE.between( this.getTemporalOfClosedStart(), tsp); if (max) { return result.plus(1, SI.NANOSECONDS); } return result; }
class class_name[name] begin[{] method[getRealDuration, return_type[type[MachineTime]], modifier[public], parameter[]] begin[{] local_variable[type[Moment], tsp] local_variable[type[boolean], max] if[member[.max]] begin[{] assign[member[.tsp], THIS[call[None.getEnd, parameter[]]call[None.getTemporal, parameter[]]]] else begin[{] None end[}] local_variable[type[MachineTime], result] if[member[.max]] begin[{] return[call[result.plus, parameter[literal[1], member[SI.NANOSECONDS]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[MachineTime] operator[<] identifier[SI] operator[>] identifier[getRealDuration] operator[SEP] operator[SEP] { identifier[Moment] identifier[tsp] operator[=] Keyword[this] operator[SEP] identifier[getTemporalOfOpenEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[max] operator[=] operator[SEP] identifier[tsp] operator[==] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[max] operator[SEP] { identifier[tsp] operator[=] Keyword[this] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[getTemporal] operator[SEP] operator[SEP] operator[SEP] } identifier[MachineTime] operator[<] identifier[SI] operator[>] identifier[result] operator[=] identifier[MachineTime] operator[SEP] identifier[ON_UTC_SCALE] operator[SEP] identifier[between] operator[SEP] Keyword[this] operator[SEP] identifier[getTemporalOfClosedStart] operator[SEP] operator[SEP] , identifier[tsp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[max] operator[SEP] { Keyword[return] identifier[result] operator[SEP] identifier[plus] operator[SEP] Other[1] , identifier[SI] operator[SEP] identifier[NANOSECONDS] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
protected void enableApiKeyInternal(final ObjectId id) { final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder(); reqBuilder .withMethod(Method.PUT) .withPath(routes.getApiKeyEnableRouteForId(id.toHexString())) .withRefreshToken(); getRequestClient().doAuthenticatedRequest(reqBuilder.build()); }
class class_name[name] begin[{] method[enableApiKeyInternal, return_type[void], modifier[protected], parameter[id]] begin[{] local_variable[type[StitchAuthRequest], reqBuilder] call[reqBuilder.withMethod, parameter[member[Method.PUT]]] call[.getRequestClient, parameter[]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[enableApiKeyInternal] operator[SEP] Keyword[final] identifier[ObjectId] identifier[id] operator[SEP] { Keyword[final] identifier[StitchAuthRequest] operator[SEP] identifier[Builder] identifier[reqBuilder] operator[=] Keyword[new] identifier[StitchAuthRequest] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[reqBuilder] operator[SEP] identifier[withMethod] operator[SEP] identifier[Method] operator[SEP] identifier[PUT] operator[SEP] operator[SEP] identifier[withPath] operator[SEP] identifier[routes] operator[SEP] identifier[getApiKeyEnableRouteForId] operator[SEP] identifier[id] operator[SEP] identifier[toHexString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withRefreshToken] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestClient] operator[SEP] operator[SEP] operator[SEP] identifier[doAuthenticatedRequest] operator[SEP] identifier[reqBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void removeRemedyIndex(RemedyIndexEventData data) { String path = StagePathUtils.getRemedyRoot(data.getPipelineId()); try { zookeeper.delete(path + "/" + RemedyIndexEventData.formatNodeName(data)); } catch (ZkNoNodeException e) { // ignore } catch (ZkException e) { throw new ArbitrateException("removeRemedyIndex", data.getPipelineId().toString(), e); } }
class class_name[name] begin[{] method[removeRemedyIndex, return_type[void], modifier[public], parameter[data]] begin[{] local_variable[type[String], path] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formatNodeName, postfix_operators=[], prefix_operators=[], qualifier=RemedyIndexEventData, selectors=[], type_arguments=None), operator=+)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=zookeeper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ZkNoNodeException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="removeRemedyIndex"), MethodInvocation(arguments=[], member=getPipelineId, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), 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=ArbitrateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ZkException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[removeRemedyIndex] operator[SEP] identifier[RemedyIndexEventData] identifier[data] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[StagePathUtils] operator[SEP] identifier[getRemedyRoot] operator[SEP] identifier[data] operator[SEP] identifier[getPipelineId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[zookeeper] operator[SEP] identifier[delete] operator[SEP] identifier[path] operator[+] literal[String] operator[+] identifier[RemedyIndexEventData] operator[SEP] identifier[formatNodeName] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ZkNoNodeException] identifier[e] operator[SEP] { } Keyword[catch] operator[SEP] identifier[ZkException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArbitrateException] operator[SEP] literal[String] , identifier[data] operator[SEP] identifier[getPipelineId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private int addContentHash(final PropertyKey key, final int contentHash) { final Object value = getProperty(key); if (value != null) { return contentHash ^ value.hashCode(); } return contentHash; }
class class_name[name] begin[{] method[addContentHash, return_type[type[int]], modifier[private], parameter[key, contentHash]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[binary_operation[member[.contentHash], ^, call[value.hashCode, parameter[]]]] else begin[{] None end[}] return[member[.contentHash]] end[}] END[}]
Keyword[private] Keyword[int] identifier[addContentHash] operator[SEP] Keyword[final] identifier[PropertyKey] identifier[key] , Keyword[final] Keyword[int] identifier[contentHash] operator[SEP] { Keyword[final] identifier[Object] identifier[value] operator[=] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[contentHash] operator[^] identifier[value] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[contentHash] operator[SEP] }
@Override public void setPropertyValue(PropertyInfo propInfo, Object value) { setPropertyValue(propInfo.getId(), value); }
class class_name[name] begin[{] method[setPropertyValue, return_type[void], modifier[public], parameter[propInfo, value]] begin[{] call[.setPropertyValue, parameter[call[propInfo.getId, parameter[]], member[.value]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setPropertyValue] operator[SEP] identifier[PropertyInfo] identifier[propInfo] , identifier[Object] identifier[value] operator[SEP] { identifier[setPropertyValue] operator[SEP] identifier[propInfo] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] }
void genCode() throws IOException { if (!outputDirectory.exists()) { if (!outputDirectory.mkdirs()) { throw new IOException("unable to create output directory " + outputDirectory); } } FileWriter cc = new FileWriter(new File(outputDirectory, mName + ".cc")); FileWriter hh = new FileWriter(new File(outputDirectory, mName + ".hh")); hh.write("/**\n"); hh.write("* Licensed to the Apache Software Foundation (ASF) under one\n"); hh.write("* or more contributor license agreements. See the NOTICE file\n"); hh.write("* distributed with this work for additional information\n"); hh.write("* regarding copyright ownership. The ASF licenses this file\n"); hh.write("* to you under the Apache License, Version 2.0 (the\n"); hh.write("* \"License\"); you may not use this file except in compliance\n"); hh.write("* with the License. You may obtain a copy of the License at\n"); hh.write("*\n"); hh.write("* http://www.apache.org/licenses/LICENSE-2.0\n"); hh.write("*\n"); hh.write("* Unless required by applicable law or agreed to in writing, software\n"); hh.write("* distributed under the License is distributed on an \"AS IS\" BASIS,\n"); hh.write("* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"); hh.write("* See the License for the specific language governing permissions and\n"); hh.write("* limitations under the License.\n"); hh.write("*/\n"); hh.write("\n"); cc.write("/**\n"); cc.write("* Licensed to the Apache Software Foundation (ASF) under one\n"); cc.write("* or more contributor license agreements. See the NOTICE file\n"); cc.write("* distributed with this work for additional information\n"); cc.write("* regarding copyright ownership. The ASF licenses this file\n"); cc.write("* to you under the Apache License, Version 2.0 (the\n"); cc.write("* \"License\"); you may not use this file except in compliance\n"); cc.write("* with the License. You may obtain a copy of the License at\n"); cc.write("*\n"); cc.write("* http://www.apache.org/licenses/LICENSE-2.0\n"); cc.write("*\n"); cc.write("* Unless required by applicable law or agreed to in writing, software\n"); cc.write("* distributed under the License is distributed on an \"AS IS\" BASIS,\n"); cc.write("* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"); cc.write("* See the License for the specific language governing permissions and\n"); cc.write("* limitations under the License.\n"); cc.write("*/\n"); cc.write("\n"); hh.write("#ifndef __" + mName.toUpperCase().replace('.', '_') + "__\n"); hh.write("#define __" + mName.toUpperCase().replace('.', '_') + "__\n"); hh.write("#include \"recordio.hh\"\n"); for (Iterator<JFile> i = mInclFiles.iterator(); i.hasNext();) { JFile f = i.next(); hh.write("#include \"" + f.getName() + ".hh\"\n"); } cc.write("#include \"" + mName + ".hh\"\n"); for (Iterator<JRecord> i = mRecList.iterator(); i.hasNext();) { JRecord jr = i.next(); jr.genCppCode(hh, cc); } hh.write("#endif //" + mName.toUpperCase().replace('.', '_') + "__\n"); hh.close(); cc.close(); }
class class_name[name] begin[{] method[genCode, return_type[void], modifier[default], parameter[]] begin[{] if[call[outputDirectory.exists, parameter[]]] begin[{] if[call[outputDirectory.mkdirs, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unable to create output directory "), operandr=MemberReference(member=outputDirectory, 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) else begin[{] None end[}] else begin[{] None end[}] local_variable[type[FileWriter], cc] local_variable[type[FileWriter], hh] call[hh.write, parameter[literal["/**\n"]]] call[hh.write, parameter[literal["* Licensed to the Apache Software Foundation (ASF) under one\n"]]] call[hh.write, parameter[literal["* or more contributor license agreements. See the NOTICE file\n"]]] call[hh.write, parameter[literal["* distributed with this work for additional information\n"]]] call[hh.write, parameter[literal["* regarding copyright ownership. The ASF licenses this file\n"]]] call[hh.write, parameter[literal["* to you under the Apache License, Version 2.0 (the\n"]]] call[hh.write, parameter[literal["* \"License\"); you may not use this file except in compliance\n"]]] call[hh.write, parameter[literal["* with the License. You may obtain a copy of the License at\n"]]] call[hh.write, parameter[literal["*\n"]]] call[hh.write, parameter[literal["* http://www.apache.org/licenses/LICENSE-2.0\n"]]] call[hh.write, parameter[literal["*\n"]]] call[hh.write, parameter[literal["* Unless required by applicable law or agreed to in writing, software\n"]]] call[hh.write, parameter[literal["* distributed under the License is distributed on an \"AS IS\" BASIS,\n"]]] call[hh.write, parameter[literal["* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"]]] call[hh.write, parameter[literal["* See the License for the specific language governing permissions and\n"]]] call[hh.write, parameter[literal["* limitations under the License.\n"]]] call[hh.write, parameter[literal["*/\n"]]] call[hh.write, parameter[literal["\n"]]] call[cc.write, parameter[literal["/**\n"]]] call[cc.write, parameter[literal["* Licensed to the Apache Software Foundation (ASF) under one\n"]]] call[cc.write, parameter[literal["* or more contributor license agreements. See the NOTICE file\n"]]] call[cc.write, parameter[literal["* distributed with this work for additional information\n"]]] call[cc.write, parameter[literal["* regarding copyright ownership. The ASF licenses this file\n"]]] call[cc.write, parameter[literal["* to you under the Apache License, Version 2.0 (the\n"]]] call[cc.write, parameter[literal["* \"License\"); you may not use this file except in compliance\n"]]] call[cc.write, parameter[literal["* with the License. You may obtain a copy of the License at\n"]]] call[cc.write, parameter[literal["*\n"]]] call[cc.write, parameter[literal["* http://www.apache.org/licenses/LICENSE-2.0\n"]]] call[cc.write, parameter[literal["*\n"]]] call[cc.write, parameter[literal["* Unless required by applicable law or agreed to in writing, software\n"]]] call[cc.write, parameter[literal["* distributed under the License is distributed on an \"AS IS\" BASIS,\n"]]] call[cc.write, parameter[literal["* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"]]] call[cc.write, parameter[literal["* See the License for the specific language governing permissions and\n"]]] call[cc.write, parameter[literal["* limitations under the License.\n"]]] call[cc.write, parameter[literal["*/\n"]]] call[cc.write, parameter[literal["\n"]]] call[hh.write, parameter[binary_operation[binary_operation[literal["#ifndef __"], +, call[mName.toUpperCase, parameter[]]], +, literal["__\n"]]]] call[hh.write, parameter[binary_operation[binary_operation[literal["#define __"], +, call[mName.toUpperCase, parameter[]]], +, literal["__\n"]]]] call[hh.write, parameter[literal["#include \"recordio.hh\"\n"]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JFile, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#include \""), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".hh\"\n"), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=hh, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=mInclFiles, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JFile, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) call[cc.write, parameter[binary_operation[binary_operation[literal["#include \""], +, member[.mName]], +, literal[".hh\"\n"]]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), name=jr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JRecord, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=genCppCode, postfix_operators=[], prefix_operators=[], qualifier=jr, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=mRecList, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JRecord, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) call[hh.write, parameter[binary_operation[binary_operation[literal["#endif //"], +, call[mName.toUpperCase, parameter[]]], +, literal["__\n"]]]] call[hh.close, parameter[]] call[cc.close, parameter[]] end[}] END[}]
Keyword[void] identifier[genCode] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[outputDirectory] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[outputDirectory] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[outputDirectory] operator[SEP] operator[SEP] } } identifier[FileWriter] identifier[cc] operator[=] Keyword[new] identifier[FileWriter] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[outputDirectory] , identifier[mName] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[FileWriter] identifier[hh] operator[=] Keyword[new] identifier[FileWriter] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[outputDirectory] , identifier[mName] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[mName] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[mName] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[JFile] operator[>] identifier[i] operator[=] identifier[mInclFiles] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[JFile] identifier[f] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[cc] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[mName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[JRecord] operator[>] identifier[i] operator[=] identifier[mRecList] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[JRecord] identifier[jr] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[jr] operator[SEP] identifier[genCppCode] operator[SEP] identifier[hh] , identifier[cc] operator[SEP] operator[SEP] } identifier[hh] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[mName] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hh] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[cc] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream, int size) throws IOException, ClassNotFoundException { for (int i = 0; i < size; i++) { @SuppressWarnings("unchecked") // reading data stored by writeMap K key = (K) stream.readObject(); @SuppressWarnings("unchecked") // reading data stored by writeMap V value = (V) stream.readObject(); map.put(key, value); } }
class class_name[name] begin[{] method[populateMap, return_type[void], modifier[static], parameter[map, stream, size]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings)], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings)], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, 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) end[}] END[}]
Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] Keyword[void] identifier[populateMap] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] , identifier[ObjectInputStream] identifier[stream] , Keyword[int] identifier[size] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[K] identifier[key] operator[=] operator[SEP] identifier[K] operator[SEP] identifier[stream] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[V] identifier[value] operator[=] operator[SEP] identifier[V] operator[SEP] identifier[stream] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } }
public SortedMap subMap(Object startKey, Object endKey) { if (comparator == null) { if (((Comparable) startKey).compareTo(endKey) <= 0) return makeSubMap(startKey, endKey); } else { if (comparator.compare(startKey, endKey) <= 0) return makeSubMap(startKey, endKey); } throw new IllegalArgumentException(); }
class class_name[name] begin[{] method[subMap, return_type[type[SortedMap]], modifier[public], parameter[startKey, endKey]] begin[{] if[binary_operation[member[.comparator], ==, literal[null]]] begin[{] if[binary_operation[Cast(expression=MemberReference(member=startKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None)), <=, literal[0]]] begin[{] return[call[.makeSubMap, parameter[member[.startKey], member[.endKey]]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[comparator.compare, parameter[member[.startKey], member[.endKey]]], <=, literal[0]]] begin[{] return[call[.makeSubMap, parameter[member[.startKey], member[.endKey]]]] else begin[{] None end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[SortedMap] identifier[subMap] operator[SEP] identifier[Object] identifier[startKey] , identifier[Object] identifier[endKey] operator[SEP] { Keyword[if] operator[SEP] identifier[comparator] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[Comparable] operator[SEP] identifier[startKey] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[endKey] operator[SEP] operator[<=] Other[0] operator[SEP] Keyword[return] identifier[makeSubMap] operator[SEP] identifier[startKey] , identifier[endKey] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[startKey] , identifier[endKey] operator[SEP] operator[<=] Other[0] operator[SEP] Keyword[return] identifier[makeSubMap] operator[SEP] identifier[startKey] , identifier[endKey] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] }
@SneakyThrows public DocumentDbMappingContext createDocumentDbMappingContext() { val documentDbMappingContext = new DocumentDbMappingContext(); documentDbMappingContext.setInitialEntitySet(new EntityScanner(applicationContext).scan(Persistent.class)); return documentDbMappingContext; }
class class_name[name] begin[{] method[createDocumentDbMappingContext, return_type[type[DocumentDbMappingContext]], modifier[public], parameter[]] begin[{] local_variable[type[val], documentDbMappingContext] call[documentDbMappingContext.setInitialEntitySet, parameter[ClassCreator(arguments=[MemberReference(member=applicationContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Persistent, sub_type=None))], member=scan, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=EntityScanner, sub_type=None))]] return[member[.documentDbMappingContext]] end[}] END[}]
annotation[@] identifier[SneakyThrows] Keyword[public] identifier[DocumentDbMappingContext] identifier[createDocumentDbMappingContext] operator[SEP] operator[SEP] { identifier[val] identifier[documentDbMappingContext] operator[=] Keyword[new] identifier[DocumentDbMappingContext] operator[SEP] operator[SEP] operator[SEP] identifier[documentDbMappingContext] operator[SEP] identifier[setInitialEntitySet] operator[SEP] Keyword[new] identifier[EntityScanner] operator[SEP] identifier[applicationContext] operator[SEP] operator[SEP] identifier[scan] operator[SEP] identifier[Persistent] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[documentDbMappingContext] operator[SEP] }
@Nullable public static String getAllBytesAsString (@Nullable @WillClose final InputStream aIS, @Nonnull @Nonempty final Charset aCharset) { ValueEnforcer.notNull (aCharset, "Charset"); if (aIS == null) return null; return getCopy (aIS).getAsString (aCharset); }
class class_name[name] begin[{] method[getAllBytesAsString, return_type[type[String]], modifier[public static], parameter[aIS, aCharset]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aCharset], literal["Charset"]]] if[binary_operation[member[.aIS], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[.getCopy, parameter[member[.aIS]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getAllBytesAsString] operator[SEP] annotation[@] identifier[Nullable] annotation[@] identifier[WillClose] Keyword[final] identifier[InputStream] identifier[aIS] , annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[Charset] identifier[aCharset] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aCharset] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aIS] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[getCopy] operator[SEP] identifier[aIS] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] identifier[aCharset] operator[SEP] operator[SEP] }
public final EObject ruleTypeReferenceWithTypeArgs() throws RecognitionException { EObject current = null; EObject this_ParameterizedTypeReferenceWithTypeArgs_0 = null; EObject this_TypeReferenceNoTypeArgs_3 = null; EObject this_XFunctionTypeRef_6 = null; enterRule(); try { // InternalSARL.g:9235:2: ( ( (this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | (this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ ) | this_XFunctionTypeRef_6= ruleXFunctionTypeRef ) ) // InternalSARL.g:9236:2: ( (this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | (this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ ) | this_XFunctionTypeRef_6= ruleXFunctionTypeRef ) { // InternalSARL.g:9236:2: ( (this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | (this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ ) | this_XFunctionTypeRef_6= ruleXFunctionTypeRef ) int alt245=3; alt245 = dfa245.predict(input); switch (alt245) { case 1 : // InternalSARL.g:9237:3: (this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) { // InternalSARL.g:9237:3: (this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) // InternalSARL.g:9238:4: this_ParameterizedTypeReferenceWithTypeArgs_0= ruleParameterizedTypeReferenceWithTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getTypeReferenceWithTypeArgsAccess().getParameterizedTypeReferenceWithTypeArgsParserRuleCall_0_0()); } pushFollow(FOLLOW_89); this_ParameterizedTypeReferenceWithTypeArgs_0=ruleParameterizedTypeReferenceWithTypeArgs(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_ParameterizedTypeReferenceWithTypeArgs_0; afterParserOrEnumRuleCall(); } // InternalSARL.g:9246:4: ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* loop243: do { int alt243=2; int LA243_0 = input.LA(1); if ( (LA243_0==55) && (synpred15_InternalSARL())) { alt243=1; } switch (alt243) { case 1 : // InternalSARL.g:9247:5: ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) { // InternalSARL.g:9253:5: ( () ruleArrayBrackets ) // InternalSARL.g:9254:6: () ruleArrayBrackets { // InternalSARL.g:9254:6: () // InternalSARL.g:9255:7: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getTypeReferenceWithTypeArgsAccess().getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0(), current); } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getTypeReferenceWithTypeArgsAccess().getArrayBracketsParserRuleCall_0_1_0_1()); } pushFollow(FOLLOW_89); ruleArrayBrackets(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } } break; default : break loop243; } } while (true); } } break; case 2 : // InternalSARL.g:9272:3: (this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ ) { // InternalSARL.g:9272:3: (this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ ) // InternalSARL.g:9273:4: this_TypeReferenceNoTypeArgs_3= ruleTypeReferenceNoTypeArgs ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getTypeReferenceWithTypeArgsAccess().getTypeReferenceNoTypeArgsParserRuleCall_1_0()); } pushFollow(FOLLOW_90); this_TypeReferenceNoTypeArgs_3=ruleTypeReferenceNoTypeArgs(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_TypeReferenceNoTypeArgs_3; afterParserOrEnumRuleCall(); } // InternalSARL.g:9281:4: ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )+ int cnt244=0; loop244: do { int alt244=2; int LA244_0 = input.LA(1); if ( (LA244_0==55) && (synpred16_InternalSARL())) { alt244=1; } switch (alt244) { case 1 : // InternalSARL.g:9282:5: ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) { // InternalSARL.g:9288:5: ( () ruleArrayBrackets ) // InternalSARL.g:9289:6: () ruleArrayBrackets { // InternalSARL.g:9289:6: () // InternalSARL.g:9290:7: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getTypeReferenceWithTypeArgsAccess().getJvmGenericArrayTypeReferenceComponentTypeAction_1_1_0_0(), current); } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getTypeReferenceWithTypeArgsAccess().getArrayBracketsParserRuleCall_1_1_0_1()); } pushFollow(FOLLOW_89); ruleArrayBrackets(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } } break; default : if ( cnt244 >= 1 ) break loop244; if (state.backtracking>0) {state.failed=true; return current;} EarlyExitException eee = new EarlyExitException(244, input); throw eee; } cnt244++; } while (true); } } break; case 3 : // InternalSARL.g:9307:3: this_XFunctionTypeRef_6= ruleXFunctionTypeRef { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getTypeReferenceWithTypeArgsAccess().getXFunctionTypeRefParserRuleCall_2()); } pushFollow(FOLLOW_2); this_XFunctionTypeRef_6=ruleXFunctionTypeRef(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_XFunctionTypeRef_6; afterParserOrEnumRuleCall(); } } break; } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleTypeReferenceWithTypeArgs, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], this_ParameterizedTypeReferenceWithTypeArgs_0] local_variable[type[EObject], this_TypeReferenceNoTypeArgs_3] local_variable[type[EObject], this_XFunctionTypeRef_6] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), name=alt245)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt245, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predict, postfix_operators=[], prefix_operators=[], qualifier=dfa245, selectors=[], type_arguments=None)), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getParameterizedTypeReferenceWithTypeArgsParserRuleCall_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_89, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_ParameterizedTypeReferenceWithTypeArgs_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleParameterizedTypeReferenceWithTypeArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_ParameterizedTypeReferenceWithTypeArgs_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt243)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA243_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA243_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), operator===), operandr=MethodInvocation(arguments=[], member=synpred15_InternalSARL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt243, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getArrayBracketsParserRuleCall_0_1_0_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_89, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleArrayBrackets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop243, label=None)])], expression=MemberReference(member=alt243, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop243)])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getTypeReferenceNoTypeArgsParserRuleCall_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_90, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_TypeReferenceNoTypeArgs_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleTypeReferenceNoTypeArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_TypeReferenceNoTypeArgs_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt244)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt244)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA244_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA244_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), operator===), operandr=MethodInvocation(arguments=[], member=synpred16_InternalSARL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt244, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getJvmGenericArrayTypeReferenceComponentTypeAction_1_1_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getArrayBracketsParserRuleCall_1_1_0_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_89, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleArrayBrackets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt244, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=loop244, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=244), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt244, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt244, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop244)])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReferenceWithTypeArgsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXFunctionTypeRefParserRuleCall_2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_XFunctionTypeRef_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXFunctionTypeRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_XFunctionTypeRef_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt245, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleTypeReferenceWithTypeArgs] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_ParameterizedTypeReferenceWithTypeArgs_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_TypeReferenceNoTypeArgs_3] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_XFunctionTypeRef_6] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[alt245] operator[=] Other[3] operator[SEP] identifier[alt245] operator[=] identifier[dfa245] operator[SEP] identifier[predict] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[alt245] operator[SEP] { Keyword[case] Other[1] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getParameterizedTypeReferenceWithTypeArgsParserRuleCall_0_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_89] operator[SEP] operator[SEP] identifier[this_ParameterizedTypeReferenceWithTypeArgs_0] operator[=] identifier[ruleParameterizedTypeReferenceWithTypeArgs] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_ParameterizedTypeReferenceWithTypeArgs_0] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } identifier[loop243] operator[:] Keyword[do] { Keyword[int] identifier[alt243] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA243_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA243_0] operator[==] Other[55] operator[SEP] operator[&&] operator[SEP] identifier[synpred15_InternalSARL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt243] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt243] operator[SEP] { Keyword[case] Other[1] operator[:] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElementAndSet] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getArrayBracketsParserRuleCall_0_1_0_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_89] operator[SEP] operator[SEP] identifier[ruleArrayBrackets] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop243] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeReferenceNoTypeArgsParserRuleCall_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_90] operator[SEP] operator[SEP] identifier[this_TypeReferenceNoTypeArgs_3] operator[=] identifier[ruleTypeReferenceNoTypeArgs] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_TypeReferenceNoTypeArgs_3] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[cnt244] operator[=] Other[0] operator[SEP] identifier[loop244] operator[:] Keyword[do] { Keyword[int] identifier[alt244] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA244_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA244_0] operator[==] Other[55] operator[SEP] operator[&&] operator[SEP] identifier[synpred16_InternalSARL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt244] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt244] operator[SEP] { Keyword[case] Other[1] operator[:] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElementAndSet] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getJvmGenericArrayTypeReferenceComponentTypeAction_1_1_0_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getArrayBracketsParserRuleCall_1_1_0_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_89] operator[SEP] operator[SEP] identifier[ruleArrayBrackets] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt244] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop244] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[244] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP] } identifier[cnt244] operator[++] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getTypeReferenceWithTypeArgsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXFunctionTypeRefParserRuleCall_2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[this_XFunctionTypeRef_6] operator[=] identifier[ruleXFunctionTypeRef] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_XFunctionTypeRef_6] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public String getDomains() { StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); generator = gf.createGenerator(sw); } else generator = Json.createGenerator(sw); generator.writeStartArray(); List<String> doms = DomainInformation.availableDomains(dbAccess); for (String dom : doms) { generator.write(dom); } generator.writeEnd(); generator.flush(); return sw.toString(); }
class class_name[name] begin[{] method[getDomains, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringWriter], sw] local_variable[type[JsonGenerator], generator] if[binary_operation[THIS[member[None.prettyFormat]], !=, member[Format.NONE]]] begin[{] local_variable[type[JsonGeneratorFactory], gf] assign[member[.generator], call[gf.createGenerator, parameter[member[.sw]]]] else begin[{] assign[member[.generator], call[Json.createGenerator, parameter[member[.sw]]]] end[}] call[generator.writeStartArray, parameter[]] local_variable[type[List], doms] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=generator, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=doms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dom)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[generator.writeEnd, parameter[]] call[generator.flush, parameter[]] return[call[sw.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getDomains] operator[SEP] operator[SEP] { identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] identifier[JsonGenerator] identifier[generator] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[prettyFormat] operator[!=] identifier[Format] operator[SEP] identifier[NONE] operator[SEP] { identifier[JsonGeneratorFactory] identifier[gf] operator[=] identifier[JSONWriter] operator[SEP] identifier[getPrettyGeneratorFactory] operator[SEP] operator[SEP] operator[SEP] identifier[generator] operator[=] identifier[gf] operator[SEP] identifier[createGenerator] operator[SEP] identifier[sw] operator[SEP] operator[SEP] } Keyword[else] identifier[generator] operator[=] identifier[Json] operator[SEP] identifier[createGenerator] operator[SEP] identifier[sw] operator[SEP] operator[SEP] identifier[generator] operator[SEP] identifier[writeStartArray] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[doms] operator[=] identifier[DomainInformation] operator[SEP] identifier[availableDomains] operator[SEP] identifier[dbAccess] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[dom] operator[:] identifier[doms] operator[SEP] { identifier[generator] operator[SEP] identifier[write] operator[SEP] identifier[dom] operator[SEP] operator[SEP] } identifier[generator] operator[SEP] identifier[writeEnd] operator[SEP] operator[SEP] operator[SEP] identifier[generator] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sw] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public final Flux<T> expandDeep(Function<? super T, ? extends Publisher<? extends T>> expander) { return expandDeep(expander, Queues.SMALL_BUFFER_SIZE); }
class class_name[name] begin[{] method[expandDeep, return_type[type[Flux]], modifier[final public], parameter[expander]] begin[{] return[call[.expandDeep, parameter[member[.expander], member[Queues.SMALL_BUFFER_SIZE]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[T] operator[>] identifier[expandDeep] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Publisher] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] identifier[expander] operator[SEP] { Keyword[return] identifier[expandDeep] operator[SEP] identifier[expander] , identifier[Queues] operator[SEP] identifier[SMALL_BUFFER_SIZE] operator[SEP] operator[SEP] }
@Override public void setMessageListener(MessageListener messageListener) throws JMSException { externalAccessLock.readLock().lock(); try { checkNotClosed(); this.messageListener = messageListener; } finally { externalAccessLock.readLock().unlock(); } }
class class_name[name] begin[{] method[setMessageListener, return_type[void], modifier[public], parameter[messageListener]] begin[{] call[externalAccessLock.readLock, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=checkNotClosed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messageListener, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=messageListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=readLock, postfix_operators=[], prefix_operators=[], qualifier=externalAccessLock, selectors=[MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setMessageListener] operator[SEP] identifier[MessageListener] identifier[messageListener] operator[SEP] Keyword[throws] identifier[JMSException] { identifier[externalAccessLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[checkNotClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[messageListener] operator[=] identifier[messageListener] operator[SEP] } Keyword[finally] { identifier[externalAccessLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
<R extends Request<T>> R setRequestQueue(RequestQueue requestQueue) { checkIfActive(); java.lang.reflect.Method m = null; if (!(this.getClass().equals(Request.class))) { try { m = this.getClass().getDeclaredMethod("parseNetworkResponse", NetworkResponse .class); } catch (NoSuchMethodException e) { //e.printStackTrace(); } } if (converterFromResponse == null) { Type t; if (responseType != null) { t = responseType; } else { t = tryIdentifyResultType(this); } if (t == null) { throw new IllegalArgumentException("Cannot resolve Response type in order to " + "identify Response Converter for Request : " + this); } try { this.converterFromResponse = (Converter<NetworkResponse, T>) requestQueue .getResponseConverter(t, new Annotation[0]); } catch (IllegalArgumentException ex) { //check if parseNetworkResponse is overridden if (m == null) { //it is not so it is for sure that we cannot parse response thus throw throw ex; } //else keep quiet as conversion can probably be handled by the overridden method. // if it fails parse exception will be thrown. } } if (retryPolicy == null) { setRetryPolicy(new DefaultRetryPolicy(this)); } this.requestQueue = requestQueue; return (R) this; }
class class_name[name] begin[{] method[setRequestQueue, return_type[type[R]], modifier[default], parameter[requestQueue]] begin[{] call[.checkIfActive, parameter[]] local_variable[type[java], m] if[THIS[]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parseNetworkResponse"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NetworkResponse, sub_type=None))], member=getDeclaredMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.converterFromResponse], ==, literal[null]]] begin[{] local_variable[type[Type], t] if[binary_operation[member[.responseType], !=, literal[null]]] begin[{] assign[member[.t], member[.responseType]] else begin[{] assign[member[.t], call[.tryIdentifyResultType, parameter[THIS[]]]] end[}] if[binary_operation[member[.t], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot resolve Response type in order to "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="identify Response Converter for Request : "), operator=+), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=converterFromResponse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Annotation, sub_type=None))], member=getResponseConverter, postfix_operators=[], prefix_operators=[], qualifier=requestQueue, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=NetworkResponse, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Converter, sub_type=None))), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m, 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=[ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.retryPolicy], ==, literal[null]]] begin[{] call[.setRetryPolicy, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultRetryPolicy, sub_type=None))]] else begin[{] None end[}] assign[THIS[member[None.requestQueue]], member[.requestQueue]] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))] end[}] END[}]
operator[<] identifier[R] Keyword[extends] identifier[Request] operator[<] identifier[T] operator[>] operator[>] identifier[R] identifier[setRequestQueue] operator[SEP] identifier[RequestQueue] identifier[requestQueue] operator[SEP] { identifier[checkIfActive] operator[SEP] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[Method] identifier[m] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Request] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[m] operator[=] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] , identifier[NetworkResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { } } Keyword[if] operator[SEP] identifier[converterFromResponse] operator[==] Other[null] operator[SEP] { identifier[Type] identifier[t] operator[SEP] Keyword[if] operator[SEP] identifier[responseType] operator[!=] Other[null] operator[SEP] { identifier[t] operator[=] identifier[responseType] operator[SEP] } Keyword[else] { identifier[t] operator[=] identifier[tryIdentifyResultType] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] } Keyword[try] { Keyword[this] operator[SEP] identifier[converterFromResponse] operator[=] operator[SEP] identifier[Converter] operator[<] identifier[NetworkResponse] , identifier[T] operator[>] operator[SEP] identifier[requestQueue] operator[SEP] identifier[getResponseConverter] operator[SEP] identifier[t] , Keyword[new] identifier[Annotation] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[m] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[ex] operator[SEP] } } } Keyword[if] operator[SEP] identifier[retryPolicy] operator[==] Other[null] operator[SEP] { identifier[setRetryPolicy] operator[SEP] Keyword[new] identifier[DefaultRetryPolicy] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[requestQueue] operator[=] identifier[requestQueue] operator[SEP] Keyword[return] operator[SEP] identifier[R] operator[SEP] Keyword[this] operator[SEP] }
protected void createActions() { super.createActions(); IAction a = new TextOperationAction(RuleEditorMessages .getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS); a .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); setAction("ContentAssistProposal", a); a = new TextOperationAction( RuleEditorMessages.getResourceBundle(), "ContentAssistTip.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$ a .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION); setAction("ContentAssistTip", a); a = new ToggleBreakpointAction(getSite().getPart() , null, getVerticalRuler()); setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, a); }
class class_name[name] begin[{] method[createActions, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=createActions, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[IAction], a] call[a.setActionDefinitionId, parameter[member[ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS]]] call[.setAction, parameter[literal["ContentAssistProposal"], member[.a]]] assign[member[.a], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceBundle, postfix_operators=[], prefix_operators=[], qualifier=RuleEditorMessages, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ContentAssistTip."), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=CONTENTASSIST_CONTEXT_INFORMATION, postfix_operators=[], prefix_operators=[], qualifier=ISourceViewer, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextOperationAction, sub_type=None))] call[a.setActionDefinitionId, parameter[member[ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION]]] call[.setAction, parameter[literal["ContentAssistTip"], member[.a]]] assign[member[.a], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getPart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=getVerticalRuler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ToggleBreakpointAction, sub_type=None))] call[.setAction, parameter[member[ITextEditorActionConstants.RULER_DOUBLE_CLICK], member[.a]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[createActions] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[createActions] operator[SEP] operator[SEP] operator[SEP] identifier[IAction] identifier[a] operator[=] Keyword[new] identifier[TextOperationAction] operator[SEP] identifier[RuleEditorMessages] operator[SEP] identifier[getResourceBundle] operator[SEP] operator[SEP] , literal[String] , Keyword[this] , identifier[ISourceViewer] operator[SEP] identifier[CONTENTASSIST_PROPOSALS] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[setActionDefinitionId] operator[SEP] identifier[ITextEditorActionDefinitionIds] operator[SEP] identifier[CONTENT_ASSIST_PROPOSALS] operator[SEP] operator[SEP] identifier[setAction] operator[SEP] literal[String] , identifier[a] operator[SEP] operator[SEP] identifier[a] operator[=] Keyword[new] identifier[TextOperationAction] operator[SEP] identifier[RuleEditorMessages] operator[SEP] identifier[getResourceBundle] operator[SEP] operator[SEP] , literal[String] , Keyword[this] , identifier[ISourceViewer] operator[SEP] identifier[CONTENTASSIST_CONTEXT_INFORMATION] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[setActionDefinitionId] operator[SEP] identifier[ITextEditorActionDefinitionIds] operator[SEP] identifier[CONTENT_ASSIST_CONTEXT_INFORMATION] operator[SEP] operator[SEP] identifier[setAction] operator[SEP] literal[String] , identifier[a] operator[SEP] operator[SEP] identifier[a] operator[=] Keyword[new] identifier[ToggleBreakpointAction] operator[SEP] identifier[getSite] operator[SEP] operator[SEP] operator[SEP] identifier[getPart] operator[SEP] operator[SEP] , Other[null] , identifier[getVerticalRuler] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setAction] operator[SEP] identifier[ITextEditorActionConstants] operator[SEP] identifier[RULER_DOUBLE_CLICK] , identifier[a] operator[SEP] operator[SEP] }
private static void addDataItem(final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat, final SimpleDateFormat parseIncomingDateFormat, final ViewRiksdagenOrgDocumentDailySummary item) { if (item != null && item.getEmbeddedId().getPublicDate().length() > 0) { try { dataSeries.add( simpleDateFormat .format(parseIncomingDateFormat.parse(item.getEmbeddedId().getPublicDate())), item.getTotal()); } catch (final ParseException e) { LOGGER.warn("Problem parsing date:{}", item.getEmbeddedId().getPublicDate()); } } }
class class_name[name] begin[{] method[addDataItem, return_type[void], modifier[private static], parameter[dataSeries, simpleDateFormat, parseIncomingDateFormat, item]] begin[{] if[binary_operation[binary_operation[member[.item], !=, literal[null]], &&, binary_operation[call[item.getEmbeddedId, parameter[]], >, literal[0]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEmbeddedId, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=getPublicDate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parseIncomingDateFormat, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=simpleDateFormat, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTotal, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=dataSeries, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Problem parsing date:{}"), MethodInvocation(arguments=[], member=getEmbeddedId, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=getPublicDate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParseException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addDataItem] operator[SEP] Keyword[final] identifier[DataSeries] identifier[dataSeries] , Keyword[final] identifier[SimpleDateFormat] identifier[simpleDateFormat] , Keyword[final] identifier[SimpleDateFormat] identifier[parseIncomingDateFormat] , Keyword[final] identifier[ViewRiksdagenOrgDocumentDailySummary] identifier[item] operator[SEP] { Keyword[if] operator[SEP] identifier[item] operator[!=] Other[null] operator[&&] identifier[item] operator[SEP] identifier[getEmbeddedId] operator[SEP] operator[SEP] operator[SEP] identifier[getPublicDate] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[try] { identifier[dataSeries] operator[SEP] identifier[add] operator[SEP] identifier[simpleDateFormat] operator[SEP] identifier[format] operator[SEP] identifier[parseIncomingDateFormat] operator[SEP] identifier[parse] operator[SEP] identifier[item] operator[SEP] identifier[getEmbeddedId] operator[SEP] operator[SEP] operator[SEP] identifier[getPublicDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[item] operator[SEP] identifier[getTotal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[ParseException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[item] operator[SEP] identifier[getEmbeddedId] operator[SEP] operator[SEP] operator[SEP] identifier[getPublicDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
private String determineQualifiedName(String name, CompilationUnit from) { if (from != null) { // Determine qualified name as being relative to "from" String fromName = from.getName(); int index = fromName.lastIndexOf('.'); if (index >= 0) { String qual = fromName.substring(0, index + 1) + name; if (sourceExists(qual)) { return qual; } } } if (sourceExists(name)) { return name; } return null; }
class class_name[name] begin[{] method[determineQualifiedName, return_type[type[String]], modifier[private], parameter[name, from]] begin[{] if[binary_operation[member[.from], !=, literal[null]]] begin[{] local_variable[type[String], fromName] local_variable[type[int], index] if[binary_operation[member[.index], >=, literal[0]]] begin[{] local_variable[type[String], qual] if[call[.sourceExists, parameter[member[.qual]]]] begin[{] return[member[.qual]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[call[.sourceExists, parameter[member[.name]]]] begin[{] return[member[.name]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[determineQualifiedName] operator[SEP] identifier[String] identifier[name] , identifier[CompilationUnit] identifier[from] operator[SEP] { Keyword[if] operator[SEP] identifier[from] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[fromName] operator[=] identifier[from] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[fromName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[>=] Other[0] operator[SEP] { identifier[String] identifier[qual] operator[=] identifier[fromName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[+] Other[1] operator[SEP] operator[+] identifier[name] operator[SEP] Keyword[if] operator[SEP] identifier[sourceExists] operator[SEP] identifier[qual] operator[SEP] operator[SEP] { Keyword[return] identifier[qual] operator[SEP] } } } Keyword[if] operator[SEP] identifier[sourceExists] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[name] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) { return resolveQualifiedMethod(pos, env, site.tsym, site, name, argtypes, typeargtypes); }
class class_name[name] begin[{] method[resolveQualifiedMethod, return_type[type[Symbol]], modifier[default], parameter[pos, env, site, name, argtypes, typeargtypes]] begin[{] return[call[.resolveQualifiedMethod, parameter[member[.pos], member[.env], member[site.tsym], member[.site], member[.name], member[.argtypes], member[.typeargtypes]]]] end[}] END[}]
identifier[Symbol] identifier[resolveQualifiedMethod] operator[SEP] identifier[DiagnosticPosition] identifier[pos] , identifier[Env] operator[<] identifier[AttrContext] operator[>] identifier[env] , identifier[Type] identifier[site] , identifier[Name] identifier[name] , identifier[List] operator[<] identifier[Type] operator[>] identifier[argtypes] , identifier[List] operator[<] identifier[Type] operator[>] identifier[typeargtypes] operator[SEP] { Keyword[return] identifier[resolveQualifiedMethod] operator[SEP] identifier[pos] , identifier[env] , identifier[site] operator[SEP] identifier[tsym] , identifier[site] , identifier[name] , identifier[argtypes] , identifier[typeargtypes] operator[SEP] operator[SEP] }
public ResolvableType[] getInterfaces() { Class<?> resolved = resolve(); if (resolved == null || ObjectUtils.isEmpty(resolved.getGenericInterfaces())) { return EMPTY_TYPES_ARRAY; } if (this.interfaces == null) { this.interfaces = forTypes(SerializableTypeWrapper.forGenericInterfaces(resolved), asVariableResolver()); } return this.interfaces; }
class class_name[name] begin[{] method[getInterfaces, return_type[type[ResolvableType]], modifier[public], parameter[]] begin[{] local_variable[type[Class], resolved] if[binary_operation[binary_operation[member[.resolved], ==, literal[null]], ||, call[ObjectUtils.isEmpty, parameter[call[resolved.getGenericInterfaces, parameter[]]]]]] begin[{] return[member[.EMPTY_TYPES_ARRAY]] else begin[{] None end[}] if[binary_operation[THIS[member[None.interfaces]], ==, literal[null]]] begin[{] assign[THIS[member[None.interfaces]], call[.forTypes, parameter[call[SerializableTypeWrapper.forGenericInterfaces, parameter[member[.resolved]]], call[.asVariableResolver, parameter[]]]]] else begin[{] None end[}] return[THIS[member[None.interfaces]]] end[}] END[}]
Keyword[public] identifier[ResolvableType] operator[SEP] operator[SEP] identifier[getInterfaces] operator[SEP] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[resolved] operator[=] identifier[resolve] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resolved] operator[==] Other[null] operator[||] identifier[ObjectUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[resolved] operator[SEP] identifier[getGenericInterfaces] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[EMPTY_TYPES_ARRAY] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[interfaces] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[interfaces] operator[=] identifier[forTypes] operator[SEP] identifier[SerializableTypeWrapper] operator[SEP] identifier[forGenericInterfaces] operator[SEP] identifier[resolved] operator[SEP] , identifier[asVariableResolver] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[interfaces] operator[SEP] }
public static String getExceptionMessageString(ELContext context, String messageId) { return getExceptionMessageString(context, messageId, null); }
class class_name[name] begin[{] method[getExceptionMessageString, return_type[type[String]], modifier[public static], parameter[context, messageId]] begin[{] return[call[.getExceptionMessageString, parameter[member[.context], member[.messageId], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getExceptionMessageString] operator[SEP] identifier[ELContext] identifier[context] , identifier[String] identifier[messageId] operator[SEP] { Keyword[return] identifier[getExceptionMessageString] operator[SEP] identifier[context] , identifier[messageId] , Other[null] operator[SEP] operator[SEP] }
private void beforeName() throws IOException { int context = peekScope(); if (context == NONEMPTY_OBJECT) { // first in object sink.writeByte(','); } else if (context != EMPTY_OBJECT) { // not in an object! throw new IllegalStateException("Nesting problem."); } newline(); replaceTop(DANGLING_NAME); }
class class_name[name] begin[{] method[beforeName, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], context] if[binary_operation[member[.context], ==, member[.NONEMPTY_OBJECT]]] begin[{] call[sink.writeByte, parameter[literal[',']]] else begin[{] if[binary_operation[member[.context], !=, member[.EMPTY_OBJECT]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Nesting problem.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] end[}] call[.newline, parameter[]] call[.replaceTop, parameter[member[.DANGLING_NAME]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[beforeName] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[context] operator[=] identifier[peekScope] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[==] identifier[NONEMPTY_OBJECT] operator[SEP] { identifier[sink] operator[SEP] identifier[writeByte] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[context] operator[!=] identifier[EMPTY_OBJECT] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[newline] operator[SEP] operator[SEP] operator[SEP] identifier[replaceTop] operator[SEP] identifier[DANGLING_NAME] operator[SEP] operator[SEP] }
@Override public void rename(final Name oldDn, final Name newDn) { executeReadWrite(new ContextExecutor() { public Object executeWithContext(DirContext ctx) throws javax.naming.NamingException { ctx.rename(oldDn, newDn); return null; } }); }
class class_name[name] begin[{] method[rename, return_type[void], modifier[public], parameter[oldDn, newDn]] begin[{] call[.executeReadWrite, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldDn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newDn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rename, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], documentation=None, modifiers={'public'}, name=executeWithContext, parameters=[FormalParameter(annotations=[], modifiers=set(), name=ctx, type=ReferenceType(arguments=None, dimensions=[], name=DirContext, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=['javax.naming.NamingException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ContextExecutor, sub_type=None))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[rename] operator[SEP] Keyword[final] identifier[Name] identifier[oldDn] , Keyword[final] identifier[Name] identifier[newDn] operator[SEP] { identifier[executeReadWrite] operator[SEP] Keyword[new] identifier[ContextExecutor] operator[SEP] operator[SEP] { Keyword[public] identifier[Object] identifier[executeWithContext] operator[SEP] identifier[DirContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[javax] operator[SEP] identifier[naming] operator[SEP] identifier[NamingException] { identifier[ctx] operator[SEP] identifier[rename] operator[SEP] identifier[oldDn] , identifier[newDn] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } operator[SEP] operator[SEP] }
public static hostcpu get(nitro_service client, hostcpu resource) throws Exception { resource.validate("get"); return ((hostcpu[]) resource.get_resources(client))[0]; }
class class_name[name] begin[{] method[get, return_type[type[hostcpu]], modifier[public static], parameter[client, resource]] begin[{] call[resource.validate, parameter[literal["get"]]] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get_resources, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=hostcpu, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[hostcpu] identifier[get] operator[SEP] identifier[nitro_service] identifier[client] , identifier[hostcpu] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[resource] operator[SEP] identifier[validate] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[hostcpu] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[get_resources] operator[SEP] identifier[client] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] }
private void doBatchMessage(final JsonObject message) { String batchID = message.getString("batch"); if (currentBatch != null && currentBatch.id().equals(batchID)) { Object value = deserializer.deserialize(message); if (value != null) { if (log.isDebugEnabled()) { log.debug(String.format("%s - Batch received: Batch[batch=%s, id=%d, message=%s]", this, batchID, message.getLong("id"), value)); } currentBatch.handleMessage(value); } } }
class class_name[name] begin[{] method[doBatchMessage, return_type[void], modifier[private], parameter[message]] begin[{] local_variable[type[String], batchID] if[binary_operation[binary_operation[member[.currentBatch], !=, literal[null]], &&, call[currentBatch.id, parameter[]]]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[call[String.format, parameter[literal["%s - Batch received: Batch[batch=%s, id=%d, message=%s]"], THIS[], member[.batchID], call[message.getLong, parameter[literal["id"]]], member[.value]]]]] else begin[{] None end[}] call[currentBatch.handleMessage, parameter[member[.value]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[doBatchMessage] operator[SEP] Keyword[final] identifier[JsonObject] identifier[message] operator[SEP] { identifier[String] identifier[batchID] operator[=] identifier[message] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentBatch] operator[!=] Other[null] operator[&&] identifier[currentBatch] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[batchID] operator[SEP] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[deserializer] operator[SEP] identifier[deserialize] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , Keyword[this] , identifier[batchID] , identifier[message] operator[SEP] identifier[getLong] operator[SEP] literal[String] operator[SEP] , identifier[value] operator[SEP] operator[SEP] operator[SEP] } identifier[currentBatch] operator[SEP] identifier[handleMessage] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } }
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException { if (isApiVersion(ApiVersion.V3)) { Boolean isPublic = Visibility.PUBLIC == visibility; return (createProject(name, namespaceId, description, issuesEnabled, mergeRequestsEnabled, wikiEnabled, snippetsEnabled, isPublic, visibilityLevel, importUrl)); } if (name == null || name.trim().length() == 0) { return (null); } GitLabApiForm formData = new GitLabApiForm() .withParam("name", name, true) .withParam("namespace_id", namespaceId) .withParam("description", description) .withParam("issues_enabled", issuesEnabled) .withParam("merge_requests_enabled", mergeRequestsEnabled) .withParam("wiki_enabled", wikiEnabled) .withParam("snippets_enabled", snippetsEnabled) .withParam("visibility_level", visibilityLevel) .withParam("visibility", visibility) .withParam("import_url", importUrl); Response response = post(Response.Status.CREATED, formData, "projects"); return (response.readEntity(Project.class)); }
class class_name[name] begin[{] method[createProject, return_type[type[Project]], modifier[public], parameter[name, namespaceId, description, issuesEnabled, mergeRequestsEnabled, wikiEnabled, snippetsEnabled, visibility, visibilityLevel, importUrl]] begin[{] if[call[.isApiVersion, parameter[member[ApiVersion.V3]]]] begin[{] local_variable[type[Boolean], isPublic] return[call[.createProject, parameter[member[.name], member[.namespaceId], member[.description], member[.issuesEnabled], member[.mergeRequestsEnabled], member[.wikiEnabled], member[.snippetsEnabled], member[.isPublic], member[.visibilityLevel], member[.importUrl]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.name], ==, literal[null]], ||, binary_operation[call[name.trim, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[GitLabApiForm], formData] local_variable[type[Response], response] return[call[response.readEntity, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Project, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Project] identifier[createProject] operator[SEP] identifier[String] identifier[name] , identifier[Integer] identifier[namespaceId] , identifier[String] identifier[description] , identifier[Boolean] identifier[issuesEnabled] , identifier[Boolean] identifier[mergeRequestsEnabled] , identifier[Boolean] identifier[wikiEnabled] , identifier[Boolean] identifier[snippetsEnabled] , identifier[Visibility] identifier[visibility] , identifier[Integer] identifier[visibilityLevel] , identifier[String] identifier[importUrl] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[if] operator[SEP] identifier[isApiVersion] operator[SEP] identifier[ApiVersion] operator[SEP] identifier[V3] operator[SEP] operator[SEP] { identifier[Boolean] identifier[isPublic] operator[=] identifier[Visibility] operator[SEP] identifier[PUBLIC] operator[==] identifier[visibility] operator[SEP] Keyword[return] operator[SEP] identifier[createProject] operator[SEP] identifier[name] , identifier[namespaceId] , identifier[description] , identifier[issuesEnabled] , identifier[mergeRequestsEnabled] , identifier[wikiEnabled] , identifier[snippetsEnabled] , identifier[isPublic] , identifier[visibilityLevel] , identifier[importUrl] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] identifier[name] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[GitLabApiForm] identifier[formData] operator[=] Keyword[new] identifier[GitLabApiForm] operator[SEP] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[name] , literal[boolean] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[namespaceId] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[description] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[issuesEnabled] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[mergeRequestsEnabled] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[wikiEnabled] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[snippetsEnabled] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[visibilityLevel] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[visibility] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[importUrl] operator[SEP] operator[SEP] identifier[Response] identifier[response] operator[=] identifier[post] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[CREATED] , identifier[formData] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[response] operator[SEP] identifier[readEntity] operator[SEP] identifier[Project] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] }
public WritableByteChannel asWritableByteChannel() { // Bufferless/direct output if (packetSize < 2) { return new WritableByteChannel() { @Override public final boolean isOpen() { return !closed.get(); } @Override public final void close() { sendClose(); } @Override public final int write(ByteBuffer src) { try { int len = src.remaining(); if (len > 0) { byte[] packet = new byte[len]; src.get(packet); sendData(packet); } return len; } catch (Throwable cause) { try { sendError(cause); } catch (Throwable ignored) { } throw cause; } } @Override protected final void finalize() throws Throwable { close(); } }; } // Buffered output final OutputStream out = asOutputStream(); return new WritableByteChannel() { @Override public final boolean isOpen() { return !closed.get(); } @Override public final void close() throws IOException { out.flush(); out.close(); } @Override public final int write(ByteBuffer src) throws IOException { try { int len = src.remaining(); if (len > 0) { byte[] packet = new byte[len]; src.get(packet); out.write(packet); } return len; } catch (Throwable cause) { try { sendError(cause); } catch (Throwable ignored) { } throw cause; } } }; }
class class_name[name] begin[{] method[asWritableByteChannel, return_type[type[WritableByteChannel]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.packetSize], <, literal[2]]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=closed, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'public'}, name=isOpen, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=sendClose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'public'}, name=close, parameters=[], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=packet)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['Throwable']))], finally_block=None, label=None, resources=None), ThrowStatement(expression=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cause, types=['Throwable']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'final', 'public'}, name=write, parameters=[FormalParameter(annotations=[], modifiers=set(), name=src, type=ReferenceType(arguments=None, dimensions=[], name=ByteBuffer, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'protected'}, name=finalize, parameters=[], return_type=None, throws=['Throwable'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WritableByteChannel, sub_type=None))] else begin[{] None end[}] local_variable[type[OutputStream], out] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=closed, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'public'}, name=isOpen, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'public'}, name=close, parameters=[], return_type=None, throws=['IOException'], type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=packet)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=packet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['Throwable']))], finally_block=None, label=None, resources=None), ThrowStatement(expression=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cause, types=['Throwable']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'final', 'public'}, name=write, parameters=[FormalParameter(annotations=[], modifiers=set(), name=src, type=ReferenceType(arguments=None, dimensions=[], name=ByteBuffer, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WritableByteChannel, sub_type=None))] end[}] END[}]
Keyword[public] identifier[WritableByteChannel] identifier[asWritableByteChannel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[packetSize] operator[<] Other[2] operator[SEP] { Keyword[return] Keyword[new] identifier[WritableByteChannel] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[isOpen] operator[SEP] operator[SEP] { Keyword[return] operator[!] identifier[closed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[sendClose] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[int] identifier[write] operator[SEP] identifier[ByteBuffer] identifier[src] operator[SEP] { Keyword[try] { Keyword[int] identifier[len] operator[=] identifier[src] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[>] Other[0] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[packet] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[src] operator[SEP] identifier[get] operator[SEP] identifier[packet] operator[SEP] operator[SEP] identifier[sendData] operator[SEP] identifier[packet] operator[SEP] operator[SEP] } Keyword[return] identifier[len] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] { Keyword[try] { identifier[sendError] operator[SEP] identifier[cause] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ignored] operator[SEP] { } Keyword[throw] identifier[cause] operator[SEP] } } annotation[@] identifier[Override] Keyword[protected] Keyword[final] Keyword[void] identifier[finalize] operator[SEP] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[close] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] } Keyword[final] identifier[OutputStream] identifier[out] operator[=] identifier[asOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[WritableByteChannel] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[isOpen] operator[SEP] operator[SEP] { Keyword[return] operator[!] identifier[closed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[int] identifier[write] operator[SEP] identifier[ByteBuffer] identifier[src] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[int] identifier[len] operator[=] identifier[src] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[>] Other[0] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[packet] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[src] operator[SEP] identifier[get] operator[SEP] identifier[packet] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[packet] operator[SEP] operator[SEP] } Keyword[return] identifier[len] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] { Keyword[try] { identifier[sendError] operator[SEP] identifier[cause] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ignored] operator[SEP] { } Keyword[throw] identifier[cause] operator[SEP] } } } operator[SEP] }
protected static Properties loadConfig(URL url) { InputStream is = null; try { URLConnection connection = url.openConnection(); if(connection instanceof HttpURLConnection) { ((HttpURLConnection)connection).setConnectTimeout(2000); } is = connection.getInputStream(); return loadConfig(url.toString(), is); } catch (Exception ex) { throw new IllegalArgumentException("Failed to load configuration from [" + url + "]"); }finally { if(is!=null) try { is.close(); } catch (Exception ex) { /* No Op */ } } }
class class_name[name] begin[{] method[loadConfig, return_type[type[Properties]], modifier[static protected], parameter[url]] begin[{] local_variable[type[InputStream], is] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=openConnection, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), name=connection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URLConnection, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to load configuration from ["), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=is, 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=TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None))], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[static] identifier[Properties] identifier[loadConfig] operator[SEP] identifier[URL] identifier[url] operator[SEP] { identifier[InputStream] identifier[is] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[URLConnection] identifier[connection] operator[=] identifier[url] operator[SEP] identifier[openConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connection] Keyword[instanceof] identifier[HttpURLConnection] operator[SEP] { operator[SEP] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[setConnectTimeout] operator[SEP] Other[2000] operator[SEP] operator[SEP] } identifier[is] operator[=] identifier[connection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[loadConfig] operator[SEP] identifier[url] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[is] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[url] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[is] operator[!=] Other[null] operator[SEP] Keyword[try] { identifier[is] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { } } }
public ListConstraintsForPortfolioResult withConstraintDetails(ConstraintDetail... constraintDetails) { if (this.constraintDetails == null) { setConstraintDetails(new java.util.ArrayList<ConstraintDetail>(constraintDetails.length)); } for (ConstraintDetail ele : constraintDetails) { this.constraintDetails.add(ele); } return this; }
class class_name[name] begin[{] method[withConstraintDetails, return_type[type[ListConstraintsForPortfolioResult]], modifier[public], parameter[constraintDetails]] begin[{] if[binary_operation[THIS[member[None.constraintDetails]], ==, literal[null]]] begin[{] call[.setConstraintDetails, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=constraintDetails, 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=ConstraintDetail, 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=constraintDetails, 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=constraintDetails, 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=ConstraintDetail, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListConstraintsForPortfolioResult] identifier[withConstraintDetails] operator[SEP] identifier[ConstraintDetail] operator[...] identifier[constraintDetails] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[constraintDetails] operator[==] Other[null] operator[SEP] { identifier[setConstraintDetails] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ConstraintDetail] operator[>] operator[SEP] identifier[constraintDetails] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ConstraintDetail] identifier[ele] operator[:] identifier[constraintDetails] operator[SEP] { Keyword[this] operator[SEP] identifier[constraintDetails] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public boolean isAuditorEnabledForTransaction(AuditEventMessage msg) { CodedValueType transactionCode = EventUtils.getIHETransactionCodeFromMessage(msg); return isAuditorEnabledForTransaction(transactionCode); }
class class_name[name] begin[{] method[isAuditorEnabledForTransaction, return_type[type[boolean]], modifier[public], parameter[msg]] begin[{] local_variable[type[CodedValueType], transactionCode] return[call[.isAuditorEnabledForTransaction, parameter[member[.transactionCode]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isAuditorEnabledForTransaction] operator[SEP] identifier[AuditEventMessage] identifier[msg] operator[SEP] { identifier[CodedValueType] identifier[transactionCode] operator[=] identifier[EventUtils] operator[SEP] identifier[getIHETransactionCodeFromMessage] operator[SEP] identifier[msg] operator[SEP] operator[SEP] Keyword[return] identifier[isAuditorEnabledForTransaction] operator[SEP] identifier[transactionCode] operator[SEP] operator[SEP] }
public void warning(LintCategory lc, Warning warningKey) { report(diags.warning(lc, null, null, warningKey)); }
class class_name[name] begin[{] method[warning, return_type[void], modifier[public], parameter[lc, warningKey]] begin[{] call[.report, parameter[call[diags.warning, parameter[member[.lc], literal[null], literal[null], member[.warningKey]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[warning] operator[SEP] identifier[LintCategory] identifier[lc] , identifier[Warning] identifier[warningKey] operator[SEP] { identifier[report] operator[SEP] identifier[diags] operator[SEP] identifier[warning] operator[SEP] identifier[lc] , Other[null] , Other[null] , identifier[warningKey] operator[SEP] operator[SEP] operator[SEP] }
public Set<String> getChannelNames() { Set<String> ret = Collections.EMPTY_SET; JsonObject channels = getJsonObject(jsonConfig, "channels"); if (channels != null) { final Set<String> channelNames = channels.keySet(); if (channelNames != null && !channelNames.isEmpty()) { ret = new HashSet<>(channelNames); } } return ret; }
class class_name[name] begin[{] method[getChannelNames, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Set], ret] local_variable[type[JsonObject], channels] if[binary_operation[member[.channels], !=, literal[null]]] begin[{] local_variable[type[Set], channelNames] if[binary_operation[binary_operation[member[.channelNames], !=, literal[null]], &&, call[channelNames.isEmpty, parameter[]]]] begin[{] assign[member[.ret], ClassCreator(arguments=[MemberReference(member=channelNames, 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=HashSet, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[getChannelNames] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[ret] operator[=] identifier[Collections] operator[SEP] identifier[EMPTY_SET] operator[SEP] identifier[JsonObject] identifier[channels] operator[=] identifier[getJsonObject] operator[SEP] identifier[jsonConfig] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channels] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[channelNames] operator[=] identifier[channels] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channelNames] operator[!=] Other[null] operator[&&] operator[!] identifier[channelNames] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[ret] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[channelNames] operator[SEP] operator[SEP] } } Keyword[return] identifier[ret] operator[SEP] }
public <T> void removeListener(final Listener<T> listener, final Object instance) { final ListenerInstancePair<T> pair = new ListenerInstancePair<T>(listener, instance); this.listeners.remove(pair); for (final List<ListenerInstancePair<?>> entry : this.cachedListeners.values()) { entry.remove(pair); } }
class class_name[name] begin[{] method[removeListener, return_type[void], modifier[public], parameter[listener, instance]] begin[{] local_variable[type[ListenerInstancePair], pair] THIS[member[None.listeners]call[None.remove, parameter[member[.pair]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pair, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cachedListeners, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ListenerInstancePair, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None) end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[removeListener] operator[SEP] Keyword[final] identifier[Listener] operator[<] identifier[T] operator[>] identifier[listener] , Keyword[final] identifier[Object] identifier[instance] operator[SEP] { Keyword[final] identifier[ListenerInstancePair] operator[<] identifier[T] operator[>] identifier[pair] operator[=] Keyword[new] identifier[ListenerInstancePair] operator[<] identifier[T] operator[>] operator[SEP] identifier[listener] , identifier[instance] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[listeners] operator[SEP] identifier[remove] operator[SEP] identifier[pair] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[ListenerInstancePair] operator[<] operator[?] operator[>] operator[>] identifier[entry] operator[:] Keyword[this] operator[SEP] identifier[cachedListeners] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[entry] operator[SEP] identifier[remove] operator[SEP] identifier[pair] operator[SEP] operator[SEP] } }
@Override public void eUnset(int featureID) { switch (featureID) { case TypesPackage.JVM_MEMBER__DECLARING_TYPE: setDeclaringType((JvmDeclaredType)null); return; case TypesPackage.JVM_MEMBER__VISIBILITY: setVisibility(VISIBILITY_EDEFAULT); return; case TypesPackage.JVM_MEMBER__SIMPLE_NAME: setSimpleName(SIMPLE_NAME_EDEFAULT); return; case TypesPackage.JVM_MEMBER__DEPRECATED: unsetDeprecated(); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_MEMBER__DECLARING_TYPE, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=JvmDeclaredType, sub_type=None))], member=setDeclaringType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=JVM_MEMBER__VISIBILITY, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VISIBILITY_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVisibility, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=JVM_MEMBER__SIMPLE_NAME, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SIMPLE_NAME_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSimpleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=JVM_MEMBER__DEPRECATED, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=unsetDeprecated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_MEMBER__DECLARING_TYPE] operator[:] identifier[setDeclaringType] operator[SEP] operator[SEP] identifier[JvmDeclaredType] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_MEMBER__VISIBILITY] operator[:] identifier[setVisibility] operator[SEP] identifier[VISIBILITY_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_MEMBER__SIMPLE_NAME] operator[:] identifier[setSimpleName] operator[SEP] identifier[SIMPLE_NAME_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_MEMBER__DEPRECATED] operator[:] identifier[unsetDeprecated] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public void marshall(Eac3Settings eac3Settings, ProtocolMarshaller protocolMarshaller) { if (eac3Settings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(eac3Settings.getAttenuationControl(), ATTENUATIONCONTROL_BINDING); protocolMarshaller.marshall(eac3Settings.getBitrate(), BITRATE_BINDING); protocolMarshaller.marshall(eac3Settings.getBitstreamMode(), BITSTREAMMODE_BINDING); protocolMarshaller.marshall(eac3Settings.getCodingMode(), CODINGMODE_BINDING); protocolMarshaller.marshall(eac3Settings.getDcFilter(), DCFILTER_BINDING); protocolMarshaller.marshall(eac3Settings.getDialnorm(), DIALNORM_BINDING); protocolMarshaller.marshall(eac3Settings.getDynamicRangeCompressionLine(), DYNAMICRANGECOMPRESSIONLINE_BINDING); protocolMarshaller.marshall(eac3Settings.getDynamicRangeCompressionRf(), DYNAMICRANGECOMPRESSIONRF_BINDING); protocolMarshaller.marshall(eac3Settings.getLfeControl(), LFECONTROL_BINDING); protocolMarshaller.marshall(eac3Settings.getLfeFilter(), LFEFILTER_BINDING); protocolMarshaller.marshall(eac3Settings.getLoRoCenterMixLevel(), LOROCENTERMIXLEVEL_BINDING); protocolMarshaller.marshall(eac3Settings.getLoRoSurroundMixLevel(), LOROSURROUNDMIXLEVEL_BINDING); protocolMarshaller.marshall(eac3Settings.getLtRtCenterMixLevel(), LTRTCENTERMIXLEVEL_BINDING); protocolMarshaller.marshall(eac3Settings.getLtRtSurroundMixLevel(), LTRTSURROUNDMIXLEVEL_BINDING); protocolMarshaller.marshall(eac3Settings.getMetadataControl(), METADATACONTROL_BINDING); protocolMarshaller.marshall(eac3Settings.getPassthroughControl(), PASSTHROUGHCONTROL_BINDING); protocolMarshaller.marshall(eac3Settings.getPhaseControl(), PHASECONTROL_BINDING); protocolMarshaller.marshall(eac3Settings.getSampleRate(), SAMPLERATE_BINDING); protocolMarshaller.marshall(eac3Settings.getStereoDownmix(), STEREODOWNMIX_BINDING); protocolMarshaller.marshall(eac3Settings.getSurroundExMode(), SURROUNDEXMODE_BINDING); protocolMarshaller.marshall(eac3Settings.getSurroundMode(), SURROUNDMODE_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[eac3Settings, protocolMarshaller]] begin[{] if[binary_operation[member[.eac3Settings], ==, 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=getAttenuationControl, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=ATTENUATIONCONTROL_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=getBitrate, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=BITRATE_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=getBitstreamMode, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=BITSTREAMMODE_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=getCodingMode, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=CODINGMODE_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=getDcFilter, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=DCFILTER_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=getDialnorm, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=DIALNORM_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=getDynamicRangeCompressionLine, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=DYNAMICRANGECOMPRESSIONLINE_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=getDynamicRangeCompressionRf, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=DYNAMICRANGECOMPRESSIONRF_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=getLfeControl, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LFECONTROL_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=getLfeFilter, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LFEFILTER_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=getLoRoCenterMixLevel, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LOROCENTERMIXLEVEL_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=getLoRoSurroundMixLevel, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LOROSURROUNDMIXLEVEL_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=getLtRtCenterMixLevel, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LTRTCENTERMIXLEVEL_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=getLtRtSurroundMixLevel, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=LTRTSURROUNDMIXLEVEL_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=getMetadataControl, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=METADATACONTROL_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=getPassthroughControl, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=PASSTHROUGHCONTROL_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=getPhaseControl, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=PHASECONTROL_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=getSampleRate, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=SAMPLERATE_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=getStereoDownmix, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=STEREODOWNMIX_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=getSurroundExMode, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=SURROUNDEXMODE_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=getSurroundMode, postfix_operators=[], prefix_operators=[], qualifier=eac3Settings, selectors=[], type_arguments=None), MemberReference(member=SURROUNDMODE_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[Eac3Settings] identifier[eac3Settings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[eac3Settings] 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[eac3Settings] operator[SEP] identifier[getAttenuationControl] operator[SEP] operator[SEP] , identifier[ATTENUATIONCONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getBitrate] operator[SEP] operator[SEP] , identifier[BITRATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getBitstreamMode] operator[SEP] operator[SEP] , identifier[BITSTREAMMODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getCodingMode] operator[SEP] operator[SEP] , identifier[CODINGMODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getDcFilter] operator[SEP] operator[SEP] , identifier[DCFILTER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getDialnorm] operator[SEP] operator[SEP] , identifier[DIALNORM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getDynamicRangeCompressionLine] operator[SEP] operator[SEP] , identifier[DYNAMICRANGECOMPRESSIONLINE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getDynamicRangeCompressionRf] operator[SEP] operator[SEP] , identifier[DYNAMICRANGECOMPRESSIONRF_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLfeControl] operator[SEP] operator[SEP] , identifier[LFECONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLfeFilter] operator[SEP] operator[SEP] , identifier[LFEFILTER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLoRoCenterMixLevel] operator[SEP] operator[SEP] , identifier[LOROCENTERMIXLEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLoRoSurroundMixLevel] operator[SEP] operator[SEP] , identifier[LOROSURROUNDMIXLEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLtRtCenterMixLevel] operator[SEP] operator[SEP] , identifier[LTRTCENTERMIXLEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getLtRtSurroundMixLevel] operator[SEP] operator[SEP] , identifier[LTRTSURROUNDMIXLEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getMetadataControl] operator[SEP] operator[SEP] , identifier[METADATACONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getPassthroughControl] operator[SEP] operator[SEP] , identifier[PASSTHROUGHCONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getPhaseControl] operator[SEP] operator[SEP] , identifier[PHASECONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getSampleRate] operator[SEP] operator[SEP] , identifier[SAMPLERATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getStereoDownmix] operator[SEP] operator[SEP] , identifier[STEREODOWNMIX_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getSurroundExMode] operator[SEP] operator[SEP] , identifier[SURROUNDEXMODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[eac3Settings] operator[SEP] identifier[getSurroundMode] operator[SEP] operator[SEP] , identifier[SURROUNDMODE_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] } }
static public URI parseToURI(final String u) throws URISyntaxException { StringBuilder buf = new StringBuilder(); int i = 0; while(i < u.length()) { char c = u.charAt(i); if(c == '\\') { if(i + 1 == u.length()) throw new URISyntaxException(u, "Trailing '\' at end of url"); buf.append("%5c"); i++; c = u.charAt(i); buf.append(String.format("%%%02x", (int) c)); } else buf.append(c); i++; } return new URI(buf.toString()); }
class class_name[name] begin[{] method[parseToURI, return_type[type[URI]], modifier[public static], parameter[u]] begin[{] local_variable[type[StringBuilder], buf] local_variable[type[int], i] while[binary_operation[member[.i], <, call[u.length, parameter[]]]] begin[{] local_variable[type[char], c] if[binary_operation[member[.c], ==, literal['\\']]] begin[{] if[binary_operation[binary_operation[member[.i], +, literal[1]], ==, call[u.length, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Trailing '\' at end of url")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URISyntaxException, sub_type=None)), label=None) else begin[{] None end[}] call[buf.append, parameter[literal["%5c"]]] member[.i] assign[member[.c], call[u.charAt, parameter[member[.i]]]] call[buf.append, parameter[call[String.format, parameter[literal["%%%02x"], Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))]]]] else begin[{] call[buf.append, parameter[member[.c]]] end[}] member[.i] end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URI, sub_type=None))] end[}] END[}]
Keyword[static] Keyword[public] identifier[URI] identifier[parseToURI] operator[SEP] Keyword[final] identifier[String] identifier[u] operator[SEP] Keyword[throws] identifier[URISyntaxException] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[u] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[u] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[+] Other[1] operator[==] identifier[u] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[URISyntaxException] operator[SEP] identifier[u] , literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[c] operator[=] identifier[u] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[return] Keyword[new] identifier[URI] operator[SEP] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
static Point2d intersection(final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2) { final Vector2d p1End = sum(p1, d1); final Vector2d p2End = sum(p2, d2); return intersection(p1.x, p1.y, p1End.x, p1End.y, p2.x, p2.y, p2End.x, p2End.y); }
class class_name[name] begin[{] method[intersection, return_type[type[Point2d]], modifier[static], parameter[p1, d1, p2, d2]] begin[{] local_variable[type[Vector2d], p1End] local_variable[type[Vector2d], p2End] return[call[.intersection, parameter[member[p1.x], member[p1.y], member[p1End.x], member[p1End.y], member[p2.x], member[p2.y], member[p2End.x], member[p2End.y]]]] end[}] END[}]
Keyword[static] identifier[Point2d] identifier[intersection] operator[SEP] Keyword[final] identifier[Tuple2d] identifier[p1] , Keyword[final] identifier[Tuple2d] identifier[d1] , Keyword[final] identifier[Tuple2d] identifier[p2] , Keyword[final] identifier[Tuple2d] identifier[d2] operator[SEP] { Keyword[final] identifier[Vector2d] identifier[p1End] operator[=] identifier[sum] operator[SEP] identifier[p1] , identifier[d1] operator[SEP] operator[SEP] Keyword[final] identifier[Vector2d] identifier[p2End] operator[=] identifier[sum] operator[SEP] identifier[p2] , identifier[d2] operator[SEP] operator[SEP] Keyword[return] identifier[intersection] operator[SEP] identifier[p1] operator[SEP] identifier[x] , identifier[p1] operator[SEP] identifier[y] , identifier[p1End] operator[SEP] identifier[x] , identifier[p1End] operator[SEP] identifier[y] , identifier[p2] operator[SEP] identifier[x] , identifier[p2] operator[SEP] identifier[y] , identifier[p2End] operator[SEP] identifier[x] , identifier[p2End] operator[SEP] identifier[y] operator[SEP] operator[SEP] }
@Override public int removeProperties(String pattern, Character escape) throws Exception { if (pattern == null) throw new NullPointerException("pattern"); int count = 0; TransactionController tranController = new TransactionController(); try { tranController.preInvoke(); count = taskStore.removeProperties(Utils.normalizeString(pattern), escape); } catch (Throwable x) { tranController.setFailure(x); } finally { Exception x = tranController.postInvoke(Exception.class); if (x != null) throw x; } return count; }
class class_name[name] begin[{] method[removeProperties, return_type[type[int]], modifier[public], parameter[pattern, escape]] begin[{] if[binary_operation[member[.pattern], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pattern")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], count] local_variable[type[TransactionController], tranController] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=preInvoke, postfix_operators=[], prefix_operators=[], qualifier=tranController, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=normalizeString, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), MemberReference(member=escape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeProperties, postfix_operators=[], prefix_operators=[], qualifier=taskStore, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFailure, postfix_operators=[], prefix_operators=[], qualifier=tranController, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['Throwable']))], finally_block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None))], member=postInvoke, postfix_operators=[], prefix_operators=[], qualifier=tranController, selectors=[], type_arguments=None), name=x)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Exception, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, 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=ThrowStatement(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))], label=None, resources=None) return[member[.count]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[removeProperties] operator[SEP] identifier[String] identifier[pattern] , identifier[Character] identifier[escape] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[pattern] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[TransactionController] identifier[tranController] operator[=] Keyword[new] identifier[TransactionController] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[tranController] operator[SEP] identifier[preInvoke] operator[SEP] operator[SEP] operator[SEP] identifier[count] operator[=] identifier[taskStore] operator[SEP] identifier[removeProperties] operator[SEP] identifier[Utils] operator[SEP] identifier[normalizeString] operator[SEP] identifier[pattern] operator[SEP] , identifier[escape] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[x] operator[SEP] { identifier[tranController] operator[SEP] identifier[setFailure] operator[SEP] identifier[x] operator[SEP] operator[SEP] } Keyword[finally] { identifier[Exception] identifier[x] operator[=] identifier[tranController] operator[SEP] identifier[postInvoke] operator[SEP] identifier[Exception] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[x] operator[!=] Other[null] operator[SEP] Keyword[throw] identifier[x] operator[SEP] } Keyword[return] identifier[count] operator[SEP] }
public Nodejs overwrite(final boolean overwrite) { if (overwrite) { this.coptions = EnumSet.of(StandardCopyOption.REPLACE_EXISTING); } else { this.coptions = Collections.emptySet(); } return this; }
class class_name[name] begin[{] method[overwrite, return_type[type[Nodejs]], modifier[public], parameter[overwrite]] begin[{] if[member[.overwrite]] begin[{] assign[THIS[member[None.coptions]], call[EnumSet.of, parameter[member[StandardCopyOption.REPLACE_EXISTING]]]] else begin[{] assign[THIS[member[None.coptions]], call[Collections.emptySet, parameter[]]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Nodejs] identifier[overwrite] operator[SEP] Keyword[final] Keyword[boolean] identifier[overwrite] operator[SEP] { Keyword[if] operator[SEP] identifier[overwrite] operator[SEP] { Keyword[this] operator[SEP] identifier[coptions] operator[=] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[StandardCopyOption] operator[SEP] identifier[REPLACE_EXISTING] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[coptions] operator[=] identifier[Collections] operator[SEP] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Beta public <R, E extends Exception, E2 extends Exception> void flatMapThenForEach(final Try.Function<? super T, ? extends Collection<? extends R>, E> mapper, final Try.Consumer<? super R, E2> action) throws E, E2 { N.checkArgNotNull(mapper); N.checkArgNotNull(action); Collection<? extends R> c = null; for (T e : coll) { c = mapper.apply(e); if (N.notNullOrEmpty(c)) { for (R r : c) { action.accept(r); } } } }
class class_name[name] begin[{] method[flatMapThenForEach, return_type[void], modifier[public], parameter[mapper, action]] begin[{] call[N.checkArgNotNull, parameter[member[.mapper]]] call[N.checkArgNotNull, parameter[member[.action]]] local_variable[type[Collection], c] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=mapper, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notNullOrEmpty, postfix_operators=[], prefix_operators=[], qualifier=N, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=r)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=coll, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Beta] Keyword[public] operator[<] identifier[R] , identifier[E] Keyword[extends] identifier[Exception] , identifier[E2] Keyword[extends] identifier[Exception] operator[>] Keyword[void] identifier[flatMapThenForEach] operator[SEP] Keyword[final] identifier[Try] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] , identifier[E] operator[>] identifier[mapper] , Keyword[final] identifier[Try] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[R] , identifier[E2] operator[>] identifier[action] operator[SEP] Keyword[throws] identifier[E] , identifier[E2] { identifier[N] operator[SEP] identifier[checkArgNotNull] operator[SEP] identifier[mapper] operator[SEP] operator[SEP] identifier[N] operator[SEP] identifier[checkArgNotNull] operator[SEP] identifier[action] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] identifier[c] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[e] operator[:] identifier[coll] operator[SEP] { identifier[c] operator[=] identifier[mapper] operator[SEP] identifier[apply] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[notNullOrEmpty] operator[SEP] identifier[c] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[R] identifier[r] operator[:] identifier[c] operator[SEP] { identifier[action] operator[SEP] identifier[accept] operator[SEP] identifier[r] operator[SEP] operator[SEP] } } } }
public static AtomixConfig config(ClassLoader classLoader, String... files) { return config(classLoader, Stream.of(files).map(File::new).collect(Collectors.toList()), AtomixRegistry.registry(classLoader)); }
class class_name[name] begin[{] method[config, return_type[type[AtomixConfig]], modifier[public static], parameter[classLoader, files]] begin[{] return[call[.config, parameter[member[.classLoader], call[Stream.of, parameter[member[.files]]], call[AtomixRegistry.registry, parameter[member[.classLoader]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AtomixConfig] identifier[config] operator[SEP] identifier[ClassLoader] identifier[classLoader] , identifier[String] operator[...] identifier[files] operator[SEP] { Keyword[return] identifier[config] operator[SEP] identifier[classLoader] , identifier[Stream] operator[SEP] identifier[of] operator[SEP] identifier[files] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[File] operator[::] Keyword[new] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] , identifier[AtomixRegistry] operator[SEP] identifier[registry] operator[SEP] identifier[classLoader] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings({ "unchecked" }) protected final <D> D nullSafeValue(JsonNode jsonNode, Class<D> type) { Assert.notNull(type, "Type must not be null"); if (jsonNode == null) { return null; } if (type == String.class) { return (D) jsonNode.textValue(); } if (type == Boolean.class) { return (D) Boolean.valueOf(jsonNode.booleanValue()); } if (type == Long.class) { return (D) Long.valueOf(jsonNode.longValue()); } if (type == Integer.class) { return (D) Integer.valueOf(jsonNode.intValue()); } if (type == Short.class) { return (D) Short.valueOf(jsonNode.shortValue()); } if (type == Double.class) { return (D) Double.valueOf(jsonNode.doubleValue()); } if (type == Float.class) { return (D) Float.valueOf(jsonNode.floatValue()); } if (type == BigDecimal.class) { return (D) jsonNode.decimalValue(); } if (type == BigInteger.class) { return (D) jsonNode.bigIntegerValue(); } throw new IllegalArgumentException("Unsupported value type " + type.getName()); }
class class_name[name] begin[{] method[nullSafeValue, return_type[type[D]], modifier[final protected], parameter[jsonNode, type]] begin[{] call[Assert.notNull, parameter[member[.type], literal["Type must not be null"]]] if[binary_operation[member[.jsonNode], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=textValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=booleanValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=longValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=shortValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Short, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=doubleValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Float, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=floatValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Float, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=decimalValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None))]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=bigIntegerValue, postfix_operators=[], prefix_operators=[], qualifier=jsonNode, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported value type "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] Keyword[protected] Keyword[final] operator[<] identifier[D] operator[>] identifier[D] identifier[nullSafeValue] operator[SEP] identifier[JsonNode] identifier[jsonNode] , identifier[Class] operator[<] identifier[D] operator[>] identifier[type] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[type] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jsonNode] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[String] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[jsonNode] operator[SEP] identifier[textValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Boolean] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Long] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Integer] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Short] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Short] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Double] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[Float] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[Float] operator[SEP] identifier[valueOf] operator[SEP] identifier[jsonNode] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BigDecimal] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[jsonNode] operator[SEP] identifier[decimalValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BigInteger] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[D] operator[SEP] identifier[jsonNode] operator[SEP] identifier[bigIntegerValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public AnnotationValueImpl addAnnotationValue(String name, String enumClassName, String enumName) { AnnotationValueImpl annotationValue = new AnnotationValueImpl(enumClassName, enumName); addAnnotationValue(name, annotationValue); return annotationValue; }
class class_name[name] begin[{] method[addAnnotationValue, return_type[type[AnnotationValueImpl]], modifier[public], parameter[name, enumClassName, enumName]] begin[{] local_variable[type[AnnotationValueImpl], annotationValue] call[.addAnnotationValue, parameter[member[.name], member[.annotationValue]]] return[member[.annotationValue]] end[}] END[}]
Keyword[public] identifier[AnnotationValueImpl] identifier[addAnnotationValue] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[enumClassName] , identifier[String] identifier[enumName] operator[SEP] { identifier[AnnotationValueImpl] identifier[annotationValue] operator[=] Keyword[new] identifier[AnnotationValueImpl] operator[SEP] identifier[enumClassName] , identifier[enumName] operator[SEP] operator[SEP] identifier[addAnnotationValue] operator[SEP] identifier[name] , identifier[annotationValue] operator[SEP] operator[SEP] Keyword[return] identifier[annotationValue] operator[SEP] }
@BetaApi public final Operation resetInstance(String instance) { ResetInstanceHttpRequest request = ResetInstanceHttpRequest.newBuilder().setInstance(instance).build(); return resetInstance(request); }
class class_name[name] begin[{] method[resetInstance, return_type[type[Operation]], modifier[final public], parameter[instance]] begin[{] local_variable[type[ResetInstanceHttpRequest], request] return[call[.resetInstance, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[resetInstance] operator[SEP] identifier[String] identifier[instance] operator[SEP] { identifier[ResetInstanceHttpRequest] identifier[request] operator[=] identifier[ResetInstanceHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setInstance] operator[SEP] identifier[instance] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[resetInstance] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@SafeVarargs public static <T> T[] append(T[] buffer, T... newElements) { if(isEmpty(buffer)) { return newElements; } return insert(buffer, buffer.length, newElements); }
class class_name[name] begin[{] method[append, return_type[type[T]], modifier[public static], parameter[buffer, newElements]] begin[{] if[call[.isEmpty, parameter[member[.buffer]]]] begin[{] return[member[.newElements]] else begin[{] None end[}] return[call[.insert, parameter[member[.buffer], member[buffer.length], member[.newElements]]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[buffer] , identifier[T] operator[...] identifier[newElements] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] { Keyword[return] identifier[newElements] operator[SEP] } Keyword[return] identifier[insert] operator[SEP] identifier[buffer] , identifier[buffer] operator[SEP] identifier[length] , identifier[newElements] operator[SEP] operator[SEP] }
public static void collectPayPalDeviceData(final BraintreeFragment fragment, final BraintreeResponseListener<String> listener) { final JSONObject deviceData = new JSONObject(); try { String clientMetadataId = getPayPalClientMetadataId(fragment.getApplicationContext()); if (!TextUtils.isEmpty(clientMetadataId)) { deviceData.put(CORRELATION_ID_KEY, clientMetadataId); } } catch (JSONException ignored) {} listener.onResponse(deviceData.toString()); }
class class_name[name] begin[{] method[collectPayPalDeviceData, return_type[void], modifier[public static], parameter[fragment, listener]] begin[{] local_variable[type[JSONObject], deviceData] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getApplicationContext, postfix_operators=[], prefix_operators=[], qualifier=fragment, selectors=[], type_arguments=None)], member=getPayPalClientMetadataId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=clientMetadataId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=clientMetadataId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=TextUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CORRELATION_ID_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clientMetadataId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=deviceData, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['JSONException']))], finally_block=None, label=None, resources=None) call[listener.onResponse, parameter[call[deviceData.toString, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[collectPayPalDeviceData] operator[SEP] Keyword[final] identifier[BraintreeFragment] identifier[fragment] , Keyword[final] identifier[BraintreeResponseListener] operator[<] identifier[String] operator[>] identifier[listener] operator[SEP] { Keyword[final] identifier[JSONObject] identifier[deviceData] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[clientMetadataId] operator[=] identifier[getPayPalClientMetadataId] operator[SEP] identifier[fragment] operator[SEP] identifier[getApplicationContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[clientMetadataId] operator[SEP] operator[SEP] { identifier[deviceData] operator[SEP] identifier[put] operator[SEP] identifier[CORRELATION_ID_KEY] , identifier[clientMetadataId] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[JSONException] identifier[ignored] operator[SEP] { } identifier[listener] operator[SEP] identifier[onResponse] operator[SEP] identifier[deviceData] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private NamingEnumeration<SearchResult> checkSearchCache(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws WIMException { final String METHODNAME = "checkSearchCache"; NamingEnumeration<SearchResult> neu = null; if (getSearchResultsCache() != null) { String key = null; if (filterArgs == null) { key = toKey(name, filterExpr, cons); } else { key = toKey(name, filterExpr, filterArgs, cons); } CachedNamingEnumeration cached = (CachedNamingEnumeration) getSearchResultsCache().get(key); if (cached == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, METHODNAME + " Miss cache: " + key); } neu = search(name, filterExpr, filterArgs, cons, null); String[] reqAttrIds = cons.getReturningAttributes(); neu = updateSearchCache(name, key, neu, reqAttrIds); } else { if (tc.isDebugEnabled()) { Tr.debug(tc, METHODNAME + " Hit cache: " + key); } neu = (CachedNamingEnumeration) cached.clone(); } } else { neu = search(name, filterExpr, filterArgs, cons, null); } return neu; }
class class_name[name] begin[{] method[checkSearchCache, return_type[type[NamingEnumeration]], modifier[private], parameter[name, filterExpr, filterArgs, cons]] begin[{] local_variable[type[String], METHODNAME] local_variable[type[NamingEnumeration], neu] if[binary_operation[call[.getSearchResultsCache, parameter[]], !=, literal[null]]] begin[{] local_variable[type[String], key] if[binary_operation[member[.filterArgs], ==, literal[null]]] begin[{] assign[member[.key], call[.toKey, parameter[member[.name], member[.filterExpr], member[.cons]]]] else begin[{] assign[member[.key], call[.toKey, parameter[member[.name], member[.filterExpr], member[.filterArgs], member[.cons]]]] end[}] local_variable[type[CachedNamingEnumeration], cached] if[binary_operation[member[.cached], ==, literal[null]]] begin[{] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[member[.METHODNAME], +, literal[" Miss cache: "]], +, member[.key]]]] else begin[{] None end[}] assign[member[.neu], call[.search, parameter[member[.name], member[.filterExpr], member[.filterArgs], member[.cons], literal[null]]]] local_variable[type[String], reqAttrIds] assign[member[.neu], call[.updateSearchCache, parameter[member[.name], member[.key], member[.neu], member[.reqAttrIds]]]] else begin[{] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[member[.METHODNAME], +, literal[" Hit cache: "]], +, member[.key]]]] else begin[{] None end[}] assign[member[.neu], Cast(expression=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=cached, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CachedNamingEnumeration, sub_type=None))] end[}] else begin[{] assign[member[.neu], call[.search, parameter[member[.name], member[.filterExpr], member[.filterArgs], member[.cons], literal[null]]]] end[}] return[member[.neu]] end[}] END[}]
Keyword[private] identifier[NamingEnumeration] operator[<] identifier[SearchResult] operator[>] identifier[checkSearchCache] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[filterExpr] , identifier[Object] operator[SEP] operator[SEP] identifier[filterArgs] , identifier[SearchControls] identifier[cons] operator[SEP] Keyword[throws] identifier[WIMException] { Keyword[final] identifier[String] identifier[METHODNAME] operator[=] literal[String] operator[SEP] identifier[NamingEnumeration] operator[<] identifier[SearchResult] operator[>] identifier[neu] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[getSearchResultsCache] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[key] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[filterArgs] operator[==] Other[null] operator[SEP] { identifier[key] operator[=] identifier[toKey] operator[SEP] identifier[name] , identifier[filterExpr] , identifier[cons] operator[SEP] operator[SEP] } Keyword[else] { identifier[key] operator[=] identifier[toKey] operator[SEP] identifier[name] , identifier[filterExpr] , identifier[filterArgs] , identifier[cons] operator[SEP] operator[SEP] } identifier[CachedNamingEnumeration] identifier[cached] operator[=] operator[SEP] identifier[CachedNamingEnumeration] operator[SEP] identifier[getSearchResultsCache] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cached] operator[==] Other[null] 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] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP] } identifier[neu] operator[=] identifier[search] operator[SEP] identifier[name] , identifier[filterExpr] , identifier[filterArgs] , identifier[cons] , Other[null] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[reqAttrIds] operator[=] identifier[cons] operator[SEP] identifier[getReturningAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[neu] operator[=] identifier[updateSearchCache] operator[SEP] identifier[name] , identifier[key] , identifier[neu] , identifier[reqAttrIds] operator[SEP] operator[SEP] } Keyword[else] { 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] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP] } identifier[neu] operator[=] operator[SEP] identifier[CachedNamingEnumeration] operator[SEP] identifier[cached] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[neu] operator[=] identifier[search] operator[SEP] identifier[name] , identifier[filterExpr] , identifier[filterArgs] , identifier[cons] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[neu] operator[SEP] }
public void restore(String state) { JsonObject json = JsonObject.readFrom(state); String accessToken = json.get("accessToken").asString(); String refreshToken = json.get("refreshToken").asString(); long lastRefresh = json.get("lastRefresh").asLong(); long expires = json.get("expires").asLong(); String userAgent = json.get("userAgent").asString(); String tokenURL = json.get("tokenURL").asString(); String baseURL = json.get("baseURL").asString(); String baseUploadURL = json.get("baseUploadURL").asString(); boolean autoRefresh = json.get("autoRefresh").asBoolean(); int maxRequestAttempts = json.get("maxRequestAttempts").asInt(); this.accessToken = accessToken; this.refreshToken = refreshToken; this.lastRefresh = lastRefresh; this.expires = expires; this.userAgent = userAgent; this.tokenURL = tokenURL; this.baseURL = baseURL; this.baseUploadURL = baseUploadURL; this.autoRefresh = autoRefresh; this.maxRequestAttempts = maxRequestAttempts; }
class class_name[name] begin[{] method[restore, return_type[void], modifier[public], parameter[state]] begin[{] local_variable[type[JsonObject], json] local_variable[type[String], accessToken] local_variable[type[String], refreshToken] local_variable[type[long], lastRefresh] local_variable[type[long], expires] local_variable[type[String], userAgent] local_variable[type[String], tokenURL] local_variable[type[String], baseURL] local_variable[type[String], baseUploadURL] local_variable[type[boolean], autoRefresh] local_variable[type[int], maxRequestAttempts] assign[THIS[member[None.accessToken]], member[.accessToken]] assign[THIS[member[None.refreshToken]], member[.refreshToken]] assign[THIS[member[None.lastRefresh]], member[.lastRefresh]] assign[THIS[member[None.expires]], member[.expires]] assign[THIS[member[None.userAgent]], member[.userAgent]] assign[THIS[member[None.tokenURL]], member[.tokenURL]] assign[THIS[member[None.baseURL]], member[.baseURL]] assign[THIS[member[None.baseUploadURL]], member[.baseUploadURL]] assign[THIS[member[None.autoRefresh]], member[.autoRefresh]] assign[THIS[member[None.maxRequestAttempts]], member[.maxRequestAttempts]] end[}] END[}]
Keyword[public] Keyword[void] identifier[restore] operator[SEP] identifier[String] identifier[state] operator[SEP] { identifier[JsonObject] identifier[json] operator[=] identifier[JsonObject] operator[SEP] identifier[readFrom] operator[SEP] identifier[state] operator[SEP] operator[SEP] identifier[String] identifier[accessToken] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[refreshToken] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[lastRefresh] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asLong] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[expires] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asLong] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[userAgent] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[tokenURL] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[baseURL] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[baseUploadURL] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[autoRefresh] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asBoolean] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[maxRequestAttempts] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[accessToken] operator[=] identifier[accessToken] operator[SEP] Keyword[this] operator[SEP] identifier[refreshToken] operator[=] identifier[refreshToken] operator[SEP] Keyword[this] operator[SEP] identifier[lastRefresh] operator[=] identifier[lastRefresh] operator[SEP] Keyword[this] operator[SEP] identifier[expires] operator[=] identifier[expires] operator[SEP] Keyword[this] operator[SEP] identifier[userAgent] operator[=] identifier[userAgent] operator[SEP] Keyword[this] operator[SEP] identifier[tokenURL] operator[=] identifier[tokenURL] operator[SEP] Keyword[this] operator[SEP] identifier[baseURL] operator[=] identifier[baseURL] operator[SEP] Keyword[this] operator[SEP] identifier[baseUploadURL] operator[=] identifier[baseUploadURL] operator[SEP] Keyword[this] operator[SEP] identifier[autoRefresh] operator[=] identifier[autoRefresh] operator[SEP] Keyword[this] operator[SEP] identifier[maxRequestAttempts] operator[=] identifier[maxRequestAttempts] operator[SEP] }
public int compareTo(Version v) { if (this == v) return 0; int diff = major - v.major; if (diff != 0) return diff; diff = minor - v.minor; if (diff != 0) return diff; diff = micro - v.micro; if (diff != 0) return diff; return qualifier.compareTo(v.qualifier); }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[v]] begin[{] if[binary_operation[THIS[], ==, member[.v]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[int], diff] if[binary_operation[member[.diff], !=, literal[0]]] begin[{] return[member[.diff]] else begin[{] None end[}] assign[member[.diff], binary_operation[member[.minor], -, member[v.minor]]] if[binary_operation[member[.diff], !=, literal[0]]] begin[{] return[member[.diff]] else begin[{] None end[}] assign[member[.diff], binary_operation[member[.micro], -, member[v.micro]]] if[binary_operation[member[.diff], !=, literal[0]]] begin[{] return[member[.diff]] else begin[{] None end[}] return[call[qualifier.compareTo, parameter[member[v.qualifier]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Version] identifier[v] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[v] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[int] identifier[diff] operator[=] identifier[major] operator[-] identifier[v] operator[SEP] identifier[major] operator[SEP] Keyword[if] operator[SEP] identifier[diff] operator[!=] Other[0] operator[SEP] Keyword[return] identifier[diff] operator[SEP] identifier[diff] operator[=] identifier[minor] operator[-] identifier[v] operator[SEP] identifier[minor] operator[SEP] Keyword[if] operator[SEP] identifier[diff] operator[!=] Other[0] operator[SEP] Keyword[return] identifier[diff] operator[SEP] identifier[diff] operator[=] identifier[micro] operator[-] identifier[v] operator[SEP] identifier[micro] operator[SEP] Keyword[if] operator[SEP] identifier[diff] operator[!=] Other[0] operator[SEP] Keyword[return] identifier[diff] operator[SEP] Keyword[return] identifier[qualifier] operator[SEP] identifier[compareTo] operator[SEP] identifier[v] operator[SEP] identifier[qualifier] operator[SEP] operator[SEP] }
public final String rewriteXml( Node xmlDoc, String aloneTags[], boolean outputXmlHeader ) { try { StringWriter sOut = new StringWriter(); rewriteXml( sOut, xmlDoc, aloneTags, outputXmlHeader ); return sOut.toString(); } catch (Exception e) { e.printStackTrace(); return null; } }
class class_name[name] begin[{] method[rewriteXml, return_type[type[String]], modifier[final public], parameter[xmlDoc, aloneTags, outputXmlHeader]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)), name=sOut)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringWriter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=xmlDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=aloneTags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputXmlHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rewriteXml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sOut, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, 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[final] identifier[String] identifier[rewriteXml] operator[SEP] identifier[Node] identifier[xmlDoc] , identifier[String] identifier[aloneTags] operator[SEP] operator[SEP] , Keyword[boolean] identifier[outputXmlHeader] operator[SEP] { Keyword[try] { identifier[StringWriter] identifier[sOut] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] identifier[rewriteXml] operator[SEP] identifier[sOut] , identifier[xmlDoc] , identifier[aloneTags] , identifier[outputXmlHeader] operator[SEP] operator[SEP] Keyword[return] identifier[sOut] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
@Override public void invoke() throws Exception { if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Start task code.")); } // whatever happens in this scope, make sure that the local strategies are cleaned up! // note that the initialization of the local strategies is in the try-finally block as well, // so that the thread that creates them catches its own errors that may happen in that process. // this is especially important, since there may be asynchronous closes (such as through canceling). try { // initialize the serializers (one per channel) of the record writers initOutputWriters(this.eventualOutputs); // initialize the remaining data structures on the input and trigger the local processing // the local processing includes building the dams / caches try { int numInputs = driver.getNumberOfInputs(); int numBroadcastInputs = this.config.getNumBroadcastInputs(); initInputsSerializersAndComparators(numInputs); initBroadcastInputsSerializers(numBroadcastInputs); // set the iterative status for inputs and broadcast inputs { List<Integer> iterativeInputs = new ArrayList<Integer>(); for (int i = 0; i < numInputs; i++) { final int numberOfEventsUntilInterrupt = getTaskConfig().getNumberOfEventsUntilInterruptInIterativeGate(i); if (numberOfEventsUntilInterrupt < 0) { throw new IllegalArgumentException(); } else if (numberOfEventsUntilInterrupt > 0) { this.inputReaders[i].setIterative(numberOfEventsUntilInterrupt); iterativeInputs.add(i); if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Input [" + i + "] reads in supersteps with [" + + numberOfEventsUntilInterrupt + "] event(s) till next superstep.")); } } } this.iterativeInputs = asArray(iterativeInputs); } { List<Integer> iterativeBcInputs = new ArrayList<Integer>(); for (int i = 0; i < numBroadcastInputs; i++) { final int numberOfEventsUntilInterrupt = getTaskConfig().getNumberOfEventsUntilInterruptInIterativeBroadcastGate(i); if (numberOfEventsUntilInterrupt < 0) { throw new IllegalArgumentException(); } else if (numberOfEventsUntilInterrupt > 0) { this.broadcastInputReaders[i].setIterative(numberOfEventsUntilInterrupt); iterativeBcInputs.add(i); if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Broadcast input [" + i + "] reads in supersteps with [" + + numberOfEventsUntilInterrupt + "] event(s) till next superstep.")); } } } this.iterativeBroadcastInputs = asArray(iterativeBcInputs); } initLocalStrategies(numInputs); } catch (Exception e) { throw new RuntimeException("Initializing the input processing failed" + e.getMessage() == null ? "." : ": " + e.getMessage(), e); } if (!this.running) { if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Task cancelled before task code was started.")); } return; } // pre main-function initialization initialize(); // read the broadcast variables for (int i = 0; i < this.config.getNumBroadcastInputs(); i++) { final String name = this.config.getBroadcastInputName(i); readAndSetBroadcastInput(i, name, this.runtimeUdfContext); } // the work goes here run(); } finally { // clean up in any case! closeLocalStrategiesAndCaches(); } if (this.running) { if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Finished task code.")); } } else { if (LOG.isDebugEnabled()) { LOG.debug(formatLogString("Task code cancelled.")); } } }
class class_name[name] begin[{] method[invoke, return_type[void], modifier[public], parameter[]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[call[.formatLogString, parameter[literal["Start task code."]]]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=eventualOutputs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=initOutputWriters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNumberOfInputs, postfix_operators=[], prefix_operators=[], qualifier=driver, selectors=[], type_arguments=None), name=numInputs)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getNumBroadcastInputs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=numBroadcastInputs)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=numInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initInputsSerializersAndComparators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=numBroadcastInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initBroadcastInputsSerializers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=iterativeInputs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTaskConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNumberOfEventsUntilInterruptInIterativeGate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=numberOfEventsUntilInterrupt)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=inputReaders, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setIterative, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=iterativeInputs, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Input ["), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] reads in supersteps with ["), operator=+), operandr=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=['+'], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] event(s) till next superstep."), operator=+)], member=formatLogString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numInputs, 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), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=iterativeInputs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=iterativeInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=iterativeBcInputs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTaskConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNumberOfEventsUntilInterruptInIterativeBroadcastGate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=numberOfEventsUntilInterrupt)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=broadcastInputReaders, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setIterative, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=iterativeBcInputs, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Broadcast input ["), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] reads in supersteps with ["), operator=+), operandr=MemberReference(member=numberOfEventsUntilInterrupt, postfix_operators=[], prefix_operators=['+'], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] event(s) till next superstep."), operator=+)], member=formatLogString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numBroadcastInputs, 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), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=iterativeBroadcastInputs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=iterativeBcInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=numInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initLocalStrategies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Initializing the input processing failed"), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=This(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MemberReference(member=running, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Task cancelled before task code was started.")], member=formatLogString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBroadcastInputName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=name)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=runtimeUdfContext, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=readAndSetBroadcastInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getNumBroadcastInputs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=run, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=closeLocalStrategiesAndCaches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) if[THIS[member[None.running]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[call[.formatLogString, parameter[literal["Finished task code."]]]]] else begin[{] None end[}] else begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[call[.formatLogString, parameter[literal["Task code cancelled."]]]]] else begin[{] None end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[invoke] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[initOutputWriters] operator[SEP] Keyword[this] operator[SEP] identifier[eventualOutputs] operator[SEP] operator[SEP] Keyword[try] { Keyword[int] identifier[numInputs] operator[=] identifier[driver] operator[SEP] identifier[getNumberOfInputs] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numBroadcastInputs] operator[=] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getNumBroadcastInputs] operator[SEP] operator[SEP] operator[SEP] identifier[initInputsSerializersAndComparators] operator[SEP] identifier[numInputs] operator[SEP] operator[SEP] identifier[initBroadcastInputsSerializers] operator[SEP] identifier[numBroadcastInputs] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Integer] operator[>] identifier[iterativeInputs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numInputs] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[numberOfEventsUntilInterrupt] operator[=] identifier[getTaskConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getNumberOfEventsUntilInterruptInIterativeGate] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[>] Other[0] operator[SEP] { Keyword[this] operator[SEP] identifier[inputReaders] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setIterative] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[SEP] operator[SEP] identifier[iterativeInputs] operator[SEP] identifier[add] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] operator[+] identifier[numberOfEventsUntilInterrupt] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[this] operator[SEP] identifier[iterativeInputs] operator[=] identifier[asArray] operator[SEP] identifier[iterativeInputs] operator[SEP] operator[SEP] } { identifier[List] operator[<] identifier[Integer] operator[>] identifier[iterativeBcInputs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numBroadcastInputs] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[numberOfEventsUntilInterrupt] operator[=] identifier[getTaskConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getNumberOfEventsUntilInterruptInIterativeBroadcastGate] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[>] Other[0] operator[SEP] { Keyword[this] operator[SEP] identifier[broadcastInputReaders] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setIterative] operator[SEP] identifier[numberOfEventsUntilInterrupt] operator[SEP] operator[SEP] identifier[iterativeBcInputs] operator[SEP] identifier[add] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] operator[+] identifier[numberOfEventsUntilInterrupt] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[this] operator[SEP] identifier[iterativeBroadcastInputs] operator[=] identifier[asArray] operator[SEP] identifier[iterativeBcInputs] operator[SEP] operator[SEP] } identifier[initLocalStrategies] operator[SEP] identifier[numInputs] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] literal[String] operator[:] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[running] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[initialize] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getNumBroadcastInputs] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[String] identifier[name] operator[=] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getBroadcastInputName] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[readAndSetBroadcastInput] operator[SEP] identifier[i] , identifier[name] , Keyword[this] operator[SEP] identifier[runtimeUdfContext] operator[SEP] operator[SEP] } identifier[run] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeLocalStrategiesAndCaches] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[running] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[formatLogString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } }
public static byte[] md2Hash(String data, Charset charset) throws NoSuchAlgorithmException { return md2Hash(data.getBytes(charset)); }
class class_name[name] begin[{] method[md2Hash, return_type[type[byte]], modifier[public static], parameter[data, charset]] begin[{] return[call[.md2Hash, parameter[call[data.getBytes, parameter[member[.charset]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[md2Hash] operator[SEP] identifier[String] identifier[data] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { Keyword[return] identifier[md2Hash] operator[SEP] identifier[data] operator[SEP] identifier[getBytes] operator[SEP] identifier[charset] operator[SEP] operator[SEP] operator[SEP] }
void trimLabels() { for (Iterator<Label> itr = labels.values().iterator(); itr.hasNext();) { Label l = itr.next(); resetLabel(l); if(l.isEmpty()) itr.remove(); } }
class class_name[name] begin[{] method[trimLabels, return_type[void], modifier[default], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None), name=l)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Label, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resetLabel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=itr, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=labels, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=itr)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Label, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[void] identifier[trimLabels] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Label] operator[>] identifier[itr] operator[=] identifier[labels] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Label] identifier[l] operator[=] identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[resetLabel] operator[SEP] identifier[l] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] identifier[itr] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } }
public static <K, V> OMVRBTreeEntry<K, V> predecessor(final OMVRBTreeEntry<K, V> t) { if (t == null) return null; else if (t.getLeft() != null) { OMVRBTreeEntry<K, V> p = t.getLeft(); while (p.getRight() != null) p = p.getRight(); return p; } else { OMVRBTreeEntry<K, V> p = t.getParent(); Entry<K, V> ch = t; while (p != null && ch == p.getLeft()) { ch = p; p = p.getParent(); } return p; } }
class class_name[name] begin[{] method[predecessor, return_type[type[OMVRBTreeEntry]], modifier[public static], parameter[t]] begin[{] if[binary_operation[member[.t], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[call[t.getLeft, parameter[]], !=, literal[null]]] begin[{] local_variable[type[OMVRBTreeEntry], p] while[binary_operation[call[p.getRight, parameter[]], !=, literal[null]]] begin[{] assign[member[.p], call[p.getRight, parameter[]]] end[}] return[member[.p]] else begin[{] local_variable[type[OMVRBTreeEntry], p] local_variable[type[Entry], ch] while[binary_operation[binary_operation[member[.p], !=, literal[null]], &&, binary_operation[member[.ch], ==, call[p.getLeft, parameter[]]]]] begin[{] assign[member[.ch], member[.p]] assign[member[.p], call[p.getParent, parameter[]]] end[}] return[member[.p]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[predecessor] operator[SEP] Keyword[final] identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[p] operator[=] identifier[t] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[p] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[p] operator[=] identifier[p] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[p] operator[SEP] } Keyword[else] { identifier[OMVRBTreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[p] operator[=] identifier[t] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[ch] operator[=] identifier[t] operator[SEP] Keyword[while] operator[SEP] identifier[p] operator[!=] Other[null] operator[&&] identifier[ch] operator[==] identifier[p] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[SEP] { identifier[ch] operator[=] identifier[p] operator[SEP] identifier[p] operator[=] identifier[p] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[p] operator[SEP] } }
@SafeVarargs public final synchronized JaxRsClientFactory addFeatureToGroup(JaxRsFeatureGroup group, Class<? extends Feature>... features) { Preconditions.checkState(!started, "Already started building clients"); classFeatureMap.putAll(group, Arrays.asList(features)); LOG.trace("Group {} registers features {}", group, features); return this; }
class class_name[name] begin[{] method[addFeatureToGroup, return_type[type[JaxRsClientFactory]], modifier[synchronized final public], parameter[group, features]] begin[{] call[Preconditions.checkState, parameter[member[.started], literal["Already started building clients"]]] call[classFeatureMap.putAll, parameter[member[.group], call[Arrays.asList, parameter[member[.features]]]]] call[LOG.trace, parameter[literal["Group {} registers features {}"], member[.group], member[.features]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[final] Keyword[synchronized] identifier[JaxRsClientFactory] identifier[addFeatureToGroup] operator[SEP] identifier[JaxRsFeatureGroup] identifier[group] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Feature] operator[>] operator[...] identifier[features] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[started] , literal[String] operator[SEP] operator[SEP] identifier[classFeatureMap] operator[SEP] identifier[putAll] operator[SEP] identifier[group] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[features] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[group] , identifier[features] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <E> Set<E> decorate(Set<E> set) { return new SynchronizedSet<E>(set); }
class class_name[name] begin[{] method[decorate, return_type[type[Set]], modifier[public static], parameter[set]] begin[{] return[ClassCreator(arguments=[MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=SynchronizedSet, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Set] operator[<] identifier[E] operator[>] identifier[decorate] operator[SEP] identifier[Set] operator[<] identifier[E] operator[>] identifier[set] operator[SEP] { Keyword[return] Keyword[new] identifier[SynchronizedSet] operator[<] identifier[E] operator[>] operator[SEP] identifier[set] operator[SEP] operator[SEP] }
public <T> QueryResultPage<T> queryPage(Class<T> clazz, DynamoDBQueryExpression queryExpression, DynamoDBMapperConfig config) { config = mergeConfig(config); QueryRequest queryRequest = createQueryRequestFromExpression(clazz, queryExpression, config); QueryResult scanResult = db.query(applyUserAgent(queryRequest)); QueryResultPage<T> result = new QueryResultPage<T>(); result.setResults(marshallIntoObjects(clazz, scanResult.getItems())); result.setLastEvaluatedKey(scanResult.getLastEvaluatedKey()); return result; }
class class_name[name] begin[{] method[queryPage, return_type[type[QueryResultPage]], modifier[public], parameter[clazz, queryExpression, config]] begin[{] assign[member[.config], call[.mergeConfig, parameter[member[.config]]]] local_variable[type[QueryRequest], queryRequest] local_variable[type[QueryResult], scanResult] local_variable[type[QueryResultPage], result] call[result.setResults, parameter[call[.marshallIntoObjects, parameter[member[.clazz], call[scanResult.getItems, parameter[]]]]]] call[result.setLastEvaluatedKey, parameter[call[scanResult.getLastEvaluatedKey, parameter[]]]] return[member[.result]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[QueryResultPage] operator[<] identifier[T] operator[>] identifier[queryPage] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[DynamoDBQueryExpression] identifier[queryExpression] , identifier[DynamoDBMapperConfig] identifier[config] operator[SEP] { identifier[config] operator[=] identifier[mergeConfig] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[QueryRequest] identifier[queryRequest] operator[=] identifier[createQueryRequestFromExpression] operator[SEP] identifier[clazz] , identifier[queryExpression] , identifier[config] operator[SEP] operator[SEP] identifier[QueryResult] identifier[scanResult] operator[=] identifier[db] operator[SEP] identifier[query] operator[SEP] identifier[applyUserAgent] operator[SEP] identifier[queryRequest] operator[SEP] operator[SEP] operator[SEP] identifier[QueryResultPage] operator[<] identifier[T] operator[>] identifier[result] operator[=] Keyword[new] identifier[QueryResultPage] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setResults] operator[SEP] identifier[marshallIntoObjects] operator[SEP] identifier[clazz] , identifier[scanResult] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setLastEvaluatedKey] operator[SEP] identifier[scanResult] operator[SEP] identifier[getLastEvaluatedKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static Account retrieve(RequestOptions options) throws StripeException { return retrieve((Map<String, Object>) null, options); }
class class_name[name] begin[{] method[retrieve, return_type[type[Account]], modifier[public static], parameter[options]] begin[{] return[call[.retrieve, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), member[.options]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Account] identifier[retrieve] operator[SEP] identifier[RequestOptions] identifier[options] operator[SEP] Keyword[throws] identifier[StripeException] { Keyword[return] identifier[retrieve] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] Other[null] , identifier[options] operator[SEP] operator[SEP] }
protected synchronized void handleCompleted() { latch.countDown(); for (final ShutdownListener listener : listeners) { listener.handleCompleted(); } listeners.clear(); }
class class_name[name] begin[{] method[handleCompleted, return_type[void], modifier[synchronized protected], parameter[]] begin[{] call[latch.countDown, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=handleCompleted, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ShutdownListener, sub_type=None))), label=None) call[listeners.clear, parameter[]] end[}] END[}]
Keyword[protected] Keyword[synchronized] Keyword[void] identifier[handleCompleted] operator[SEP] operator[SEP] { identifier[latch] operator[SEP] identifier[countDown] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[ShutdownListener] identifier[listener] operator[:] identifier[listeners] operator[SEP] { identifier[listener] operator[SEP] identifier[handleCompleted] operator[SEP] operator[SEP] operator[SEP] } identifier[listeners] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public static void installSecureRandomProvider() { CoGProperties props = CoGProperties.getDefault(); String providerName = props.getSecureRandomProvider(); try { Class providerClass = Class.forName(providerName); Security.insertProviderAt( (Provider)providerClass.newInstance(), 1 ); } catch (Exception e) { logger.debug("Unable to install PRNG. Using default PRNG.",e); } }
class class_name[name] begin[{] method[installSecureRandomProvider, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[CoGProperties], props] local_variable[type[String], providerName] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=providerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=providerClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=providerClass, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Provider, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=insertProviderAt, postfix_operators=[], prefix_operators=[], qualifier=Security, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to install PRNG. Using default PRNG."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[installSecureRandomProvider] operator[SEP] operator[SEP] { identifier[CoGProperties] identifier[props] operator[=] identifier[CoGProperties] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[providerName] operator[=] identifier[props] operator[SEP] identifier[getSecureRandomProvider] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Class] identifier[providerClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[providerName] operator[SEP] operator[SEP] identifier[Security] operator[SEP] identifier[insertProviderAt] operator[SEP] operator[SEP] identifier[Provider] operator[SEP] identifier[providerClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] , Other[1] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static double getUpperBoundForBoverA(final long a, final long b, final double f) { checkInputs(a, b, f); if (a == 0) { return 1.0; } if (f == 1.0) { return (double) b / a; } return approximateUpperBoundOnP(a, b, NUM_STD_DEVS * hackyAdjuster(f)); }
class class_name[name] begin[{] method[getUpperBoundForBoverA, return_type[type[double]], modifier[public static], parameter[a, b, f]] begin[{] call[.checkInputs, parameter[member[.a], member[.b], member[.f]]] if[binary_operation[member[.a], ==, literal[0]]] begin[{] return[literal[1.0]] else begin[{] None end[}] if[binary_operation[member[.f], ==, literal[1.0]]] begin[{] return[binary_operation[Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), /, member[.a]]] else begin[{] None end[}] return[call[.approximateUpperBoundOnP, parameter[member[.a], member[.b], binary_operation[member[.NUM_STD_DEVS], *, call[.hackyAdjuster, parameter[member[.f]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getUpperBoundForBoverA] operator[SEP] Keyword[final] Keyword[long] identifier[a] , Keyword[final] Keyword[long] identifier[b] , Keyword[final] Keyword[double] identifier[f] operator[SEP] { identifier[checkInputs] operator[SEP] identifier[a] , identifier[b] , identifier[f] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[==] Other[0] operator[SEP] { Keyword[return] literal[Float] operator[SEP] } Keyword[if] operator[SEP] identifier[f] operator[==] literal[Float] operator[SEP] { Keyword[return] operator[SEP] Keyword[double] operator[SEP] identifier[b] operator[/] identifier[a] operator[SEP] } Keyword[return] identifier[approximateUpperBoundOnP] operator[SEP] identifier[a] , identifier[b] , identifier[NUM_STD_DEVS] operator[*] identifier[hackyAdjuster] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] }
@Override public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException { ChargingStationId csId = new ChargingStationId(chargingStationId); if (!commandAuthorizationService.isAuthorized(csId, identityContext.getUserIdentity(), AddChargingStationOpeningTimesCommand.class)) { throw new UserIdentityUnauthorizedException(chargingStationId, identityContext.getUserIdentity(), AddChargingStationOpeningTimesCommand.class); } try { ChargingStation chargingStation = repository.findOne(chargingStationId); if (chargingStation != null && chargingStation.isAccepted()) { AddChargingStationOpeningTimesApiCommand command = gson.fromJson(commandObject, AddChargingStationOpeningTimesApiCommand.class); commandGateway.send(new AddChargingStationOpeningTimesCommand(csId, command.getOpeningTimes(), identityContext)); } } catch (JsonSyntaxException e) { throw new IllegalArgumentException("Set charging station opening times command not able to parse the payload, is your JSON correctly formatted?", e); } }
class class_name[name] begin[{] method[handle, return_type[void], modifier[public], parameter[chargingStationId, commandObject, identityContext]] begin[{] local_variable[type[ChargingStationId], csId] if[call[commandAuthorizationService.isAuthorized, parameter[member[.csId], call[identityContext.getUserIdentity, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddChargingStationOpeningTimesCommand, sub_type=None))]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=chargingStationId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getUserIdentity, postfix_operators=[], prefix_operators=[], qualifier=identityContext, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddChargingStationOpeningTimesCommand, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UserIdentityUnauthorizedException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=chargingStationId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findOne, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None), name=chargingStation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChargingStation, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=chargingStation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isAccepted, postfix_operators=[], prefix_operators=[], qualifier=chargingStation, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=commandObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddChargingStationOpeningTimesApiCommand, sub_type=None))], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=gson, selectors=[], type_arguments=None), name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AddChargingStationOpeningTimesApiCommand, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=csId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOpeningTimes, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[], type_arguments=None), MemberReference(member=identityContext, 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=AddChargingStationOpeningTimesCommand, sub_type=None))], member=send, postfix_operators=[], prefix_operators=[], qualifier=commandGateway, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set charging station opening times command not able to parse the payload, is your JSON correctly formatted?"), 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=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonSyntaxException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[String] identifier[chargingStationId] , identifier[JsonObject] identifier[commandObject] , identifier[IdentityContext] identifier[identityContext] operator[SEP] Keyword[throws] identifier[UserIdentityUnauthorizedException] { identifier[ChargingStationId] identifier[csId] operator[=] Keyword[new] identifier[ChargingStationId] operator[SEP] identifier[chargingStationId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[commandAuthorizationService] operator[SEP] identifier[isAuthorized] operator[SEP] identifier[csId] , identifier[identityContext] operator[SEP] identifier[getUserIdentity] operator[SEP] operator[SEP] , identifier[AddChargingStationOpeningTimesCommand] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[UserIdentityUnauthorizedException] operator[SEP] identifier[chargingStationId] , identifier[identityContext] operator[SEP] identifier[getUserIdentity] operator[SEP] operator[SEP] , identifier[AddChargingStationOpeningTimesCommand] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[try] { identifier[ChargingStation] identifier[chargingStation] operator[=] identifier[repository] operator[SEP] identifier[findOne] operator[SEP] identifier[chargingStationId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[chargingStation] operator[!=] Other[null] operator[&&] identifier[chargingStation] operator[SEP] identifier[isAccepted] operator[SEP] operator[SEP] operator[SEP] { identifier[AddChargingStationOpeningTimesApiCommand] identifier[command] operator[=] identifier[gson] operator[SEP] identifier[fromJson] operator[SEP] identifier[commandObject] , identifier[AddChargingStationOpeningTimesApiCommand] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[commandGateway] operator[SEP] identifier[send] operator[SEP] Keyword[new] identifier[AddChargingStationOpeningTimesCommand] operator[SEP] identifier[csId] , identifier[command] operator[SEP] identifier[getOpeningTimes] operator[SEP] operator[SEP] , identifier[identityContext] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[JsonSyntaxException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public ClassInfoList getAllInterfacesAndAnnotations() { if (closed.get()) { throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed"); } if (!scanSpec.enableClassInfo || !scanSpec.enableAnnotationInfo) { throw new IllegalArgumentException( "Please call ClassGraph#enableClassInfo() and #enableAnnotationInfo() before #scan()"); } return ClassInfo.getAllInterfacesOrAnnotationClasses(classNameToClassInfo.values(), scanSpec); }
class class_name[name] begin[{] method[getAllInterfacesAndAnnotations, return_type[type[ClassInfoList]], modifier[public], parameter[]] begin[{] if[call[closed.get, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot use a ScanResult after it has been closed")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[scanSpec.enableClassInfo], ||, member[scanSpec.enableAnnotationInfo]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Please call ClassGraph#enableClassInfo() and #enableAnnotationInfo() before #scan()")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[ClassInfo.getAllInterfacesOrAnnotationClasses, parameter[call[classNameToClassInfo.values, parameter[]], member[.scanSpec]]]] end[}] END[}]
Keyword[public] identifier[ClassInfoList] identifier[getAllInterfacesAndAnnotations] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[closed] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[scanSpec] operator[SEP] identifier[enableClassInfo] operator[||] operator[!] identifier[scanSpec] operator[SEP] identifier[enableAnnotationInfo] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[ClassInfo] operator[SEP] identifier[getAllInterfacesOrAnnotationClasses] operator[SEP] identifier[classNameToClassInfo] operator[SEP] identifier[values] operator[SEP] operator[SEP] , identifier[scanSpec] operator[SEP] operator[SEP] }
protected Class[] getInterfaces(TargetMetaDef targetMetaDef) { Class[] interfaces = targetMetaDef.getInterfaces(); if (interfaces != null) return interfaces; try { interfaces = getPOJOInterfaces(targetMetaDef); } catch (Exception ex) { Debug.logError("[JdonFramework] getInterfaces error:" + ex, module); } catch (Throwable ex) { Debug.logError("[JdonFramework] getInterfaces error:" + ex, module); } if ((interfaces == null) || (interfaces.length == 0)) { Debug.logError("[JdonFramework] no find any interface for the service:" + targetMetaDef.getClassName(), module); } else { targetMetaDef.setInterfaces(interfaces); // cache the result Debug.logVerbose("[JdonFramework]found the the below interfaces for the service:" + targetMetaDef.getClassName(), module); for (int i = 0; i < interfaces.length; i++) { Debug.logVerbose(interfaces[i].getName() + ";", module); } } return interfaces; }
class class_name[name] begin[{] method[getInterfaces, return_type[type[Class]], modifier[protected], parameter[targetMetaDef]] begin[{] local_variable[type[Class], interfaces] if[binary_operation[member[.interfaces], !=, literal[null]]] begin[{] return[member[.interfaces]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=interfaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=targetMetaDef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPOJOInterfaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[JdonFramework] getInterfaces error:"), operandr=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logError, postfix_operators=[], prefix_operators=[], qualifier=Debug, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[JdonFramework] getInterfaces error:"), operandr=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logError, postfix_operators=[], prefix_operators=[], qualifier=Debug, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[member[.interfaces], ==, literal[null]], ||, binary_operation[member[interfaces.length], ==, literal[0]]]] begin[{] call[Debug.logError, parameter[binary_operation[literal["[JdonFramework] no find any interface for the service:"], +, call[targetMetaDef.getClassName, parameter[]]], member[.module]]] else begin[{] call[targetMetaDef.setInterfaces, parameter[member[.interfaces]]] call[Debug.logVerbose, parameter[binary_operation[literal["[JdonFramework]found the the below interfaces for the service:"], +, call[targetMetaDef.getClassName, parameter[]]], member[.module]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=interfaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";"), operator=+), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logVerbose, postfix_operators=[], prefix_operators=[], qualifier=Debug, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=interfaces, 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) end[}] return[member[.interfaces]] end[}] END[}]
Keyword[protected] identifier[Class] operator[SEP] operator[SEP] identifier[getInterfaces] operator[SEP] identifier[TargetMetaDef] identifier[targetMetaDef] operator[SEP] { identifier[Class] operator[SEP] operator[SEP] identifier[interfaces] operator[=] identifier[targetMetaDef] operator[SEP] identifier[getInterfaces] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[interfaces] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[interfaces] operator[SEP] Keyword[try] { identifier[interfaces] operator[=] identifier[getPOJOInterfaces] operator[SEP] identifier[targetMetaDef] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[Debug] operator[SEP] identifier[logError] operator[SEP] literal[String] operator[+] identifier[ex] , identifier[module] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { identifier[Debug] operator[SEP] identifier[logError] operator[SEP] literal[String] operator[+] identifier[ex] , identifier[module] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[interfaces] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[interfaces] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] operator[SEP] { identifier[Debug] operator[SEP] identifier[logError] operator[SEP] literal[String] operator[+] identifier[targetMetaDef] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] , identifier[module] operator[SEP] operator[SEP] } Keyword[else] { identifier[targetMetaDef] operator[SEP] identifier[setInterfaces] operator[SEP] identifier[interfaces] operator[SEP] operator[SEP] identifier[Debug] operator[SEP] identifier[logVerbose] operator[SEP] literal[String] operator[+] identifier[targetMetaDef] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] , identifier[module] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[interfaces] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Debug] operator[SEP] identifier[logVerbose] operator[SEP] identifier[interfaces] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[module] operator[SEP] operator[SEP] } } Keyword[return] identifier[interfaces] operator[SEP] }
public static ObjectName calculateObjectName(String cacheManagerName, String name, boolean stats) { String cacheManagerNameSafe = mbeanSafe(cacheManagerName); String cacheName = mbeanSafe(name); try { String objectNameType = stats ? "Statistics" : "Configuration"; return new ObjectName( "javax.cache:type=Cache" + objectNameType + ",CacheManager=" + cacheManagerNameSafe + ",Cache=" + cacheName); } catch (MalformedObjectNameException e) { throw new CacheException( "Illegal ObjectName for Management Bean. " + "CacheManager=[" + cacheManagerNameSafe + "], Cache=[" + cacheName + "]", e); } }
class class_name[name] begin[{] method[calculateObjectName, return_type[type[ObjectName]], modifier[public static], parameter[cacheManagerName, name, stats]] begin[{] local_variable[type[String], cacheManagerNameSafe] local_variable[type[String], cacheName] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=stats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Configuration"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Statistics")), name=objectNameType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.cache:type=Cache"), operandr=MemberReference(member=objectNameType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",CacheManager="), operator=+), operandr=MemberReference(member=cacheManagerNameSafe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",Cache="), operator=+), operandr=MemberReference(member=cacheName, 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=ObjectName, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal ObjectName for Management Bean. "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CacheManager=["), operator=+), operandr=MemberReference(member=cacheManagerNameSafe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="], Cache=["), operator=+), operandr=MemberReference(member=cacheName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), 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=CacheException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedObjectNameException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[ObjectName] identifier[calculateObjectName] operator[SEP] identifier[String] identifier[cacheManagerName] , identifier[String] identifier[name] , Keyword[boolean] identifier[stats] operator[SEP] { identifier[String] identifier[cacheManagerNameSafe] operator[=] identifier[mbeanSafe] operator[SEP] identifier[cacheManagerName] operator[SEP] operator[SEP] identifier[String] identifier[cacheName] operator[=] identifier[mbeanSafe] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[objectNameType] operator[=] identifier[stats] operator[?] literal[String] operator[:] literal[String] operator[SEP] Keyword[return] Keyword[new] identifier[ObjectName] operator[SEP] literal[String] operator[+] identifier[objectNameType] operator[+] literal[String] operator[+] identifier[cacheManagerNameSafe] operator[+] literal[String] operator[+] identifier[cacheName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedObjectNameException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[cacheManagerNameSafe] operator[+] literal[String] operator[+] identifier[cacheName] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static DataReader get() throws IOException { if (!instance.initialized) { long start = System.currentTimeMillis(); instance.init(); long elapsed = System.currentTimeMillis() - start; System.out.printf("Loaded CLDR data in %d ms.\n", elapsed); } return instance; }
class class_name[name] begin[{] method[get, return_type[type[DataReader]], modifier[public static], parameter[]] begin[{] if[member[instance.initialized]] begin[{] local_variable[type[long], start] call[instance.init, parameter[]] local_variable[type[long], elapsed] call[System.out.printf, parameter[literal["Loaded CLDR data in %d ms.\n"], member[.elapsed]]] else begin[{] None end[}] return[member[.instance]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DataReader] identifier[get] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[instance] operator[SEP] identifier[initialized] operator[SEP] { Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[instance] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[elapsed] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[start] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[elapsed] operator[SEP] operator[SEP] } Keyword[return] identifier[instance] operator[SEP] }
protected int findIntersection( SquareNode target , SquareNode node ) { lineCenters.a = target.center; lineCenters.b = node.center; for (int i = 0; i < 4; i++) { int j = (i+1)%4; lineSide.a = target.square.get(i); lineSide.b = target.square.get(j); if(Intersection2D_F64.intersection(lineCenters,lineSide,dummy) != null ) { return i; } } return -1; }
class class_name[name] begin[{] method[findIntersection, return_type[type[int]], modifier[protected], parameter[target, node]] begin[{] assign[member[lineCenters.a], member[target.center]] assign[member[lineCenters.b], member[node.center]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=%), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=lineSide, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=target.square, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=lineSide, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=target.square, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=lineCenters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineSide, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dummy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intersection, postfix_operators=[], prefix_operators=[], qualifier=Intersection2D_F64, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=4), 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[1]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[findIntersection] operator[SEP] identifier[SquareNode] identifier[target] , identifier[SquareNode] identifier[node] operator[SEP] { identifier[lineCenters] operator[SEP] identifier[a] operator[=] identifier[target] operator[SEP] identifier[center] operator[SEP] identifier[lineCenters] operator[SEP] identifier[b] operator[=] identifier[node] operator[SEP] identifier[center] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[4] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[j] operator[=] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[%] Other[4] operator[SEP] identifier[lineSide] operator[SEP] identifier[a] operator[=] identifier[target] operator[SEP] identifier[square] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[lineSide] operator[SEP] identifier[b] operator[=] identifier[target] operator[SEP] identifier[square] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Intersection2D_F64] operator[SEP] identifier[intersection] operator[SEP] identifier[lineCenters] , identifier[lineSide] , identifier[dummy] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
byte[] JOSEToDER(byte[] joseSignature) throws SignatureException { if (joseSignature.length != ecNumberSize * 2) { throw new SignatureException("Invalid JOSE signature format."); } // Retrieve R and S number's length and padding. int rPadding = countPadding(joseSignature, 0, ecNumberSize); int sPadding = countPadding(joseSignature, ecNumberSize, joseSignature.length); int rLength = ecNumberSize - rPadding; int sLength = ecNumberSize - sPadding; int length = 2 + rLength + 2 + sLength; if (length > 255) { throw new SignatureException("Invalid JOSE signature format."); } final byte[] derSignature; int offset; if (length > 0x7f) { derSignature = new byte[3 + length]; derSignature[1] = (byte) 0x81; offset = 2; } else { derSignature = new byte[2 + length]; offset = 1; } // DER Structure: http://crypto.stackexchange.com/a/1797 // Header with signature length info derSignature[0] = (byte) 0x30; derSignature[offset++] = (byte) (length & 0xff); // Header with "min R" number length derSignature[offset++] = (byte) 0x02; derSignature[offset++] = (byte) rLength; // R number if (rPadding < 0) { //Sign derSignature[offset++] = (byte) 0x00; System.arraycopy(joseSignature, 0, derSignature, offset, ecNumberSize); offset += ecNumberSize; } else { int copyLength = Math.min(ecNumberSize, rLength); System.arraycopy(joseSignature, rPadding, derSignature, offset, copyLength); offset += copyLength; } // Header with "min S" number length derSignature[offset++] = (byte) 0x02; derSignature[offset++] = (byte) sLength; // S number if (sPadding < 0) { //Sign derSignature[offset++] = (byte) 0x00; System.arraycopy(joseSignature, ecNumberSize, derSignature, offset, ecNumberSize); } else { System.arraycopy(joseSignature, ecNumberSize + sPadding, derSignature, offset, Math.min(ecNumberSize, sLength)); } return derSignature; }
class class_name[name] begin[{] method[JOSEToDER, return_type[type[byte]], modifier[default], parameter[joseSignature]] begin[{] if[binary_operation[member[joseSignature.length], !=, binary_operation[member[.ecNumberSize], *, literal[2]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid JOSE signature format.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SignatureException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], rPadding] local_variable[type[int], sPadding] local_variable[type[int], rLength] local_variable[type[int], sLength] local_variable[type[int], length] if[binary_operation[member[.length], >, literal[255]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid JOSE signature format.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SignatureException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[byte], derSignature] local_variable[type[int], offset] if[binary_operation[member[.length], >, literal[0x7f]]] begin[{] assign[member[.derSignature], ArrayCreator(dimensions=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x81), type=BasicType(dimensions=[], name=byte))] assign[member[.offset], literal[2]] else begin[{] assign[member[.derSignature], ArrayCreator(dimensions=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] assign[member[.offset], literal[1]] end[}] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x30), type=BasicType(dimensions=[], name=byte))] assign[member[.derSignature], Cast(expression=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x02), type=BasicType(dimensions=[], name=byte))] assign[member[.derSignature], Cast(expression=MemberReference(member=rLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] if[binary_operation[member[.rPadding], <, literal[0]]] begin[{] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))] call[System.arraycopy, parameter[member[.joseSignature], literal[0], member[.derSignature], member[.offset], member[.ecNumberSize]]] assign[member[.offset], member[.ecNumberSize]] else begin[{] local_variable[type[int], copyLength] call[System.arraycopy, parameter[member[.joseSignature], member[.rPadding], member[.derSignature], member[.offset], member[.copyLength]]] assign[member[.offset], member[.copyLength]] end[}] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x02), type=BasicType(dimensions=[], name=byte))] assign[member[.derSignature], Cast(expression=MemberReference(member=sLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] if[binary_operation[member[.sPadding], <, literal[0]]] begin[{] assign[member[.derSignature], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))] call[System.arraycopy, parameter[member[.joseSignature], member[.ecNumberSize], member[.derSignature], member[.offset], member[.ecNumberSize]]] else begin[{] call[System.arraycopy, parameter[member[.joseSignature], binary_operation[member[.ecNumberSize], +, member[.sPadding]], member[.derSignature], member[.offset], call[Math.min, parameter[member[.ecNumberSize], member[.sLength]]]]] end[}] return[member[.derSignature]] end[}] END[}]
Keyword[byte] operator[SEP] operator[SEP] identifier[JOSEToDER] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[joseSignature] operator[SEP] Keyword[throws] identifier[SignatureException] { Keyword[if] operator[SEP] identifier[joseSignature] operator[SEP] identifier[length] operator[!=] identifier[ecNumberSize] operator[*] Other[2] operator[SEP] { Keyword[throw] Keyword[new] identifier[SignatureException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[rPadding] operator[=] identifier[countPadding] operator[SEP] identifier[joseSignature] , Other[0] , identifier[ecNumberSize] operator[SEP] operator[SEP] Keyword[int] identifier[sPadding] operator[=] identifier[countPadding] operator[SEP] identifier[joseSignature] , identifier[ecNumberSize] , identifier[joseSignature] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[int] identifier[rLength] operator[=] identifier[ecNumberSize] operator[-] identifier[rPadding] operator[SEP] Keyword[int] identifier[sLength] operator[=] identifier[ecNumberSize] operator[-] identifier[sPadding] operator[SEP] Keyword[int] identifier[length] operator[=] Other[2] operator[+] identifier[rLength] operator[+] Other[2] operator[+] identifier[sLength] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[>] Other[255] operator[SEP] { Keyword[throw] Keyword[new] identifier[SignatureException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[derSignature] operator[SEP] Keyword[int] identifier[offset] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[>] literal[Integer] operator[SEP] { identifier[derSignature] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[3] operator[+] identifier[length] operator[SEP] operator[SEP] identifier[derSignature] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[offset] operator[=] Other[2] operator[SEP] } Keyword[else] { identifier[derSignature] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2] operator[+] identifier[length] operator[SEP] operator[SEP] identifier[offset] operator[=] Other[1] operator[SEP] } identifier[derSignature] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[length] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[rLength] operator[SEP] Keyword[if] operator[SEP] identifier[rPadding] operator[<] Other[0] operator[SEP] { identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[joseSignature] , Other[0] , identifier[derSignature] , identifier[offset] , identifier[ecNumberSize] operator[SEP] operator[SEP] identifier[offset] operator[+=] identifier[ecNumberSize] operator[SEP] } Keyword[else] { Keyword[int] identifier[copyLength] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[ecNumberSize] , identifier[rLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[joseSignature] , identifier[rPadding] , identifier[derSignature] , identifier[offset] , identifier[copyLength] operator[SEP] operator[SEP] identifier[offset] operator[+=] identifier[copyLength] operator[SEP] } identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[sLength] operator[SEP] Keyword[if] operator[SEP] identifier[sPadding] operator[<] Other[0] operator[SEP] { identifier[derSignature] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[joseSignature] , identifier[ecNumberSize] , identifier[derSignature] , identifier[offset] , identifier[ecNumberSize] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[joseSignature] , identifier[ecNumberSize] operator[+] identifier[sPadding] , identifier[derSignature] , identifier[offset] , identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[ecNumberSize] , identifier[sLength] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[derSignature] operator[SEP] }
public void open(boolean readonly) { try { dataFile = ScaledRAFile.newScaledRAFile(database, fileName, false, ScaledRAFile.DATA_FILE_RAF, null, null); fileFreePosition = INITIAL_FREE_POS; initBuffers(); freeBlocks = new DataFileBlockManager(0, cacheFileScale, 0); } catch (Throwable e) { database.logger.appLog.logContext(e, null); close(false); throw Error.error(ErrorCode.FILE_IO_ERROR, ErrorCode.M_DataFileCache_open, new Object[] { e, fileName }); } }
class class_name[name] begin[{] method[open, return_type[void], modifier[public], parameter[readonly]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=database, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=DATA_FILE_RAF, postfix_operators=[], prefix_operators=[], qualifier=ScaledRAFile, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=newScaledRAFile, postfix_operators=[], prefix_operators=[], qualifier=ScaledRAFile, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fileFreePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=INITIAL_FREE_POS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=initBuffers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=freeBlocks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=cacheFileScale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DataFileBlockManager, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=logContext, postfix_operators=[], prefix_operators=[], qualifier=database.logger.appLog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=FILE_IO_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), MemberReference(member=M_DataFileCache_open, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[open] operator[SEP] Keyword[boolean] identifier[readonly] operator[SEP] { Keyword[try] { identifier[dataFile] operator[=] identifier[ScaledRAFile] operator[SEP] identifier[newScaledRAFile] operator[SEP] identifier[database] , identifier[fileName] , literal[boolean] , identifier[ScaledRAFile] operator[SEP] identifier[DATA_FILE_RAF] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[fileFreePosition] operator[=] identifier[INITIAL_FREE_POS] operator[SEP] identifier[initBuffers] operator[SEP] operator[SEP] operator[SEP] identifier[freeBlocks] operator[=] Keyword[new] identifier[DataFileBlockManager] operator[SEP] Other[0] , identifier[cacheFileScale] , Other[0] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[database] operator[SEP] identifier[logger] operator[SEP] identifier[appLog] operator[SEP] identifier[logContext] operator[SEP] identifier[e] , Other[null] operator[SEP] operator[SEP] identifier[close] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[FILE_IO_ERROR] , identifier[ErrorCode] operator[SEP] identifier[M_DataFileCache_open] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[e] , identifier[fileName] } operator[SEP] operator[SEP] } }
public Response recv_async(final byte[] trans_id) throws InvalidInputException, MessageDecodingException, TerminateException { return recv_async(this.timeout_sync, trans_id, true); }
class class_name[name] begin[{] method[recv_async, return_type[type[Response]], modifier[public], parameter[trans_id]] begin[{] return[call[.recv_async, parameter[THIS[member[None.timeout_sync]], member[.trans_id], literal[true]]]] end[}] END[}]
Keyword[public] identifier[Response] identifier[recv_async] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[trans_id] operator[SEP] Keyword[throws] identifier[InvalidInputException] , identifier[MessageDecodingException] , identifier[TerminateException] { Keyword[return] identifier[recv_async] operator[SEP] Keyword[this] operator[SEP] identifier[timeout_sync] , identifier[trans_id] , literal[boolean] operator[SEP] operator[SEP] }
public <V> Optional<V> map(final Function<T, V> function) { checkNotNull(function, "Must provide non null function to map"); if (isPresent()) { final V applied = function.apply(get()); return applied == null ? Optional.<V>empty() : Optional.of(function.apply(get())); } else { return Optional.empty(); } }
class class_name[name] begin[{] method[map, return_type[type[Optional]], modifier[public], parameter[function]] begin[{] call[.checkNotNull, parameter[member[.function], literal["Must provide non null function to map"]]] if[call[.isPresent, parameter[]]] begin[{] local_variable[type[V], applied] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=applied, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=apply, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=Optional, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))]))] else begin[{] return[call[Optional.empty, parameter[]]] end[}] end[}] END[}]
Keyword[public] operator[<] identifier[V] operator[>] identifier[Optional] operator[<] identifier[V] operator[>] identifier[map] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T] , identifier[V] operator[>] identifier[function] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[function] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[V] identifier[applied] operator[=] identifier[function] operator[SEP] identifier[apply] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[applied] operator[==] Other[null] operator[?] identifier[Optional] operator[SEP] operator[<] identifier[V] operator[>] identifier[empty] operator[SEP] operator[SEP] operator[:] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[function] operator[SEP] identifier[apply] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } }
public void scan() { WebcamDiscoveryListener[] listeners = Webcam.getDiscoveryListeners(); List<WebcamDevice> tmpnew = driver.getDevices(); List<WebcamDevice> tmpold = null; try { tmpold = getDevices(getWebcams(Long.MAX_VALUE, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { throw new WebcamException(e); } // convert to linked list due to O(1) on remove operation on // iterator versus O(n) for the same operation in array list List<WebcamDevice> oldones = new LinkedList<WebcamDevice>(tmpold); List<WebcamDevice> newones = new LinkedList<WebcamDevice>(tmpnew); Iterator<WebcamDevice> oi = oldones.iterator(); Iterator<WebcamDevice> ni = null; WebcamDevice od = null; // old device WebcamDevice nd = null; // new device // reduce lists while (oi.hasNext()) { od = oi.next(); ni = newones.iterator(); while (ni.hasNext()) { nd = ni.next(); // remove both elements, if device name is the same, which // actually means that device is exactly the same if (nd.getName().equals(od.getName())) { ni.remove(); oi.remove(); break; } } } // if any left in old ones it means that devices has been removed if (oldones.size() > 0) { List<Webcam> notified = new ArrayList<Webcam>(); for (WebcamDevice device : oldones) { for (Webcam webcam : webcams) { if (webcam.getDevice().getName().equals(device.getName())) { notified.add(webcam); break; } } } setCurrentWebcams(tmpnew); for (Webcam webcam : notified) { notifyWebcamGone(webcam, listeners); webcam.dispose(); } } // if any left in new ones it means that devices has been added if (newones.size() > 0) { setCurrentWebcams(tmpnew); for (WebcamDevice device : newones) { for (Webcam webcam : webcams) { if (webcam.getDevice().getName().equals(device.getName())) { notifyWebcamFound(webcam, listeners); break; } } } } }
class class_name[name] begin[{] method[scan, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[WebcamDiscoveryListener], listeners] local_variable[type[List], tmpnew] local_variable[type[List], tmpold] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmpold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=getWebcams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getDevices, postfix_operators=[], prefix_operators=[], qualifier=, 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=WebcamException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TimeoutException']))], finally_block=None, label=None, resources=None) local_variable[type[List], oldones] local_variable[type[List], newones] local_variable[type[Iterator], oi] local_variable[type[Iterator], ni] local_variable[type[WebcamDevice], od] local_variable[type[WebcamDevice], nd] while[call[oi.hasNext, parameter[]]] begin[{] assign[member[.od], call[oi.next, parameter[]]] assign[member[.ni], call[newones.iterator, parameter[]]] while[call[ni.hasNext, parameter[]]] begin[{] assign[member[.nd], call[ni.next, parameter[]]] if[call[nd.getName, parameter[]]] begin[{] call[ni.remove, parameter[]] call[oi.remove, parameter[]] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] end[}] if[binary_operation[call[oldones.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[List], notified] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getDevice, postfix_operators=[], prefix_operators=[], qualifier=webcam, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=device, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=webcam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=notified, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=webcams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=webcam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Webcam, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=oldones, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=device)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebcamDevice, sub_type=None))), label=None) call[.setCurrentWebcams, parameter[member[.tmpnew]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=webcam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notifyWebcamGone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=dispose, postfix_operators=[], prefix_operators=[], qualifier=webcam, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=notified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=webcam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Webcam, sub_type=None))), label=None) else begin[{] None end[}] if[binary_operation[call[newones.size, parameter[]], >, literal[0]]] begin[{] call[.setCurrentWebcams, parameter[member[.tmpnew]]] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getDevice, postfix_operators=[], prefix_operators=[], qualifier=webcam, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=device, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=webcam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notifyWebcamFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=webcams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=webcam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Webcam, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=newones, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=device)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebcamDevice, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[scan] operator[SEP] operator[SEP] { identifier[WebcamDiscoveryListener] operator[SEP] operator[SEP] identifier[listeners] operator[=] identifier[Webcam] operator[SEP] identifier[getDiscoveryListeners] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[WebcamDevice] operator[>] identifier[tmpnew] operator[=] identifier[driver] operator[SEP] identifier[getDevices] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[WebcamDevice] operator[>] identifier[tmpold] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[tmpold] operator[=] identifier[getDevices] operator[SEP] identifier[getWebcams] operator[SEP] identifier[Long] operator[SEP] identifier[MAX_VALUE] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TimeoutException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebcamException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[WebcamDevice] operator[>] identifier[oldones] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[WebcamDevice] operator[>] operator[SEP] identifier[tmpold] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[WebcamDevice] operator[>] identifier[newones] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[WebcamDevice] operator[>] operator[SEP] identifier[tmpnew] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[WebcamDevice] operator[>] identifier[oi] operator[=] identifier[oldones] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[WebcamDevice] operator[>] identifier[ni] operator[=] Other[null] operator[SEP] identifier[WebcamDevice] identifier[od] operator[=] Other[null] operator[SEP] identifier[WebcamDevice] identifier[nd] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[oi] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[od] operator[=] identifier[oi] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[ni] operator[=] identifier[newones] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[ni] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[nd] operator[=] identifier[ni] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nd] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[od] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[ni] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[oi] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[oldones] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[List] operator[<] identifier[Webcam] operator[>] identifier[notified] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Webcam] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WebcamDevice] identifier[device] operator[:] identifier[oldones] operator[SEP] { Keyword[for] operator[SEP] identifier[Webcam] identifier[webcam] operator[:] identifier[webcams] operator[SEP] { Keyword[if] operator[SEP] identifier[webcam] operator[SEP] identifier[getDevice] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[device] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[notified] operator[SEP] identifier[add] operator[SEP] identifier[webcam] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } identifier[setCurrentWebcams] operator[SEP] identifier[tmpnew] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Webcam] identifier[webcam] operator[:] identifier[notified] operator[SEP] { identifier[notifyWebcamGone] operator[SEP] identifier[webcam] , identifier[listeners] operator[SEP] operator[SEP] identifier[webcam] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[newones] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[setCurrentWebcams] operator[SEP] identifier[tmpnew] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WebcamDevice] identifier[device] operator[:] identifier[newones] operator[SEP] { Keyword[for] operator[SEP] identifier[Webcam] identifier[webcam] operator[:] identifier[webcams] operator[SEP] { Keyword[if] operator[SEP] identifier[webcam] operator[SEP] identifier[getDevice] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[device] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[notifyWebcamFound] operator[SEP] identifier[webcam] , identifier[listeners] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } } }
public List<INDArray> feedForwardToLayer(int layerNum, INDArray input) { try{ return ffToLayerActivationsDetached(false, FwdPassType.STANDARD, false, layerNum, input, mask, null, true); } catch (OutOfMemoryError e) { CrashReportingUtil.writeMemoryCrashDump(this, e); throw e; } }
class class_name[name] begin[{] method[feedForwardToLayer, return_type[type[List]], modifier[public], parameter[layerNum, input]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=STANDARD, postfix_operators=[], prefix_operators=[], qualifier=FwdPassType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=layerNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=ffToLayerActivationsDetached, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeMemoryCrashDump, postfix_operators=[], prefix_operators=[], qualifier=CrashReportingUtil, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['OutOfMemoryError']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[INDArray] operator[>] identifier[feedForwardToLayer] operator[SEP] Keyword[int] identifier[layerNum] , identifier[INDArray] identifier[input] operator[SEP] { Keyword[try] { Keyword[return] identifier[ffToLayerActivationsDetached] operator[SEP] literal[boolean] , identifier[FwdPassType] operator[SEP] identifier[STANDARD] , literal[boolean] , identifier[layerNum] , identifier[input] , identifier[mask] , Other[null] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[OutOfMemoryError] identifier[e] operator[SEP] { identifier[CrashReportingUtil] operator[SEP] identifier[writeMemoryCrashDump] operator[SEP] Keyword[this] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } }
public String stateName( int state) { String name = "Unknown state = " + state; switch(state) { case NodeStack.VISIT_LEFT: name = "VISIT_LEFT"; break; case NodeStack.PROCESS_CURRENT: name = "PROCESS_CURRENT"; break; case NodeStack.VISIT_RIGHT: name = "VISIT_RIGHT"; break; case NodeStack.DONE_VISITS: name = "DONE_VISITS"; break; } return name; }
class class_name[name] begin[{] method[stateName, return_type[type[String]], modifier[public], parameter[state]] begin[{] local_variable[type[String], name] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=VISIT_LEFT, postfix_operators=[], prefix_operators=[], qualifier=NodeStack, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="VISIT_LEFT")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=PROCESS_CURRENT, postfix_operators=[], prefix_operators=[], qualifier=NodeStack, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PROCESS_CURRENT")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=VISIT_RIGHT, postfix_operators=[], prefix_operators=[], qualifier=NodeStack, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="VISIT_RIGHT")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=DONE_VISITS, postfix_operators=[], prefix_operators=[], qualifier=NodeStack, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DONE_VISITS")), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[member[.name]] end[}] END[}]
Keyword[public] identifier[String] identifier[stateName] operator[SEP] Keyword[int] identifier[state] operator[SEP] { identifier[String] identifier[name] operator[=] literal[String] operator[+] identifier[state] operator[SEP] Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[NodeStack] operator[SEP] identifier[VISIT_LEFT] operator[:] identifier[name] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NodeStack] operator[SEP] identifier[PROCESS_CURRENT] operator[:] identifier[name] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NodeStack] operator[SEP] identifier[VISIT_RIGHT] operator[:] identifier[name] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NodeStack] operator[SEP] identifier[DONE_VISITS] operator[:] identifier[name] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] } Keyword[return] identifier[name] operator[SEP] }
public void marshall(ListMailboxPermissionsRequest listMailboxPermissionsRequest, ProtocolMarshaller protocolMarshaller) { if (listMailboxPermissionsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listMailboxPermissionsRequest.getOrganizationId(), ORGANIZATIONID_BINDING); protocolMarshaller.marshall(listMailboxPermissionsRequest.getEntityId(), ENTITYID_BINDING); protocolMarshaller.marshall(listMailboxPermissionsRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(listMailboxPermissionsRequest.getMaxResults(), MAXRESULTS_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[listMailboxPermissionsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listMailboxPermissionsRequest], ==, 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=getOrganizationId, postfix_operators=[], prefix_operators=[], qualifier=listMailboxPermissionsRequest, selectors=[], type_arguments=None), MemberReference(member=ORGANIZATIONID_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=getEntityId, postfix_operators=[], prefix_operators=[], qualifier=listMailboxPermissionsRequest, selectors=[], type_arguments=None), MemberReference(member=ENTITYID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listMailboxPermissionsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=listMailboxPermissionsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_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[ListMailboxPermissionsRequest] identifier[listMailboxPermissionsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listMailboxPermissionsRequest] 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[listMailboxPermissionsRequest] operator[SEP] identifier[getOrganizationId] operator[SEP] operator[SEP] , identifier[ORGANIZATIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listMailboxPermissionsRequest] operator[SEP] identifier[getEntityId] operator[SEP] operator[SEP] , identifier[ENTITYID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listMailboxPermissionsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listMailboxPermissionsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_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 <K, V> Map<K, V> sortNumberMapByKeyAscending(Map<K, V> map) { return sortNumberMapByKeyAscending(map.entrySet()); }
class class_name[name] begin[{] method[sortNumberMapByKeyAscending, return_type[type[Map]], modifier[public static], parameter[map]] begin[{] return[call[.sortNumberMapByKeyAscending, parameter[call[map.entrySet, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[sortNumberMapByKeyAscending] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] operator[SEP] { Keyword[return] identifier[sortNumberMapByKeyAscending] operator[SEP] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
static public MFileOS getExistingFile(String filename) { if (filename == null) return null; File file = new File(filename); if (file.exists()) return new MFileOS(file); return null; }
class class_name[name] begin[{] method[getExistingFile, return_type[type[MFileOS]], modifier[public static], parameter[filename]] begin[{] if[binary_operation[member[.filename], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[File], file] if[call[file.exists, parameter[]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=file, 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=MFileOS, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[static] Keyword[public] identifier[MFileOS] identifier[getExistingFile] operator[SEP] identifier[String] identifier[filename] operator[SEP] { Keyword[if] operator[SEP] identifier[filename] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MFileOS] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@RequestMapping(value="/{providerId}", method=RequestMethod.GET, params="oauth_token") public RedirectView oauth1Callback(@PathVariable String providerId, NativeWebRequest request) { try { OAuth1ConnectionFactory<?> connectionFactory = (OAuth1ConnectionFactory<?>) connectionFactoryLocator.getConnectionFactory(providerId); Connection<?> connection = connectSupport.completeConnection(connectionFactory, request); return handleSignIn(connection, connectionFactory, request); } catch (Exception e) { logger.error("Exception while completing OAuth 1.0(a) connection: ", e); return redirect(URIBuilder.fromUri(signInUrl).queryParam("error", "provider").build().toString()); } }
class class_name[name] begin[{] method[oauth1Callback, return_type[type[RedirectView]], modifier[public], parameter[providerId, request]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=providerId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConnectionFactory, postfix_operators=[], prefix_operators=[], qualifier=connectionFactoryLocator, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=OAuth1ConnectionFactory, sub_type=None)), name=connectionFactory)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=OAuth1ConnectionFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=connectionFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=completeConnection, postfix_operators=[], prefix_operators=[], qualifier=connectSupport, selectors=[], type_arguments=None), name=connection)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Connection, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connectionFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleSignIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception while completing OAuth 1.0(a) connection: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=signInUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromUri, postfix_operators=[], prefix_operators=[], qualifier=URIBuilder, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="provider")], member=queryParam, 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), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=redirect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[params] operator[=] literal[String] operator[SEP] Keyword[public] identifier[RedirectView] identifier[oauth1Callback] operator[SEP] annotation[@] identifier[PathVariable] identifier[String] identifier[providerId] , identifier[NativeWebRequest] identifier[request] operator[SEP] { Keyword[try] { identifier[OAuth1ConnectionFactory] operator[<] operator[?] operator[>] identifier[connectionFactory] operator[=] operator[SEP] identifier[OAuth1ConnectionFactory] operator[<] operator[?] operator[>] operator[SEP] identifier[connectionFactoryLocator] operator[SEP] identifier[getConnectionFactory] operator[SEP] identifier[providerId] operator[SEP] operator[SEP] identifier[Connection] operator[<] operator[?] operator[>] identifier[connection] operator[=] identifier[connectSupport] operator[SEP] identifier[completeConnection] operator[SEP] identifier[connectionFactory] , identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[handleSignIn] operator[SEP] identifier[connection] , identifier[connectionFactory] , identifier[request] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[redirect] operator[SEP] identifier[URIBuilder] operator[SEP] identifier[fromUri] operator[SEP] identifier[signInUrl] operator[SEP] operator[SEP] identifier[queryParam] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@RequestMapping(value = "changeLog/fileFilter/{projectId}/create", method = RequestMethod.POST) public Resource<SCMFileChangeFilter> createChangeLogFileFilter(@PathVariable ID projectId, @RequestBody SCMFileChangeFilter filter) { securityService.checkProjectFunction(projectId.get(), ProjectConfig.class); return securityService.asAdmin(() -> { // Loads the project Project project = structureService.getProject(projectId); // Gets the store SCMFileChangeFilters config = entityDataService.retrieve( project, SCMFileChangeFilters.class.getName(), SCMFileChangeFilters.class ); if (config == null) config = SCMFileChangeFilters.create(); // Updates the store config = config.save(filter); // Saves the store back entityDataService.store(project, SCMFileChangeFilters.class.getName(), config); // OK return getChangeLogFileFilter(projectId, filter.getName()); }); }
class class_name[name] begin[{] method[createChangeLogFileFilter, return_type[type[Resource]], modifier[public], parameter[projectId, filter]] begin[{] call[securityService.checkProjectFunction, parameter[call[projectId.get, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProjectConfig, sub_type=None))]] return[call[securityService.asAdmin, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=projectId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProject, postfix_operators=[], prefix_operators=[], qualifier=structureService, selectors=[], type_arguments=None), name=project)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Project, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=project, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SCMFileChangeFilters, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SCMFileChangeFilters, sub_type=None))], member=retrieve, postfix_operators=[], prefix_operators=[], qualifier=entityDataService, selectors=[], type_arguments=None), name=config)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SCMFileChangeFilters, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=create, postfix_operators=[], prefix_operators=[], qualifier=SCMFileChangeFilters, selectors=[], type_arguments=None)), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=save, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=project, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SCMFileChangeFilters, sub_type=None)), MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=store, postfix_operators=[], prefix_operators=[], qualifier=entityDataService, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=projectId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None)], member=getChangeLogFileFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], parameters=[])]]] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] identifier[Resource] operator[<] identifier[SCMFileChangeFilter] operator[>] identifier[createChangeLogFileFilter] operator[SEP] annotation[@] identifier[PathVariable] identifier[ID] identifier[projectId] , annotation[@] identifier[RequestBody] identifier[SCMFileChangeFilter] identifier[filter] operator[SEP] { identifier[securityService] operator[SEP] identifier[checkProjectFunction] operator[SEP] identifier[projectId] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[ProjectConfig] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[securityService] operator[SEP] identifier[asAdmin] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[Project] identifier[project] operator[=] identifier[structureService] operator[SEP] identifier[getProject] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] identifier[SCMFileChangeFilters] identifier[config] operator[=] identifier[entityDataService] operator[SEP] identifier[retrieve] operator[SEP] identifier[project] , identifier[SCMFileChangeFilters] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[SCMFileChangeFilters] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[config] operator[==] Other[null] operator[SEP] identifier[config] operator[=] identifier[SCMFileChangeFilters] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[=] identifier[config] operator[SEP] identifier[save] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[entityDataService] operator[SEP] identifier[store] operator[SEP] identifier[project] , identifier[SCMFileChangeFilters] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[config] operator[SEP] operator[SEP] Keyword[return] identifier[getChangeLogFileFilter] operator[SEP] identifier[projectId] , identifier[filter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static <V extends NumberVector> NumberVector.Factory<V> guessFactory(SimpleTypeInformation<V> in) { NumberVector.Factory<V> factory = null; if(in instanceof VectorTypeInformation) { factory = (NumberVector.Factory<V>) ((VectorTypeInformation<V>) in).getFactory(); } if(factory == null) { // FIXME: hack. Add factories to simple type information, too? try { Field f = in.getRestrictionClass().getField("FACTORY"); factory = (NumberVector.Factory<V>) f.get(null); } catch(Exception e) { LoggingUtil.warning("Cannot determine factory for type " + in.getRestrictionClass(), e); } } return factory; }
class class_name[name] begin[{] method[guessFactory, return_type[type[NumberVector]], modifier[public static], parameter[in]] begin[{] local_variable[type[NumberVector], factory] if[binary_operation[member[.in], instanceof, type[VectorTypeInformation]]] begin[{] assign[member[.factory], Cast(expression=Cast(expression=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=VectorTypeInformation, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=NumberVector, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Factory, sub_type=None)))] else begin[{] None end[}] if[binary_operation[member[.factory], ==, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRestrictionClass, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FACTORY")], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=get, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=NumberVector, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Factory, sub_type=None)))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot determine factory for type "), operandr=MethodInvocation(arguments=[], member=getRestrictionClass, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=LoggingUtil, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.factory]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[V] Keyword[extends] identifier[NumberVector] operator[>] identifier[NumberVector] operator[SEP] identifier[Factory] operator[<] identifier[V] operator[>] identifier[guessFactory] operator[SEP] identifier[SimpleTypeInformation] operator[<] identifier[V] operator[>] identifier[in] operator[SEP] { identifier[NumberVector] operator[SEP] identifier[Factory] operator[<] identifier[V] operator[>] identifier[factory] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[in] Keyword[instanceof] identifier[VectorTypeInformation] operator[SEP] { identifier[factory] operator[=] operator[SEP] identifier[NumberVector] operator[SEP] identifier[Factory] operator[<] identifier[V] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[VectorTypeInformation] operator[<] identifier[V] operator[>] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[factory] operator[==] Other[null] operator[SEP] { Keyword[try] { identifier[Field] identifier[f] operator[=] identifier[in] operator[SEP] identifier[getRestrictionClass] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factory] operator[=] operator[SEP] identifier[NumberVector] operator[SEP] identifier[Factory] operator[<] identifier[V] operator[>] operator[SEP] identifier[f] operator[SEP] identifier[get] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[in] operator[SEP] identifier[getRestrictionClass] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[factory] operator[SEP] }
@SuppressWarnings("unchecked") public <T> WeakReference<T> track(T obj, Runnable runnable){ return (WeakReference<T>)track(obj, WeakReference.class, runnable); }
class class_name[name] begin[{] method[track, return_type[type[WeakReference]], modifier[public], parameter[obj, runnable]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WeakReference, sub_type=None)), MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=track, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=WeakReference, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[WeakReference] operator[<] identifier[T] operator[>] identifier[track] operator[SEP] identifier[T] identifier[obj] , identifier[Runnable] identifier[runnable] operator[SEP] { Keyword[return] operator[SEP] identifier[WeakReference] operator[<] identifier[T] operator[>] operator[SEP] identifier[track] operator[SEP] identifier[obj] , identifier[WeakReference] operator[SEP] Keyword[class] , identifier[runnable] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://sashimi.sourceforge.net/schema_revision/mzXML_3.2", name = "separationTechnique") public JAXBElement<SeparationTechniqueType> createSeparationTechnique( SeparationTechniqueType value) { return new JAXBElement<SeparationTechniqueType>(_SeparationTechnique_QNAME, SeparationTechniqueType.class, null, value); }
class class_name[name] begin[{] method[createSeparationTechnique, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_SeparationTechnique_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SeparationTechniqueType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SeparationTechniqueType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[SeparationTechniqueType] operator[>] identifier[createSeparationTechnique] operator[SEP] identifier[SeparationTechniqueType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[SeparationTechniqueType] operator[>] operator[SEP] identifier[_SeparationTechnique_QNAME] , identifier[SeparationTechniqueType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public ServiceFactory getServiceFactory(AppContextWrapper sc) { ContainerWrapper containerWrapper = containerFinder.findContainer(sc); ServiceFactory serviceFactory = (ServiceFactory) containerWrapper.lookup(ComponentKeys.WEBSERVICE_FACTORY); return serviceFactory; }
class class_name[name] begin[{] method[getServiceFactory, return_type[type[ServiceFactory]], modifier[public], parameter[sc]] begin[{] local_variable[type[ContainerWrapper], containerWrapper] local_variable[type[ServiceFactory], serviceFactory] return[member[.serviceFactory]] end[}] END[}]
Keyword[public] identifier[ServiceFactory] identifier[getServiceFactory] operator[SEP] identifier[AppContextWrapper] identifier[sc] operator[SEP] { identifier[ContainerWrapper] identifier[containerWrapper] operator[=] identifier[containerFinder] operator[SEP] identifier[findContainer] operator[SEP] identifier[sc] operator[SEP] operator[SEP] identifier[ServiceFactory] identifier[serviceFactory] operator[=] operator[SEP] identifier[ServiceFactory] operator[SEP] identifier[containerWrapper] operator[SEP] identifier[lookup] operator[SEP] identifier[ComponentKeys] operator[SEP] identifier[WEBSERVICE_FACTORY] operator[SEP] operator[SEP] Keyword[return] identifier[serviceFactory] operator[SEP] }
@Override public AuditService getAuditService() { InvocationHandler ih = new TransactionInvocationHandler(_wrapped.getAuditService(), _persistent); return (AuditService)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {AuditLogService.class}, ih); }
class class_name[name] begin[{] method[getAuditService, return_type[type[AuditService]], modifier[public], parameter[]] begin[{] local_variable[type[InvocationHandler], ih] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuditLogService, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None)), MemberReference(member=ih, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newProxyInstance, postfix_operators=[], prefix_operators=[], qualifier=Proxy, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AuditService, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AuditService] identifier[getAuditService] operator[SEP] operator[SEP] { identifier[InvocationHandler] identifier[ih] operator[=] Keyword[new] identifier[TransactionInvocationHandler] operator[SEP] identifier[_wrapped] operator[SEP] identifier[getAuditService] operator[SEP] operator[SEP] , identifier[_persistent] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[AuditService] operator[SEP] identifier[Proxy] operator[SEP] identifier[newProxyInstance] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] , Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[AuditLogService] operator[SEP] Keyword[class] } , identifier[ih] operator[SEP] operator[SEP] }
public static RelationType getInstance(Locale locale, String type) { int index = -1; String[] relationTypes = LocaleData.getStringArray(locale, LocaleData.RELATION_TYPES); for (int loop = 0; loop < relationTypes.length; loop++) { if (relationTypes[loop].equalsIgnoreCase(type) == true) { index = loop; break; } } RelationType result = null; if (index != -1) { result = RelationType.getInstance(index); } return (result); }
class class_name[name] begin[{] method[getInstance, return_type[type[RelationType]], modifier[public static], parameter[locale, type]] begin[{] local_variable[type[int], index] local_variable[type[String], relationTypes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=relationTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=loop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=loop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=loop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=relationTypes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=loop)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=loop, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[RelationType], result] if[binary_operation[member[.index], !=, literal[1]]] begin[{] assign[member[.result], call[RelationType.getInstance, parameter[member[.index]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RelationType] identifier[getInstance] operator[SEP] identifier[Locale] identifier[locale] , identifier[String] identifier[type] operator[SEP] { Keyword[int] identifier[index] operator[=] operator[-] Other[1] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[relationTypes] operator[=] identifier[LocaleData] operator[SEP] identifier[getStringArray] operator[SEP] identifier[locale] , identifier[LocaleData] operator[SEP] identifier[RELATION_TYPES] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[loop] operator[=] Other[0] operator[SEP] identifier[loop] operator[<] identifier[relationTypes] operator[SEP] identifier[length] operator[SEP] identifier[loop] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[relationTypes] operator[SEP] identifier[loop] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[type] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[index] operator[=] identifier[loop] operator[SEP] Keyword[break] operator[SEP] } } identifier[RelationType] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[!=] operator[-] Other[1] operator[SEP] { identifier[result] operator[=] identifier[RelationType] operator[SEP] identifier[getInstance] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
void setPlayingTrack(int playingTrackPosition) { if (playingTrackPosition < 0 || playingTrackPosition >= mSoundCloudPlaylist.getTracks().size()) { throw new IllegalArgumentException("No tracks a the position " + playingTrackPosition); } mCurrentTrackIndex = playingTrackPosition; }
class class_name[name] begin[{] method[setPlayingTrack, return_type[void], modifier[default], parameter[playingTrackPosition]] begin[{] if[binary_operation[binary_operation[member[.playingTrackPosition], <, literal[0]], ||, binary_operation[member[.playingTrackPosition], >=, call[mSoundCloudPlaylist.getTracks, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No tracks a the position "), operandr=MemberReference(member=playingTrackPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.mCurrentTrackIndex], member[.playingTrackPosition]] end[}] END[}]
Keyword[void] identifier[setPlayingTrack] operator[SEP] Keyword[int] identifier[playingTrackPosition] operator[SEP] { Keyword[if] operator[SEP] identifier[playingTrackPosition] operator[<] Other[0] operator[||] identifier[playingTrackPosition] operator[>=] identifier[mSoundCloudPlaylist] operator[SEP] identifier[getTracks] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[playingTrackPosition] operator[SEP] operator[SEP] } identifier[mCurrentTrackIndex] operator[=] identifier[playingTrackPosition] operator[SEP] }
@Override public DescribeNetworkInterfacePermissionsResult describeNetworkInterfacePermissions(DescribeNetworkInterfacePermissionsRequest request) { request = beforeClientExecution(request); return executeDescribeNetworkInterfacePermissions(request); }
class class_name[name] begin[{] method[describeNetworkInterfacePermissions, return_type[type[DescribeNetworkInterfacePermissionsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeNetworkInterfacePermissions, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeNetworkInterfacePermissionsResult] identifier[describeNetworkInterfacePermissions] operator[SEP] identifier[DescribeNetworkInterfacePermissionsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeNetworkInterfacePermissions] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public Object evaluate(File file) throws CompilationFailedException, IOException { GroovyShell shell = new GroovyShell(getClass().getClassLoader(), binding); return shell.evaluate(file); }
class class_name[name] begin[{] method[evaluate, return_type[type[Object]], modifier[public], parameter[file]] begin[{] local_variable[type[GroovyShell], shell] return[call[shell.evaluate, parameter[member[.file]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[CompilationFailedException] , identifier[IOException] { identifier[GroovyShell] identifier[shell] operator[=] Keyword[new] identifier[GroovyShell] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] , identifier[binding] operator[SEP] operator[SEP] Keyword[return] identifier[shell] operator[SEP] identifier[evaluate] operator[SEP] identifier[file] operator[SEP] operator[SEP] }