code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private Map<String, Object> parseFacet(String facet) throws Exception { Map<String, Object> outputMap = new HashMap<>(); if (facet.contains(AGGREGATION_IDENTIFIER)) { // Validate function for (String function : AGGREGATION_FUNCTIONS) { if (facet.startsWith(function)) { return null; } } throw new Exception("Invalid aggregation function: " + facet); } else if (facet.contains(RANGE_IDENTIFIER)) { // Deal with ranges... int numMatches = StringUtils.countMatches(facet, ':'); if (numMatches > 1) { // Special case: facet with type "query" and with a nested "range" String[] split = facet.split(":"); Map<String, Object> rangeMap = new HashMap<>(); StringBuilder filter = new StringBuilder(split[3]); for (int i = 4; i < split.length; i++) { filter.append(":").append(split[i]); } String[] range = split[0].replace("[", ":").replace("..", ":").replace("]", "").split(":"); rangeMap.put("field", range[0]); rangeMap.put("type", "range"); rangeMap.put("start", parseNumber(range[1])); rangeMap.put("end", parseNumber(range[2])); rangeMap.put("step", parseNumber(split[1])); String[] nested = split[2].split(LABEL_SEPARATOR); outputMap.put("field", nested[0]); outputMap.put("type", "query"); outputMap.put("q", filter.toString()); if (nested.length > 1) { Map<String, Object> nestedMap = new HashMap<>(); nestedMap.put("field", nested[1]); nestedMap.put("type", "terms"); Map<String, Object> auxMap1 = new HashMap<>(); auxMap1.put(range[0], rangeMap); nestedMap.put("facet", auxMap1); Map<String, Object> auxMap2 = new HashMap<>(); auxMap2.put(nested[1], nestedMap); outputMap.put("facet", auxMap2); } else { Map<String, Object> auxMap1 = new HashMap<>(); auxMap1.put(range[0], rangeMap); outputMap.put("facet", auxMap1); } } else { String[] split = facet.replace("[", ":").replace("..", ":").replace("]", "").split(":"); outputMap.put("field", split[0]); outputMap.put("start", parseNumber(split[1])); outputMap.put("end", parseNumber(split[2])); outputMap.put("step", parseNumber(split[3])); } } else { // Categorical... Matcher matcher = CATEGORICAL_PATTERN.matcher(facet); if (matcher.find()) { boolean isQuery = false; outputMap.put("field", matcher.group(1)); String include = matcher.group(2); if (StringUtils.isNotEmpty(include)) { include = include.replace("]", "").replace("[", ""); if (include.endsWith("*")) { outputMap.put("prefix", include.substring(0, include.indexOf("*"))); } else { isQuery = true; List<String> filters = new ArrayList<>(); for (String value: include.split(INCLUDE_SEPARATOR)) { filters.add(matcher.group(1) + ":" + value); } outputMap.put("q", StringUtils.join(filters, " OR ")); } } if (isQuery) { outputMap.put("type", "query"); Map<String, Object> auxMap = new HashMap<>(); auxMap.put("field", matcher.group(1)); auxMap.put("type", "terms"); setTermLimit(matcher.group(3), auxMap); Map<String, Object> tmpMap = new HashMap<>(); tmpMap.put(matcher.group(1), auxMap); outputMap.put("facet", tmpMap); } else { outputMap.put("type", "terms"); setTermLimit(matcher.group(3), outputMap); } } else { throw new Exception("Invalid categorical facet: " + facet); } } return outputMap; }
class class_name[name] begin[{] method[parseFacet, return_type[type[Map]], modifier[private], parameter[facet]] begin[{] local_variable[type[Map], outputMap] if[call[facet.contains, parameter[member[.AGGREGATION_IDENTIFIER]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=function, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=facet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=AGGREGATION_FUNCTIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=function)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid aggregation function: "), operandr=MemberReference(member=facet, 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=Exception, sub_type=None)), label=None) else begin[{] if[call[facet.contains, parameter[member[.RANGE_IDENTIFIER]]]] begin[{] local_variable[type[int], numMatches] if[binary_operation[member[.numMatches], >, literal[1]]] begin[{] local_variable[type[String], split] local_variable[type[Map], rangeMap] local_variable[type[StringBuilder], filter] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":")], member=append, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[MethodInvocation(arguments=[MemberReference(member=split, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=split, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[String], range] call[rangeMap.put, parameter[literal["field"], member[.range]]] call[rangeMap.put, parameter[literal["type"], literal["range"]]] call[rangeMap.put, parameter[literal["start"], call[.parseNumber, parameter[member[.range]]]]] call[rangeMap.put, parameter[literal["end"], call[.parseNumber, parameter[member[.range]]]]] call[rangeMap.put, parameter[literal["step"], call[.parseNumber, parameter[member[.split]]]]] local_variable[type[String], nested] call[outputMap.put, parameter[literal["field"], member[.nested]]] call[outputMap.put, parameter[literal["type"], literal["query"]]] call[outputMap.put, parameter[literal["q"], call[filter.toString, parameter[]]]] if[binary_operation[member[nested.length], >, literal[1]]] begin[{] local_variable[type[Map], nestedMap] call[nestedMap.put, parameter[literal["field"], member[.nested]]] call[nestedMap.put, parameter[literal["type"], literal["terms"]]] local_variable[type[Map], auxMap1] call[auxMap1.put, parameter[member[.range], member[.rangeMap]]] call[nestedMap.put, parameter[literal["facet"], member[.auxMap1]]] local_variable[type[Map], auxMap2] call[auxMap2.put, parameter[member[.nested], member[.nestedMap]]] call[outputMap.put, parameter[literal["facet"], member[.auxMap2]]] else begin[{] local_variable[type[Map], auxMap1] call[auxMap1.put, parameter[member[.range], member[.rangeMap]]] call[outputMap.put, parameter[literal["facet"], member[.auxMap1]]] end[}] else begin[{] local_variable[type[String], split] call[outputMap.put, parameter[literal["field"], member[.split]]] call[outputMap.put, parameter[literal["start"], call[.parseNumber, parameter[member[.split]]]]] call[outputMap.put, parameter[literal["end"], call[.parseNumber, parameter[member[.split]]]]] call[outputMap.put, parameter[literal["step"], call[.parseNumber, parameter[member[.split]]]]] end[}] else begin[{] local_variable[type[Matcher], matcher] if[call[matcher.find, parameter[]]] begin[{] local_variable[type[boolean], isQuery] call[outputMap.put, parameter[literal["field"], call[matcher.group, parameter[literal[1]]]]] local_variable[type[String], include] if[call[StringUtils.isNotEmpty, parameter[member[.include]]]] begin[{] assign[member[.include], call[include.replace, parameter[literal["]"], literal[""]]]] if[call[include.endsWith, parameter[literal["*"]]]] begin[{] call[outputMap.put, parameter[literal["prefix"], call[include.substring, parameter[literal[0], call[include.indexOf, parameter[literal["*"]]]]]]] else begin[{] assign[member[.isQuery], literal[true]] local_variable[type[List], filters] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=add, postfix_operators=[], prefix_operators=[], qualifier=filters, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=INCLUDE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=split, postfix_operators=[], prefix_operators=[], qualifier=include, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[outputMap.put, parameter[literal["q"], call[StringUtils.join, parameter[member[.filters], literal[" OR "]]]]] end[}] else begin[{] None end[}] if[member[.isQuery]] begin[{] call[outputMap.put, parameter[literal["type"], literal["query"]]] local_variable[type[Map], auxMap] call[auxMap.put, parameter[literal["field"], call[matcher.group, parameter[literal[1]]]]] call[auxMap.put, parameter[literal["type"], literal["terms"]]] call[.setTermLimit, parameter[call[matcher.group, parameter[literal[3]]], member[.auxMap]]] local_variable[type[Map], tmpMap] call[tmpMap.put, parameter[call[matcher.group, parameter[literal[1]]], member[.auxMap]]] call[outputMap.put, parameter[literal["facet"], member[.tmpMap]]] else begin[{] call[outputMap.put, parameter[literal["type"], literal["terms"]]] call[.setTermLimit, parameter[call[matcher.group, parameter[literal[3]]], member[.outputMap]]] end[}] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid categorical facet: "), operandr=MemberReference(member=facet, 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=Exception, sub_type=None)), label=None) end[}] end[}] end[}] return[member[.outputMap]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parseFacet] operator[SEP] identifier[String] identifier[facet] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[outputMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[facet] operator[SEP] identifier[contains] operator[SEP] identifier[AGGREGATION_IDENTIFIER] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[function] operator[:] identifier[AGGREGATION_FUNCTIONS] operator[SEP] { Keyword[if] operator[SEP] identifier[facet] operator[SEP] identifier[startsWith] operator[SEP] identifier[function] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[facet] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[facet] operator[SEP] identifier[contains] operator[SEP] identifier[RANGE_IDENTIFIER] operator[SEP] operator[SEP] { Keyword[int] identifier[numMatches] operator[=] identifier[StringUtils] operator[SEP] identifier[countMatches] operator[SEP] identifier[facet] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numMatches] operator[>] Other[1] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[split] operator[=] identifier[facet] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[rangeMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[filter] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[split] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[4] operator[SEP] identifier[i] operator[<] identifier[split] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[filter] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[split] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[range] operator[=] identifier[split] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[rangeMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[range] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[rangeMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[rangeMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[range] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[rangeMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[range] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[rangeMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[split] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[nested] operator[=] identifier[split] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[LABEL_SEPARATOR] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[nested] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[filter] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nested] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[nestedMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[nestedMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[nested] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[nestedMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[auxMap1] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[auxMap1] operator[SEP] identifier[put] operator[SEP] identifier[range] operator[SEP] Other[0] operator[SEP] , identifier[rangeMap] operator[SEP] operator[SEP] identifier[nestedMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[auxMap1] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[auxMap2] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[auxMap2] operator[SEP] identifier[put] operator[SEP] identifier[nested] operator[SEP] Other[1] operator[SEP] , identifier[nestedMap] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[auxMap2] operator[SEP] operator[SEP] } Keyword[else] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[auxMap1] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[auxMap1] operator[SEP] identifier[put] operator[SEP] identifier[range] operator[SEP] Other[0] operator[SEP] , identifier[rangeMap] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[auxMap1] operator[SEP] operator[SEP] } } Keyword[else] { identifier[String] operator[SEP] operator[SEP] identifier[split] operator[=] identifier[facet] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[split] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[split] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[split] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parseNumber] operator[SEP] identifier[split] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Matcher] identifier[matcher] operator[=] identifier[CATEGORICAL_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[facet] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[isQuery] operator[=] literal[boolean] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[include] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[include] operator[SEP] operator[SEP] { identifier[include] operator[=] identifier[include] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[include] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[include] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[include] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[isQuery] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[filters] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[value] operator[:] identifier[include] operator[SEP] identifier[split] operator[SEP] identifier[INCLUDE_SEPARATOR] operator[SEP] operator[SEP] { identifier[filters] operator[SEP] identifier[add] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[+] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[filters] , literal[String] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isQuery] operator[SEP] { identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[auxMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[auxMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[auxMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[setTermLimit] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[3] operator[SEP] , identifier[auxMap] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[tmpMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[tmpMap] operator[SEP] identifier[put] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] , identifier[auxMap] operator[SEP] operator[SEP] identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[tmpMap] operator[SEP] operator[SEP] } Keyword[else] { identifier[outputMap] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[setTermLimit] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[3] operator[SEP] , identifier[outputMap] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[facet] operator[SEP] operator[SEP] } } Keyword[return] identifier[outputMap] operator[SEP] }
@Override public boolean hasTileToRetrieve(int x, int y, int zoom) { // Determine if the tile should be drawn boolean drawTile = true; for (GeoPackageOverlay geoPackageOverlay : linkedOverlays) { if (geoPackageOverlay.hasTile(x, y, zoom)) { drawTile = false; break; } } return drawTile; }
class class_name[name] begin[{] method[hasTileToRetrieve, return_type[type[boolean]], modifier[public], parameter[x, y, zoom]] begin[{] local_variable[type[boolean], drawTile] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=zoom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTile, postfix_operators=[], prefix_operators=[], qualifier=geoPackageOverlay, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=drawTile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=linkedOverlays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=geoPackageOverlay)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GeoPackageOverlay, sub_type=None))), label=None) return[member[.drawTile]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasTileToRetrieve] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[zoom] operator[SEP] { Keyword[boolean] identifier[drawTile] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[GeoPackageOverlay] identifier[geoPackageOverlay] operator[:] identifier[linkedOverlays] operator[SEP] { Keyword[if] operator[SEP] identifier[geoPackageOverlay] operator[SEP] identifier[hasTile] operator[SEP] identifier[x] , identifier[y] , identifier[zoom] operator[SEP] operator[SEP] { identifier[drawTile] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[drawTile] operator[SEP] }
public void setColor(Color color) { String hex = null; Double opacity = null; if (color != null) { hex = color.getColorHexShorthand(); opacity = new Double(color.getOpacity()); } setColor(hex); setOpacity(opacity); }
class class_name[name] begin[{] method[setColor, return_type[void], modifier[public], parameter[color]] begin[{] local_variable[type[String], hex] local_variable[type[Double], opacity] if[binary_operation[member[.color], !=, literal[null]]] begin[{] assign[member[.hex], call[color.getColorHexShorthand, parameter[]]] assign[member[.opacity], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOpacity, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))] else begin[{] None end[}] call[.setColor, parameter[member[.hex]]] call[.setOpacity, parameter[member[.opacity]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setColor] operator[SEP] identifier[Color] identifier[color] operator[SEP] { identifier[String] identifier[hex] operator[=] Other[null] operator[SEP] identifier[Double] identifier[opacity] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[color] operator[!=] Other[null] operator[SEP] { identifier[hex] operator[=] identifier[color] operator[SEP] identifier[getColorHexShorthand] operator[SEP] operator[SEP] operator[SEP] identifier[opacity] operator[=] Keyword[new] identifier[Double] operator[SEP] identifier[color] operator[SEP] identifier[getOpacity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setColor] operator[SEP] identifier[hex] operator[SEP] operator[SEP] identifier[setOpacity] operator[SEP] identifier[opacity] operator[SEP] operator[SEP] }
public MethodDescriptor[] getMethodDescriptors() { BeanInfo info = getBeanInfo(); if (info == null) { return null; } MethodDescriptor[] mds = info.getMethodDescriptors(); getTeaToolsUtils().sortMethodDescriptors(mds); return mds; }
class class_name[name] begin[{] method[getMethodDescriptors, return_type[type[MethodDescriptor]], modifier[public], parameter[]] begin[{] local_variable[type[BeanInfo], info] if[binary_operation[member[.info], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[MethodDescriptor], mds] call[.getTeaToolsUtils, parameter[]] return[member[.mds]] end[}] END[}]
Keyword[public] identifier[MethodDescriptor] operator[SEP] operator[SEP] identifier[getMethodDescriptors] operator[SEP] operator[SEP] { identifier[BeanInfo] identifier[info] operator[=] identifier[getBeanInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[info] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[MethodDescriptor] operator[SEP] operator[SEP] identifier[mds] operator[=] identifier[info] operator[SEP] identifier[getMethodDescriptors] operator[SEP] operator[SEP] operator[SEP] identifier[getTeaToolsUtils] operator[SEP] operator[SEP] operator[SEP] identifier[sortMethodDescriptors] operator[SEP] identifier[mds] operator[SEP] operator[SEP] Keyword[return] identifier[mds] operator[SEP] }
public static <E extends AbstractCommand> void start(String[] args, Class<E> clazz) { initEnv(); E command = ContextFactory.getBean(clazz); command.start(args); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public static], parameter[args, clazz]] begin[{] call[.initEnv, parameter[]] local_variable[type[E], command] call[command.start, parameter[member[.args]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[AbstractCommand] operator[>] Keyword[void] identifier[start] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] , identifier[Class] operator[<] identifier[E] operator[>] identifier[clazz] operator[SEP] { identifier[initEnv] operator[SEP] operator[SEP] operator[SEP] identifier[E] identifier[command] operator[=] identifier[ContextFactory] operator[SEP] identifier[getBean] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[command] operator[SEP] identifier[start] operator[SEP] identifier[args] operator[SEP] operator[SEP] }
public static String getSLLL(String[] soilParas) { if (soilParas != null && soilParas.length >= 3) { return divide(calcMoisture1500Kpa(soilParas[0], soilParas[1], soilParas[2]), "100", 3); } else { return null; } }
class class_name[name] begin[{] method[getSLLL, return_type[type[String]], modifier[public static], parameter[soilParas]] begin[{] if[binary_operation[binary_operation[member[.soilParas], !=, literal[null]], &&, binary_operation[member[soilParas.length], >=, literal[3]]]] begin[{] return[call[.divide, parameter[call[.calcMoisture1500Kpa, parameter[member[.soilParas], member[.soilParas], member[.soilParas]]], literal["100"], literal[3]]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getSLLL] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[soilParas] operator[SEP] { Keyword[if] operator[SEP] identifier[soilParas] operator[!=] Other[null] operator[&&] identifier[soilParas] operator[SEP] identifier[length] operator[>=] Other[3] operator[SEP] { Keyword[return] identifier[divide] operator[SEP] identifier[calcMoisture1500Kpa] operator[SEP] identifier[soilParas] operator[SEP] Other[0] operator[SEP] , identifier[soilParas] operator[SEP] Other[1] operator[SEP] , identifier[soilParas] operator[SEP] Other[2] operator[SEP] operator[SEP] , literal[String] , Other[3] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
private void flattenNameRef(String alias, Node n, Node parent, String originalName) { Preconditions.checkArgument( n.isGetProp(), "Expected GETPROP, found %s. Node: %s", n.getToken(), n); // BEFORE: // getprop // getprop // name a // string b // string c // AFTER: // name a$b$c Node ref = NodeUtil.newName(compiler, alias, n, originalName); NodeUtil.copyNameAnnotations(n.getLastChild(), ref); if (parent.isCall() && n == parent.getFirstChild()) { // The node was a call target, we are deliberately flatten these as // we node the "this" isn't provided by the namespace. Mark it as such: parent.putBooleanProp(Node.FREE_CALL, true); } JSType type = n.getJSType(); if (type != null) { ref.setJSType(type); } parent.replaceChild(n, ref); compiler.reportChangeToEnclosingScope(ref); }
class class_name[name] begin[{] method[flattenNameRef, return_type[void], modifier[private], parameter[alias, n, parent, originalName]] begin[{] call[Preconditions.checkArgument, parameter[call[n.isGetProp, parameter[]], literal["Expected GETPROP, found %s. Node: %s"], call[n.getToken, parameter[]], member[.n]]] local_variable[type[Node], ref] call[NodeUtil.copyNameAnnotations, parameter[call[n.getLastChild, parameter[]], member[.ref]]] if[binary_operation[call[parent.isCall, parameter[]], &&, binary_operation[member[.n], ==, call[parent.getFirstChild, parameter[]]]]] begin[{] call[parent.putBooleanProp, parameter[member[Node.FREE_CALL], literal[true]]] else begin[{] None end[}] local_variable[type[JSType], type] if[binary_operation[member[.type], !=, literal[null]]] begin[{] call[ref.setJSType, parameter[member[.type]]] else begin[{] None end[}] call[parent.replaceChild, parameter[member[.n], member[.ref]]] call[compiler.reportChangeToEnclosingScope, parameter[member[.ref]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[flattenNameRef] operator[SEP] identifier[String] identifier[alias] , identifier[Node] identifier[n] , identifier[Node] identifier[parent] , identifier[String] identifier[originalName] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[n] operator[SEP] identifier[isGetProp] operator[SEP] operator[SEP] , literal[String] , identifier[n] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] , identifier[n] operator[SEP] operator[SEP] identifier[Node] identifier[ref] operator[=] identifier[NodeUtil] operator[SEP] identifier[newName] operator[SEP] identifier[compiler] , identifier[alias] , identifier[n] , identifier[originalName] operator[SEP] operator[SEP] identifier[NodeUtil] operator[SEP] identifier[copyNameAnnotations] operator[SEP] identifier[n] operator[SEP] identifier[getLastChild] operator[SEP] operator[SEP] , identifier[ref] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] operator[SEP] identifier[isCall] operator[SEP] operator[SEP] operator[&&] identifier[n] operator[==] identifier[parent] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] { identifier[parent] operator[SEP] identifier[putBooleanProp] operator[SEP] identifier[Node] operator[SEP] identifier[FREE_CALL] , literal[boolean] operator[SEP] operator[SEP] } identifier[JSType] identifier[type] operator[=] identifier[n] operator[SEP] identifier[getJSType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[!=] Other[null] operator[SEP] { identifier[ref] operator[SEP] identifier[setJSType] operator[SEP] identifier[type] operator[SEP] operator[SEP] } identifier[parent] operator[SEP] identifier[replaceChild] operator[SEP] identifier[n] , identifier[ref] operator[SEP] operator[SEP] identifier[compiler] operator[SEP] identifier[reportChangeToEnclosingScope] operator[SEP] identifier[ref] operator[SEP] operator[SEP] }
public void marshall(DeleteFlowRequest deleteFlowRequest, ProtocolMarshaller protocolMarshaller) { if (deleteFlowRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteFlowRequest.getFlowArn(), FLOWARN_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[deleteFlowRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteFlowRequest], ==, 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=getFlowArn, postfix_operators=[], prefix_operators=[], qualifier=deleteFlowRequest, selectors=[], type_arguments=None), MemberReference(member=FLOWARN_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[DeleteFlowRequest] identifier[deleteFlowRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteFlowRequest] 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[deleteFlowRequest] operator[SEP] identifier[getFlowArn] operator[SEP] operator[SEP] , identifier[FLOWARN_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] } }
@Override public List<CommercePriceList> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[]] begin[{] return[call[.findAll, parameter[member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommercePriceList] operator[>] identifier[findAll] operator[SEP] operator[SEP] { Keyword[return] identifier[findAll] operator[SEP] identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] }
public static void hess(Matrix A, ExecutorService threadpool) { if(!A.isSquare()) throw new ArithmeticException("Only square matrices can be converted to Upper Hessenberg form"); int m = A.rows(); /** * Space used to store the vector for updating the columns of A */ DenseVector columnUpdateTmp = new DenseVector(m); double[] vk = new double[m]; /** * Space used for updating the sub matrix at step i */ double[] subMatrixUpdateTmp = new double[m]; double tmp;//Used for temp values for(int i = 0; i < m-2; i++) { //Holds the norm, sqrt{a_i^2 + ... + a_m^2} double s = 0.0; //First step of the loop done outside to do extra bit double sigh = A.get(i+1, i);//Holds the multiplication factor vk[i+1] = sigh; s += sigh*sigh; sigh = sigh > 0 ? 1 : -1;//Sign dosnt change the squaring, so we do it first for(int j = i+2; j < m; j++) { tmp = A.get(j, i); vk[j] = tmp; s += tmp*tmp; } double s1 = -sigh*Math.sqrt(s); //Now re use s to quickly get the norm of vk, since it will be almost the same vector s -= vk[i+1]*vk[i+1]; vk[i+1] -= s1; s += vk[i+1]*vk[i+1]; double s1Inv = 1.0/Math.sqrt(s);//Re use to store the norm of vk. Do the inverse to multiply quickly instead of divide for(int j = i+1; j < m; j++) vk[j] *= s1Inv; //Update sub sub matrix A[i+1:m, i:m] //NOTE: The first column that will be altered can be done ourslves, since we know the value set (s1) and that all below it will ber zero Matrix subA = new SubMatrix(A, i+1, i, m, m); DenseVector vVec = new DenseVector(vk, i+1, m); Vec tmpV = new DenseVector(subMatrixUpdateTmp, i, m); tmpV.zeroOut(); vVec.multiply(subA, tmpV); if(threadpool == null) OuterProductUpdate(subA, vVec, tmpV, -2.0); else OuterProductUpdate(subA, vVec, tmpV, -2.0, threadpool); //Zero out ourselves after. //TODO implement so we dont compute the first row A.set(i+1, i, s1); for(int j = i+2; j < m; j++) A.set(j, i, 0.0); //Update the columns of A[0:m, i+1:m] subA = new SubMatrix(A, 0, i+1, m, m); columnUpdateTmp.zeroOut(); subA.multiply(vVec, 1.0, columnUpdateTmp); if(threadpool == null) OuterProductUpdate(subA, columnUpdateTmp, vVec, -2.0); else OuterProductUpdate(subA, columnUpdateTmp, vVec, -2.0, threadpool); } }
class class_name[name] begin[{] method[hess, return_type[void], modifier[public static], parameter[A, threadpool]] begin[{] if[call[A.isSquare, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Only square matrices can be converted to Upper Hessenberg form")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], m] local_variable[type[DenseVector], columnUpdateTmp] local_variable[type[double], vk] local_variable[type[double], subMatrixUpdateTmp] local_variable[type[double], tmp] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=s)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), name=sigh)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=MemberReference(member=sigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=sigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=sigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))), label=None), 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=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=sigh, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), name=s1)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=*)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type=-=, value=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=*)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operandr=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), name=s1Inv)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=*=, value=MemberReference(member=s1Inv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=A, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m, 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=SubMatrix, sub_type=None)), name=subA)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matrix, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=vk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=m, 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=DenseVector, sub_type=None)), name=vVec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DenseVector, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=subMatrixUpdateTmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m, 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=DenseVector, sub_type=None)), name=tmpV)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Vec, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=zeroOut, postfix_operators=[], prefix_operators=[], qualifier=tmpV, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=multiply, postfix_operators=[], prefix_operators=[], qualifier=vVec, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=threadpool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=2.0), MemberReference(member=threadpool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=OuterProductUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=2.0)], member=OuterProductUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), label=None), ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)], member=set, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=A, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m, 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=SubMatrix, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=zeroOut, postfix_operators=[], prefix_operators=[], qualifier=columnUpdateTmp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=vVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), MemberReference(member=columnUpdateTmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=multiply, postfix_operators=[], prefix_operators=[], qualifier=subA, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=threadpool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnUpdateTmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=2.0), MemberReference(member=threadpool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=OuterProductUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnUpdateTmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vVec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=2.0)], member=OuterProductUpdate, 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=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[hess] operator[SEP] identifier[Matrix] identifier[A] , identifier[ExecutorService] identifier[threadpool] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[A] operator[SEP] identifier[isSquare] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[m] operator[=] identifier[A] operator[SEP] identifier[rows] operator[SEP] operator[SEP] operator[SEP] identifier[DenseVector] identifier[columnUpdateTmp] operator[=] Keyword[new] identifier[DenseVector] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[vk] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[subMatrixUpdateTmp] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] identifier[tmp] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m] operator[-] Other[2] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[s] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[sigh] operator[=] identifier[A] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[+] Other[1] , identifier[i] operator[SEP] operator[SEP] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[=] identifier[sigh] operator[SEP] identifier[s] operator[+=] identifier[sigh] operator[*] identifier[sigh] operator[SEP] identifier[sigh] operator[=] identifier[sigh] operator[>] Other[0] operator[?] Other[1] operator[:] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[+] Other[2] operator[SEP] identifier[j] operator[<] identifier[m] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[tmp] operator[=] identifier[A] operator[SEP] identifier[get] operator[SEP] identifier[j] , identifier[i] operator[SEP] operator[SEP] identifier[vk] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[tmp] operator[SEP] identifier[s] operator[+=] identifier[tmp] operator[*] identifier[tmp] operator[SEP] } Keyword[double] identifier[s1] operator[=] operator[-] identifier[sigh] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[s] operator[-=] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[*] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[-=] identifier[s1] operator[SEP] identifier[s] operator[+=] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[*] identifier[vk] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[double] identifier[s1Inv] operator[=] literal[Float] operator[/] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[j] operator[<] identifier[m] operator[SEP] identifier[j] operator[++] operator[SEP] identifier[vk] operator[SEP] identifier[j] operator[SEP] operator[*=] identifier[s1Inv] operator[SEP] identifier[Matrix] identifier[subA] operator[=] Keyword[new] identifier[SubMatrix] operator[SEP] identifier[A] , identifier[i] operator[+] Other[1] , identifier[i] , identifier[m] , identifier[m] operator[SEP] operator[SEP] identifier[DenseVector] identifier[vVec] operator[=] Keyword[new] identifier[DenseVector] operator[SEP] identifier[vk] , identifier[i] operator[+] Other[1] , identifier[m] operator[SEP] operator[SEP] identifier[Vec] identifier[tmpV] operator[=] Keyword[new] identifier[DenseVector] operator[SEP] identifier[subMatrixUpdateTmp] , identifier[i] , identifier[m] operator[SEP] operator[SEP] identifier[tmpV] operator[SEP] identifier[zeroOut] operator[SEP] operator[SEP] operator[SEP] identifier[vVec] operator[SEP] identifier[multiply] operator[SEP] identifier[subA] , identifier[tmpV] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[threadpool] operator[==] Other[null] operator[SEP] identifier[OuterProductUpdate] operator[SEP] identifier[subA] , identifier[vVec] , identifier[tmpV] , operator[-] literal[Float] operator[SEP] operator[SEP] Keyword[else] identifier[OuterProductUpdate] operator[SEP] identifier[subA] , identifier[vVec] , identifier[tmpV] , operator[-] literal[Float] , identifier[threadpool] operator[SEP] operator[SEP] identifier[A] operator[SEP] identifier[set] operator[SEP] identifier[i] operator[+] Other[1] , identifier[i] , identifier[s1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[+] Other[2] operator[SEP] identifier[j] operator[<] identifier[m] operator[SEP] identifier[j] operator[++] operator[SEP] identifier[A] operator[SEP] identifier[set] operator[SEP] identifier[j] , identifier[i] , literal[Float] operator[SEP] operator[SEP] identifier[subA] operator[=] Keyword[new] identifier[SubMatrix] operator[SEP] identifier[A] , Other[0] , identifier[i] operator[+] Other[1] , identifier[m] , identifier[m] operator[SEP] operator[SEP] identifier[columnUpdateTmp] operator[SEP] identifier[zeroOut] operator[SEP] operator[SEP] operator[SEP] identifier[subA] operator[SEP] identifier[multiply] operator[SEP] identifier[vVec] , literal[Float] , identifier[columnUpdateTmp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[threadpool] operator[==] Other[null] operator[SEP] identifier[OuterProductUpdate] operator[SEP] identifier[subA] , identifier[columnUpdateTmp] , identifier[vVec] , operator[-] literal[Float] operator[SEP] operator[SEP] Keyword[else] identifier[OuterProductUpdate] operator[SEP] identifier[subA] , identifier[columnUpdateTmp] , identifier[vVec] , operator[-] literal[Float] , identifier[threadpool] operator[SEP] operator[SEP] } }
private void readStreamResult(InH3 hIn, HeadersAmp headers) throws IOException { ServiceRefAmp serviceRef = readToAddress(hIn); long id = hIn.readLong(); QueryRefAmp queryRef = serviceRef.getQueryRef(id); if (queryRef != null) { ClassLoader loader = queryRef.getClassLoader(); Thread thread = Thread.currentThread(); thread.setContextClassLoader(loader); // XXX: _serializer.setClassLoader(loader); } int sequence = hIn.readInt(); List<Object> values = (List) hIn.readObject(); Throwable exn = (Throwable) hIn.readObject(Throwable.class); boolean isComplete = hIn.readBoolean(); if (log.isLoggable(_logLevel)) { log.log(_logLevel, "stream-result-r " + values + "," + isComplete + " (in " + this + ")" + "\n {id:" + id + ", to:" + serviceRef + "," + headers + "}"); } if (queryRef != null) { if (queryRef.accept(headers, values, sequence, isComplete)) { serviceRef.removeQueryRef(id); } if (exn != null) { serviceRef.removeQueryRef(id); queryRef.fail(headers, exn); } /* if (isComplete) { // XXX: timing //serviceRef.removeQueryRef(id); // queryRef.completeStream(headers, sequence); } */ /* else if (queryRef.isCancelled()) { System.out.println("CANCEL_ME: " + queryRef); } */ } else if (log.isLoggable(Level.WARNING)) { log.warning("query-result qid=" + id + " for service " + serviceRef + " does not match any known queries.\n" + headers); } }
class class_name[name] begin[{] method[readStreamResult, return_type[void], modifier[private], parameter[hIn, headers]] begin[{] local_variable[type[ServiceRefAmp], serviceRef] local_variable[type[long], id] local_variable[type[QueryRefAmp], queryRef] if[binary_operation[member[.queryRef], !=, literal[null]]] begin[{] local_variable[type[ClassLoader], loader] local_variable[type[Thread], thread] call[thread.setContextClassLoader, parameter[member[.loader]]] else begin[{] None end[}] local_variable[type[int], sequence] local_variable[type[List], values] local_variable[type[Throwable], exn] local_variable[type[boolean], isComplete] if[call[log.isLoggable, parameter[member[._logLevel]]]] begin[{] call[log.log, parameter[member[._logLevel], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["stream-result-r "], +, member[.values]], +, literal[","]], +, member[.isComplete]], +, literal[" (in "]], +, THIS[]], +, literal[")"]], +, literal["\n {id:"]], +, member[.id]], +, literal[", to:"]], +, member[.serviceRef]], +, literal[","]], +, member[.headers]], +, literal["}"]]]] else begin[{] None end[}] if[binary_operation[member[.queryRef], !=, literal[null]]] begin[{] if[call[queryRef.accept, parameter[member[.headers], member[.values], member[.sequence], member[.isComplete]]]] begin[{] call[serviceRef.removeQueryRef, parameter[member[.id]]] else begin[{] None end[}] if[binary_operation[member[.exn], !=, literal[null]]] begin[{] call[serviceRef.removeQueryRef, parameter[member[.id]]] call[queryRef.fail, parameter[member[.headers], member[.exn]]] else begin[{] None end[}] else begin[{] if[call[log.isLoggable, parameter[member[Level.WARNING]]]] begin[{] call[log.warning, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["query-result qid="], +, member[.id]], +, literal[" for service "]], +, member[.serviceRef]], +, literal[" does not match any known queries.\n"]], +, member[.headers]]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[readStreamResult] operator[SEP] identifier[InH3] identifier[hIn] , identifier[HeadersAmp] identifier[headers] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ServiceRefAmp] identifier[serviceRef] operator[=] identifier[readToAddress] operator[SEP] identifier[hIn] operator[SEP] operator[SEP] Keyword[long] identifier[id] operator[=] identifier[hIn] operator[SEP] identifier[readLong] operator[SEP] operator[SEP] operator[SEP] identifier[QueryRefAmp] identifier[queryRef] operator[=] identifier[serviceRef] operator[SEP] identifier[getQueryRef] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[queryRef] operator[!=] Other[null] operator[SEP] { identifier[ClassLoader] identifier[loader] operator[=] identifier[queryRef] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[Thread] identifier[thread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[thread] operator[SEP] identifier[setContextClassLoader] operator[SEP] identifier[loader] operator[SEP] operator[SEP] } Keyword[int] identifier[sequence] operator[=] identifier[hIn] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[values] operator[=] operator[SEP] identifier[List] operator[SEP] identifier[hIn] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] identifier[Throwable] identifier[exn] operator[=] operator[SEP] identifier[Throwable] operator[SEP] identifier[hIn] operator[SEP] identifier[readObject] operator[SEP] identifier[Throwable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[boolean] identifier[isComplete] operator[=] identifier[hIn] operator[SEP] identifier[readBoolean] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[_logLevel] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[_logLevel] , literal[String] operator[+] identifier[values] operator[+] literal[String] operator[+] identifier[isComplete] operator[+] literal[String] operator[+] Keyword[this] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[serviceRef] operator[+] literal[String] operator[+] identifier[headers] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[queryRef] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[queryRef] operator[SEP] identifier[accept] operator[SEP] identifier[headers] , identifier[values] , identifier[sequence] , identifier[isComplete] operator[SEP] operator[SEP] { identifier[serviceRef] operator[SEP] identifier[removeQueryRef] operator[SEP] identifier[id] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[exn] operator[!=] Other[null] operator[SEP] { identifier[serviceRef] operator[SEP] identifier[removeQueryRef] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[queryRef] operator[SEP] identifier[fail] operator[SEP] identifier[headers] , identifier[exn] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[WARNING] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[serviceRef] operator[+] literal[String] operator[+] identifier[headers] operator[SEP] operator[SEP] } }
@Nullable public static JsonReader enterPath(JsonReader reader, String path1, String path2) throws IOException { return enterPath(reader, path1) != null ? enterPath(reader, path2) : null; }
class class_name[name] begin[{] method[enterPath, return_type[type[JsonReader]], modifier[public static], parameter[reader, path1, path2]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enterPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enterPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[JsonReader] identifier[enterPath] operator[SEP] identifier[JsonReader] identifier[reader] , identifier[String] identifier[path1] , identifier[String] identifier[path2] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[enterPath] operator[SEP] identifier[reader] , identifier[path1] operator[SEP] operator[!=] Other[null] operator[?] identifier[enterPath] operator[SEP] identifier[reader] , identifier[path2] operator[SEP] operator[:] Other[null] operator[SEP] }
public static boolean checkpointsMatch( Collection<CompletedCheckpoint> first, Collection<CompletedCheckpoint> second) { if (first.size() != second.size()) { return false; } List<Tuple2<Long, JobID>> firstInterestingFields = new ArrayList<>(first.size()); for (CompletedCheckpoint checkpoint : first) { firstInterestingFields.add( new Tuple2<>(checkpoint.getCheckpointID(), checkpoint.getJobId())); } List<Tuple2<Long, JobID>> secondInterestingFields = new ArrayList<>(second.size()); for (CompletedCheckpoint checkpoint : second) { secondInterestingFields.add( new Tuple2<>(checkpoint.getCheckpointID(), checkpoint.getJobId())); } return firstInterestingFields.equals(secondInterestingFields); }
class class_name[name] begin[{] method[checkpointsMatch, return_type[type[boolean]], modifier[public static], parameter[first, second]] begin[{] if[binary_operation[call[first.size, parameter[]], !=, call[second.size, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[List], firstInterestingFields] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getCheckpointID, postfix_operators=[], prefix_operators=[], qualifier=checkpoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getJobId, postfix_operators=[], prefix_operators=[], qualifier=checkpoint, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Tuple2, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=firstInterestingFields, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=checkpoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompletedCheckpoint, sub_type=None))), label=None) local_variable[type[List], secondInterestingFields] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getCheckpointID, postfix_operators=[], prefix_operators=[], qualifier=checkpoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getJobId, postfix_operators=[], prefix_operators=[], qualifier=checkpoint, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Tuple2, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=secondInterestingFields, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=second, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=checkpoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompletedCheckpoint, sub_type=None))), label=None) return[call[firstInterestingFields.equals, parameter[member[.secondInterestingFields]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkpointsMatch] operator[SEP] identifier[Collection] operator[<] identifier[CompletedCheckpoint] operator[>] identifier[first] , identifier[Collection] operator[<] identifier[CompletedCheckpoint] operator[>] identifier[second] operator[SEP] { Keyword[if] operator[SEP] identifier[first] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[second] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[List] operator[<] identifier[Tuple2] operator[<] identifier[Long] , identifier[JobID] operator[>] operator[>] identifier[firstInterestingFields] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[first] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CompletedCheckpoint] identifier[checkpoint] operator[:] identifier[first] operator[SEP] { identifier[firstInterestingFields] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Tuple2] operator[<] operator[>] operator[SEP] identifier[checkpoint] operator[SEP] identifier[getCheckpointID] operator[SEP] operator[SEP] , identifier[checkpoint] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Tuple2] operator[<] identifier[Long] , identifier[JobID] operator[>] operator[>] identifier[secondInterestingFields] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[second] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CompletedCheckpoint] identifier[checkpoint] operator[:] identifier[second] operator[SEP] { identifier[secondInterestingFields] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Tuple2] operator[<] operator[>] operator[SEP] identifier[checkpoint] operator[SEP] identifier[getCheckpointID] operator[SEP] operator[SEP] , identifier[checkpoint] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[firstInterestingFields] operator[SEP] identifier[equals] operator[SEP] identifier[secondInterestingFields] operator[SEP] operator[SEP] }
private void flush(final boolean propagate) throws IOException { final int avail = baseNCodec.available(context); if (avail > 0) { final byte[] buf = new byte[avail]; final int c = baseNCodec.readResults(buf, 0, avail, context); if (c > 0) { out.write(buf, 0, c); } } if (propagate) { out.flush(); } }
class class_name[name] begin[{] method[flush, return_type[void], modifier[private], parameter[propagate]] begin[{] local_variable[type[int], avail] if[binary_operation[member[.avail], >, literal[0]]] begin[{] local_variable[type[byte], buf] local_variable[type[int], c] if[binary_operation[member[.c], >, literal[0]]] begin[{] call[out.write, parameter[member[.buf], literal[0], member[.c]]] else begin[{] None end[}] else begin[{] None end[}] if[member[.propagate]] begin[{] call[out.flush, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[flush] operator[SEP] Keyword[final] Keyword[boolean] identifier[propagate] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[int] identifier[avail] operator[=] identifier[baseNCodec] operator[SEP] identifier[available] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[avail] operator[>] Other[0] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[avail] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[c] operator[=] identifier[baseNCodec] operator[SEP] identifier[readResults] operator[SEP] identifier[buf] , Other[0] , identifier[avail] , identifier[context] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[>] Other[0] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buf] , Other[0] , identifier[c] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[propagate] operator[SEP] { identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } }
public static void write(final HighScoringPair hsp, final PrintWriter writer) { checkNotNull(hsp); checkNotNull(writer); writer.println(hsp.toString()); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public static], parameter[hsp, writer]] begin[{] call[.checkNotNull, parameter[member[.hsp]]] call[.checkNotNull, parameter[member[.writer]]] call[writer.println, parameter[call[hsp.toString, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[HighScoringPair] identifier[hsp] , Keyword[final] identifier[PrintWriter] identifier[writer] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[hsp] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[println] operator[SEP] identifier[hsp] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Nullable public static String unifyIBAN (@Nullable final String sIBAN) { if (sIBAN == null) return null; // to uppercase String sRealIBAN = sIBAN.toUpperCase (Locale.US); // kick all non-IBAN chars sRealIBAN = RegExHelper.stringReplacePattern ("[^0-9A-Z]", sRealIBAN, ""); if (sRealIBAN.length () < 4) return null; return sRealIBAN; }
class class_name[name] begin[{] method[unifyIBAN, return_type[type[String]], modifier[public static], parameter[sIBAN]] begin[{] if[binary_operation[member[.sIBAN], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], sRealIBAN] assign[member[.sRealIBAN], call[RegExHelper.stringReplacePattern, parameter[literal["[^0-9A-Z]"], member[.sRealIBAN], literal[""]]]] if[binary_operation[call[sRealIBAN.length, parameter[]], <, literal[4]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.sRealIBAN]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[unifyIBAN] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sIBAN] operator[SEP] { Keyword[if] operator[SEP] identifier[sIBAN] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] identifier[sRealIBAN] operator[=] identifier[sIBAN] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] identifier[sRealIBAN] operator[=] identifier[RegExHelper] operator[SEP] identifier[stringReplacePattern] operator[SEP] literal[String] , identifier[sRealIBAN] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sRealIBAN] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[4] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[sRealIBAN] operator[SEP] }
public ItemRequest<Tag> delete(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "DELETE"); }
class class_name[name] begin[{] method[delete, return_type[type[ItemRequest]], modifier[public], parameter[tag]] begin[{] local_variable[type[String], path] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Tag, sub_type=None)), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DELETE")], 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=Tag, sub_type=None))], dimensions=None, name=ItemRequest, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ItemRequest] operator[<] identifier[Tag] operator[>] identifier[delete] operator[SEP] identifier[String] identifier[tag] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[tag] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ItemRequest] operator[<] identifier[Tag] operator[>] operator[SEP] Keyword[this] , identifier[Tag] operator[SEP] Keyword[class] , identifier[path] , literal[String] operator[SEP] operator[SEP] }
public OvhLegacyVrack serviceName_legacyVrack_legacyVrack_GET(String serviceName, String legacyVrack) throws IOException { String qPath = "/vrack/{serviceName}/legacyVrack/{legacyVrack}"; StringBuilder sb = path(qPath, serviceName, legacyVrack); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhLegacyVrack.class); }
class class_name[name] begin[{] method[serviceName_legacyVrack_legacyVrack_GET, return_type[type[OvhLegacyVrack]], modifier[public], parameter[serviceName, legacyVrack]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhLegacyVrack, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhLegacyVrack] identifier[serviceName_legacyVrack_legacyVrack_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[legacyVrack] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[legacyVrack] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhLegacyVrack] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public BlockInfo queryBlockByNumber(Collection<Peer> peers, long blockNumber) throws InvalidArgumentException, ProposalException { return queryBlockByNumber(peers, blockNumber, client.getUserContext()); }
class class_name[name] begin[{] method[queryBlockByNumber, return_type[type[BlockInfo]], modifier[public], parameter[peers, blockNumber]] begin[{] return[call[.queryBlockByNumber, parameter[member[.peers], member[.blockNumber], call[client.getUserContext, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[BlockInfo] identifier[queryBlockByNumber] operator[SEP] identifier[Collection] operator[<] identifier[Peer] operator[>] identifier[peers] , Keyword[long] identifier[blockNumber] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] , identifier[ProposalException] { Keyword[return] identifier[queryBlockByNumber] operator[SEP] identifier[peers] , identifier[blockNumber] , identifier[client] operator[SEP] identifier[getUserContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public T addAsLibrary(String resourceName, String target) throws IllegalArgumentException { Validate.notNull(resourceName, "ResourceName must be specified"); Validate.notNull(target, "Target must be specified"); return addAsLibrary(resourceName, new BasicPath(target)); }
class class_name[name] begin[{] method[addAsLibrary, return_type[type[T]], modifier[public], parameter[resourceName, target]] begin[{] call[Validate.notNull, parameter[member[.resourceName], literal["ResourceName must be specified"]]] call[Validate.notNull, parameter[member[.target], literal["Target must be specified"]]] return[call[.addAsLibrary, parameter[member[.resourceName], ClassCreator(arguments=[MemberReference(member=target, 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=BasicPath, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[addAsLibrary] operator[SEP] identifier[String] identifier[resourceName] , identifier[String] identifier[target] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[resourceName] , literal[String] operator[SEP] operator[SEP] identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[target] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[addAsLibrary] operator[SEP] identifier[resourceName] , Keyword[new] identifier[BasicPath] operator[SEP] identifier[target] operator[SEP] operator[SEP] operator[SEP] }
public static CPDefinitionLink fetchByCPD_T_Last(long CPDefinitionId, String type, OrderByComparator<CPDefinitionLink> orderByComparator) { return getPersistence() .fetchByCPD_T_Last(CPDefinitionId, type, orderByComparator); }
class class_name[name] begin[{] method[fetchByCPD_T_Last, return_type[type[CPDefinitionLink]], modifier[public static], parameter[CPDefinitionId, type, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPDefinitionLink] identifier[fetchByCPD_T_Last] operator[SEP] Keyword[long] identifier[CPDefinitionId] , identifier[String] identifier[type] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionLink] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByCPD_T_Last] operator[SEP] identifier[CPDefinitionId] , identifier[type] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public void deleteFile(String name) throws IOException { if (!fs.delete(new Path(directory, name))) { throw new IOException("Cannot delete index file " + name); } }
class class_name[name] begin[{] method[deleteFile, return_type[void], modifier[public], parameter[name]] begin[{] if[call[fs.delete, parameter[ClassCreator(arguments=[MemberReference(member=directory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, 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=Path, sub_type=None))]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot delete index file "), operandr=MemberReference(member=name, 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[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteFile] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[fs] operator[SEP] identifier[delete] operator[SEP] Keyword[new] identifier[Path] operator[SEP] identifier[directory] , identifier[name] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[name] operator[SEP] operator[SEP] } }
private float getConstrainedDestinationScale(float scale) { scale = Math.max(scale, mEffectiveMinScale); scale = Math.min(scale, mMaxScale); return scale; }
class class_name[name] begin[{] method[getConstrainedDestinationScale, return_type[type[float]], modifier[private], parameter[scale]] begin[{] assign[member[.scale], call[Math.max, parameter[member[.scale], member[.mEffectiveMinScale]]]] assign[member[.scale], call[Math.min, parameter[member[.scale], member[.mMaxScale]]]] return[member[.scale]] end[}] END[}]
Keyword[private] Keyword[float] identifier[getConstrainedDestinationScale] operator[SEP] Keyword[float] identifier[scale] operator[SEP] { identifier[scale] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[scale] , identifier[mEffectiveMinScale] operator[SEP] operator[SEP] identifier[scale] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[scale] , identifier[mMaxScale] operator[SEP] operator[SEP] Keyword[return] identifier[scale] operator[SEP] }
public void setXUnitBase(Integer newXUnitBase) { Integer oldXUnitBase = xUnitBase; xUnitBase = newXUnitBase; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__XUNIT_BASE, oldXUnitBase, xUnitBase)); }
class class_name[name] begin[{] method[setXUnitBase, return_type[void], modifier[public], parameter[newXUnitBase]] begin[{] local_variable[type[Integer], oldXUnitBase] assign[member[.xUnitBase], member[.newXUnitBase]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=FNC__XUNIT_BASE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldXUnitBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=xUnitBase, 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=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setXUnitBase] operator[SEP] identifier[Integer] identifier[newXUnitBase] operator[SEP] { identifier[Integer] identifier[oldXUnitBase] operator[=] identifier[xUnitBase] operator[SEP] identifier[xUnitBase] operator[=] identifier[newXUnitBase] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[FNC__XUNIT_BASE] , identifier[oldXUnitBase] , identifier[xUnitBase] operator[SEP] operator[SEP] operator[SEP] }
private PHSCoverLetter12Document getPHSCoverLetter() { PHSCoverLetter12Document phsCoverLetterDocument = PHSCoverLetter12Document.Factory .newInstance(); PHSCoverLetter12 phsCoverLetter = PHSCoverLetter12.Factory .newInstance(); CoverLetterFile coverLetterFile = CoverLetterFile.Factory.newInstance(); phsCoverLetter.setFormVersion(FormVersion.v1_2.getVersion()); AttachedFileDataType attachedFileDataType = null; for (NarrativeContract narrative : pdDoc.getDevelopmentProposal() .getNarratives()) { if (narrative.getNarrativeType().getCode() != null && Integer.parseInt(narrative.getNarrativeType().getCode()) == NARRATIVE_PHS_COVER_LETTER) { attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType != null){ coverLetterFile.setCoverLetterFilename(attachedFileDataType); break; } } } phsCoverLetter.setCoverLetterFile(coverLetterFile); phsCoverLetterDocument.setPHSCoverLetter12(phsCoverLetter); return phsCoverLetterDocument; }
class class_name[name] begin[{] method[getPHSCoverLetter, return_type[type[PHSCoverLetter12Document]], modifier[private], parameter[]] begin[{] local_variable[type[PHSCoverLetter12Document], phsCoverLetterDocument] local_variable[type[PHSCoverLetter12], phsCoverLetter] local_variable[type[CoverLetterFile], coverLetterFile] call[phsCoverLetter.setFormVersion, parameter[call[FormVersion.v1_2.getVersion, parameter[]]]] local_variable[type[AttachedFileDataType], attachedFileDataType] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNarrativeType, postfix_operators=[], prefix_operators=[], qualifier=narrative, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNarrativeType, postfix_operators=[], prefix_operators=[], qualifier=narrative, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operandr=MemberReference(member=NARRATIVE_PHS_COVER_LETTER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=narrative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachedFileType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCoverLetterFilename, postfix_operators=[], prefix_operators=[], qualifier=coverLetterFile, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDevelopmentProposal, postfix_operators=[], prefix_operators=[], qualifier=pdDoc, selectors=[MethodInvocation(arguments=[], member=getNarratives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=narrative)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NarrativeContract, sub_type=None))), label=None) call[phsCoverLetter.setCoverLetterFile, parameter[member[.coverLetterFile]]] call[phsCoverLetterDocument.setPHSCoverLetter12, parameter[member[.phsCoverLetter]]] return[member[.phsCoverLetterDocument]] end[}] END[}]
Keyword[private] identifier[PHSCoverLetter12Document] identifier[getPHSCoverLetter] operator[SEP] operator[SEP] { identifier[PHSCoverLetter12Document] identifier[phsCoverLetterDocument] operator[=] identifier[PHSCoverLetter12Document] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[PHSCoverLetter12] identifier[phsCoverLetter] operator[=] identifier[PHSCoverLetter12] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[CoverLetterFile] identifier[coverLetterFile] operator[=] identifier[CoverLetterFile] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[phsCoverLetter] operator[SEP] identifier[setFormVersion] operator[SEP] identifier[FormVersion] operator[SEP] identifier[v1_2] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[AttachedFileDataType] identifier[attachedFileDataType] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[NarrativeContract] identifier[narrative] operator[:] identifier[pdDoc] operator[SEP] identifier[getDevelopmentProposal] operator[SEP] operator[SEP] operator[SEP] identifier[getNarratives] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[narrative] operator[SEP] identifier[getNarrativeType] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[narrative] operator[SEP] identifier[getNarrativeType] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[==] identifier[NARRATIVE_PHS_COVER_LETTER] operator[SEP] { identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[!=] Other[null] operator[SEP] { identifier[coverLetterFile] operator[SEP] identifier[setCoverLetterFilename] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } identifier[phsCoverLetter] operator[SEP] identifier[setCoverLetterFile] operator[SEP] identifier[coverLetterFile] operator[SEP] operator[SEP] identifier[phsCoverLetterDocument] operator[SEP] identifier[setPHSCoverLetter12] operator[SEP] identifier[phsCoverLetter] operator[SEP] operator[SEP] Keyword[return] identifier[phsCoverLetterDocument] operator[SEP] }
public static String capitalize(String input) { if (input == null) { return null; } if (input.length() > 1) { for (int i = 0; i < input.length(); i++) { if (Character.isAlphabetic(input.charAt(i))) { return input.substring(0, i) + Character.toString(input.charAt(i)).toUpperCase() + input.substring(i + 1); } } } return input.toUpperCase(); }
class class_name[name] begin[{] method[capitalize, return_type[type[String]], modifier[public static], parameter[input]] begin[{] if[binary_operation[member[.input], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[input.length, parameter[]], >, literal[1]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=isAlphabetic, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operator=+), 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=input, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] return[call[input.toUpperCase, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[capitalize] operator[SEP] identifier[String] identifier[input] operator[SEP] { Keyword[if] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isAlphabetic] operator[SEP] identifier[input] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[input] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[toString] operator[SEP] identifier[input] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[+] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] } } } Keyword[return] identifier[input] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] }
public EnableMetricsCollectionRequest withMetrics(String... metrics) { if (this.metrics == null) { setMetrics(new com.amazonaws.internal.SdkInternalList<String>(metrics.length)); } for (String ele : metrics) { this.metrics.add(ele); } return this; }
class class_name[name] begin[{] method[withMetrics, return_type[type[EnableMetricsCollectionRequest]], modifier[public], parameter[metrics]] begin[{] if[binary_operation[THIS[member[None.metrics]], ==, literal[null]]] begin[{] call[.setMetrics, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=metrics, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=metrics, 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=metrics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[EnableMetricsCollectionRequest] identifier[withMetrics] operator[SEP] identifier[String] operator[...] identifier[metrics] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[metrics] operator[==] Other[null] operator[SEP] { identifier[setMetrics] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[metrics] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[metrics] operator[SEP] { Keyword[this] operator[SEP] identifier[metrics] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void info( String msg, Throwable t ) { if( m_delegate.isInfoEnabled() ) { m_delegate.inform( msg, t ); } }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[msg, t]] begin[{] if[call[m_delegate.isInfoEnabled, parameter[]]] begin[{] call[m_delegate.inform, parameter[member[.msg], member[.t]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[info] operator[SEP] identifier[String] identifier[msg] , identifier[Throwable] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[m_delegate] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[m_delegate] operator[SEP] identifier[inform] operator[SEP] identifier[msg] , identifier[t] operator[SEP] operator[SEP] } }
private String getIssueFilePath(String issueComponent, Map<String, Component> components) { Component comp = components.get(issueComponent); String file = comp.path; if (!Strings.isNullOrEmpty(comp.moduleKey)) { String theKey = comp.moduleKey; while (!theKey.isEmpty()) { Component theChildComp = components.get(theKey); int p = theKey.lastIndexOf(":"); if (p > 0) { theKey = theKey.substring(0, p); } else { theKey = ""; } if (theChildComp != null && !Strings.isNullOrEmpty(theChildComp.path)) { file = theChildComp.path + '/' + file; } } } return file; }
class class_name[name] begin[{] method[getIssueFilePath, return_type[type[String]], modifier[private], parameter[issueComponent, components]] begin[{] local_variable[type[Component], comp] local_variable[type[String], file] if[call[Strings.isNullOrEmpty, parameter[member[comp.moduleKey]]]] begin[{] local_variable[type[String], theKey] while[call[theKey.isEmpty, parameter[]]] begin[{] local_variable[type[Component], theChildComp] local_variable[type[int], p] if[binary_operation[member[.p], >, literal[0]]] begin[{] assign[member[.theKey], call[theKey.substring, parameter[literal[0], member[.p]]]] else begin[{] assign[member[.theKey], literal[""]] end[}] if[binary_operation[binary_operation[member[.theChildComp], !=, literal[null]], &&, call[Strings.isNullOrEmpty, parameter[member[theChildComp.path]]]]] begin[{] assign[member[.file], binary_operation[binary_operation[member[theChildComp.path], +, literal['/']], +, member[.file]]] else begin[{] None end[}] end[}] else begin[{] None end[}] return[member[.file]] end[}] END[}]
Keyword[private] identifier[String] identifier[getIssueFilePath] operator[SEP] identifier[String] identifier[issueComponent] , identifier[Map] operator[<] identifier[String] , identifier[Component] operator[>] identifier[components] operator[SEP] { identifier[Component] identifier[comp] operator[=] identifier[components] operator[SEP] identifier[get] operator[SEP] identifier[issueComponent] operator[SEP] operator[SEP] identifier[String] identifier[file] operator[=] identifier[comp] operator[SEP] identifier[path] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[comp] operator[SEP] identifier[moduleKey] operator[SEP] operator[SEP] { identifier[String] identifier[theKey] operator[=] identifier[comp] operator[SEP] identifier[moduleKey] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[theKey] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Component] identifier[theChildComp] operator[=] identifier[components] operator[SEP] identifier[get] operator[SEP] identifier[theKey] operator[SEP] operator[SEP] Keyword[int] identifier[p] operator[=] identifier[theKey] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[>] Other[0] operator[SEP] { identifier[theKey] operator[=] identifier[theKey] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[p] operator[SEP] operator[SEP] } Keyword[else] { identifier[theKey] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[theChildComp] operator[!=] Other[null] operator[&&] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[theChildComp] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[file] operator[=] identifier[theChildComp] operator[SEP] identifier[path] operator[+] literal[String] operator[+] identifier[file] operator[SEP] } } } Keyword[return] identifier[file] operator[SEP] }
private List<TestCaseDef> getFailureCases( FunctionInputDef inputDef, VarTupleSet failureTuples, VarTupleSet validTuples) { logger_.debug( "{}: Creating failure test cases", inputDef); List<TestCaseDef> failureCases = new ArrayList<TestCaseDef>(); // For each failure input tuple not yet used in a test case... Tuple nextUnused; while( (nextUnused = failureTuples.getNextUnused()) != null) { // Completed bindings for all variables? TestCaseDef failureCase = createTestCase( nextUnused, inputDef, validTuples); if( failureCase != null) { // Yes, add new failure test case. failureTuples.used( nextUnused); failureCases.add( failureCase); } } logger_.info( "{}: Created {} failure test cases", inputDef, failureCases.size()); return failureCases; }
class class_name[name] begin[{] method[getFailureCases, return_type[type[List]], modifier[private], parameter[inputDef, failureTuples, validTuples]] begin[{] call[logger_.debug, parameter[literal["{}: Creating failure test cases"], member[.inputDef]]] local_variable[type[List], failureCases] local_variable[type[Tuple], nextUnused] while[binary_operation[assign[member[.nextUnused], call[failureTuples.getNextUnused, parameter[]]], !=, literal[null]]] begin[{] local_variable[type[TestCaseDef], failureCase] if[binary_operation[member[.failureCase], !=, literal[null]]] begin[{] call[failureTuples.used, parameter[member[.nextUnused]]] call[failureCases.add, parameter[member[.failureCase]]] else begin[{] None end[}] end[}] call[logger_.info, parameter[literal["{}: Created {} failure test cases"], member[.inputDef], call[failureCases.size, parameter[]]]] return[member[.failureCases]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[TestCaseDef] operator[>] identifier[getFailureCases] operator[SEP] identifier[FunctionInputDef] identifier[inputDef] , identifier[VarTupleSet] identifier[failureTuples] , identifier[VarTupleSet] identifier[validTuples] operator[SEP] { identifier[logger_] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[inputDef] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TestCaseDef] operator[>] identifier[failureCases] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TestCaseDef] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Tuple] identifier[nextUnused] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[nextUnused] operator[=] identifier[failureTuples] operator[SEP] identifier[getNextUnused] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[TestCaseDef] identifier[failureCase] operator[=] identifier[createTestCase] operator[SEP] identifier[nextUnused] , identifier[inputDef] , identifier[validTuples] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[failureCase] operator[!=] Other[null] operator[SEP] { identifier[failureTuples] operator[SEP] identifier[used] operator[SEP] identifier[nextUnused] operator[SEP] operator[SEP] identifier[failureCases] operator[SEP] identifier[add] operator[SEP] identifier[failureCase] operator[SEP] operator[SEP] } } identifier[logger_] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[inputDef] , identifier[failureCases] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[failureCases] operator[SEP] }
public void start() throws Exception { bundleClassResolverHelper = new BundleClassResolverHelper(bundleContext); bundleClassResolverHelper.setApplicationName(applicationName); bundleClassResolverHelper.register(); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.bundleClassResolverHelper], ClassCreator(arguments=[MemberReference(member=bundleContext, 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=BundleClassResolverHelper, sub_type=None))] call[bundleClassResolverHelper.setApplicationName, parameter[member[.applicationName]]] call[bundleClassResolverHelper.register, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[bundleClassResolverHelper] operator[=] Keyword[new] identifier[BundleClassResolverHelper] operator[SEP] identifier[bundleContext] operator[SEP] operator[SEP] identifier[bundleClassResolverHelper] operator[SEP] identifier[setApplicationName] operator[SEP] identifier[applicationName] operator[SEP] operator[SEP] identifier[bundleClassResolverHelper] operator[SEP] identifier[register] operator[SEP] operator[SEP] operator[SEP] }
private void registerChildInternal(IgnoreDomainResourceTypeResource child) { child.setParent(this); children.put(child.getName(), child); }
class class_name[name] begin[{] method[registerChildInternal, return_type[void], modifier[private], parameter[child]] begin[{] call[child.setParent, parameter[THIS[]]] call[children.put, parameter[call[child.getName, parameter[]], member[.child]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[registerChildInternal] operator[SEP] identifier[IgnoreDomainResourceTypeResource] identifier[child] operator[SEP] { identifier[child] operator[SEP] identifier[setParent] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[children] operator[SEP] identifier[put] operator[SEP] identifier[child] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[child] operator[SEP] operator[SEP] }
private Collection<String> createEnabledByQuery() { Collection<String> query = new ArrayList<String>(); String temp = ""; //generate queries temp = "wlpInformation.requireFeature="; temp += getProvideFeature(); String version = findVersion(); if (version != null) { temp += "&wlpInformation.appliesToFilterInfo.minVersion.value="; temp += version; } temp += "&type="; temp += getType().getValue(); query.add(temp); return query; }
class class_name[name] begin[{] method[createEnabledByQuery, return_type[type[Collection]], modifier[private], parameter[]] begin[{] local_variable[type[Collection], query] local_variable[type[String], temp] assign[member[.temp], literal["wlpInformation.requireFeature="]] assign[member[.temp], call[.getProvideFeature, parameter[]]] local_variable[type[String], version] if[binary_operation[member[.version], !=, literal[null]]] begin[{] assign[member[.temp], literal["&wlpInformation.appliesToFilterInfo.minVersion.value="]] assign[member[.temp], member[.version]] else begin[{] None end[}] assign[member[.temp], literal["&type="]] assign[member[.temp], call[.getType, parameter[]]] call[query.add, parameter[member[.temp]]] return[member[.query]] end[}] END[}]
Keyword[private] identifier[Collection] operator[<] identifier[String] operator[>] identifier[createEnabledByQuery] operator[SEP] operator[SEP] { identifier[Collection] operator[<] identifier[String] operator[>] identifier[query] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[temp] operator[=] literal[String] operator[SEP] identifier[temp] operator[=] literal[String] operator[SEP] identifier[temp] operator[+=] identifier[getProvideFeature] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[version] operator[=] identifier[findVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[version] operator[!=] Other[null] operator[SEP] { identifier[temp] operator[+=] literal[String] operator[SEP] identifier[temp] operator[+=] identifier[version] operator[SEP] } identifier[temp] operator[+=] literal[String] operator[SEP] identifier[temp] operator[+=] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[add] operator[SEP] identifier[temp] operator[SEP] operator[SEP] Keyword[return] identifier[query] operator[SEP] }
protected Object getValue( QueryContext context, StaticOperand operand ) { if (operand instanceof Literal) { Literal literal = (Literal)operand; return literal.value(); } BindVariableName variable = (BindVariableName)operand; return context.getVariables().get(variable.getBindVariableName()); }
class class_name[name] begin[{] method[getValue, return_type[type[Object]], modifier[protected], parameter[context, operand]] begin[{] if[binary_operation[member[.operand], instanceof, type[Literal]]] begin[{] local_variable[type[Literal], literal] return[call[literal.value, parameter[]]] else begin[{] None end[}] local_variable[type[BindVariableName], variable] return[call[context.getVariables, parameter[]]] end[}] END[}]
Keyword[protected] identifier[Object] identifier[getValue] operator[SEP] identifier[QueryContext] identifier[context] , identifier[StaticOperand] identifier[operand] operator[SEP] { Keyword[if] operator[SEP] identifier[operand] Keyword[instanceof] identifier[Literal] operator[SEP] { identifier[Literal] identifier[literal] operator[=] operator[SEP] identifier[Literal] operator[SEP] identifier[operand] operator[SEP] Keyword[return] identifier[literal] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } identifier[BindVariableName] identifier[variable] operator[=] operator[SEP] identifier[BindVariableName] operator[SEP] identifier[operand] operator[SEP] Keyword[return] identifier[context] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[variable] operator[SEP] identifier[getBindVariableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override protected void initGraphics() { super.initGraphics(); if (tile.isAutoScale()) tile.calcAutoScale(); minValue = tile.getMinValue(); range = tile.getRange(); angleStep = ANGLE_RANGE / range; sectionsVisible = tile.getSectionsVisible(); sections = tile.getSections(); formatString = new StringBuilder("%.").append(Integer.toString(tile.getDecimals())).append("f").toString(); locale = tile.getLocale(); currentValueListener = o -> setBar(tile.getCurrentValue()); graphicListener = (o, ov, nv) -> { if (nv != null) { graphicContainer.getChildren().setAll(tile.getGraphic()); }}; titleText = new Text(); titleText.setFill(tile.getTitleColor()); enableNode(titleText, !tile.getTitle().isEmpty()); text = new Text(tile.getText()); text.setFill(tile.getTextColor()); enableNode(text, tile.isTextVisible()); barBackground = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.468, PREFERRED_HEIGHT * 0.468, 90, 360); barBackground.setType(ArcType.OPEN); barBackground.setStroke(tile.getBarBackgroundColor()); barBackground.setStrokeWidth(PREFERRED_WIDTH * 0.1); barBackground.setStrokeLineCap(StrokeLineCap.BUTT); barBackground.setFill(null); bar = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.468, PREFERRED_HEIGHT * 0.468, 90, 0); bar.setType(ArcType.OPEN); bar.setStroke(tile.getBarColor()); bar.setStrokeWidth(PREFERRED_WIDTH * 0.1); bar.setStrokeLineCap(StrokeLineCap.BUTT); bar.setFill(null); separator = new Line(PREFERRED_WIDTH * 0.5, 1, PREFERRED_WIDTH * 0.5, 0.16667 * PREFERRED_HEIGHT); separator.setStroke(tile.getBackgroundColor()); separator.setFill(Color.TRANSPARENT); percentageValueText = new Text(String.format(locale, formatString, tile.getCurrentValue())); percentageValueText.setFont(Fonts.latoRegular(PREFERRED_WIDTH * 0.27333)); percentageValueText.setFill(tile.getValueColor()); percentageValueText.setTextOrigin(VPos.CENTER); percentageUnitText = new Text(tile.getUnit()); percentageUnitText = new Text("\u0025"); percentageUnitText.setFont(Fonts.latoLight(PREFERRED_WIDTH * 0.08)); percentageUnitText.setFill(tile.getUnitColor()); percentageFlow = new TextFlow(percentageValueText, percentageUnitText); percentageFlow.setTextAlignment(TextAlignment.CENTER); valueText = new Text(String.format(locale, formatString, tile.getCurrentValue())); valueText.setFont(Fonts.latoRegular(PREFERRED_WIDTH * 0.27333)); valueText.setFill(tile.getValueColor()); valueText.setTextOrigin(VPos.CENTER); enableNode(valueText, tile.isValueVisible()); unitText = new Text(tile.getUnit()); unitText = new Text("\u0025"); unitText.setFont(Fonts.latoLight(PREFERRED_WIDTH * 0.08)); unitText.setFill(tile.getUnitColor()); enableNode(unitText, !tile.getUnit().isEmpty()); valueUnitFlow = new TextFlow(valueText, unitText); valueUnitFlow.setTextAlignment(TextAlignment.CENTER); graphicContainer = new StackPane(); graphicContainer.setMinSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795); graphicContainer.setMaxSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795); graphicContainer.setPrefSize(size * 0.9, tile.isTextVisible() ? size * 0.72 : size * 0.795); if (null == tile.getGraphic()) { enableNode(graphicContainer, false); } else { graphicContainer.getChildren().setAll(tile.getGraphic()); } getPane().getChildren().addAll(barBackground, bar, separator, titleText, text, graphicContainer, percentageFlow, valueUnitFlow); }
class class_name[name] begin[{] method[initGraphics, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=initGraphics, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[call[tile.isAutoScale, parameter[]]] begin[{] call[tile.calcAutoScale, parameter[]] else begin[{] None end[}] assign[member[.minValue], call[tile.getMinValue, parameter[]]] assign[member[.range], call[tile.getRange, parameter[]]] assign[member[.angleStep], binary_operation[member[.ANGLE_RANGE], /, member[.range]]] assign[member[.sectionsVisible], call[tile.getSectionsVisible, parameter[]]] assign[member[.sections], call[tile.getSections, parameter[]]] assign[member[.formatString], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDecimals, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f")], member=append, 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=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))] assign[member[.locale], call[tile.getLocale, parameter[]]] assign[member[.currentValueListener], LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCurrentValue, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], member=setBar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] assign[member[.graphicListener], LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=graphicContainer, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGraphic, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], member=setAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], parameters=[InferredFormalParameter(name=o), InferredFormalParameter(name=ov), InferredFormalParameter(name=nv)])] assign[member[.titleText], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[titleText.setFill, parameter[call[tile.getTitleColor, parameter[]]]] call[.enableNode, parameter[member[.titleText], call[tile.getTitle, parameter[]]]] assign[member[.text], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[text.setFill, parameter[call[tile.getTextColor, parameter[]]]] call[.enableNode, parameter[member[.text], call[tile.isTextVisible, parameter[]]]] assign[member[.barBackground], ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_HEIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.468), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_HEIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.468), operator=*), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=360)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Arc, sub_type=None))] call[barBackground.setType, parameter[member[ArcType.OPEN]]] call[barBackground.setStroke, parameter[call[tile.getBarBackgroundColor, parameter[]]]] call[barBackground.setStrokeWidth, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.1]]]] call[barBackground.setStrokeLineCap, parameter[member[StrokeLineCap.BUTT]]] call[barBackground.setFill, parameter[literal[null]]] assign[member[.bar], ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_HEIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.468), operator=*), BinaryOperation(operandl=MemberReference(member=PREFERRED_HEIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.468), operator=*), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90), 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=Arc, sub_type=None))] call[bar.setType, parameter[member[ArcType.OPEN]]] call[bar.setStroke, parameter[call[tile.getBarColor, parameter[]]]] call[bar.setStrokeWidth, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.1]]]] call[bar.setStrokeLineCap, parameter[member[StrokeLineCap.BUTT]]] call[bar.setFill, parameter[literal[null]]] assign[member[.separator], ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=*), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.16667), operandr=MemberReference(member=PREFERRED_HEIGHT, 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=Line, sub_type=None))] call[separator.setStroke, parameter[call[tile.getBackgroundColor, parameter[]]]] call[separator.setFill, parameter[member[Color.TRANSPARENT]]] assign[member[.percentageValueText], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=formatString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getCurrentValue, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[percentageValueText.setFont, parameter[call[Fonts.latoRegular, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.27333]]]]]] call[percentageValueText.setFill, parameter[call[tile.getValueColor, parameter[]]]] call[percentageValueText.setTextOrigin, parameter[member[VPos.CENTER]]] assign[member[.percentageUnitText], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUnit, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] assign[member[.percentageUnitText], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[percentageUnitText.setFont, parameter[call[Fonts.latoLight, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.08]]]]]] call[percentageUnitText.setFill, parameter[call[tile.getUnitColor, parameter[]]]] assign[member[.percentageFlow], ClassCreator(arguments=[MemberReference(member=percentageValueText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=percentageUnitText, 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=TextFlow, sub_type=None))] call[percentageFlow.setTextAlignment, parameter[member[TextAlignment.CENTER]]] assign[member[.valueText], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=formatString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getCurrentValue, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[valueText.setFont, parameter[call[Fonts.latoRegular, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.27333]]]]]] call[valueText.setFill, parameter[call[tile.getValueColor, parameter[]]]] call[valueText.setTextOrigin, parameter[member[VPos.CENTER]]] call[.enableNode, parameter[member[.valueText], call[tile.isValueVisible, parameter[]]]] assign[member[.unitText], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUnit, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] assign[member[.unitText], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Text, sub_type=None))] call[unitText.setFont, parameter[call[Fonts.latoLight, parameter[binary_operation[member[.PREFERRED_WIDTH], *, literal[0.08]]]]]] call[unitText.setFill, parameter[call[tile.getUnitColor, parameter[]]]] call[.enableNode, parameter[member[.unitText], call[tile.getUnit, parameter[]]]] assign[member[.valueUnitFlow], ClassCreator(arguments=[MemberReference(member=valueText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=unitText, 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=TextFlow, sub_type=None))] call[valueUnitFlow.setTextAlignment, parameter[member[TextAlignment.CENTER]]] assign[member[.graphicContainer], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StackPane, sub_type=None))] call[graphicContainer.setMinSize, parameter[binary_operation[member[.size], *, literal[0.9]], TernaryExpression(condition=MethodInvocation(arguments=[], member=isTextVisible, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.795), operator=*), if_true=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.72), operator=*))]] call[graphicContainer.setMaxSize, parameter[binary_operation[member[.size], *, literal[0.9]], TernaryExpression(condition=MethodInvocation(arguments=[], member=isTextVisible, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.795), operator=*), if_true=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.72), operator=*))]] call[graphicContainer.setPrefSize, parameter[binary_operation[member[.size], *, literal[0.9]], TernaryExpression(condition=MethodInvocation(arguments=[], member=isTextVisible, postfix_operators=[], prefix_operators=[], qualifier=tile, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.795), operator=*), if_true=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.72), operator=*))]] if[binary_operation[literal[null], ==, call[tile.getGraphic, parameter[]]]] begin[{] call[.enableNode, parameter[member[.graphicContainer], literal[false]]] else begin[{] call[graphicContainer.getChildren, parameter[]] end[}] call[.getPane, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initGraphics] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[initGraphics] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tile] operator[SEP] identifier[isAutoScale] operator[SEP] operator[SEP] operator[SEP] identifier[tile] operator[SEP] identifier[calcAutoScale] operator[SEP] operator[SEP] operator[SEP] identifier[minValue] operator[=] identifier[tile] operator[SEP] identifier[getMinValue] operator[SEP] operator[SEP] operator[SEP] identifier[range] operator[=] identifier[tile] operator[SEP] identifier[getRange] operator[SEP] operator[SEP] operator[SEP] identifier[angleStep] operator[=] identifier[ANGLE_RANGE] operator[/] identifier[range] operator[SEP] identifier[sectionsVisible] operator[=] identifier[tile] operator[SEP] identifier[getSectionsVisible] operator[SEP] operator[SEP] operator[SEP] identifier[sections] operator[=] identifier[tile] operator[SEP] identifier[getSections] operator[SEP] operator[SEP] operator[SEP] identifier[formatString] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[tile] operator[SEP] identifier[getDecimals] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[locale] operator[=] identifier[tile] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] identifier[currentValueListener] operator[=] identifier[o] operator[->] identifier[setBar] operator[SEP] identifier[tile] operator[SEP] identifier[getCurrentValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[graphicListener] operator[=] operator[SEP] identifier[o] , identifier[ov] , identifier[nv] operator[SEP] operator[->] { Keyword[if] operator[SEP] identifier[nv] operator[!=] Other[null] operator[SEP] { identifier[graphicContainer] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[setAll] operator[SEP] identifier[tile] operator[SEP] identifier[getGraphic] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] identifier[titleText] operator[=] Keyword[new] identifier[Text] operator[SEP] operator[SEP] operator[SEP] identifier[titleText] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getTitleColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[enableNode] operator[SEP] identifier[titleText] , operator[!] identifier[tile] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[text] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[tile] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getTextColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[enableNode] operator[SEP] identifier[text] , identifier[tile] operator[SEP] identifier[isTextVisible] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[barBackground] operator[=] Keyword[new] identifier[Arc] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] , identifier[PREFERRED_HEIGHT] operator[*] literal[Float] , identifier[PREFERRED_WIDTH] operator[*] literal[Float] , identifier[PREFERRED_HEIGHT] operator[*] literal[Float] , Other[90] , Other[360] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setType] operator[SEP] identifier[ArcType] operator[SEP] identifier[OPEN] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setStroke] operator[SEP] identifier[tile] operator[SEP] identifier[getBarBackgroundColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setStrokeWidth] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setStrokeLineCap] operator[SEP] identifier[StrokeLineCap] operator[SEP] identifier[BUTT] operator[SEP] operator[SEP] identifier[barBackground] operator[SEP] identifier[setFill] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[bar] operator[=] Keyword[new] identifier[Arc] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] , identifier[PREFERRED_HEIGHT] operator[*] literal[Float] , identifier[PREFERRED_WIDTH] operator[*] literal[Float] , identifier[PREFERRED_HEIGHT] operator[*] literal[Float] , Other[90] , Other[0] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setType] operator[SEP] identifier[ArcType] operator[SEP] identifier[OPEN] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setStroke] operator[SEP] identifier[tile] operator[SEP] identifier[getBarColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setStrokeWidth] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setStrokeLineCap] operator[SEP] identifier[StrokeLineCap] operator[SEP] identifier[BUTT] operator[SEP] operator[SEP] identifier[bar] operator[SEP] identifier[setFill] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[separator] operator[=] Keyword[new] identifier[Line] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] , Other[1] , identifier[PREFERRED_WIDTH] operator[*] literal[Float] , literal[Float] operator[*] identifier[PREFERRED_HEIGHT] operator[SEP] operator[SEP] identifier[separator] operator[SEP] identifier[setStroke] operator[SEP] identifier[tile] operator[SEP] identifier[getBackgroundColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[separator] operator[SEP] identifier[setFill] operator[SEP] identifier[Color] operator[SEP] identifier[TRANSPARENT] operator[SEP] operator[SEP] identifier[percentageValueText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[locale] , identifier[formatString] , identifier[tile] operator[SEP] identifier[getCurrentValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageValueText] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoRegular] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[percentageValueText] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getValueColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageValueText] operator[SEP] identifier[setTextOrigin] operator[SEP] identifier[VPos] operator[SEP] identifier[CENTER] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[tile] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[=] Keyword[new] identifier[Text] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoLight] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[percentageUnitText] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getUnitColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[percentageFlow] operator[=] Keyword[new] identifier[TextFlow] operator[SEP] identifier[percentageValueText] , identifier[percentageUnitText] operator[SEP] operator[SEP] identifier[percentageFlow] operator[SEP] identifier[setTextAlignment] operator[SEP] identifier[TextAlignment] operator[SEP] identifier[CENTER] operator[SEP] operator[SEP] identifier[valueText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[locale] , identifier[formatString] , identifier[tile] operator[SEP] identifier[getCurrentValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[valueText] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoRegular] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[valueText] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getValueColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[valueText] operator[SEP] identifier[setTextOrigin] operator[SEP] identifier[VPos] operator[SEP] identifier[CENTER] operator[SEP] operator[SEP] identifier[enableNode] operator[SEP] identifier[valueText] , identifier[tile] operator[SEP] identifier[isValueVisible] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[unitText] operator[=] Keyword[new] identifier[Text] operator[SEP] identifier[tile] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[unitText] operator[=] Keyword[new] identifier[Text] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[unitText] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoLight] operator[SEP] identifier[PREFERRED_WIDTH] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[unitText] operator[SEP] identifier[setFill] operator[SEP] identifier[tile] operator[SEP] identifier[getUnitColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[enableNode] operator[SEP] identifier[unitText] , operator[!] identifier[tile] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[valueUnitFlow] operator[=] Keyword[new] identifier[TextFlow] operator[SEP] identifier[valueText] , identifier[unitText] operator[SEP] operator[SEP] identifier[valueUnitFlow] operator[SEP] identifier[setTextAlignment] operator[SEP] identifier[TextAlignment] operator[SEP] identifier[CENTER] operator[SEP] operator[SEP] identifier[graphicContainer] operator[=] Keyword[new] identifier[StackPane] operator[SEP] operator[SEP] operator[SEP] identifier[graphicContainer] operator[SEP] identifier[setMinSize] operator[SEP] identifier[size] operator[*] literal[Float] , identifier[tile] operator[SEP] identifier[isTextVisible] operator[SEP] operator[SEP] operator[?] identifier[size] operator[*] literal[Float] operator[:] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[graphicContainer] operator[SEP] identifier[setMaxSize] operator[SEP] identifier[size] operator[*] literal[Float] , identifier[tile] operator[SEP] identifier[isTextVisible] operator[SEP] operator[SEP] operator[?] identifier[size] operator[*] literal[Float] operator[:] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[graphicContainer] operator[SEP] identifier[setPrefSize] operator[SEP] identifier[size] operator[*] literal[Float] , identifier[tile] operator[SEP] identifier[isTextVisible] operator[SEP] operator[SEP] operator[?] identifier[size] operator[*] literal[Float] operator[:] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[tile] operator[SEP] identifier[getGraphic] operator[SEP] operator[SEP] operator[SEP] { identifier[enableNode] operator[SEP] identifier[graphicContainer] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[graphicContainer] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[setAll] operator[SEP] identifier[tile] operator[SEP] identifier[getGraphic] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[getPane] operator[SEP] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[barBackground] , identifier[bar] , identifier[separator] , identifier[titleText] , identifier[text] , identifier[graphicContainer] , identifier[percentageFlow] , identifier[valueUnitFlow] operator[SEP] operator[SEP] }
public double getUnnormalizedLogProbability(Assignment assignment) { Preconditions.checkArgument(assignment.containsAll(variables.getVariableNumsArray()), "Invalid assignment %s to factor graph on variables %s", assignment, variables); double logProbability = 0.0; for (Factor factor : factors) { logProbability += factor.getUnnormalizedLogProbability(assignment); } return logProbability; }
class class_name[name] begin[{] method[getUnnormalizedLogProbability, return_type[type[double]], modifier[public], parameter[assignment]] begin[{] call[Preconditions.checkArgument, parameter[call[assignment.containsAll, parameter[call[variables.getVariableNumsArray, parameter[]]]], literal["Invalid assignment %s to factor graph on variables %s"], member[.assignment], member[.variables]]] local_variable[type[double], logProbability] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=logProbability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=assignment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getUnnormalizedLogProbability, postfix_operators=[], prefix_operators=[], qualifier=factor, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=factors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=factor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Factor, sub_type=None))), label=None) return[member[.logProbability]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getUnnormalizedLogProbability] operator[SEP] identifier[Assignment] identifier[assignment] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[assignment] operator[SEP] identifier[containsAll] operator[SEP] identifier[variables] operator[SEP] identifier[getVariableNumsArray] operator[SEP] operator[SEP] operator[SEP] , literal[String] , identifier[assignment] , identifier[variables] operator[SEP] operator[SEP] Keyword[double] identifier[logProbability] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] identifier[Factor] identifier[factor] operator[:] identifier[factors] operator[SEP] { identifier[logProbability] operator[+=] identifier[factor] operator[SEP] identifier[getUnnormalizedLogProbability] operator[SEP] identifier[assignment] operator[SEP] operator[SEP] } Keyword[return] identifier[logProbability] operator[SEP] }
public static Object[] removeAt(Object[] array, int index) { if (array == null) { return null; } if (index < 0 || index >= array.length) { return array; } Object[] retVal = (Object[]) Array.newInstance(array[0].getClass(), array.length - 1); for (int i = 0; i < array.length; i++) { if (i < index) { retVal[i] = array[i]; } else if (i > index) { retVal[i - 1] = array[i]; } } return retVal; }
class class_name[name] begin[{] method[removeAt, return_type[type[Object]], modifier[public static], parameter[array, index]] begin[{] if[binary_operation[member[.array], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, member[array.length]]]] begin[{] return[member[.array]] else begin[{] None end[}] local_variable[type[Object], retVal] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=retVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=retVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.retVal]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[removeAt] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[array] operator[SEP] identifier[length] operator[SEP] { Keyword[return] identifier[array] operator[SEP] } identifier[Object] operator[SEP] operator[SEP] identifier[retVal] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[Array] operator[SEP] identifier[newInstance] operator[SEP] identifier[array] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[array] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[array] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[<] identifier[index] operator[SEP] { identifier[retVal] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[i] operator[>] identifier[index] operator[SEP] { identifier[retVal] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[=] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] identifier[retVal] operator[SEP] }
public Object processMessage(Object message) { Utility.getLogger().info("processMessage called in service message"); BaseMessage msgReplyInternal = null; try { BaseMessage messageIn = new TreeMessage(null, null); new ServiceTrxMessageIn(messageIn, message); msgReplyInternal = this.processIncomingMessage(messageIn, null); Utility.getLogger().info("msgReplyInternal: " + msgReplyInternal); int iErrorCode = this.convertToExternal(msgReplyInternal, null); Utility.getLogger().info("externalMessageReply: " + msgReplyInternal); Object msg = null;//fac.createMessage(); if (iErrorCode == DBConstants.NORMAL_RETURN) { msg = msgReplyInternal.getExternalMessage().getRawData(); String strTrxID = (String)msgReplyInternal.getMessageHeader().get(TrxMessageHeader.LOG_TRX_ID); this.logMessage(strTrxID, msgReplyInternal, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_OUT, MessageStatusModel.SENTOK, null, null); // Sent (no reply required) } return msg; } catch (Throwable ex) { ex.printStackTrace(); String strError = "Error in processing or replying to a message"; Utility.getLogger().warning(strError); if (msgReplyInternal != null) { String strTrxID = (String)msgReplyInternal.getMessageHeader().get(TrxMessageHeader.LOG_TRX_ID); this.logMessage(strTrxID, msgReplyInternal, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_OUT, MessageStatusModel.ERROR, strError, null); } return null; } }
class class_name[name] begin[{] method[processMessage, return_type[type[Object]], modifier[public], parameter[message]] begin[{] call[Utility.getLogger, parameter[]] local_variable[type[BaseMessage], msgReplyInternal] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TreeMessage, sub_type=None)), name=messageIn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseMessage, sub_type=None)), StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=messageIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceTrxMessageIn, sub_type=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=messageIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=processIncomingMessage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="msgReplyInternal: "), operandr=MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=convertToExternal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=iErrorCode)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="externalMessageReply: "), operandr=MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=iErrorCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NORMAL_RETURN, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getExternalMessage, postfix_operators=[], prefix_operators=[], qualifier=msgReplyInternal, selectors=[MethodInvocation(arguments=[], member=getRawData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getMessageHeader, postfix_operators=[], prefix_operators=[], qualifier=msgReplyInternal, selectors=[MethodInvocation(arguments=[MemberReference(member=LOG_TRX_ID, postfix_operators=[], prefix_operators=[], qualifier=TrxMessageHeader, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=strTrxID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=strTrxID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=REPLY, postfix_operators=[], prefix_operators=[], qualifier=MessageInfoTypeModel, selectors=[]), MemberReference(member=MESSAGE_OUT, postfix_operators=[], prefix_operators=[], qualifier=MessageTypeModel, selectors=[]), MemberReference(member=SENTOK, postfix_operators=[], prefix_operators=[], qualifier=MessageStatusModel, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=logMessage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), ReturnStatement(expression=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in processing or replying to a message"), name=strError)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[MethodInvocation(arguments=[MemberReference(member=strError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getMessageHeader, postfix_operators=[], prefix_operators=[], qualifier=msgReplyInternal, selectors=[MethodInvocation(arguments=[MemberReference(member=LOG_TRX_ID, postfix_operators=[], prefix_operators=[], qualifier=TrxMessageHeader, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=strTrxID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=strTrxID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgReplyInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=REPLY, postfix_operators=[], prefix_operators=[], qualifier=MessageInfoTypeModel, selectors=[]), MemberReference(member=MESSAGE_OUT, postfix_operators=[], prefix_operators=[], qualifier=MessageTypeModel, selectors=[]), MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=MessageStatusModel, selectors=[]), MemberReference(member=strError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=logMessage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[processMessage] operator[SEP] identifier[Object] identifier[message] operator[SEP] { identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[BaseMessage] identifier[msgReplyInternal] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[BaseMessage] identifier[messageIn] operator[=] Keyword[new] identifier[TreeMessage] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[new] identifier[ServiceTrxMessageIn] operator[SEP] identifier[messageIn] , identifier[message] operator[SEP] operator[SEP] identifier[msgReplyInternal] operator[=] Keyword[this] operator[SEP] identifier[processIncomingMessage] operator[SEP] identifier[messageIn] , Other[null] operator[SEP] operator[SEP] identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[msgReplyInternal] operator[SEP] operator[SEP] Keyword[int] identifier[iErrorCode] operator[=] Keyword[this] operator[SEP] identifier[convertToExternal] operator[SEP] identifier[msgReplyInternal] , Other[null] operator[SEP] operator[SEP] identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[msgReplyInternal] operator[SEP] operator[SEP] identifier[Object] identifier[msg] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[iErrorCode] operator[==] identifier[DBConstants] operator[SEP] identifier[NORMAL_RETURN] operator[SEP] { identifier[msg] operator[=] identifier[msgReplyInternal] operator[SEP] identifier[getExternalMessage] operator[SEP] operator[SEP] operator[SEP] identifier[getRawData] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strTrxID] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[msgReplyInternal] operator[SEP] identifier[getMessageHeader] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[TrxMessageHeader] operator[SEP] identifier[LOG_TRX_ID] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[logMessage] operator[SEP] identifier[strTrxID] , identifier[msgReplyInternal] , identifier[MessageInfoTypeModel] operator[SEP] identifier[REPLY] , identifier[MessageTypeModel] operator[SEP] identifier[MESSAGE_OUT] , identifier[MessageStatusModel] operator[SEP] identifier[SENTOK] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[msg] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strError] operator[=] literal[String] operator[SEP] identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[warning] operator[SEP] identifier[strError] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgReplyInternal] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[strTrxID] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[msgReplyInternal] operator[SEP] identifier[getMessageHeader] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[TrxMessageHeader] operator[SEP] identifier[LOG_TRX_ID] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[logMessage] operator[SEP] identifier[strTrxID] , identifier[msgReplyInternal] , identifier[MessageInfoTypeModel] operator[SEP] identifier[REPLY] , identifier[MessageTypeModel] operator[SEP] identifier[MESSAGE_OUT] , identifier[MessageStatusModel] operator[SEP] identifier[ERROR] , identifier[strError] , Other[null] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } }
public static int open(Shell parentShell) { final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard(); final WizardDialog dialog = new WizardDialog(parentShell, wizard); wizard.setWizardDialog(dialog); return dialog.open(); }
class class_name[name] begin[{] method[open, return_type[type[int]], modifier[public static], parameter[parentShell]] begin[{] local_variable[type[SubmitEclipseLogWizard], wizard] local_variable[type[WizardDialog], dialog] call[wizard.setWizardDialog, parameter[member[.dialog]]] return[call[dialog.open, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[open] operator[SEP] identifier[Shell] identifier[parentShell] operator[SEP] { Keyword[final] identifier[SubmitEclipseLogWizard] identifier[wizard] operator[=] Keyword[new] identifier[SubmitEclipseLogWizard] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[WizardDialog] identifier[dialog] operator[=] Keyword[new] identifier[WizardDialog] operator[SEP] identifier[parentShell] , identifier[wizard] operator[SEP] operator[SEP] identifier[wizard] operator[SEP] identifier[setWizardDialog] operator[SEP] identifier[dialog] operator[SEP] operator[SEP] Keyword[return] identifier[dialog] operator[SEP] identifier[open] operator[SEP] operator[SEP] operator[SEP] }
private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); JLabel question = new JLabel(Constant.messages.getString("database.newsession.question")); jPanel.add(question, LayoutHelper.getGBC(0, 0, 2, 1.0D, new Insets(4, 4, 4, 4))); jPanel.add(this.getTimestampRadioButton(), LayoutHelper.getGBC(0, 1, 2, 1.0D, new Insets(4, 4, 4, 4))); jPanel.add(this.getPersistRadioButton(), LayoutHelper.getGBC(0, 3, 2, 1.0D, new Insets(4, 4, 4, 4))); jPanel.add(this.getTemporaryRadioButton(), LayoutHelper.getGBC(0, 5, 2, 1.0D, new Insets(4, 4, 4, 4))); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(this.getTimestampRadioButton()); buttonGroup.add(this.getPersistRadioButton()); buttonGroup.add(this.getTemporaryRadioButton()); jPanel.add(new JLabel(), LayoutHelper.getGBC(0, 6, 2, 1.0D, 1.0D)); // Spacer jPanel.add(getDontAskAgainCheckbox(), LayoutHelper.getGBC(0, 7, 2, 1.0D, new Insets(4, 4, 4, 4))); jPanel.add(new JLabel(Constant.messages.getString("database.newsession.prompt.note")), LayoutHelper.getGBC(0, 8, 2, 1.0D, new Insets(4, 4, 4, 4))); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridBagLayout()); JButton helpButton = new JButton(Constant.messages.getString("menu.help")); helpButton.setToolTipText(Constant.messages.getString("help.dialog.button.tooltip")); helpButton.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { ExtensionHelp.showHelp("ui.dialogs.persistsession"); }}); buttonPanel.add(helpButton, LayoutHelper.getGBC(0, 0, 1, 0.0D, new Insets(4, 4, 4, 4))); buttonPanel.add(new JLabel(), LayoutHelper.getGBC(1, 0, 1, 1.0D, new Insets(4, 4, 4, 4))); // Spacer buttonPanel.add(getStartSessionButton(), LayoutHelper.getGBC(2, 0, 1, 0.0D, new Insets(4, 4, 4, 4))); jPanel.add(buttonPanel, LayoutHelper.getGBC(0, 20, 2, 1.0D, new Insets(4, 4, 4, 4))); } return jPanel; }
class class_name[name] begin[{] method[getJPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.jPanel], ==, literal[null]]] begin[{] assign[member[.jPanel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None))] call[jPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] local_variable[type[JLabel], question] call[jPanel.add, parameter[member[.question], call[LayoutHelper.getGBC, parameter[literal[0], literal[0], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[jPanel.add, parameter[THIS[call[None.getTimestampRadioButton, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[0], literal[1], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[jPanel.add, parameter[THIS[call[None.getPersistRadioButton, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[0], literal[3], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[jPanel.add, parameter[THIS[call[None.getTemporaryRadioButton, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[0], literal[5], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] local_variable[type[ButtonGroup], buttonGroup] call[buttonGroup.add, parameter[THIS[call[None.getTimestampRadioButton, parameter[]]]]] call[buttonGroup.add, parameter[THIS[call[None.getPersistRadioButton, parameter[]]]]] call[buttonGroup.add, parameter[THIS[call[None.getTemporaryRadioButton, parameter[]]]]] call[jPanel.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[6], literal[2], literal[1.0D], literal[1.0D]]]]] call[jPanel.add, parameter[call[.getDontAskAgainCheckbox, parameter[]], call[LayoutHelper.getGBC, parameter[literal[0], literal[7], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[jPanel.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="database.newsession.prompt.note")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[8], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] local_variable[type[JPanel], buttonPanel] call[buttonPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] local_variable[type[JButton], helpButton] call[helpButton.setToolTipText, parameter[call[Constant.messages.getString, parameter[literal["help.dialog.button.tooltip"]]]]] call[helpButton.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ui.dialogs.persistsession")], member=showHelp, postfix_operators=[], prefix_operators=[], qualifier=ExtensionHelp, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=ActionEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None))]] call[buttonPanel.add, parameter[member[.helpButton], call[LayoutHelper.getGBC, parameter[literal[0], literal[0], literal[1], literal[0.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[buttonPanel.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[1], literal[0], literal[1], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[buttonPanel.add, parameter[call[.getStartSessionButton, parameter[]], call[LayoutHelper.getGBC, parameter[literal[2], literal[0], literal[1], literal[0.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[jPanel.add, parameter[member[.buttonPanel], call[LayoutHelper.getGBC, parameter[literal[0], literal[20], literal[2], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] else begin[{] None end[}] return[member[.jPanel]] end[}] END[}]
Keyword[private] identifier[JPanel] identifier[getJPanel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[jPanel] operator[==] Other[null] operator[SEP] { identifier[jPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JLabel] identifier[question] operator[=] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] identifier[question] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[0] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getTimestampRadioButton] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[1] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getPersistRadioButton] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[3] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getTemporaryRadioButton] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[5] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ButtonGroup] identifier[buttonGroup] operator[=] Keyword[new] identifier[ButtonGroup] operator[SEP] operator[SEP] operator[SEP] identifier[buttonGroup] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getTimestampRadioButton] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buttonGroup] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getPersistRadioButton] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buttonGroup] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getTemporaryRadioButton] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[6] , Other[2] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] identifier[getDontAskAgainCheckbox] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[7] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[8] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JPanel] identifier[buttonPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[buttonPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JButton] identifier[helpButton] operator[=] Keyword[new] identifier[JButton] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[helpButton] operator[SEP] identifier[setToolTipText] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[helpButton] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[ActionListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[ActionEvent] identifier[e] operator[SEP] { identifier[ExtensionHelp] operator[SEP] identifier[showHelp] operator[SEP] literal[String] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[buttonPanel] operator[SEP] identifier[add] operator[SEP] identifier[helpButton] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[0] , Other[1] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buttonPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Other[0] , Other[1] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buttonPanel] operator[SEP] identifier[add] operator[SEP] identifier[getStartSessionButton] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[2] , Other[0] , Other[1] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] operator[SEP] identifier[add] operator[SEP] identifier[buttonPanel] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[20] , Other[2] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[jPanel] operator[SEP] }
public void incrCounter(Enum<?> key, long incr) { PigStatusReporter reporter = PigStatusReporter.getInstance(); if (reporter != null && reporter.getCounter(key) != null) { HadoopCompat.incrementCounter(reporter.getCounter(key), incr); if (counterEnumMap_.size() > 0) { for (Map.Entry<Enum<?>, Long> entry : counterEnumMap_.entrySet()) { HadoopCompat.incrementCounter( reporter.getCounter(entry.getKey()), entry.getValue()); } counterEnumMap_.clear(); } } else { // buffer the increments Long currentValue = counterEnumMap_.get(key); counterEnumMap_.put(key, (currentValue == null ? 0 : currentValue) + incr); } }
class class_name[name] begin[{] method[incrCounter, return_type[void], modifier[public], parameter[key, incr]] begin[{] local_variable[type[PigStatusReporter], reporter] if[binary_operation[binary_operation[member[.reporter], !=, literal[null]], &&, binary_operation[call[reporter.getCounter, parameter[member[.key]]], !=, literal[null]]]] begin[{] call[HadoopCompat.incrementCounter, parameter[call[reporter.getCounter, parameter[member[.key]]], member[.incr]]] if[binary_operation[call[counterEnumMap_.size, parameter[]], >, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=getCounter, postfix_operators=[], prefix_operators=[], qualifier=reporter, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=incrementCounter, postfix_operators=[], prefix_operators=[], qualifier=HadoopCompat, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=counterEnumMap_, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Enum, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) call[counterEnumMap_.clear, parameter[]] else begin[{] None end[}] else begin[{] local_variable[type[Long], currentValue] call[counterEnumMap_.put, parameter[member[.key], binary_operation[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=currentValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=currentValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), +, member[.incr]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[incrCounter] operator[SEP] identifier[Enum] operator[<] operator[?] operator[>] identifier[key] , Keyword[long] identifier[incr] operator[SEP] { identifier[PigStatusReporter] identifier[reporter] operator[=] identifier[PigStatusReporter] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reporter] operator[!=] Other[null] operator[&&] identifier[reporter] operator[SEP] identifier[getCounter] operator[SEP] identifier[key] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[HadoopCompat] operator[SEP] identifier[incrementCounter] operator[SEP] identifier[reporter] operator[SEP] identifier[getCounter] operator[SEP] identifier[key] operator[SEP] , identifier[incr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[counterEnumMap_] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Enum] operator[<] operator[?] operator[>] , identifier[Long] operator[>] identifier[entry] operator[:] identifier[counterEnumMap_] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[HadoopCompat] operator[SEP] identifier[incrementCounter] operator[SEP] identifier[reporter] operator[SEP] identifier[getCounter] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[counterEnumMap_] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Long] identifier[currentValue] operator[=] identifier[counterEnumMap_] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[counterEnumMap_] operator[SEP] identifier[put] operator[SEP] identifier[key] , operator[SEP] identifier[currentValue] operator[==] Other[null] operator[?] Other[0] operator[:] identifier[currentValue] operator[SEP] operator[+] identifier[incr] operator[SEP] operator[SEP] } }
protected XAbstractFeatureCall createSarlCapacityExtensionProvider(JvmIdentifiableElement thisFeature, JvmField field) { // For capacity call redirection if (thisFeature instanceof JvmDeclaredType) { final JvmAnnotationReference capacityAnnotation = this.annotationLookup.findAnnotation(field, ImportedCapacityFeature.class); if (capacityAnnotation != null) { final String methodName = Utils.createNameForHiddenCapacityImplementationCallingMethodFromFieldName( field.getSimpleName()); final JvmOperation callerOperation = findOperation((JvmDeclaredType) thisFeature, methodName); if (callerOperation != null) { final XbaseFactory baseFactory = getXbaseFactory(); final XMemberFeatureCall extensionProvider = baseFactory.createXMemberFeatureCall(); extensionProvider.setFeature(callerOperation); final XFeatureCall thisAccess = baseFactory.createXFeatureCall(); thisAccess.setFeature(thisFeature); extensionProvider.setMemberCallTarget(thisAccess); return extensionProvider; } } } return null; }
class class_name[name] begin[{] method[createSarlCapacityExtensionProvider, return_type[type[XAbstractFeatureCall]], modifier[protected], parameter[thisFeature, field]] begin[{] if[binary_operation[member[.thisFeature], instanceof, type[JvmDeclaredType]]] begin[{] local_variable[type[JvmAnnotationReference], capacityAnnotation] if[binary_operation[member[.capacityAnnotation], !=, literal[null]]] begin[{] local_variable[type[String], methodName] local_variable[type[JvmOperation], callerOperation] if[binary_operation[member[.callerOperation], !=, literal[null]]] begin[{] local_variable[type[XbaseFactory], baseFactory] local_variable[type[XMemberFeatureCall], extensionProvider] call[extensionProvider.setFeature, parameter[member[.callerOperation]]] local_variable[type[XFeatureCall], thisAccess] call[thisAccess.setFeature, parameter[member[.thisFeature]]] call[extensionProvider.setMemberCallTarget, parameter[member[.thisAccess]]] return[member[.extensionProvider]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[XAbstractFeatureCall] identifier[createSarlCapacityExtensionProvider] operator[SEP] identifier[JvmIdentifiableElement] identifier[thisFeature] , identifier[JvmField] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[thisFeature] Keyword[instanceof] identifier[JvmDeclaredType] operator[SEP] { Keyword[final] identifier[JvmAnnotationReference] identifier[capacityAnnotation] operator[=] Keyword[this] operator[SEP] identifier[annotationLookup] operator[SEP] identifier[findAnnotation] operator[SEP] identifier[field] , identifier[ImportedCapacityFeature] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[capacityAnnotation] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] identifier[Utils] operator[SEP] identifier[createNameForHiddenCapacityImplementationCallingMethodFromFieldName] operator[SEP] identifier[field] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JvmOperation] identifier[callerOperation] operator[=] identifier[findOperation] operator[SEP] operator[SEP] identifier[JvmDeclaredType] operator[SEP] identifier[thisFeature] , identifier[methodName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[callerOperation] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[XbaseFactory] identifier[baseFactory] operator[=] identifier[getXbaseFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[XMemberFeatureCall] identifier[extensionProvider] operator[=] identifier[baseFactory] operator[SEP] identifier[createXMemberFeatureCall] operator[SEP] operator[SEP] operator[SEP] identifier[extensionProvider] operator[SEP] identifier[setFeature] operator[SEP] identifier[callerOperation] operator[SEP] operator[SEP] Keyword[final] identifier[XFeatureCall] identifier[thisAccess] operator[=] identifier[baseFactory] operator[SEP] identifier[createXFeatureCall] operator[SEP] operator[SEP] operator[SEP] identifier[thisAccess] operator[SEP] identifier[setFeature] operator[SEP] identifier[thisFeature] operator[SEP] operator[SEP] identifier[extensionProvider] operator[SEP] identifier[setMemberCallTarget] operator[SEP] identifier[thisAccess] operator[SEP] operator[SEP] Keyword[return] identifier[extensionProvider] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public static StringBuilder replace(StringBuilder sb, String[][] mxStrings) { for (int x = 0; x < mxStrings.length; x++) { if (mxStrings[x].length != 2) return sb; sb = Utility.replace(sb, mxStrings[x][0], mxStrings[x][1]); } return sb; }
class class_name[name] begin[{] method[replace, return_type[type[StringBuilder]], modifier[public static], parameter[sb, mxStrings]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mxStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mxStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=mxStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=mxStrings, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=x)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=x, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.sb]] end[}] END[}]
Keyword[public] Keyword[static] identifier[StringBuilder] identifier[replace] operator[SEP] identifier[StringBuilder] identifier[sb] , identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mxStrings] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] Other[0] operator[SEP] identifier[x] operator[<] identifier[mxStrings] operator[SEP] identifier[length] operator[SEP] identifier[x] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[mxStrings] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[length] operator[!=] Other[2] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[sb] operator[=] identifier[Utility] operator[SEP] identifier[replace] operator[SEP] identifier[sb] , identifier[mxStrings] operator[SEP] identifier[x] operator[SEP] operator[SEP] Other[0] operator[SEP] , identifier[mxStrings] operator[SEP] identifier[x] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] }
@Setup(Level.Trial) public void setupFeatureManager() { FeatureManager featureManager = new FeatureManagerBuilder() .featureEnums(OverheadFeature.class) .stateRepository(new InMemoryStateRepository()) .userProvider(new NoOpUserProvider()) .build(); manager = featureManager; // set the StaticFeatureManagerProvider to use this feature manager StaticFeatureManagerProvider.setFeatureManager(featureManager); }
class class_name[name] begin[{] method[setupFeatureManager, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[FeatureManager], featureManager] assign[member[.manager], member[.featureManager]] call[StaticFeatureManagerProvider.setFeatureManager, parameter[member[.featureManager]]] end[}] END[}]
annotation[@] identifier[Setup] operator[SEP] identifier[Level] operator[SEP] identifier[Trial] operator[SEP] Keyword[public] Keyword[void] identifier[setupFeatureManager] operator[SEP] operator[SEP] { identifier[FeatureManager] identifier[featureManager] operator[=] Keyword[new] identifier[FeatureManagerBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[featureEnums] operator[SEP] identifier[OverheadFeature] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stateRepository] operator[SEP] Keyword[new] identifier[InMemoryStateRepository] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[userProvider] operator[SEP] Keyword[new] identifier[NoOpUserProvider] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[manager] operator[=] identifier[featureManager] operator[SEP] identifier[StaticFeatureManagerProvider] operator[SEP] identifier[setFeatureManager] operator[SEP] identifier[featureManager] operator[SEP] operator[SEP] }
public static <T extends Comparable<? super T>> Collector<T, ?, Seq<T>> maxAll() { return maxAllBy(t -> t, naturalOrder()); }
class class_name[name] begin[{] method[maxAll, return_type[type[Collector]], modifier[public static], parameter[]] begin[{] return[call[.maxAllBy, parameter[LambdaExpression(body=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), parameters=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), call[.naturalOrder, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Seq] operator[<] identifier[T] operator[>] operator[>] identifier[maxAll] operator[SEP] operator[SEP] { Keyword[return] identifier[maxAllBy] operator[SEP] identifier[t] operator[->] identifier[t] , identifier[naturalOrder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) { return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments); }
class class_name[name] begin[{] method[parallelScan, return_type[type[PaginatedParallelScanList]], modifier[public], parameter[scanExpression, totalSegments]] begin[{] return[call[.mapper, parameter[call[model.targetType, parameter[]], member[.scanExpression], member[.totalSegments]]]] end[}] END[}]
Keyword[public] identifier[PaginatedParallelScanList] operator[<] identifier[T] operator[>] identifier[parallelScan] operator[SEP] identifier[DynamoDBScanExpression] identifier[scanExpression] , Keyword[int] identifier[totalSegments] operator[SEP] { Keyword[return] identifier[mapper] operator[SEP] operator[<] identifier[T] operator[>] identifier[parallelScan] operator[SEP] identifier[model] operator[SEP] identifier[targetType] operator[SEP] operator[SEP] , identifier[scanExpression] , identifier[totalSegments] operator[SEP] operator[SEP] }
public static Date strToDateWithFormat(String strDate, Format format) { SimpleDateFormat localFormat = (SimpleDateFormat) format; ParsePosition pos = new ParsePosition(0); Date strtodate = localFormat.parse(strDate, pos); return strtodate; }
class class_name[name] begin[{] method[strToDateWithFormat, return_type[type[Date]], modifier[public static], parameter[strDate, format]] begin[{] local_variable[type[SimpleDateFormat], localFormat] local_variable[type[ParsePosition], pos] local_variable[type[Date], strtodate] return[member[.strtodate]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[strToDateWithFormat] operator[SEP] identifier[String] identifier[strDate] , identifier[Format] identifier[format] operator[SEP] { identifier[SimpleDateFormat] identifier[localFormat] operator[=] operator[SEP] identifier[SimpleDateFormat] operator[SEP] identifier[format] operator[SEP] identifier[ParsePosition] identifier[pos] operator[=] Keyword[new] identifier[ParsePosition] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Date] identifier[strtodate] operator[=] identifier[localFormat] operator[SEP] identifier[parse] operator[SEP] identifier[strDate] , identifier[pos] operator[SEP] operator[SEP] Keyword[return] identifier[strtodate] operator[SEP] }
public static Schema partitionFieldSchema(FieldPartitioner<?, ?> fp, Schema schema) { if (fp instanceof IdentityFieldPartitioner) { // copy the schema directly from the entity to preserve annotations return fieldSchema(schema, fp.getSourceName()); } else { Class<?> fieldType = getPartitionType(fp, schema); if (fieldType == Integer.class) { return Schema.create(Schema.Type.INT); } else if (fieldType == Long.class) { return Schema.create(Schema.Type.LONG); } else if (fieldType == String.class) { return Schema.create(Schema.Type.STRING); } else { throw new ValidationException( "Cannot encode partition " + fp.getName() + " with type " + fp.getSourceType() ); } } }
class class_name[name] begin[{] method[partitionFieldSchema, return_type[type[Schema]], modifier[public static], parameter[fp, schema]] begin[{] if[binary_operation[member[.fp], instanceof, type[IdentityFieldPartitioner]]] begin[{] return[call[.fieldSchema, parameter[member[.schema], call[fp.getSourceName, parameter[]]]]] else begin[{] local_variable[type[Class], fieldType] if[binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] begin[{] return[call[Schema.create, parameter[member[Schema.Type.INT]]]] else begin[{] if[binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]] begin[{] return[call[Schema.create, parameter[member[Schema.Type.LONG]]]] else begin[{] if[binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] begin[{] return[call[Schema.create, parameter[member[Schema.Type.STRING]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot encode partition "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=fp, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with type "), operator=+), operandr=MethodInvocation(arguments=[], member=getSourceType, postfix_operators=[], prefix_operators=[], qualifier=fp, 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=ValidationException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Schema] identifier[partitionFieldSchema] operator[SEP] identifier[FieldPartitioner] operator[<] operator[?] , operator[?] operator[>] identifier[fp] , identifier[Schema] identifier[schema] operator[SEP] { Keyword[if] operator[SEP] identifier[fp] Keyword[instanceof] identifier[IdentityFieldPartitioner] operator[SEP] { Keyword[return] identifier[fieldSchema] operator[SEP] identifier[schema] , identifier[fp] operator[SEP] identifier[getSourceName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Class] operator[<] operator[?] operator[>] identifier[fieldType] operator[=] identifier[getPartitionType] operator[SEP] identifier[fp] , identifier[schema] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldType] operator[==] identifier[Integer] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[Schema] operator[SEP] identifier[create] operator[SEP] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[INT] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[==] identifier[Long] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[Schema] operator[SEP] identifier[create] operator[SEP] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[LONG] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[==] identifier[String] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[Schema] operator[SEP] identifier[create] operator[SEP] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[STRING] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ValidationException] operator[SEP] literal[String] operator[+] identifier[fp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[fp] operator[SEP] identifier[getSourceType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public void serializeInByteBufferObject(UUID object, ByteBuffer buffer, Object... hints) { buffer.putLong(object.getMostSignificantBits()); buffer.putLong(object.getLeastSignificantBits()); }
class class_name[name] begin[{] method[serializeInByteBufferObject, return_type[void], modifier[public], parameter[object, buffer, hints]] begin[{] call[buffer.putLong, parameter[call[object.getMostSignificantBits, parameter[]]]] call[buffer.putLong, parameter[call[object.getLeastSignificantBits, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serializeInByteBufferObject] operator[SEP] identifier[UUID] identifier[object] , identifier[ByteBuffer] identifier[buffer] , identifier[Object] operator[...] identifier[hints] operator[SEP] { identifier[buffer] operator[SEP] identifier[putLong] operator[SEP] identifier[object] operator[SEP] identifier[getMostSignificantBits] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[putLong] operator[SEP] identifier[object] operator[SEP] identifier[getLeastSignificantBits] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Pure public boolean isFrom(UUID entityId) { final Address iSource = getSource(); return (entityId != null) && (iSource != null) && entityId.equals(iSource.getUUID()); }
class class_name[name] begin[{] method[isFrom, return_type[type[boolean]], modifier[public], parameter[entityId]] begin[{] local_variable[type[Address], iSource] return[binary_operation[binary_operation[binary_operation[member[.entityId], !=, literal[null]], &&, binary_operation[member[.iSource], !=, literal[null]]], &&, call[entityId.equals, parameter[call[iSource.getUUID, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[boolean] identifier[isFrom] operator[SEP] identifier[UUID] identifier[entityId] operator[SEP] { Keyword[final] identifier[Address] identifier[iSource] operator[=] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[entityId] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[iSource] operator[!=] Other[null] operator[SEP] operator[&&] identifier[entityId] operator[SEP] identifier[equals] operator[SEP] identifier[iSource] operator[SEP] identifier[getUUID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ElasticsearchDomainStatus withAdvancedOptions(java.util.Map<String, String> advancedOptions) { setAdvancedOptions(advancedOptions); return this; }
class class_name[name] begin[{] method[withAdvancedOptions, return_type[type[ElasticsearchDomainStatus]], modifier[public], parameter[advancedOptions]] begin[{] call[.setAdvancedOptions, parameter[member[.advancedOptions]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ElasticsearchDomainStatus] identifier[withAdvancedOptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[advancedOptions] operator[SEP] { identifier[setAdvancedOptions] operator[SEP] identifier[advancedOptions] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private void fetchByTitle(Title pTitle, boolean useExactTitle) throws WikiApiException { String searchString = pTitle.getPlainTitle(); if (!useExactTitle) { searchString = pTitle.getWikiStyleTitle(); } Session session; session = this.wiki.__getHibernateSession(); session.beginTransaction(); Integer pageId = (Integer) session .createNativeQuery( "select pml.pageID from PageMapLine as pml where pml.name = :pagetitle LIMIT 1") .setParameter("pagetitle", searchString, StringType.INSTANCE).uniqueResult(); session.getTransaction().commit(); if (pageId == null) { throw new WikiPageNotFoundException("No page with name " + searchString + " was found."); } fetchByPageId(pageId); if (!this.isRedirect&&searchString != null&&!searchString.equals(getTitle().getRawTitleText())) { if(this.isRedirect){ //in case we already tried to re-retrieve the discussion page unsuccessfully, //we have to give up here or we end up in an infinite loop. //reasons for this happening might be several entries in PageMapLine with the same name but different upper/lower case variants //if the database does not allow case sensitive queries, then the API will always retrieve only the first result and if this is a redirect to a different writing variant, we are stuck in a loop. //To fix this, either a case sensitive collation should be used or the API should be able to deal with set valued results and pick the correct one from the set. //For now, we gracefully return without retrieving the Talk page for this article and throw an appropriate excption. throw new WikiPageNotFoundException("No discussion page with name " + searchString + " could be retrieved. This is most likely due to multiple writing variants of the same page in the database"); }else{ this.isRedirect = true; /* * WORKAROUND * in our page is a redirect to a discussion page, we might not retrieve the target discussion page as expected but rather the article associated with the target discussion page * we check this here and re-retrieve the correct page. * this error should be avoided by keeping the namespace information in the database * This fix has been provided by Shiri Dori-Hacohen and is discussed in the Google Group under https://groups.google.com/forum/#!topic/jwpl/2nlr55yp87I/discussion */ if (searchString.startsWith(DISCUSSION_PREFIX) && !getTitle().getRawTitleText().startsWith(DISCUSSION_PREFIX)) { try { fetchByTitle(new Title(DISCUSSION_PREFIX + getTitle().getRawTitleText()), useExactTitle); } catch (WikiPageNotFoundException e) { throw new WikiPageNotFoundException("No page with name " + DISCUSSION_PREFIX + getTitle().getRawTitleText() + " was found."); } } } } }
class class_name[name] begin[{] method[fetchByTitle, return_type[void], modifier[private], parameter[pTitle, useExactTitle]] begin[{] local_variable[type[String], searchString] if[member[.useExactTitle]] begin[{] assign[member[.searchString], call[pTitle.getWikiStyleTitle, parameter[]]] else begin[{] None end[}] local_variable[type[Session], session] assign[member[.session], THIS[member[None.wiki]call[None.__getHibernateSession, parameter[]]]] call[session.beginTransaction, parameter[]] local_variable[type[Integer], pageId] call[session.getTransaction, parameter[]] if[binary_operation[member[.pageId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No page with name "), operandr=MemberReference(member=searchString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was found."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WikiPageNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] call[.fetchByPageId, parameter[member[.pageId]]] if[binary_operation[binary_operation[THIS[member[None.isRedirect]], &&, binary_operation[member[.searchString], !=, literal[null]]], &&, call[searchString.equals, parameter[call[.getTitle, parameter[]]]]]] begin[{] if[THIS[member[None.isRedirect]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No discussion page with name "), operandr=MemberReference(member=searchString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" could be retrieved. This is most likely due to multiple writing variants of the same page in the database"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WikiPageNotFoundException, sub_type=None)), label=None) else begin[{] assign[THIS[member[None.isRedirect]], literal[true]] if[binary_operation[call[searchString.startsWith, parameter[member[.DISCUSSION_PREFIX]]], &&, call[.getTitle, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=DISCUSSION_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getRawTitleText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Title, sub_type=None)), MemberReference(member=useExactTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fetchByTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No page with name "), operandr=MemberReference(member=DISCUSSION_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=getTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getRawTitleText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was found."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WikiPageNotFoundException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['WikiPageNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[fetchByTitle] operator[SEP] identifier[Title] identifier[pTitle] , Keyword[boolean] identifier[useExactTitle] operator[SEP] Keyword[throws] identifier[WikiApiException] { identifier[String] identifier[searchString] operator[=] identifier[pTitle] operator[SEP] identifier[getPlainTitle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[useExactTitle] operator[SEP] { identifier[searchString] operator[=] identifier[pTitle] operator[SEP] identifier[getWikiStyleTitle] operator[SEP] operator[SEP] operator[SEP] } identifier[Session] identifier[session] operator[SEP] identifier[session] operator[=] Keyword[this] operator[SEP] identifier[wiki] operator[SEP] identifier[__getHibernateSession] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[pageId] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[session] operator[SEP] identifier[createNativeQuery] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setParameter] operator[SEP] literal[String] , identifier[searchString] , identifier[StringType] operator[SEP] identifier[INSTANCE] operator[SEP] operator[SEP] identifier[uniqueResult] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[getTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pageId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[WikiPageNotFoundException] operator[SEP] literal[String] operator[+] identifier[searchString] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[fetchByPageId] operator[SEP] identifier[pageId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isRedirect] operator[&&] identifier[searchString] operator[!=] Other[null] operator[&&] operator[!] identifier[searchString] operator[SEP] identifier[equals] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[getRawTitleText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isRedirect] operator[SEP] { Keyword[throw] Keyword[new] identifier[WikiPageNotFoundException] operator[SEP] literal[String] operator[+] identifier[searchString] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[isRedirect] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[searchString] operator[SEP] identifier[startsWith] operator[SEP] identifier[DISCUSSION_PREFIX] operator[SEP] operator[&&] operator[!] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[getRawTitleText] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[DISCUSSION_PREFIX] operator[SEP] operator[SEP] { Keyword[try] { identifier[fetchByTitle] operator[SEP] Keyword[new] identifier[Title] operator[SEP] identifier[DISCUSSION_PREFIX] operator[+] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[getRawTitleText] operator[SEP] operator[SEP] operator[SEP] , identifier[useExactTitle] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[WikiPageNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[WikiPageNotFoundException] operator[SEP] literal[String] operator[+] identifier[DISCUSSION_PREFIX] operator[+] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] identifier[getRawTitleText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } } } }
private Map<String, String> buildPayParams(PayRequest request, TradeType tradeType) { Map<String, String> payParams = new TreeMap<>(); // 配置参数 buildConfigParams(payParams); // 业务必需参数 put(payParams, WepayField.BODY, request.getBody()); put(payParams, WepayField.OUT_TRADE_NO, request.getOutTradeNo()); put(payParams, WepayField.TOTAL_FEE, request.getTotalFee() + ""); put(payParams, WepayField.SPBILL_CREATE_IP, request.getClientIp()); put(payParams, WepayField.NOTIFY_URL, request.getNotifyUrl()); put(payParams, WepayField.FEE_TYPE, request.getFeeType().type()); put(payParams, WepayField.NONCE_STR, RandomStrs.generate(16)); put(payParams, WepayField.TIME_START, request.getTimeStart()); put(payParams, WepayField.TRADE_TYPE, tradeType.type()); // 业务可选参数 putIfNotEmpty(payParams, WepayField.DEVICE_INFO, request.getDeviceInfo()); putIfNotEmpty(payParams, WepayField.ATTACH, request.getAttach()); putIfNotEmpty(payParams, WepayField.DETAIL, request.getDetail()); putIfNotEmpty(payParams, WepayField.GOODS_TAG, request.getGoodsTag()); putIfNotEmpty(payParams, WepayField.TIME_EXPIRE, request.getTimeExpire()); putIfNotEmpty(payParams, WepayField.LIMIT_PAY, request.getLimitPay()); return payParams; }
class class_name[name] begin[{] method[buildPayParams, return_type[type[Map]], modifier[private], parameter[request, tradeType]] begin[{] local_variable[type[Map], payParams] call[.buildConfigParams, parameter[member[.payParams]]] call[.put, parameter[member[.payParams], member[WepayField.BODY], call[request.getBody, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.OUT_TRADE_NO], call[request.getOutTradeNo, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.TOTAL_FEE], binary_operation[call[request.getTotalFee, parameter[]], +, literal[""]]]] call[.put, parameter[member[.payParams], member[WepayField.SPBILL_CREATE_IP], call[request.getClientIp, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.NOTIFY_URL], call[request.getNotifyUrl, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.FEE_TYPE], call[request.getFeeType, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.NONCE_STR], call[RandomStrs.generate, parameter[literal[16]]]]] call[.put, parameter[member[.payParams], member[WepayField.TIME_START], call[request.getTimeStart, parameter[]]]] call[.put, parameter[member[.payParams], member[WepayField.TRADE_TYPE], call[tradeType.type, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.DEVICE_INFO], call[request.getDeviceInfo, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.ATTACH], call[request.getAttach, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.DETAIL], call[request.getDetail, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.GOODS_TAG], call[request.getGoodsTag, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.TIME_EXPIRE], call[request.getTimeExpire, parameter[]]]] call[.putIfNotEmpty, parameter[member[.payParams], member[WepayField.LIMIT_PAY], call[request.getLimitPay, parameter[]]]] return[member[.payParams]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[buildPayParams] operator[SEP] identifier[PayRequest] identifier[request] , identifier[TradeType] identifier[tradeType] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[payParams] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[buildConfigParams] operator[SEP] identifier[payParams] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[BODY] , identifier[request] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[OUT_TRADE_NO] , identifier[request] operator[SEP] identifier[getOutTradeNo] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[TOTAL_FEE] , identifier[request] operator[SEP] identifier[getTotalFee] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[SPBILL_CREATE_IP] , identifier[request] operator[SEP] identifier[getClientIp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[NOTIFY_URL] , identifier[request] operator[SEP] identifier[getNotifyUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[FEE_TYPE] , identifier[request] operator[SEP] identifier[getFeeType] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[NONCE_STR] , identifier[RandomStrs] operator[SEP] identifier[generate] operator[SEP] Other[16] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[TIME_START] , identifier[request] operator[SEP] identifier[getTimeStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[TRADE_TYPE] , identifier[tradeType] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[DEVICE_INFO] , identifier[request] operator[SEP] identifier[getDeviceInfo] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[ATTACH] , identifier[request] operator[SEP] identifier[getAttach] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[DETAIL] , identifier[request] operator[SEP] identifier[getDetail] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[GOODS_TAG] , identifier[request] operator[SEP] identifier[getGoodsTag] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[TIME_EXPIRE] , identifier[request] operator[SEP] identifier[getTimeExpire] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[putIfNotEmpty] operator[SEP] identifier[payParams] , identifier[WepayField] operator[SEP] identifier[LIMIT_PAY] , identifier[request] operator[SEP] identifier[getLimitPay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[payParams] operator[SEP] }
private static Direction direction(Point2d centerXy, Point2d substituentXy, Point2d horizontalXy, boolean haworth) { double deltaX = substituentXy.x - centerXy.x; double deltaY = substituentXy.y - centerXy.y; // normalise vector length so threshold is independent of length double mag = Math.sqrt(deltaX * deltaX + deltaY * deltaY); deltaX /= mag; deltaY /= mag; // account for an offset horizontal reference and re-normalise, // we presume no vertical chairs and use the deltaX +ve or -ve to // determine direction, the horizontal offset should be deltaX > 0. if (deltaX > 0) { deltaX -= horizontalXy.x; deltaY -= horizontalXy.y; } else { deltaX += horizontalXy.x; deltaY += horizontalXy.y; } mag = Math.sqrt(deltaX * deltaX + deltaY * deltaY); deltaX /= mag; deltaY /= mag; if (haworth && Math.abs(deltaX) > CARDINALITY_THRESHOLD) return Direction.Other; return deltaY > 0 ? Direction.Up : Direction.Down; }
class class_name[name] begin[{] method[direction, return_type[type[Direction]], modifier[private static], parameter[centerXy, substituentXy, horizontalXy, haworth]] begin[{] local_variable[type[double], deltaX] local_variable[type[double], deltaY] local_variable[type[double], mag] assign[member[.deltaX], member[.mag]] assign[member[.deltaY], member[.mag]] if[binary_operation[member[.deltaX], >, literal[0]]] begin[{] assign[member[.deltaX], member[horizontalXy.x]] assign[member[.deltaY], member[horizontalXy.y]] else begin[{] assign[member[.deltaX], member[horizontalXy.x]] assign[member[.deltaY], member[horizontalXy.y]] end[}] assign[member[.mag], call[Math.sqrt, parameter[binary_operation[binary_operation[member[.deltaX], *, member[.deltaX]], +, binary_operation[member[.deltaY], *, member[.deltaY]]]]]] assign[member[.deltaX], member[.mag]] assign[member[.deltaY], member[.mag]] if[binary_operation[member[.haworth], &&, binary_operation[call[Math.abs, parameter[member[.deltaX]]], >, member[.CARDINALITY_THRESHOLD]]]] begin[{] return[member[Direction.Other]] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=deltaY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=MemberReference(member=Down, postfix_operators=[], prefix_operators=[], qualifier=Direction, selectors=[]), if_true=MemberReference(member=Up, postfix_operators=[], prefix_operators=[], qualifier=Direction, selectors=[]))] end[}] END[}]
Keyword[private] Keyword[static] identifier[Direction] identifier[direction] operator[SEP] identifier[Point2d] identifier[centerXy] , identifier[Point2d] identifier[substituentXy] , identifier[Point2d] identifier[horizontalXy] , Keyword[boolean] identifier[haworth] operator[SEP] { Keyword[double] identifier[deltaX] operator[=] identifier[substituentXy] operator[SEP] identifier[x] operator[-] identifier[centerXy] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[deltaY] operator[=] identifier[substituentXy] operator[SEP] identifier[y] operator[-] identifier[centerXy] operator[SEP] identifier[y] operator[SEP] Keyword[double] identifier[mag] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[deltaX] operator[*] identifier[deltaX] operator[+] identifier[deltaY] operator[*] identifier[deltaY] operator[SEP] operator[SEP] identifier[deltaX] operator[/=] identifier[mag] operator[SEP] identifier[deltaY] operator[/=] identifier[mag] operator[SEP] Keyword[if] operator[SEP] identifier[deltaX] operator[>] Other[0] operator[SEP] { identifier[deltaX] operator[-=] identifier[horizontalXy] operator[SEP] identifier[x] operator[SEP] identifier[deltaY] operator[-=] identifier[horizontalXy] operator[SEP] identifier[y] operator[SEP] } Keyword[else] { identifier[deltaX] operator[+=] identifier[horizontalXy] operator[SEP] identifier[x] operator[SEP] identifier[deltaY] operator[+=] identifier[horizontalXy] operator[SEP] identifier[y] operator[SEP] } identifier[mag] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[deltaX] operator[*] identifier[deltaX] operator[+] identifier[deltaY] operator[*] identifier[deltaY] operator[SEP] operator[SEP] identifier[deltaX] operator[/=] identifier[mag] operator[SEP] identifier[deltaY] operator[/=] identifier[mag] operator[SEP] Keyword[if] operator[SEP] identifier[haworth] operator[&&] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[deltaX] operator[SEP] operator[>] identifier[CARDINALITY_THRESHOLD] operator[SEP] Keyword[return] identifier[Direction] operator[SEP] identifier[Other] operator[SEP] Keyword[return] identifier[deltaY] operator[>] Other[0] operator[?] identifier[Direction] operator[SEP] identifier[Up] operator[:] identifier[Direction] operator[SEP] identifier[Down] operator[SEP] }
public Boolean waitForResponse() { if (responseReceived != null) { return responseReceived; } synchronized (lock) { try { lock.wait(RESPONSE_WAIT_TIME); } catch (InterruptedException e) { log.warn("Interrupted waiting for synchronous response."); } } if (responseReceived == null) { log.warn("Timed out waiting for synchronous response."); responseReceived = false; } return responseReceived; }
class class_name[name] begin[{] method[waitForResponse, return_type[type[Boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.responseReceived], !=, literal[null]]] begin[{] return[member[.responseReceived]] else begin[{] None end[}] SYNCHRONIZED[member[.lock]] BEGIN[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=RESPONSE_WAIT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wait, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Interrupted waiting for synchronous response.")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) END[}] if[binary_operation[member[.responseReceived], ==, literal[null]]] begin[{] call[log.warn, parameter[literal["Timed out waiting for synchronous response."]]] assign[member[.responseReceived], literal[false]] else begin[{] None end[}] return[member[.responseReceived]] end[}] END[}]
Keyword[public] identifier[Boolean] identifier[waitForResponse] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[responseReceived] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[responseReceived] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[try] { identifier[lock] operator[SEP] identifier[wait] operator[SEP] identifier[RESPONSE_WAIT_TIME] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[responseReceived] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[responseReceived] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[responseReceived] operator[SEP] }
public void setGoalRevenue(Double goalRevenue){ if (goalRevenue != null && getGoalId() == null){ throw new IllegalStateException("GoalId must be set before GoalRevenue can be set."); } setParameter(GOAL_REVENUE, goalRevenue); }
class class_name[name] begin[{] method[setGoalRevenue, return_type[void], modifier[public], parameter[goalRevenue]] begin[{] if[binary_operation[binary_operation[member[.goalRevenue], !=, literal[null]], &&, binary_operation[call[.getGoalId, parameter[]], ==, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GoalId must be set before GoalRevenue can be set.")], 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[}] call[.setParameter, parameter[member[.GOAL_REVENUE], member[.goalRevenue]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setGoalRevenue] operator[SEP] identifier[Double] identifier[goalRevenue] operator[SEP] { Keyword[if] operator[SEP] identifier[goalRevenue] operator[!=] Other[null] operator[&&] identifier[getGoalId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[setParameter] operator[SEP] identifier[GOAL_REVENUE] , identifier[goalRevenue] operator[SEP] operator[SEP] }
public static boolean isDebuggable() { boolean debuggable = false; Context ctx = QuickUtils.getContext(); try { PackageInfo pinfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), PackageManager.GET_SIGNATURES); Signature signatures[] = pinfo.signatures; CertificateFactory cf = CertificateFactory.getInstance("X.509"); for (int i = 0; i < signatures.length; i++) { ByteArrayInputStream stream = new ByteArrayInputStream(signatures[i].toByteArray()); X509Certificate cert = (X509Certificate) cf.generateCertificate(stream); debuggable = cert.getSubjectX500Principal().equals(DEBUG_DN); if (debuggable) break; } } catch (NameNotFoundException | CertificateException ignored) { } return debuggable; }
class class_name[name] begin[{] method[isDebuggable, return_type[type[boolean]], modifier[public static], parameter[]] begin[{] local_variable[type[boolean], debuggable] local_variable[type[Context], ctx] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPackageManager, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPackageName, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), MemberReference(member=GET_SIGNATURES, postfix_operators=[], prefix_operators=[], qualifier=PackageManager, selectors=[])], member=getPackageInfo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=pinfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PackageInfo, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=MemberReference(member=signatures, postfix_operators=[], prefix_operators=[], qualifier=pinfo, selectors=[]), name=signatures)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Signature, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="X.509")], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=CertificateFactory, selectors=[], type_arguments=None), name=cf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CertificateFactory, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=signatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=toByteArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None)), name=stream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayInputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateCertificate, postfix_operators=[], prefix_operators=[], qualifier=cf, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), name=cert)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=debuggable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSubjectX500Principal, postfix_operators=[], prefix_operators=[], qualifier=cert, selectors=[MethodInvocation(arguments=[MemberReference(member=DEBUG_DN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MemberReference(member=debuggable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BreakStatement(goto=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=signatures, 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)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['NameNotFoundException', 'CertificateException']))], finally_block=None, label=None, resources=None) return[member[.debuggable]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isDebuggable] operator[SEP] operator[SEP] { Keyword[boolean] identifier[debuggable] operator[=] literal[boolean] operator[SEP] identifier[Context] identifier[ctx] operator[=] identifier[QuickUtils] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[PackageInfo] identifier[pinfo] operator[=] identifier[ctx] operator[SEP] identifier[getPackageManager] operator[SEP] operator[SEP] operator[SEP] identifier[getPackageInfo] operator[SEP] identifier[ctx] operator[SEP] identifier[getPackageName] operator[SEP] operator[SEP] , identifier[PackageManager] operator[SEP] identifier[GET_SIGNATURES] operator[SEP] operator[SEP] identifier[Signature] identifier[signatures] operator[SEP] operator[SEP] operator[=] identifier[pinfo] operator[SEP] identifier[signatures] operator[SEP] identifier[CertificateFactory] identifier[cf] operator[=] identifier[CertificateFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[signatures] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ByteArrayInputStream] identifier[stream] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[signatures] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[X509Certificate] identifier[cert] operator[=] operator[SEP] identifier[X509Certificate] operator[SEP] identifier[cf] operator[SEP] identifier[generateCertificate] operator[SEP] identifier[stream] operator[SEP] operator[SEP] identifier[debuggable] operator[=] identifier[cert] operator[SEP] identifier[getSubjectX500Principal] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[DEBUG_DN] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debuggable] operator[SEP] Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NameNotFoundException] operator[|] identifier[CertificateException] identifier[ignored] operator[SEP] { } Keyword[return] identifier[debuggable] operator[SEP] }
public static I_CmsSearchConfigurationPagination create( String pageParam, List<Integer> pageSizes, Integer pageNavLength) { return (pageParam != null) || (pageSizes != null) || (pageNavLength != null) ? new CmsSearchConfigurationPagination(pageParam, pageSizes, pageNavLength) : null; }
class class_name[name] begin[{] method[create, return_type[type[I_CmsSearchConfigurationPagination]], modifier[public static], parameter[pageParam, pageSizes, pageNavLength]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pageParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=pageSizes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=pageNavLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=||), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=ClassCreator(arguments=[MemberReference(member=pageParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pageSizes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pageNavLength, 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=CmsSearchConfigurationPagination, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] identifier[I_CmsSearchConfigurationPagination] identifier[create] operator[SEP] identifier[String] identifier[pageParam] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[pageSizes] , identifier[Integer] identifier[pageNavLength] operator[SEP] { Keyword[return] operator[SEP] identifier[pageParam] operator[!=] Other[null] operator[SEP] operator[||] operator[SEP] identifier[pageSizes] operator[!=] Other[null] operator[SEP] operator[||] operator[SEP] identifier[pageNavLength] operator[!=] Other[null] operator[SEP] operator[?] Keyword[new] identifier[CmsSearchConfigurationPagination] operator[SEP] identifier[pageParam] , identifier[pageSizes] , identifier[pageNavLength] operator[SEP] operator[:] Other[null] operator[SEP] }
public void onSelectFilterFunction() { int selectedIdx = view.getSelectedFunctionIndex(); if (selectedIdx >= 0) { CoreFunctionFilter coreFilter = getCoreFilter(); CoreFunctionType functionType = getAvailableFunctions(coreFilter).get(selectedIdx); ColumnType columnType = metadata.getColumnType(coreFilter.getColumnId()); List params = FilterFactory.createParameters(columnType, functionType); coreFilter.setType(functionType); coreFilter.setParameters(params); initFilterSelector(); fireFilterChanged(); if (!initFilterConfig().isEmpty()) { view.showFilterConfig(); } } }
class class_name[name] begin[{] method[onSelectFilterFunction, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[int], selectedIdx] if[binary_operation[member[.selectedIdx], >=, literal[0]]] begin[{] local_variable[type[CoreFunctionFilter], coreFilter] local_variable[type[CoreFunctionType], functionType] local_variable[type[ColumnType], columnType] local_variable[type[List], params] call[coreFilter.setType, parameter[member[.functionType]]] call[coreFilter.setParameters, parameter[member[.params]]] call[.initFilterSelector, parameter[]] call[.fireFilterChanged, parameter[]] if[call[.initFilterConfig, parameter[]]] begin[{] call[view.showFilterConfig, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onSelectFilterFunction] operator[SEP] operator[SEP] { Keyword[int] identifier[selectedIdx] operator[=] identifier[view] operator[SEP] identifier[getSelectedFunctionIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[selectedIdx] operator[>=] Other[0] operator[SEP] { identifier[CoreFunctionFilter] identifier[coreFilter] operator[=] identifier[getCoreFilter] operator[SEP] operator[SEP] operator[SEP] identifier[CoreFunctionType] identifier[functionType] operator[=] identifier[getAvailableFunctions] operator[SEP] identifier[coreFilter] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[selectedIdx] operator[SEP] operator[SEP] identifier[ColumnType] identifier[columnType] operator[=] identifier[metadata] operator[SEP] identifier[getColumnType] operator[SEP] identifier[coreFilter] operator[SEP] identifier[getColumnId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] identifier[params] operator[=] identifier[FilterFactory] operator[SEP] identifier[createParameters] operator[SEP] identifier[columnType] , identifier[functionType] operator[SEP] operator[SEP] identifier[coreFilter] operator[SEP] identifier[setType] operator[SEP] identifier[functionType] operator[SEP] operator[SEP] identifier[coreFilter] operator[SEP] identifier[setParameters] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[initFilterSelector] operator[SEP] operator[SEP] operator[SEP] identifier[fireFilterChanged] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[initFilterConfig] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[view] operator[SEP] identifier[showFilterConfig] operator[SEP] operator[SEP] operator[SEP] } } }
public static <T> List<Number> findIndexValues(Iterator<T> self, Number startIndex, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) { List<Number> result = new ArrayList<Number>(); long count = 0; long startCount = startIndex.longValue(); BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition); while (self.hasNext()) { Object value = self.next(); if (count++ < startCount) { continue; } if (bcw.call(value)) { result.add(count - 1); } } return result; }
class class_name[name] begin[{] method[findIndexValues, return_type[type[List]], modifier[public static], parameter[self, startIndex, condition]] begin[{] local_variable[type[List], result] local_variable[type[long], count] local_variable[type[long], startCount] local_variable[type[BooleanClosureWrapper], bcw] while[call[self.hasNext, parameter[]]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.count], <, member[.startCount]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] if[call[bcw.call, parameter[member[.value]]]] begin[{] call[result.add, parameter[binary_operation[member[.count], -, literal[1]]]] else begin[{] None end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Number] operator[>] identifier[findIndexValues] operator[SEP] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[self] , identifier[Number] identifier[startIndex] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[FirstParam] operator[SEP] identifier[FirstGenericType] operator[SEP] Keyword[class] operator[SEP] identifier[Closure] identifier[condition] operator[SEP] { identifier[List] operator[<] identifier[Number] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Number] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[count] operator[=] Other[0] operator[SEP] Keyword[long] identifier[startCount] operator[=] identifier[startIndex] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] identifier[BooleanClosureWrapper] identifier[bcw] operator[=] Keyword[new] identifier[BooleanClosureWrapper] operator[SEP] identifier[condition] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[self] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[self] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[++] operator[<] identifier[startCount] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[bcw] operator[SEP] identifier[call] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[count] operator[-] Other[1] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public void execute(@Param("pipelineId") Long pipelineId, Context context, Navigator nav) throws Exception { Channel channel = channelService.findByPipelineId(pipelineId); if (channel.getStatus().isStart()) { nav.redirectTo(WebConstant.ERROR_FORBIDDEN_Link); return; } Pipeline pipeline = pipelineService.findById(pipelineId); context.put("pipeline", pipeline); context.put("nodes", nodeService.listAll()); }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[pipelineId, context, nav]] begin[{] local_variable[type[Channel], channel] if[call[channel.getStatus, parameter[]]] begin[{] call[nav.redirectTo, parameter[member[WebConstant.ERROR_FORBIDDEN_Link]]] return[None] else begin[{] None end[}] local_variable[type[Pipeline], pipeline] call[context.put, parameter[literal["pipeline"], member[.pipeline]]] call[context.put, parameter[literal["nodes"], call[nodeService.listAll, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[execute] operator[SEP] annotation[@] identifier[Param] operator[SEP] literal[String] operator[SEP] identifier[Long] identifier[pipelineId] , identifier[Context] identifier[context] , identifier[Navigator] identifier[nav] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Channel] identifier[channel] operator[=] identifier[channelService] operator[SEP] identifier[findByPipelineId] operator[SEP] identifier[pipelineId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channel] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[isStart] operator[SEP] operator[SEP] operator[SEP] { identifier[nav] operator[SEP] identifier[redirectTo] operator[SEP] identifier[WebConstant] operator[SEP] identifier[ERROR_FORBIDDEN_Link] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[Pipeline] identifier[pipeline] operator[=] identifier[pipelineService] operator[SEP] identifier[findById] operator[SEP] identifier[pipelineId] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[pipeline] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[nodeService] operator[SEP] identifier[listAll] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public OrientVertex addVertex(Object id, final Object... prop) { makeActive(); String className = null; String clusterName = null; Object[] fields = null; if (id != null) { if (id instanceof String) { // PARSE ARGUMENTS final String[] args = ((String) id).split(","); for (String s : args) { if (s.startsWith(CLASS_PREFIX)) // GET THE CLASS NAME className = s.substring(CLASS_PREFIX.length()); else if (s.startsWith(CLUSTER_PREFIX)) // GET THE CLASS NAME clusterName = s.substring(CLUSTER_PREFIX.length()); else id = s; } } if (isSaveOriginalIds()) // SAVE THE ID TOO fields = new Object[] { OrientElement.DEF_ORIGINAL_ID_FIELDNAME, id }; } setCurrentGraphInThreadLocal(); autoStartTransaction(); final OrientVertex vertex = getVertexInstance(className, fields); vertex.setPropertiesInternal(prop); // SAVE IT if (clusterName != null) vertex.save(clusterName); else vertex.save(); return vertex; }
class class_name[name] begin[{] method[addVertex, return_type[type[OrientVertex]], modifier[public], parameter[id, prop]] begin[{] call[.makeActive, parameter[]] local_variable[type[String], className] local_variable[type[String], clusterName] local_variable[type[Object], fields] if[binary_operation[member[.id], !=, literal[null]]] begin[{] if[binary_operation[member[.id], instanceof, type[String]]] begin[{] local_variable[type[String], args] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CLASS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CLUSTER_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=clusterName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=CLUSTER_PREFIX, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)), label=None)), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=CLASS_PREFIX, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] if[call[.isSaveOriginalIds, parameter[]]] begin[{] assign[member[.fields], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=DEF_ORIGINAL_ID_FIELDNAME, postfix_operators=[], prefix_operators=[], qualifier=OrientElement, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] call[.setCurrentGraphInThreadLocal, parameter[]] call[.autoStartTransaction, parameter[]] local_variable[type[OrientVertex], vertex] call[vertex.setPropertiesInternal, parameter[member[.prop]]] if[binary_operation[member[.clusterName], !=, literal[null]]] begin[{] call[vertex.save, parameter[member[.clusterName]]] else begin[{] call[vertex.save, parameter[]] end[}] return[member[.vertex]] end[}] END[}]
Keyword[public] identifier[OrientVertex] identifier[addVertex] operator[SEP] identifier[Object] identifier[id] , Keyword[final] identifier[Object] operator[...] identifier[prop] operator[SEP] { identifier[makeActive] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] Other[null] operator[SEP] identifier[String] identifier[clusterName] operator[=] Other[null] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[fields] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[id] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[startsWith] operator[SEP] identifier[CLASS_PREFIX] operator[SEP] operator[SEP] identifier[className] operator[=] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[CLASS_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[startsWith] operator[SEP] identifier[CLUSTER_PREFIX] operator[SEP] operator[SEP] identifier[clusterName] operator[=] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[CLUSTER_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[id] operator[=] identifier[s] operator[SEP] } } Keyword[if] operator[SEP] identifier[isSaveOriginalIds] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[=] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[OrientElement] operator[SEP] identifier[DEF_ORIGINAL_ID_FIELDNAME] , identifier[id] } operator[SEP] } identifier[setCurrentGraphInThreadLocal] operator[SEP] operator[SEP] operator[SEP] identifier[autoStartTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[OrientVertex] identifier[vertex] operator[=] identifier[getVertexInstance] operator[SEP] identifier[className] , identifier[fields] operator[SEP] operator[SEP] identifier[vertex] operator[SEP] identifier[setPropertiesInternal] operator[SEP] identifier[prop] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clusterName] operator[!=] Other[null] operator[SEP] identifier[vertex] operator[SEP] identifier[save] operator[SEP] identifier[clusterName] operator[SEP] operator[SEP] Keyword[else] identifier[vertex] operator[SEP] identifier[save] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[vertex] operator[SEP] }
public final void setStartEndPoints(final Point3D start, final Point3D end) { final Point3D direction = start.subtract(end); final Point3D position = start.midpoint(end); setLength(direction.magnitude()); final Point3D axis = UP.crossProduct(direction.normalize()); super.setVisible(true); super.setTranslateX(position.getX()); super.setTranslateY(position.getY()); super.setTranslateZ(position.getZ()); super.setRotationAxis(axis); super.setRotate(UP.angle(direction.normalize())); }
class class_name[name] begin[{] method[setStartEndPoints, return_type[void], modifier[final public], parameter[start, end]] begin[{] local_variable[type[Point3D], direction] local_variable[type[Point3D], position] call[.setLength, parameter[call[direction.magnitude, parameter[]]]] local_variable[type[Point3D], axis] SuperMethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setVisible, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=position, selectors=[], type_arguments=None)], member=setTranslateX, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=position, selectors=[], type_arguments=None)], member=setTranslateY, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[MethodInvocation(arguments=[], member=getZ, postfix_operators=[], prefix_operators=[], qualifier=position, selectors=[], type_arguments=None)], member=setTranslateZ, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[MemberReference(member=axis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRotationAxis, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=normalize, postfix_operators=[], prefix_operators=[], qualifier=direction, selectors=[], type_arguments=None)], member=angle, postfix_operators=[], prefix_operators=[], qualifier=UP, selectors=[], type_arguments=None)], member=setRotate, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setStartEndPoints] operator[SEP] Keyword[final] identifier[Point3D] identifier[start] , Keyword[final] identifier[Point3D] identifier[end] operator[SEP] { Keyword[final] identifier[Point3D] identifier[direction] operator[=] identifier[start] operator[SEP] identifier[subtract] operator[SEP] identifier[end] operator[SEP] operator[SEP] Keyword[final] identifier[Point3D] identifier[position] operator[=] identifier[start] operator[SEP] identifier[midpoint] operator[SEP] identifier[end] operator[SEP] operator[SEP] identifier[setLength] operator[SEP] identifier[direction] operator[SEP] identifier[magnitude] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Point3D] identifier[axis] operator[=] identifier[UP] operator[SEP] identifier[crossProduct] operator[SEP] identifier[direction] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setTranslateX] operator[SEP] identifier[position] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setTranslateY] operator[SEP] identifier[position] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setTranslateZ] operator[SEP] identifier[position] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setRotationAxis] operator[SEP] identifier[axis] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setRotate] operator[SEP] identifier[UP] operator[SEP] identifier[angle] operator[SEP] identifier[direction] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
LinkedEntry<K, V> createEntry(K pKey, V pValue) { return new LinkedEntry<K, V>(pKey, pValue, null); }
class class_name[name] begin[{] method[createEntry, return_type[type[LinkedEntry]], modifier[default], parameter[pKey, pValue]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=LinkedEntry, sub_type=None))] end[}] END[}]
identifier[LinkedEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[createEntry] operator[SEP] identifier[K] identifier[pKey] , identifier[V] identifier[pValue] operator[SEP] { Keyword[return] Keyword[new] identifier[LinkedEntry] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] identifier[pKey] , identifier[pValue] , Other[null] operator[SEP] operator[SEP] }
public static <T extends Executable> T getExecutable(List<T> executables, String name, Class<?>... parameterTypes) { for (T info : executables) { if (name == null || info.getName().equals(name)) { Class<?>[] types = info.getParameterTypes(); if (parameterTypes.length == types.length) { boolean match = true; for (int i = 0; i < parameterTypes.length; i++) { if (types[i] != parameterTypes[i]) { match = false; break; } } if (match) { return info; } } } } return null; }
class class_name[name] begin[{] method[getExecutable, return_type[type[T]], modifier[public static], parameter[executables, name, parameterTypes]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), name=types)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[None], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameterTypes, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=match)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=parameterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=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=parameterTypes, 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), IfStatement(condition=MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]))]), control=EnhancedForControl(iterable=MemberReference(member=executables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=info)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Executable] operator[>] identifier[T] identifier[getExecutable] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[executables] , identifier[String] identifier[name] , identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[parameterTypes] operator[SEP] { Keyword[for] operator[SEP] identifier[T] identifier[info] operator[:] identifier[executables] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] identifier[info] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[types] operator[=] identifier[info] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parameterTypes] operator[SEP] identifier[length] operator[==] identifier[types] operator[SEP] identifier[length] operator[SEP] { Keyword[boolean] identifier[match] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[parameterTypes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[parameterTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[match] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[match] operator[SEP] { Keyword[return] identifier[info] operator[SEP] } } } } Keyword[return] Other[null] operator[SEP] }
public void setCommerceDiscountUserSegmentRelService( com.liferay.commerce.discount.service.CommerceDiscountUserSegmentRelService commerceDiscountUserSegmentRelService) { this.commerceDiscountUserSegmentRelService = commerceDiscountUserSegmentRelService; }
class class_name[name] begin[{] method[setCommerceDiscountUserSegmentRelService, return_type[void], modifier[public], parameter[commerceDiscountUserSegmentRelService]] begin[{] assign[THIS[member[None.commerceDiscountUserSegmentRelService]], member[.commerceDiscountUserSegmentRelService]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCommerceDiscountUserSegmentRelService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[discount] operator[SEP] identifier[service] operator[SEP] identifier[CommerceDiscountUserSegmentRelService] identifier[commerceDiscountUserSegmentRelService] operator[SEP] { Keyword[this] operator[SEP] identifier[commerceDiscountUserSegmentRelService] operator[=] identifier[commerceDiscountUserSegmentRelService] operator[SEP] }
public void depthFirstSearch(Vertex<T> v, final Visitor<T> visitor) { VisitorEX<T, RuntimeException> wrapper = new VisitorEX<T, RuntimeException>() { public void visit(Graph<T> g, Vertex<T> v) throws RuntimeException { if (visitor != null) visitor.visit(g, v); } }; this.depthFirstSearch(v, wrapper); }
class class_name[name] begin[{] method[depthFirstSearch, return_type[void], modifier[public], parameter[v, visitor]] begin[{] local_variable[type[VisitorEX], wrapper] THIS[call[None.depthFirstSearch, parameter[member[.v], member[.wrapper]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[depthFirstSearch] operator[SEP] identifier[Vertex] operator[<] identifier[T] operator[>] identifier[v] , Keyword[final] identifier[Visitor] operator[<] identifier[T] operator[>] identifier[visitor] operator[SEP] { identifier[VisitorEX] operator[<] identifier[T] , identifier[RuntimeException] operator[>] identifier[wrapper] operator[=] Keyword[new] identifier[VisitorEX] operator[<] identifier[T] , identifier[RuntimeException] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[Graph] operator[<] identifier[T] operator[>] identifier[g] , identifier[Vertex] operator[<] identifier[T] operator[>] identifier[v] operator[SEP] Keyword[throws] identifier[RuntimeException] { Keyword[if] operator[SEP] identifier[visitor] operator[!=] Other[null] operator[SEP] identifier[visitor] operator[SEP] identifier[visit] operator[SEP] identifier[g] , identifier[v] operator[SEP] operator[SEP] } } operator[SEP] Keyword[this] operator[SEP] identifier[depthFirstSearch] operator[SEP] identifier[v] , identifier[wrapper] operator[SEP] operator[SEP] }
public void setRefEdge(Integer newRefEdge) { Integer oldRefEdge = refEdge; refEdge = newRefEdge; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FINISHING_OPERATION__REF_EDGE, oldRefEdge, refEdge)); }
class class_name[name] begin[{] method[setRefEdge, return_type[void], modifier[public], parameter[newRefEdge]] begin[{] local_variable[type[Integer], oldRefEdge] assign[member[.refEdge], member[.newRefEdge]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=FINISHING_OPERATION__REF_EDGE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldRefEdge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=refEdge, 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=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRefEdge] operator[SEP] identifier[Integer] identifier[newRefEdge] operator[SEP] { identifier[Integer] identifier[oldRefEdge] operator[=] identifier[refEdge] operator[SEP] identifier[refEdge] operator[=] identifier[newRefEdge] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[FINISHING_OPERATION__REF_EDGE] , identifier[oldRefEdge] , identifier[refEdge] operator[SEP] operator[SEP] operator[SEP] }
public List<Block.Instance> getBlockInstancesForWitness(Witness w) { return witnessToBlockInstances.computeIfAbsent(w, v -> Collections.emptyList()); }
class class_name[name] begin[{] method[getBlockInstancesForWitness, return_type[type[List]], modifier[public], parameter[w]] begin[{] return[call[witnessToBlockInstances.computeIfAbsent, parameter[member[.w], LambdaExpression(body=MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), parameters=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Block] operator[SEP] identifier[Instance] operator[>] identifier[getBlockInstancesForWitness] operator[SEP] identifier[Witness] identifier[w] operator[SEP] { Keyword[return] identifier[witnessToBlockInstances] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[w] , identifier[v] operator[->] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ServiceFuture<LogAnalyticsOperationResultInner> beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters, final ServiceCallback<LogAnalyticsOperationResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters), serviceCallback); }
class class_name[name] begin[{] method[beginExportRequestRateByIntervalAsync, return_type[type[ServiceFuture]], modifier[public], parameter[location, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginExportRequestRateByIntervalWithServiceResponseAsync, parameter[member[.location], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[LogAnalyticsOperationResultInner] operator[>] identifier[beginExportRequestRateByIntervalAsync] operator[SEP] identifier[String] identifier[location] , identifier[RequestRateByIntervalInput] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[LogAnalyticsOperationResultInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[beginExportRequestRateByIntervalWithServiceResponseAsync] operator[SEP] identifier[location] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/transportation/2.0", name = "Railway", substitutionHeadNamespace = "http://www.opengis.net/citygml/transportation/2.0", substitutionHeadName = "TransportationComplex") public JAXBElement<RailwayType> createRailway(RailwayType value) { return new JAXBElement<RailwayType>(_Railway_QNAME, RailwayType.class, null, value); }
class class_name[name] begin[{] method[createRailway, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Railway_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RailwayType, 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=RailwayType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[RailwayType] operator[>] identifier[createRailway] operator[SEP] identifier[RailwayType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[RailwayType] operator[>] operator[SEP] identifier[_Railway_QNAME] , identifier[RailwayType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public void updateCharacterStream(int columnIndex, Reader reader, int length) throws SQLException { updateCharacterStream(columnIndex, reader, (long) length); }
class class_name[name] begin[{] method[updateCharacterStream, return_type[void], modifier[public], parameter[columnIndex, reader, length]] begin[{] call[.updateCharacterStream, parameter[member[.columnIndex], member[.reader], Cast(expression=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=long))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateCharacterStream] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[Reader] identifier[reader] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[updateCharacterStream] operator[SEP] identifier[columnIndex] , identifier[reader] , operator[SEP] Keyword[long] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
protected String getLockErrorTitle(CmsLockInfo lockInfo) { switch (lockInfo.getState()) { case changed: return Messages.get().key(Messages.ERR_LOCK_TITLE_RESOURCE_CHANGED_0); case locked: return Messages.get().key(Messages.ERR_LOCK_TITLE_RESOURCE_LOCKED_0); case other: case success: default: return Messages.get().key(Messages.GUI_LOCK_FAIL_0); } }
class class_name[name] begin[{] method[getLockErrorTitle, return_type[type[String]], modifier[protected], parameter[lockInfo]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['changed'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_LOCK_TITLE_RESOURCE_CHANGED_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=['locked'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_LOCK_TITLE_RESOURCE_LOCKED_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=['other', 'success'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=GUI_LOCK_FAIL_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])], expression=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=lockInfo, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[protected] identifier[String] identifier[getLockErrorTitle] operator[SEP] identifier[CmsLockInfo] identifier[lockInfo] operator[SEP] { Keyword[switch] operator[SEP] identifier[lockInfo] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[changed] operator[:] Keyword[return] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_LOCK_TITLE_RESOURCE_CHANGED_0] operator[SEP] operator[SEP] Keyword[case] identifier[locked] operator[:] Keyword[return] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_LOCK_TITLE_RESOURCE_LOCKED_0] operator[SEP] operator[SEP] Keyword[case] identifier[other] operator[:] Keyword[case] identifier[success] operator[:] Keyword[default] operator[:] Keyword[return] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_LOCK_FAIL_0] operator[SEP] operator[SEP] } }
public List<HealthDependencyPresenter> getDependencies() { List<HealthDependencyPresenter> dependencies = Lists.newArrayList(); if (dto.getDependencies().isPresent()) { for (HealthDependencyDto dependencyDto : dto.getDependencies().get()) { dependencies.add(new HealthDependencyPresenter(dependencyDto)); } } return dependencies; }
class class_name[name] begin[{] method[getDependencies, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], dependencies] if[call[dto.getDependencies, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=dependencyDto, 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=HealthDependencyPresenter, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=dependencies, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDependencies, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dependencyDto)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HealthDependencyDto, sub_type=None))), label=None) else begin[{] None end[}] return[member[.dependencies]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[HealthDependencyPresenter] operator[>] identifier[getDependencies] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[HealthDependencyPresenter] operator[>] identifier[dependencies] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dto] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[HealthDependencyDto] identifier[dependencyDto] operator[:] identifier[dto] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { identifier[dependencies] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[HealthDependencyPresenter] operator[SEP] identifier[dependencyDto] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[dependencies] operator[SEP] }
public ModbusRequest buildReturnQueryData(int serverAddress, int queryData) throws ModbusNumberException { return buildDiagnostics(DiagnosticsSubFunctionCode.RETURN_QUERY_DATA, serverAddress, queryData); }
class class_name[name] begin[{] method[buildReturnQueryData, return_type[type[ModbusRequest]], modifier[public], parameter[serverAddress, queryData]] begin[{] return[call[.buildDiagnostics, parameter[member[DiagnosticsSubFunctionCode.RETURN_QUERY_DATA], member[.serverAddress], member[.queryData]]]] end[}] END[}]
Keyword[public] identifier[ModbusRequest] identifier[buildReturnQueryData] operator[SEP] Keyword[int] identifier[serverAddress] , Keyword[int] identifier[queryData] operator[SEP] Keyword[throws] identifier[ModbusNumberException] { Keyword[return] identifier[buildDiagnostics] operator[SEP] identifier[DiagnosticsSubFunctionCode] operator[SEP] identifier[RETURN_QUERY_DATA] , identifier[serverAddress] , identifier[queryData] operator[SEP] operator[SEP] }
public static byte[] getOverride() { String overrideMac = System.getProperty(OVERRIDE_MAC_PROP); byte[] macBytes = null; if (overrideMac != null) { ByteArrayOutputStream out = new ByteArrayOutputStream(); String[] rawBytes = overrideMac.split(":"); if (rawBytes.length == 6) { try { for (String b : rawBytes) { out.write(Integer.parseInt(b, 16)); } macBytes = out.toByteArray(); } catch (NumberFormatException e) { // do nothing } } } return macBytes; }
class class_name[name] begin[{] method[getOverride, return_type[type[byte]], modifier[public static], parameter[]] begin[{] local_variable[type[String], overrideMac] local_variable[type[byte], macBytes] if[binary_operation[member[.overrideMac], !=, literal[null]]] begin[{] local_variable[type[ByteArrayOutputStream], out] local_variable[type[String], rawBytes] if[binary_operation[member[rawBytes.length], ==, literal[6]]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=rawBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=b)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=macBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.macBytes]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getOverride] operator[SEP] operator[SEP] { identifier[String] identifier[overrideMac] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[OVERRIDE_MAC_PROP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[macBytes] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[overrideMac] operator[!=] Other[null] operator[SEP] { identifier[ByteArrayOutputStream] identifier[out] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[rawBytes] operator[=] identifier[overrideMac] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rawBytes] operator[SEP] identifier[length] operator[==] Other[6] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] identifier[String] identifier[b] operator[:] identifier[rawBytes] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[b] , Other[16] operator[SEP] operator[SEP] operator[SEP] } identifier[macBytes] operator[=] identifier[out] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { } } } Keyword[return] identifier[macBytes] operator[SEP] }
private static Map<String, Object> readAndEnrichFragment(PlatformMode platformMode, ResourceVersioning apiVersions, File file, String appName) throws IOException { Pattern pattern = Pattern.compile(FILENAME_PATTERN, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(file.getName()); if (!matcher.matches()) { throw new IllegalArgumentException( String.format("Resource file name '%s' does not match pattern <name>-<type>.(yaml|yml|json)", file.getName())); } String name = matcher.group("name"); String type = matcher.group("type"); String ext = matcher.group("ext").toLowerCase(); String kind; Map<String,Object> fragment = readFragment(file, ext); if (type != null) { kind = getAndValidateKindFromType(file, type); } else { // Try name as type kind = FILENAME_TO_KIND_MAPPER.get(name.toLowerCase()); if (kind != null) { // Name is in fact the type, so lets erase the name. name = null; } } addKind(fragment, kind, file.getName()); String apiVersion = apiVersions.getCoreVersion(); if (Objects.equals(kind, "Ingress")) { apiVersion = apiVersions.getExtensionsVersion(); } else if (Objects.equals(kind, "StatefulSet") || Objects.equals(kind, "Deployment")) { apiVersion = apiVersions.getAppsVersion(); } else if (Objects.equals(kind, "Job")) { apiVersion = apiVersions.getJobVersion(); } else if (Objects.equals(kind, "DeploymentConfig") && platformMode == PlatformMode.openshift) { apiVersion = apiVersions.getOpenshiftV1version(); } addIfNotExistent(fragment, "apiVersion", apiVersion); Map<String, Object> metaMap = getMetadata(fragment); // No name means: generated app name should be taken as resource name addIfNotExistent(metaMap, "name", StringUtils.isNotBlank(name) ? name : appName); return fragment; }
class class_name[name] begin[{] method[readAndEnrichFragment, return_type[type[Map]], modifier[private static], parameter[platformMode, apiVersions, file, appName]] begin[{] local_variable[type[Pattern], pattern] local_variable[type[Matcher], matcher] if[call[matcher.matches, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource file name '%s' does not match pattern <name>-<type>.(yaml|yml|json)"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], name] local_variable[type[String], type] local_variable[type[String], ext] local_variable[type[String], kind] local_variable[type[Map], fragment] if[binary_operation[member[.type], !=, literal[null]]] begin[{] assign[member[.kind], call[.getAndValidateKindFromType, parameter[member[.file], member[.type]]]] else begin[{] assign[member[.kind], call[FILENAME_TO_KIND_MAPPER.get, parameter[call[name.toLowerCase, parameter[]]]]] if[binary_operation[member[.kind], !=, literal[null]]] begin[{] assign[member[.name], literal[null]] else begin[{] None end[}] end[}] call[.addKind, parameter[member[.fragment], member[.kind], call[file.getName, parameter[]]]] local_variable[type[String], apiVersion] if[call[Objects.equals, parameter[member[.kind], literal["Ingress"]]]] begin[{] assign[member[.apiVersion], call[apiVersions.getExtensionsVersion, parameter[]]] else begin[{] if[binary_operation[call[Objects.equals, parameter[member[.kind], literal["StatefulSet"]]], ||, call[Objects.equals, parameter[member[.kind], literal["Deployment"]]]]] begin[{] assign[member[.apiVersion], call[apiVersions.getAppsVersion, parameter[]]] else begin[{] if[call[Objects.equals, parameter[member[.kind], literal["Job"]]]] begin[{] assign[member[.apiVersion], call[apiVersions.getJobVersion, parameter[]]] else begin[{] if[binary_operation[call[Objects.equals, parameter[member[.kind], literal["DeploymentConfig"]]], &&, binary_operation[member[.platformMode], ==, member[PlatformMode.openshift]]]] begin[{] assign[member[.apiVersion], call[apiVersions.getOpenshiftV1version, parameter[]]] else begin[{] None end[}] end[}] end[}] end[}] call[.addIfNotExistent, parameter[member[.fragment], literal["apiVersion"], member[.apiVersion]]] local_variable[type[Map], metaMap] call[.addIfNotExistent, parameter[member[.metaMap], literal["name"], TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotBlank, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), if_false=MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]] return[member[.fragment]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[readAndEnrichFragment] operator[SEP] identifier[PlatformMode] identifier[platformMode] , identifier[ResourceVersioning] identifier[apiVersions] , identifier[File] identifier[file] , identifier[String] identifier[appName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[FILENAME_PATTERN] , identifier[Pattern] operator[SEP] identifier[CASE_INSENSITIVE] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[name] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[type] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[ext] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[kind] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[fragment] operator[=] identifier[readFragment] operator[SEP] identifier[file] , identifier[ext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[!=] Other[null] operator[SEP] { identifier[kind] operator[=] identifier[getAndValidateKindFromType] operator[SEP] identifier[file] , identifier[type] operator[SEP] operator[SEP] } Keyword[else] { identifier[kind] operator[=] identifier[FILENAME_TO_KIND_MAPPER] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[kind] operator[!=] Other[null] operator[SEP] { identifier[name] operator[=] Other[null] operator[SEP] } } identifier[addKind] operator[SEP] identifier[fragment] , identifier[kind] , identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[apiVersion] operator[=] identifier[apiVersions] operator[SEP] identifier[getCoreVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[kind] , literal[String] operator[SEP] operator[SEP] { identifier[apiVersion] operator[=] identifier[apiVersions] operator[SEP] identifier[getExtensionsVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[kind] , literal[String] operator[SEP] operator[||] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[kind] , literal[String] operator[SEP] operator[SEP] { identifier[apiVersion] operator[=] identifier[apiVersions] operator[SEP] identifier[getAppsVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[kind] , literal[String] operator[SEP] operator[SEP] { identifier[apiVersion] operator[=] identifier[apiVersions] operator[SEP] identifier[getJobVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[kind] , literal[String] operator[SEP] operator[&&] identifier[platformMode] operator[==] identifier[PlatformMode] operator[SEP] identifier[openshift] operator[SEP] { identifier[apiVersion] operator[=] identifier[apiVersions] operator[SEP] identifier[getOpenshiftV1version] operator[SEP] operator[SEP] operator[SEP] } identifier[addIfNotExistent] operator[SEP] identifier[fragment] , literal[String] , identifier[apiVersion] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[metaMap] operator[=] identifier[getMetadata] operator[SEP] identifier[fragment] operator[SEP] operator[SEP] identifier[addIfNotExistent] operator[SEP] identifier[metaMap] , literal[String] , identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[name] operator[SEP] operator[?] identifier[name] operator[:] identifier[appName] operator[SEP] operator[SEP] Keyword[return] identifier[fragment] operator[SEP] }
public static <T, ID> int dropTable(Dao<T, ID> dao, boolean ignoreErrors) throws SQLException { ConnectionSource connectionSource = dao.getConnectionSource(); Class<T> dataClass = dao.getDataClass(); DatabaseType databaseType = connectionSource.getDatabaseType(); if (dao instanceof BaseDaoImpl<?, ?>) { return doDropTable(databaseType, connectionSource, ((BaseDaoImpl<?, ?>) dao).getTableInfo(), ignoreErrors); } else { TableInfo<T, ID> tableInfo = new TableInfo<T, ID>(databaseType, dataClass); return doDropTable(databaseType, connectionSource, tableInfo, ignoreErrors); } }
class class_name[name] begin[{] method[dropTable, return_type[type[int]], modifier[public static], parameter[dao, ignoreErrors]] begin[{] local_variable[type[ConnectionSource], connectionSource] local_variable[type[Class], dataClass] local_variable[type[DatabaseType], databaseType] if[binary_operation[member[.dao], instanceof, type[BaseDaoImpl]]] begin[{] return[call[.doDropTable, parameter[member[.databaseType], member[.connectionSource], Cast(expression=MemberReference(member=dao, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=BaseDaoImpl, sub_type=None)), member[.ignoreErrors]]]] else begin[{] local_variable[type[TableInfo], tableInfo] return[call[.doDropTable, parameter[member[.databaseType], member[.connectionSource], member[.tableInfo], member[.ignoreErrors]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[ID] operator[>] Keyword[int] identifier[dropTable] operator[SEP] identifier[Dao] operator[<] identifier[T] , identifier[ID] operator[>] identifier[dao] , Keyword[boolean] identifier[ignoreErrors] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[ConnectionSource] identifier[connectionSource] operator[=] identifier[dao] operator[SEP] identifier[getConnectionSource] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[dataClass] operator[=] identifier[dao] operator[SEP] identifier[getDataClass] operator[SEP] operator[SEP] operator[SEP] identifier[DatabaseType] identifier[databaseType] operator[=] identifier[connectionSource] operator[SEP] identifier[getDatabaseType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dao] Keyword[instanceof] identifier[BaseDaoImpl] operator[<] operator[?] , operator[?] operator[>] operator[SEP] { Keyword[return] identifier[doDropTable] operator[SEP] identifier[databaseType] , identifier[connectionSource] , operator[SEP] operator[SEP] identifier[BaseDaoImpl] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[dao] operator[SEP] operator[SEP] identifier[getTableInfo] operator[SEP] operator[SEP] , identifier[ignoreErrors] operator[SEP] operator[SEP] } Keyword[else] { identifier[TableInfo] operator[<] identifier[T] , identifier[ID] operator[>] identifier[tableInfo] operator[=] Keyword[new] identifier[TableInfo] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[databaseType] , identifier[dataClass] operator[SEP] operator[SEP] Keyword[return] identifier[doDropTable] operator[SEP] identifier[databaseType] , identifier[connectionSource] , identifier[tableInfo] , identifier[ignoreErrors] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") public void addWriter(RecordWriter<Record> writer) { // avoid using the array-list here to reduce one level of object indirection if (this.writers == null) { this.writers = new RecordWriter[] {writer}; } else { RecordWriter<Record>[] ws = new RecordWriter[this.writers.length + 1]; System.arraycopy(this.writers, 0, ws, 0, this.writers.length); ws[this.writers.length] = writer; this.writers = ws; } }
class class_name[name] begin[{] method[addWriter, return_type[void], modifier[public], parameter[writer]] begin[{] if[binary_operation[THIS[member[None.writers]], ==, literal[null]]] begin[{] assign[THIS[member[None.writers]], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RecordWriter, sub_type=None))] else begin[{] local_variable[type[RecordWriter], ws] call[System.arraycopy, parameter[THIS[member[None.writers]], literal[0], member[.ws], literal[0], THIS[member[None.writers]member[None.length]]]] assign[member[.ws], member[.writer]] assign[THIS[member[None.writers]], member[.ws]] end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[addWriter] operator[SEP] identifier[RecordWriter] operator[<] identifier[Record] operator[>] identifier[writer] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[writers] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[writers] operator[=] Keyword[new] identifier[RecordWriter] operator[SEP] operator[SEP] { identifier[writer] } operator[SEP] } Keyword[else] { identifier[RecordWriter] operator[<] identifier[Record] operator[>] operator[SEP] operator[SEP] identifier[ws] operator[=] Keyword[new] identifier[RecordWriter] operator[SEP] Keyword[this] operator[SEP] identifier[writers] operator[SEP] identifier[length] operator[+] Other[1] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] Keyword[this] operator[SEP] identifier[writers] , Other[0] , identifier[ws] , Other[0] , Keyword[this] operator[SEP] identifier[writers] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[ws] operator[SEP] Keyword[this] operator[SEP] identifier[writers] operator[SEP] identifier[length] operator[SEP] operator[=] identifier[writer] operator[SEP] Keyword[this] operator[SEP] identifier[writers] operator[=] identifier[ws] operator[SEP] } }
@Nullable public static Date parseDate(String dateValue, Collection<String> dateFormats, Date startDate) { // trim single quotes around date if present // see issue #5279 if (dateValue.length() > 1 && dateValue.startsWith("'") && dateValue.endsWith("'")) { dateValue = dateValue.substring(1, dateValue.length() - 1); } SimpleDateFormat dateParser = null; for (String format : dateFormats) { if (dateParser == null) { dateParser = new SimpleDateFormat(format, Locale.US); dateParser.setTimeZone(TimeZone.getTimeZone("GMT")); dateParser.set2DigitYearStart(startDate); } else { dateParser.applyPattern(format); } try { return dateParser.parse(dateValue); } catch (ParseException pe) { // ignore this exception, we will try the next format } } // we were unable to parse the date return null; }
class class_name[name] begin[{] method[parseDate, return_type[type[Date]], modifier[public static], parameter[dateValue, dateFormats, startDate]] begin[{] if[binary_operation[binary_operation[binary_operation[call[dateValue.length, parameter[]], >, literal[1]], &&, call[dateValue.startsWith, parameter[literal["'"]]]], &&, call[dateValue.endsWith, parameter[literal["'"]]]]] begin[{] assign[member[.dateValue], call[dateValue.substring, parameter[literal[1], binary_operation[call[dateValue.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] local_variable[type[SimpleDateFormat], dateParser] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dateParser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyPattern, postfix_operators=[], prefix_operators=[], qualifier=dateParser, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dateParser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=US, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SimpleDateFormat, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GMT")], member=getTimeZone, postfix_operators=[], prefix_operators=[], qualifier=TimeZone, selectors=[], type_arguments=None)], member=setTimeZone, postfix_operators=[], prefix_operators=[], qualifier=dateParser, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set2DigitYearStart, postfix_operators=[], prefix_operators=[], qualifier=dateParser, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=dateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=dateParser, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pe, types=['ParseException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=dateFormats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=format)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[Date] identifier[parseDate] operator[SEP] identifier[String] identifier[dateValue] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[dateFormats] , identifier[Date] identifier[startDate] operator[SEP] { Keyword[if] operator[SEP] identifier[dateValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[dateValue] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[dateValue] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dateValue] operator[=] identifier[dateValue] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[dateValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[SimpleDateFormat] identifier[dateParser] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[format] operator[:] identifier[dateFormats] operator[SEP] { Keyword[if] operator[SEP] identifier[dateParser] operator[==] Other[null] operator[SEP] { identifier[dateParser] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[format] , identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] identifier[dateParser] operator[SEP] identifier[setTimeZone] operator[SEP] identifier[TimeZone] operator[SEP] identifier[getTimeZone] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[dateParser] operator[SEP] identifier[set2DigitYearStart] operator[SEP] identifier[startDate] operator[SEP] operator[SEP] } Keyword[else] { identifier[dateParser] operator[SEP] identifier[applyPattern] operator[SEP] identifier[format] operator[SEP] operator[SEP] } Keyword[try] { Keyword[return] identifier[dateParser] operator[SEP] identifier[parse] operator[SEP] identifier[dateValue] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[pe] operator[SEP] { } } Keyword[return] Other[null] operator[SEP] }
@Override @InterfaceAudience.Private public Status updateIndexes(List<ViewStore> inputViews) throws CouchbaseLiteException { Log.v(Log.TAG_VIEW, "Re-indexing view: %s", name); if (getViewID() <= 0) { String msg = "getViewID() < 0"; throw new CouchbaseLiteException(msg, Status.NOT_FOUND); } if (!store.beginTransaction()) throw new CouchbaseLiteException("Error in beginTransaction()", Status.DB_ERROR); boolean success = false; Cursor cursor = null; try { // If the view the update is for doesn't need any update, don't do anything: final long dbMaxSequence = store.getLastSequence(); final long forViewLastSequence = getLastSequenceIndexed(); if (forViewLastSequence >= dbMaxSequence) { success = true; return new Status(Status.NOT_MODIFIED); } // Check whether we need to update at all, // and remove obsolete emitted results from the 'maps' table: long minLastSequence = dbMaxSequence; final long[] viewLastSequence = new long[inputViews.size()]; int deletedCount = 0; int i = 0; final HashSet<String> docTypes = new HashSet<String>(); HashMap<String, String> viewDocTypes = null; boolean allDocTypes = false; final HashMap<Integer, Integer> viewTotalRows = new HashMap<Integer, Integer>(); final ArrayList<SQLiteViewStore> views = new ArrayList<SQLiteViewStore>(); final ArrayList<Mapper> mapBlocks = new ArrayList<Mapper>(); for (ViewStore v : inputViews) { assert (v != null); SQLiteViewStore view = (SQLiteViewStore) v; ViewStoreDelegate delegate = view.getDelegate(); Mapper map = delegate != null ? delegate.getMap() : null; if (map == null) { if (view == this) { String msg = String.format(Locale.ENGLISH, "Cannot index view %s: " + "no map block registered", view.getName()); Log.e(Log.TAG_VIEW, msg); throw new CouchbaseLiteException(msg, Status.BAD_REQUEST); } Log.v(Log.TAG_VIEW, " %s has no map block; skipping it", view.getName()); continue; } views.add(view); mapBlocks.add(map); int viewID = view.getViewID(); if (viewID <= 0) { String message = String.format(Locale.ENGLISH, "View '%s' not found in database", view.getName()); Log.e(Log.TAG_VIEW, message); throw new CouchbaseLiteException(message, Status.NOT_FOUND); } int totalRows = view.getTotalRows(); viewTotalRows.put(viewID, totalRows); long last = view == this ? forViewLastSequence : view.getLastSequenceIndexed(); viewLastSequence[i++] = last; if (last < 0) { String msg = String.format(Locale.ENGLISH, "last < 0 (%d)", last); throw new CouchbaseLiteException(msg, Status.INTERNAL_SERVER_ERROR); } else if (last < dbMaxSequence) { if (last == 0) view.createIndex(); minLastSequence = Math.min(minLastSequence, last); Log.v(Log.TAG_VIEW, " %s last indexed at #%d", view.getName(), last); String docType = delegate.getDocumentType(); if (docType != null) { docTypes.add(docType); if (viewDocTypes == null) viewDocTypes = new HashMap<String, String>(); viewDocTypes.put(view.getName(), docType); } else { allDocTypes = true; } int changes = 0; if (last == 0) { changes = store.getStorageEngine().delete(view.queryString("maps_#"), null, null); } else { store.optimizeSQLIndexes(); String[] args = {Long.toString(last), Long.toString(last)}; changes = store.getStorageEngine().delete(view.queryString("maps_#"), "sequence IN (SELECT parent FROM revs " + "WHERE sequence>? AND +parent>0 AND +parent<=?)", args); } // Update #deleted rows: deletedCount += changes; // Only count these deletes as changes if this isn't a view reset to 0 if (last != 0) { int newTotalRows = viewTotalRows.get(viewID) - changes; viewTotalRows.put(viewID, newTotalRows); } } } if (minLastSequence == dbMaxSequence) { Log.v(Log.TAG_VIEW, "minLastSequence (%d) == dbMaxSequence (%d), nothing to do", minLastSequence, dbMaxSequence); success = true; return new Status(Status.NOT_MODIFIED); } Log.v(Log.TAG_VIEW, "Updating indexes of (%s) from #%d to #%d ...", viewNames(views), minLastSequence, dbMaxSequence); // This is the emit() block, which gets called from within the user-defined map() block // that's called down below. final AtomicInteger insertedCount = new AtomicInteger(0); AbstractMapEmitBlock emitBlock = new AbstractMapEmitBlock() { @Override public void emit(Object key, Object value) { if (key == null) { Log.w(Log.TAG_VIEW, "emit() called with nil key; ignoring"); return; } try { curView.emit(key, value, this.sequence); // emit block's sequence int curViewID = curView.getViewID(); viewTotalRows.put(curViewID, viewTotalRows.get(curViewID) + 1); } catch (Exception e) { Log.e(Log.TAG_VIEW, "Error emitting", e); throw new RuntimeException(e); } } }; // Now scan every revision added since the last time the view was indexed: // NOTE: Below is original Query. In case query result uses a lot of memory, // Android SQLiteDatabase causes null value column. Then it causes the missing // _index data because following logic skip result if column is null. // To avoid the issue, retrieving json field is isolated from original query. // Because json field could be large, maximum size is 2MB. // StringBuffer sql = new StringBuffer( "SELECT revs.doc_id, sequence, docid, revid, // json, no_attachments, deleted FROM revs, docs WHERE sequence>? AND current!=0 "); boolean checkDocTypes = docTypes.size() > 1 || (allDocTypes && docTypes.size() > 0); StringBuilder sql = new StringBuilder( "SELECT revs.doc_id, sequence, docid, revid, no_attachments, deleted "); if (checkDocTypes) sql.append(", doc_type "); sql.append("FROM revs "); sql.append("JOIN docs ON docs.doc_id = revs.doc_id "); sql.append("WHERE sequence>? AND +current>0 "); if (minLastSequence == 0) { sql.append("AND +deleted=0 "); } if (!allDocTypes && docTypes.size() > 0) { String docTypesString = getJoinedSQLQuotedStrings( docTypes.toArray(new String[docTypes.size()])); sql.append("AND doc_type IN (").append(docTypesString).append(") "); } // order result by deleted ASC so if multiple revs returned the non deleted are the first // NOTE: Views broken with concurrent update and delete // https://github.com/couchbase/couchbase-lite-java-core/issues/952 sql.append("ORDER BY +revs.doc_id, +deleted, +revid DESC"); String[] selectArgs = {Long.toString(minLastSequence)}; cursor = store.getStorageEngine().rawQuery(sql.toString(), selectArgs); boolean keepGoing = cursor.moveToNext(); // Go to first result row while (keepGoing) { // NOTE: skip row if 1st column is null // https://github.com/couchbase/couchbase-lite-java-core/issues/497 if (cursor.isNull(0)) { keepGoing = cursor.moveToNext(); continue; } long docID = cursor.getLong(0); // Reconstitute the document as a dictionary: long sequence = cursor.getLong(1); String docId = cursor.getString(2); if (docId.startsWith("_design/")) { // design docs don't get indexed! keepGoing = cursor.moveToNext(); continue; } String revID = cursor.getString(3); boolean deleted = cursor.getInt(5) > 0; String docType = checkDocTypes ? cursor.getString(6) : null; // Skip rows with the same doc_id -- these are losing conflicts. // NOTE: Or Skip rows if 1st column is null // https://github.com/couchbase/couchbase-lite-java-core/issues/497 ArrayList<String> conflicts = null; boolean isNull; while ((keepGoing = cursor.moveToNext()) && ((isNull = cursor.isNull(0)) || cursor.getLong(0) == docID)) { if (isNull) continue; if (!deleted) { if (conflicts == null) conflicts = new ArrayList<String>(); conflicts.add(cursor.getString(3)); } } long realSequence = sequence; // because sequence may be changed, below if (minLastSequence > 0) { // Find conflicts with documents from previous indexings. Cursor cursor2 = null; try { String[] selectArgs2 = {Long.toString(docID), Long.toString(minLastSequence)}; cursor2 = store.getStorageEngine().rawQuery( "SELECT revid, sequence FROM revs " + "WHERE doc_id=? AND sequence<=? AND current>0 AND deleted=0 " + "ORDER BY revID DESC ", selectArgs2); if (cursor2.moveToNext()) { String oldRevID = cursor2.getString(0); // This is the revision that used to be the 'winner'. // Remove its emitted rows: long oldSequence = cursor2.getLong(1); String[] args = {Long.toString(oldSequence)}; for (SQLiteViewStore view : views) { int changes = view.store.getStorageEngine(). delete(view.queryString("maps_#"), "sequence=?", args); deletedCount += changes; int thisViewID = view.getViewID(); int newTotalRows = viewTotalRows.get(thisViewID) - changes; viewTotalRows.put(thisViewID, newTotalRows); } String conflictRevID = oldRevID; if (deleted || RevisionInternal.CBLCompareRevIDs(oldRevID, revID) > 0) { // It still 'wins' the conflict, so it's the one that // should be mapped [again], not the current revision! conflictRevID = revID; revID = oldRevID; deleted = false; sequence = oldSequence; } if (!deleted) { // Conflict revisions: if (conflicts == null) conflicts = new ArrayList<String>(); conflicts.add(conflictRevID); while (cursor2.moveToNext()) { conflicts.add(cursor2.getString(0)); } } } } finally { if (cursor2 != null) { cursor2.close(); } } } if (deleted) continue; // Get json blob: String[] selectArgs3 = {Long.toString(sequence)}; byte[] json = SQLiteUtils.byteArrayResultForQuery(store.getStorageEngine(), "SELECT json FROM revs WHERE sequence=?", selectArgs3); // Get the document properties, to pass to the map function: Map<String, Object> curDoc = store.documentPropertiesFromJSON( json, docId, revID, false, sequence ); if (curDoc == null) { Log.w(Log.TAG_VIEW, "Failed to parse JSON of doc %s rev %s", docID, revID); continue; } curDoc.put("_local_seq", sequence); if (conflicts != null) curDoc.put("_conflicts", conflicts); // Call the user-defined map() to emit new key/value pairs from this revision: i = -1; for (SQLiteViewStore view : views) { curView = view; ++i; if (viewLastSequence[i] < realSequence) { if (checkDocTypes) { String viewDocType = viewDocTypes.get(view.getName()); if (viewDocType != null && !viewDocType.equals(docType)) continue; // skip; view's documentType doesn't match this doc } Log.v(Log.TAG_VIEW, "#%d: map '%s' for view %s...", sequence, docID, view.getName()); try { emitBlock.setSequence(sequence); mapBlocks.get(i).map(curDoc, emitBlock); } catch (Throwable e) { String msg = String.format(Locale.ENGLISH, "Error when calling map block of view '%s'", view.getName()); Log.e(Log.TAG_VIEW, msg, e); throw new CouchbaseLiteException(msg, e, Status.CALLBACK_ERROR); } } } } // Finally, record the last revision sequence number that was indexed and update #rows: for (SQLiteViewStore view : views) { view.finishCreatingIndex(); int newTotalRows = viewTotalRows.get(view.getViewID()); ContentValues updateValues = new ContentValues(); updateValues.put("lastSequence", dbMaxSequence); updateValues.put("total_docs", newTotalRows); String[] whereArgs = {Integer.toString(view.getViewID())}; store.getStorageEngine().update("views", updateValues, "view_id=?", whereArgs); } Log.v(Log.TAG_VIEW, "...Finished re-indexing (%s) to #%d (deleted %d, added %d)", viewNames(views), dbMaxSequence, deletedCount, insertedCount.intValue()); success = true; return new Status(Status.OK); } catch (SQLException ex) { throw new CouchbaseLiteException(ex, Status.DB_ERROR); } finally { curView = null; if (cursor != null) cursor.close(); if (store != null) { if (!store.endTransaction(success)) throw new CouchbaseLiteException("Error in endTransaction()", Status.DB_ERROR); } } }
class class_name[name] begin[{] method[updateIndexes, return_type[type[Status]], modifier[public], parameter[inputViews]] begin[{] call[Log.v, parameter[member[Log.TAG_VIEW], literal["Re-indexing view: %s"], member[.name]]] if[binary_operation[call[.getViewID, parameter[]], <=, literal[0]]] begin[{] local_variable[type[String], msg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None) else begin[{] None end[}] if[call[store.beginTransaction, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in beginTransaction()"), MemberReference(member=DB_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[boolean], success] local_variable[type[Cursor], cursor] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLastSequence, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), name=dbMaxSequence)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLastSequenceIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=forViewLastSequence)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=forViewLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_MODIFIED, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Status, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=minLastSequence)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=inputViews, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=long)), name=viewLastSequence)], modifiers={'final'}, type=BasicType(dimensions=[None], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=deletedCount)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), 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=String, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=docTypes)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=HashSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=viewDocTypes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=allDocTypes)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), 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)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), name=viewTotalRows)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=views)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Mapper, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=mapBlocks)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Mapper, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None)), name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDelegate, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), name=delegate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ViewStoreDelegate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[], member=getMap, postfix_operators=[], prefix_operators=[], qualifier=delegate, selectors=[], type_arguments=None)), name=map)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Mapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ENGLISH, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot index view %s: "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no map block registered"), operator=+), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=BAD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" %s has no map block; skipping it"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=views, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=mapBlocks, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getViewID, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), name=viewID)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=viewID, 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=MethodInvocation(arguments=[MemberReference(member=ENGLISH, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="View '%s' not found in database"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=message)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTotalRows, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), name=totalRows)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=viewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=totalRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator===), if_false=MethodInvocation(arguments=[], member=getLastSequenceIndexed, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), if_true=MemberReference(member=forViewLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=last)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=viewLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, 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=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=createIndex, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" %s last indexed at #%d"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDocumentType, postfix_operators=[], prefix_operators=[], qualifier=delegate, selectors=[], type_arguments=None), name=docType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=docType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=allDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=docType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=viewDocTypes, 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=viewDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), MemberReference(member=docType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=viewDocTypes, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=changes)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=optimizeSQLIndexes, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)]), name=args)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="maps_#")], member=queryString, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sequence IN (SELECT parent FROM revs "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WHERE sequence>? AND +parent>0 AND +parent<=?)"), operator=+), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="maps_#")], member=queryString, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=delete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=deletedCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, 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=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=viewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), operandr=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=newTotalRows)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=viewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newTotalRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ENGLISH, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="last < 0 (%d)"), MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=inputViews, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=v)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ViewStore, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="minLastSequence (%d) == dbMaxSequence (%d), nothing to do"), MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_MODIFIED, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Status, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Updating indexes of (%s) from #%d to #%d ..."), MethodInvocation(arguments=[MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=viewNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[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=AtomicInteger, sub_type=None)), name=insertedCount)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=AtomicInteger, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="emit() called with nil key; ignoring")], member=w, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sequence, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=curView, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getViewID, postfix_operators=[], prefix_operators=[], qualifier=curView, selectors=[], type_arguments=None), name=curViewID)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=curViewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=curViewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error emitting"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), 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=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)], documentation=None, modifiers={'public'}, name=emit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=key, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=value, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractMapEmitBlock, sub_type=None)), name=emitBlock)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractMapEmitBlock, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=allDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operator=||), name=checkDocTypes)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SELECT revs.doc_id, sequence, docid, revid, no_attachments, deleted ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=sql)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), IfStatement(condition=MemberReference(member=checkDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", doc_type ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FROM revs ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JOIN docs ON docs.doc_id = revs.doc_id ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WHERE sequence>? AND +current>0 ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AND +deleted=0 ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=allDocTypes, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=docTypes, selectors=[], type_arguments=None)], member=getJoinedSQLQuotedStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=docTypesString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AND doc_type IN (")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[MethodInvocation(arguments=[MemberReference(member=docTypesString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ORDER BY +revs.doc_id, +deleted, +revid DESC")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)]), name=selectArgs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[], type_arguments=None), MemberReference(member=selectArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawQuery, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), name=keepGoing)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=isNull, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepGoing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), name=docID)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), name=sequence)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), name=docId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_design/")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=docId, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepGoing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), name=revID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), name=deleted)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=checkDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), name=docType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=conflicts)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=isNull)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), IfStatement(condition=MemberReference(member=deleted, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=conflicts, 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=conflicts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=conflicts, selectors=[], type_arguments=None), label=None)]))]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=keepGoing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=isNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=isNull, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), operandr=MemberReference(member=docID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operator=&&), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=realSequence)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=minLastSequence, 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=cursor2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cursor, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=docID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=minLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)]), name=selectArgs2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cursor2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SELECT revid, sequence FROM revs "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WHERE doc_id=? AND sequence<=? AND current>0 AND deleted=0 "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ORDER BY revID DESC "), operator=+), MemberReference(member=selectArgs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawQuery, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None), name=oldRevID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None), name=oldSequence)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=oldSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)]), name=args)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=view.store, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="maps_#")], member=queryString, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sequence=?"), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=changes)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=deletedCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getViewID, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), name=thisViewID)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=thisViewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), operandr=MemberReference(member=changes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=newTotalRows)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=thisViewID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newTotalRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=oldRevID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=conflictRevID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=oldRevID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=revID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=CBLCompareRevIDs, postfix_operators=[], prefix_operators=[], qualifier=RevisionInternal, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=conflictRevID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=revID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=revID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=oldRevID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=oldSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=MemberReference(member=deleted, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=conflicts, 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=conflicts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conflictRevID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=conflicts, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=conflicts, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None), label=None)]))]))], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursor2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=cursor2, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)])), IfStatement(condition=MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)]), name=selectArgs3)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SELECT json FROM revs WHERE sequence=?"), MemberReference(member=selectArgs3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=byteArrayResultForQuery, postfix_operators=[], prefix_operators=[], qualifier=SQLiteUtils, selectors=[], type_arguments=None), name=json)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=revID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=documentPropertiesFromJSON, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), name=curDoc)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=curDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to parse JSON of doc %s rev %s"), MemberReference(member=docID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=revID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=w, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_local_seq"), MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=curDoc, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=conflicts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_conflicts"), MemberReference(member=conflicts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=curDoc, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=curView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=viewLastSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=realSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=checkDocTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=viewDocTypes, selectors=[], type_arguments=None), name=viewDocType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=viewDocType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=docType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=viewDocType, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#%d: map '%s' for view %s..."), MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=docID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSequence, postfix_operators=[], prefix_operators=[], qualifier=emitBlock, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mapBlocks, selectors=[MethodInvocation(arguments=[MemberReference(member=curDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=emitBlock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ENGLISH, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error when calling map block of view '%s'"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CALLBACK_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None))), label=None)]), condition=MemberReference(member=keepGoing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=finishCreatingIndex, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getViewID, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=viewTotalRows, selectors=[], type_arguments=None), name=newTotalRows)], modifiers=set(), type=BasicType(dimensions=[], name=int)), 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=ContentValues, sub_type=None)), name=updateValues)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ContentValues, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="lastSequence"), MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=updateValues, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="total_docs"), MemberReference(member=newTotalRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=updateValues, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getViewID, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)]), name=whereArgs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getStorageEngine, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="views"), MemberReference(member=updateValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="view_id=?"), MemberReference(member=whereArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=update, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLiteViewStore, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_VIEW, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Finished re-indexing (%s) to #%d (deleted %d, added %d)"), MethodInvocation(arguments=[MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=viewNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=dbMaxSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deletedCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=insertedCount, selectors=[], type_arguments=None)], member=v, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=OK, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Status, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=DB_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['SQLException']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=curView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=endTransaction, postfix_operators=[], prefix_operators=['!'], qualifier=store, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in endTransaction()"), MemberReference(member=DB_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None))]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Private] Keyword[public] identifier[Status] identifier[updateIndexes] operator[SEP] identifier[List] operator[<] identifier[ViewStore] operator[>] identifier[inputViews] operator[SEP] Keyword[throws] identifier[CouchbaseLiteException] { identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[String] identifier[msg] operator[=] literal[String] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[msg] , identifier[Status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[store] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] literal[String] , identifier[Status] operator[SEP] identifier[DB_ERROR] operator[SEP] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] identifier[Cursor] identifier[cursor] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[final] Keyword[long] identifier[dbMaxSequence] operator[=] identifier[store] operator[SEP] identifier[getLastSequence] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[forViewLastSequence] operator[=] identifier[getLastSequenceIndexed] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[forViewLastSequence] operator[>=] identifier[dbMaxSequence] operator[SEP] { identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[return] Keyword[new] identifier[Status] operator[SEP] identifier[Status] operator[SEP] identifier[NOT_MODIFIED] operator[SEP] operator[SEP] } Keyword[long] identifier[minLastSequence] operator[=] identifier[dbMaxSequence] operator[SEP] Keyword[final] Keyword[long] operator[SEP] operator[SEP] identifier[viewLastSequence] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[inputViews] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[deletedCount] operator[=] Other[0] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[final] identifier[HashSet] operator[<] identifier[String] operator[>] identifier[docTypes] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[viewDocTypes] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[allDocTypes] operator[=] literal[boolean] operator[SEP] Keyword[final] identifier[HashMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[viewTotalRows] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ArrayList] operator[<] identifier[SQLiteViewStore] operator[>] identifier[views] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[SQLiteViewStore] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ArrayList] operator[<] identifier[Mapper] operator[>] identifier[mapBlocks] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Mapper] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ViewStore] identifier[v] operator[:] identifier[inputViews] operator[SEP] { Keyword[assert] operator[SEP] identifier[v] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[SQLiteViewStore] identifier[view] operator[=] operator[SEP] identifier[SQLiteViewStore] operator[SEP] identifier[v] operator[SEP] identifier[ViewStoreDelegate] identifier[delegate] operator[=] identifier[view] operator[SEP] identifier[getDelegate] operator[SEP] operator[SEP] operator[SEP] identifier[Mapper] identifier[map] operator[=] identifier[delegate] operator[!=] Other[null] operator[?] identifier[delegate] operator[SEP] identifier[getMap] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[view] operator[==] Keyword[this] operator[SEP] { identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] , literal[String] operator[+] literal[String] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , identifier[msg] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[msg] , identifier[Status] operator[SEP] identifier[BAD_REQUEST] operator[SEP] operator[SEP] } identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[views] operator[SEP] identifier[add] operator[SEP] identifier[view] operator[SEP] operator[SEP] identifier[mapBlocks] operator[SEP] identifier[add] operator[SEP] identifier[map] operator[SEP] operator[SEP] Keyword[int] identifier[viewID] operator[=] identifier[view] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[viewID] operator[<=] Other[0] operator[SEP] { identifier[String] identifier[message] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] , literal[String] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , identifier[message] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[message] , identifier[Status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] } Keyword[int] identifier[totalRows] operator[=] identifier[view] operator[SEP] identifier[getTotalRows] operator[SEP] operator[SEP] operator[SEP] identifier[viewTotalRows] operator[SEP] identifier[put] operator[SEP] identifier[viewID] , identifier[totalRows] operator[SEP] operator[SEP] Keyword[long] identifier[last] operator[=] identifier[view] operator[==] Keyword[this] operator[?] identifier[forViewLastSequence] operator[:] identifier[view] operator[SEP] identifier[getLastSequenceIndexed] operator[SEP] operator[SEP] operator[SEP] identifier[viewLastSequence] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[last] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[<] Other[0] operator[SEP] { identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] , literal[String] , identifier[last] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[msg] , identifier[Status] operator[SEP] identifier[INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[last] operator[<] identifier[dbMaxSequence] operator[SEP] { Keyword[if] operator[SEP] identifier[last] operator[==] Other[0] operator[SEP] identifier[view] operator[SEP] identifier[createIndex] operator[SEP] operator[SEP] operator[SEP] identifier[minLastSequence] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[minLastSequence] , identifier[last] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[last] operator[SEP] operator[SEP] identifier[String] identifier[docType] operator[=] identifier[delegate] operator[SEP] identifier[getDocumentType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[docType] operator[!=] Other[null] operator[SEP] { identifier[docTypes] operator[SEP] identifier[add] operator[SEP] identifier[docType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[viewDocTypes] operator[==] Other[null] operator[SEP] identifier[viewDocTypes] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[viewDocTypes] operator[SEP] identifier[put] operator[SEP] identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[docType] operator[SEP] operator[SEP] } Keyword[else] { identifier[allDocTypes] operator[=] literal[boolean] operator[SEP] } Keyword[int] identifier[changes] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[==] Other[0] operator[SEP] { identifier[changes] operator[=] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] identifier[view] operator[SEP] identifier[queryString] operator[SEP] literal[String] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[store] operator[SEP] identifier[optimizeSQLIndexes] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[last] operator[SEP] , identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[last] operator[SEP] } operator[SEP] identifier[changes] operator[=] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] identifier[view] operator[SEP] identifier[queryString] operator[SEP] literal[String] operator[SEP] , literal[String] operator[+] literal[String] , identifier[args] operator[SEP] operator[SEP] } identifier[deletedCount] operator[+=] identifier[changes] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[newTotalRows] operator[=] identifier[viewTotalRows] operator[SEP] identifier[get] operator[SEP] identifier[viewID] operator[SEP] operator[-] identifier[changes] operator[SEP] identifier[viewTotalRows] operator[SEP] identifier[put] operator[SEP] identifier[viewID] , identifier[newTotalRows] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[minLastSequence] operator[==] identifier[dbMaxSequence] operator[SEP] { identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[minLastSequence] , identifier[dbMaxSequence] operator[SEP] operator[SEP] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[return] Keyword[new] identifier[Status] operator[SEP] identifier[Status] operator[SEP] identifier[NOT_MODIFIED] operator[SEP] operator[SEP] } identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[viewNames] operator[SEP] identifier[views] operator[SEP] , identifier[minLastSequence] , identifier[dbMaxSequence] operator[SEP] operator[SEP] Keyword[final] identifier[AtomicInteger] identifier[insertedCount] operator[=] Keyword[new] identifier[AtomicInteger] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[AbstractMapEmitBlock] identifier[emitBlock] operator[=] Keyword[new] identifier[AbstractMapEmitBlock] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[emit] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[try] { identifier[curView] operator[SEP] identifier[emit] operator[SEP] identifier[key] , identifier[value] , Keyword[this] operator[SEP] identifier[sequence] operator[SEP] operator[SEP] Keyword[int] identifier[curViewID] operator[=] identifier[curView] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[SEP] identifier[viewTotalRows] operator[SEP] identifier[put] operator[SEP] identifier[curViewID] , identifier[viewTotalRows] operator[SEP] identifier[get] operator[SEP] identifier[curViewID] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } operator[SEP] Keyword[boolean] identifier[checkDocTypes] operator[=] identifier[docTypes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[||] operator[SEP] identifier[allDocTypes] operator[&&] identifier[docTypes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sql] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[checkDocTypes] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[minLastSequence] operator[==] Other[0] operator[SEP] { identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[allDocTypes] operator[&&] identifier[docTypes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[String] identifier[docTypesString] operator[=] identifier[getJoinedSQLQuotedStrings] operator[SEP] identifier[docTypes] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[docTypes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[docTypesString] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[selectArgs] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[minLastSequence] operator[SEP] } operator[SEP] identifier[cursor] operator[=] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[rawQuery] operator[SEP] identifier[sql] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[selectArgs] operator[SEP] operator[SEP] Keyword[boolean] identifier[keepGoing] operator[=] identifier[cursor] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[keepGoing] operator[SEP] { Keyword[if] operator[SEP] identifier[cursor] operator[SEP] identifier[isNull] operator[SEP] Other[0] operator[SEP] operator[SEP] { identifier[keepGoing] operator[=] identifier[cursor] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[long] identifier[docID] operator[=] identifier[cursor] operator[SEP] identifier[getLong] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[long] identifier[sequence] operator[=] identifier[cursor] operator[SEP] identifier[getLong] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[docId] operator[=] identifier[cursor] operator[SEP] identifier[getString] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[docId] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[keepGoing] operator[=] identifier[cursor] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[String] identifier[revID] operator[=] identifier[cursor] operator[SEP] identifier[getString] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[boolean] identifier[deleted] operator[=] identifier[cursor] operator[SEP] identifier[getInt] operator[SEP] Other[5] operator[SEP] operator[>] Other[0] operator[SEP] identifier[String] identifier[docType] operator[=] identifier[checkDocTypes] operator[?] identifier[cursor] operator[SEP] identifier[getString] operator[SEP] Other[6] operator[SEP] operator[:] Other[null] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[conflicts] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[isNull] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[keepGoing] operator[=] identifier[cursor] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[isNull] operator[=] identifier[cursor] operator[SEP] identifier[isNull] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[||] identifier[cursor] operator[SEP] identifier[getLong] operator[SEP] Other[0] operator[SEP] operator[==] identifier[docID] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isNull] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[deleted] operator[SEP] { Keyword[if] operator[SEP] identifier[conflicts] operator[==] Other[null] operator[SEP] identifier[conflicts] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[conflicts] operator[SEP] identifier[add] operator[SEP] identifier[cursor] operator[SEP] identifier[getString] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] } } Keyword[long] identifier[realSequence] operator[=] identifier[sequence] operator[SEP] Keyword[if] operator[SEP] identifier[minLastSequence] operator[>] Other[0] operator[SEP] { identifier[Cursor] identifier[cursor2] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[String] operator[SEP] operator[SEP] identifier[selectArgs2] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[docID] operator[SEP] , identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[minLastSequence] operator[SEP] } operator[SEP] identifier[cursor2] operator[=] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[rawQuery] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] , identifier[selectArgs2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cursor2] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[oldRevID] operator[=] identifier[cursor2] operator[SEP] identifier[getString] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[long] identifier[oldSequence] operator[=] identifier[cursor2] operator[SEP] identifier[getLong] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[oldSequence] operator[SEP] } operator[SEP] Keyword[for] operator[SEP] identifier[SQLiteViewStore] identifier[view] operator[:] identifier[views] operator[SEP] { Keyword[int] identifier[changes] operator[=] identifier[view] operator[SEP] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] identifier[view] operator[SEP] identifier[queryString] operator[SEP] literal[String] operator[SEP] , literal[String] , identifier[args] operator[SEP] operator[SEP] identifier[deletedCount] operator[+=] identifier[changes] operator[SEP] Keyword[int] identifier[thisViewID] operator[=] identifier[view] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[newTotalRows] operator[=] identifier[viewTotalRows] operator[SEP] identifier[get] operator[SEP] identifier[thisViewID] operator[SEP] operator[-] identifier[changes] operator[SEP] identifier[viewTotalRows] operator[SEP] identifier[put] operator[SEP] identifier[thisViewID] , identifier[newTotalRows] operator[SEP] operator[SEP] } identifier[String] identifier[conflictRevID] operator[=] identifier[oldRevID] operator[SEP] Keyword[if] operator[SEP] identifier[deleted] operator[||] identifier[RevisionInternal] operator[SEP] identifier[CBLCompareRevIDs] operator[SEP] identifier[oldRevID] , identifier[revID] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[conflictRevID] operator[=] identifier[revID] operator[SEP] identifier[revID] operator[=] identifier[oldRevID] operator[SEP] identifier[deleted] operator[=] literal[boolean] operator[SEP] identifier[sequence] operator[=] identifier[oldSequence] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[deleted] operator[SEP] { Keyword[if] operator[SEP] identifier[conflicts] operator[==] Other[null] operator[SEP] identifier[conflicts] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[conflicts] operator[SEP] identifier[add] operator[SEP] identifier[conflictRevID] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[cursor2] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] { identifier[conflicts] operator[SEP] identifier[add] operator[SEP] identifier[cursor2] operator[SEP] identifier[getString] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[finally] { Keyword[if] operator[SEP] identifier[cursor2] operator[!=] Other[null] operator[SEP] { identifier[cursor2] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[deleted] operator[SEP] Keyword[continue] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[selectArgs3] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[sequence] operator[SEP] } operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[json] operator[=] identifier[SQLiteUtils] operator[SEP] identifier[byteArrayResultForQuery] operator[SEP] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] , literal[String] , identifier[selectArgs3] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[curDoc] operator[=] identifier[store] operator[SEP] identifier[documentPropertiesFromJSON] operator[SEP] identifier[json] , identifier[docId] , identifier[revID] , literal[boolean] , identifier[sequence] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[curDoc] operator[==] Other[null] operator[SEP] { identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[docID] , identifier[revID] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[curDoc] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[sequence] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conflicts] operator[!=] Other[null] operator[SEP] identifier[curDoc] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[conflicts] operator[SEP] operator[SEP] identifier[i] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] identifier[SQLiteViewStore] identifier[view] operator[:] identifier[views] operator[SEP] { identifier[curView] operator[=] identifier[view] operator[SEP] operator[++] identifier[i] operator[SEP] Keyword[if] operator[SEP] identifier[viewLastSequence] operator[SEP] identifier[i] operator[SEP] operator[<] identifier[realSequence] operator[SEP] { Keyword[if] operator[SEP] identifier[checkDocTypes] operator[SEP] { identifier[String] identifier[viewDocType] operator[=] identifier[viewDocTypes] operator[SEP] identifier[get] operator[SEP] identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[viewDocType] operator[!=] Other[null] operator[&&] operator[!] identifier[viewDocType] operator[SEP] identifier[equals] operator[SEP] identifier[docType] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[sequence] , identifier[docID] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[emitBlock] operator[SEP] identifier[setSequence] operator[SEP] identifier[sequence] operator[SEP] operator[SEP] identifier[mapBlocks] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[curDoc] , identifier[emitBlock] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] , literal[String] , identifier[view] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , identifier[msg] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[msg] , identifier[e] , identifier[Status] operator[SEP] identifier[CALLBACK_ERROR] operator[SEP] operator[SEP] } } } } Keyword[for] operator[SEP] identifier[SQLiteViewStore] identifier[view] operator[:] identifier[views] operator[SEP] { identifier[view] operator[SEP] identifier[finishCreatingIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[newTotalRows] operator[=] identifier[viewTotalRows] operator[SEP] identifier[get] operator[SEP] identifier[view] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ContentValues] identifier[updateValues] operator[=] Keyword[new] identifier[ContentValues] operator[SEP] operator[SEP] operator[SEP] identifier[updateValues] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[dbMaxSequence] operator[SEP] operator[SEP] identifier[updateValues] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[newTotalRows] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[whereArgs] operator[=] { identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[view] operator[SEP] identifier[getViewID] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] identifier[store] operator[SEP] identifier[getStorageEngine] operator[SEP] operator[SEP] operator[SEP] identifier[update] operator[SEP] literal[String] , identifier[updateValues] , literal[String] , identifier[whereArgs] operator[SEP] operator[SEP] } identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[Log] operator[SEP] identifier[TAG_VIEW] , literal[String] , identifier[viewNames] operator[SEP] identifier[views] operator[SEP] , identifier[dbMaxSequence] , identifier[deletedCount] , identifier[insertedCount] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[return] Keyword[new] identifier[Status] operator[SEP] identifier[Status] operator[SEP] identifier[OK] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] identifier[ex] , identifier[Status] operator[SEP] identifier[DB_ERROR] operator[SEP] operator[SEP] } Keyword[finally] { identifier[curView] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[cursor] operator[!=] Other[null] operator[SEP] identifier[cursor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[store] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[store] operator[SEP] identifier[endTransaction] operator[SEP] identifier[success] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] literal[String] , identifier[Status] operator[SEP] identifier[DB_ERROR] operator[SEP] operator[SEP] } } }
public void update(final Graphics g) { final Dimension d = getSize(); if ( (this.offScreenImage == null) ) { this.offScreenImage = createImage( d.width, d.height ); } paint( this.offScreenImage.getGraphics() ); g.drawImage( this.offScreenImage, 0, 0, null ); }
class class_name[name] begin[{] method[update, return_type[void], modifier[public], parameter[g]] begin[{] local_variable[type[Dimension], d] if[binary_operation[THIS[member[None.offScreenImage]], ==, literal[null]]] begin[{] assign[THIS[member[None.offScreenImage]], call[.createImage, parameter[member[d.width], member[d.height]]]] else begin[{] None end[}] call[.paint, parameter[THIS[member[None.offScreenImage]call[None.getGraphics, parameter[]]]]] call[g.drawImage, parameter[THIS[member[None.offScreenImage]], literal[0], literal[0], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[final] identifier[Graphics] identifier[g] operator[SEP] { Keyword[final] identifier[Dimension] identifier[d] operator[=] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[offScreenImage] operator[==] Other[null] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[offScreenImage] operator[=] identifier[createImage] operator[SEP] identifier[d] operator[SEP] identifier[width] , identifier[d] operator[SEP] identifier[height] operator[SEP] operator[SEP] } identifier[paint] operator[SEP] Keyword[this] operator[SEP] identifier[offScreenImage] operator[SEP] identifier[getGraphics] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[drawImage] operator[SEP] Keyword[this] operator[SEP] identifier[offScreenImage] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] }
public static ServiceInvocationException newServiceInvocationException(String message, Object... args) { return newServiceInvocationException(null, message, args); }
class class_name[name] begin[{] method[newServiceInvocationException, return_type[type[ServiceInvocationException]], modifier[public static], parameter[message, args]] begin[{] return[call[.newServiceInvocationException, parameter[literal[null], member[.message], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ServiceInvocationException] identifier[newServiceInvocationException] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[return] identifier[newServiceInvocationException] operator[SEP] Other[null] , identifier[message] , identifier[args] operator[SEP] operator[SEP] }
public QueryCapability readXML(InputStream docIs, URI uri) throws IOException { // get ready for XML parsing warnMessages.setLength(0); errMessages.setLength(0); fatalMessages.setLength(0); Document doc = null; try { doc = builder.build(docIs); } catch (JDOMException e) { fatalMessages.append(e.getMessage()); // makes it invalid } return readXML(doc, uri); }
class class_name[name] begin[{] method[readXML, return_type[type[QueryCapability]], modifier[public], parameter[docIs, uri]] begin[{] call[warnMessages.setLength, parameter[literal[0]]] call[errMessages.setLength, parameter[literal[0]]] call[fatalMessages.setLength, parameter[literal[0]]] local_variable[type[Document], doc] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=docIs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=build, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=fatalMessages, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JDOMException']))], finally_block=None, label=None, resources=None) return[call[.readXML, parameter[member[.doc], member[.uri]]]] end[}] END[}]
Keyword[public] identifier[QueryCapability] identifier[readXML] operator[SEP] identifier[InputStream] identifier[docIs] , identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[IOException] { identifier[warnMessages] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[errMessages] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[fatalMessages] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Document] identifier[doc] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[doc] operator[=] identifier[builder] operator[SEP] identifier[build] operator[SEP] identifier[docIs] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JDOMException] identifier[e] operator[SEP] { identifier[fatalMessages] operator[SEP] identifier[append] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[readXML] operator[SEP] identifier[doc] , identifier[uri] operator[SEP] operator[SEP] }
protected long createTaskInternal(final String name, final String channel, final String data, final String key1, final String key2, final Long batchId, int postponeSec, TedStatus status) { final String sqlLogId = "create_task"; if (status == null) status = TedStatus.NEW; String nextts = (status == TedStatus.NEW ? dbType.sql.now() + " + " + dbType.sql.intervalSeconds(postponeSec) : "null"); String sql = " insert into tedtask (taskId, `system`, name, channel, bno, status, createTs, nextTs, retries, data, key1, key2, batchId)" + " values(null, '$sys', ?, ?, null, '$status', $now, $nextts, 0, ?, ?, ?, ?)" + " "; sql = sql.replace("$nextTaskId", dbType.sql.sequenceSql("SEQ_TEDTASK_ID")); sql = sql.replace("$now", dbType.sql.now()); sql = sql.replace("$sys", thisSystem); sql = sql.replace("$nextts", nextts); sql = sql.replace("$status", status.toString()); final String finalSql = sql; Long taskId = JdbcSelectTed.runInConn(dataSource, new ExecInConn<Long>() { @Override public Long execute(Connection connection) throws SQLException { int res = JdbcSelectTedImpl.executeUpdate(connection, finalSql, asList( sqlParam(name, JetJdbcParamType.STRING), sqlParam(channel, JetJdbcParamType.STRING), sqlParam(data, JetJdbcParamType.STRING), sqlParam(key1, JetJdbcParamType.STRING), sqlParam(key2, JetJdbcParamType.STRING), sqlParam(batchId, JetJdbcParamType.LONG) )); if (res != 1) throw new IllegalStateException("expected 1 insert"); String sql = "select last_insert_id()"; return JdbcSelectTedImpl.selectSingleLong(connection, sql, Collections.<SqlParam>emptyList()); } }); logger.trace("Task {} {} created successfully. ", name, taskId); return taskId; }
class class_name[name] begin[{] method[createTaskInternal, return_type[type[long]], modifier[protected], parameter[name, channel, data, key1, key2, batchId, postponeSec, status]] begin[{] local_variable[type[String], sqlLogId] if[binary_operation[member[.status], ==, literal[null]]] begin[{] assign[member[.status], member[TedStatus.NEW]] else begin[{] None end[}] local_variable[type[String], nextts] local_variable[type[String], sql] assign[member[.sql], call[sql.replace, parameter[literal["$nextTaskId"], call[dbType.sql.sequenceSql, parameter[literal["SEQ_TEDTASK_ID"]]]]]] assign[member[.sql], call[sql.replace, parameter[literal["$now"], call[dbType.sql.now, parameter[]]]]] assign[member[.sql], call[sql.replace, parameter[literal["$sys"], member[.thisSystem]]]] assign[member[.sql], call[sql.replace, parameter[literal["$nextts"], member[.nextts]]]] assign[member[.sql], call[sql.replace, parameter[literal["$status"], call[status.toString, parameter[]]]]] local_variable[type[String], finalSql] local_variable[type[Long], taskId] call[logger.trace, parameter[literal["Task {} {} created successfully. "], member[.name], member[.taskId]]] return[member[.taskId]] end[}] END[}]
Keyword[protected] Keyword[long] identifier[createTaskInternal] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[channel] , Keyword[final] identifier[String] identifier[data] , Keyword[final] identifier[String] identifier[key1] , Keyword[final] identifier[String] identifier[key2] , Keyword[final] identifier[Long] identifier[batchId] , Keyword[int] identifier[postponeSec] , identifier[TedStatus] identifier[status] operator[SEP] { Keyword[final] identifier[String] identifier[sqlLogId] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[==] Other[null] operator[SEP] identifier[status] operator[=] identifier[TedStatus] operator[SEP] identifier[NEW] operator[SEP] identifier[String] identifier[nextts] operator[=] operator[SEP] identifier[status] operator[==] identifier[TedStatus] operator[SEP] identifier[NEW] operator[?] identifier[dbType] operator[SEP] identifier[sql] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[dbType] operator[SEP] identifier[sql] operator[SEP] identifier[intervalSeconds] operator[SEP] identifier[postponeSec] operator[SEP] operator[:] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[sql] operator[=] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] identifier[sql] operator[=] identifier[sql] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[dbType] operator[SEP] identifier[sql] operator[SEP] identifier[sequenceSql] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[sql] operator[=] identifier[sql] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[dbType] operator[SEP] identifier[sql] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sql] operator[=] identifier[sql] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[thisSystem] operator[SEP] operator[SEP] identifier[sql] operator[=] identifier[sql] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[nextts] operator[SEP] operator[SEP] identifier[sql] operator[=] identifier[sql] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[status] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[finalSql] operator[=] identifier[sql] operator[SEP] identifier[Long] identifier[taskId] operator[=] identifier[JdbcSelectTed] operator[SEP] identifier[runInConn] operator[SEP] identifier[dataSource] , Keyword[new] identifier[ExecInConn] operator[<] identifier[Long] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[execute] operator[SEP] identifier[Connection] identifier[connection] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[int] identifier[res] operator[=] identifier[JdbcSelectTedImpl] operator[SEP] identifier[executeUpdate] operator[SEP] identifier[connection] , identifier[finalSql] , identifier[asList] operator[SEP] identifier[sqlParam] operator[SEP] identifier[name] , identifier[JetJdbcParamType] operator[SEP] identifier[STRING] operator[SEP] , identifier[sqlParam] operator[SEP] identifier[channel] , identifier[JetJdbcParamType] operator[SEP] identifier[STRING] operator[SEP] , identifier[sqlParam] operator[SEP] identifier[data] , identifier[JetJdbcParamType] operator[SEP] identifier[STRING] operator[SEP] , identifier[sqlParam] operator[SEP] identifier[key1] , identifier[JetJdbcParamType] operator[SEP] identifier[STRING] operator[SEP] , identifier[sqlParam] operator[SEP] identifier[key2] , identifier[JetJdbcParamType] operator[SEP] identifier[STRING] operator[SEP] , identifier[sqlParam] operator[SEP] identifier[batchId] , identifier[JetJdbcParamType] operator[SEP] identifier[LONG] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[res] operator[!=] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[sql] operator[=] literal[String] operator[SEP] Keyword[return] identifier[JdbcSelectTedImpl] operator[SEP] identifier[selectSingleLong] operator[SEP] identifier[connection] , identifier[sql] , identifier[Collections] operator[SEP] operator[<] identifier[SqlParam] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[name] , identifier[taskId] operator[SEP] operator[SEP] Keyword[return] identifier[taskId] operator[SEP] }
public String getHTML(int index) { String raw=getRaw(index); if (raw==null) { return raw; } int[] style=getStyle(index); if (style==null) { return raw; } StringBuilder html=new StringBuilder(raw.length()+32); int offset=0; while (true) { int i=-1; for (int j=0;j!=style.length;j+=3) { if (style[j+1]==-1) { continue; } if (i==-1 || style[i+1]>style[j+1]) { i=j; } } int start=((i!=-1)?style[i+1]:raw.length()); for (int j=0;j!=style.length;j+=3) { int end=style[j+2]; if (end==-1 || end>=start) { continue; } if (offset<=end) { html.append(raw,offset,end+1); offset=end+1; } style[j+2]=-1; html.append('<'); html.append('/'); html.append(getRaw(style[j])); html.append('>'); } if (offset<start) { html.append(raw,offset,start); offset=start; } if (i==-1) { break; } html.append('<'); html.append(getRaw(style[i])); html.append('>'); style[i+1]=-1; } return html.toString(); }
class class_name[name] begin[{] method[getHTML, return_type[type[String]], modifier[public], parameter[index]] begin[{] local_variable[type[String], raw] if[binary_operation[member[.raw], ==, literal[null]]] begin[{] return[member[.raw]] else begin[{] None end[}] local_variable[type[int], style] if[binary_operation[member[.style], ==, literal[null]]] begin[{] return[member[.raw]] else begin[{] None end[}] local_variable[type[StringBuilder], html] local_variable[type[int], offset] while[literal[true]] begin[{] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, 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=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=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=BinaryOperation(operandl=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=>), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[]), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), label=None) local_variable[type[int], start] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=raw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=html, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='<')], member=append, postfix_operators=[], prefix_operators=[], qualifier=html, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], member=append, postfix_operators=[], prefix_operators=[], qualifier=html, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getRaw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=html, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='>')], member=append, postfix_operators=[], prefix_operators=[], qualifier=html, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[]), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), label=None) if[binary_operation[member[.offset], <, member[.start]]] begin[{] call[html.append, parameter[member[.raw], member[.offset], member[.start]]] assign[member[.offset], member[.start]] else begin[{] None end[}] if[binary_operation[member[.i], ==, literal[1]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[html.append, parameter[literal['<']]] call[html.append, parameter[call[.getRaw, parameter[member[.style]]]]] call[html.append, parameter[literal['>']]] assign[member[.style], literal[1]] end[}] return[call[html.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getHTML] operator[SEP] Keyword[int] identifier[index] operator[SEP] { identifier[String] identifier[raw] operator[=] identifier[getRaw] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[raw] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[raw] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] identifier[style] operator[=] identifier[getStyle] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[style] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[raw] operator[SEP] } identifier[StringBuilder] identifier[html] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[raw] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[32] operator[SEP] operator[SEP] Keyword[int] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[i] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[!=] identifier[style] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[+=] Other[3] operator[SEP] { Keyword[if] operator[SEP] identifier[style] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[==] operator[-] Other[1] operator[||] identifier[style] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[>] identifier[style] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] { identifier[i] operator[=] identifier[j] operator[SEP] } } Keyword[int] identifier[start] operator[=] operator[SEP] operator[SEP] identifier[i] operator[!=] operator[-] Other[1] operator[SEP] operator[?] identifier[style] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] identifier[raw] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[!=] identifier[style] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[+=] Other[3] operator[SEP] { Keyword[int] identifier[end] operator[=] identifier[style] operator[SEP] identifier[j] operator[+] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[end] operator[==] operator[-] Other[1] operator[||] identifier[end] operator[>=] identifier[start] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[offset] operator[<=] identifier[end] operator[SEP] { identifier[html] operator[SEP] identifier[append] operator[SEP] identifier[raw] , identifier[offset] , identifier[end] operator[+] Other[1] operator[SEP] operator[SEP] identifier[offset] operator[=] identifier[end] operator[+] Other[1] operator[SEP] } identifier[style] operator[SEP] identifier[j] operator[+] Other[2] operator[SEP] operator[=] operator[-] Other[1] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] identifier[getRaw] operator[SEP] identifier[style] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[offset] operator[<] identifier[start] operator[SEP] { identifier[html] operator[SEP] identifier[append] operator[SEP] identifier[raw] , identifier[offset] , identifier[start] operator[SEP] operator[SEP] identifier[offset] operator[=] identifier[start] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[==] operator[-] Other[1] operator[SEP] { Keyword[break] operator[SEP] } identifier[html] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] identifier[getRaw] operator[SEP] identifier[style] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[html] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[=] operator[-] Other[1] operator[SEP] } Keyword[return] identifier[html] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void scaleWeights(double scale) { for (int i = 0; i < weights.length; i++) { for (int j = 0; j < weights[i].length; j++) { weights[i][j] *= scale; } } }
class class_name[name] begin[{] method[scaleWeights, return_type[void], modifier[public], parameter[scale]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weights, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=*=, value=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=weights, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=weights, 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[public] Keyword[void] identifier[scaleWeights] operator[SEP] Keyword[double] identifier[scale] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[weights] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[weights] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[weights] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[*=] identifier[scale] operator[SEP] } } }
public static String findUniqueKey(JSONArray expected) throws JSONException { // Find a unique key for the object (id, name, whatever) JSONObject o = (JSONObject) expected.get(0); // There's at least one at this point for (String candidate : getKeys(o)) { if (isUsableAsUniqueKey(candidate, expected)) return candidate; } // No usable unique key :-( return null; }
class class_name[name] begin[{] method[findUniqueKey, return_type[type[String]], modifier[public static], parameter[expected]] begin[{] local_variable[type[JSONObject], o] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=candidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isUsableAsUniqueKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=candidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=candidate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[findUniqueKey] operator[SEP] identifier[JSONArray] identifier[expected] operator[SEP] Keyword[throws] identifier[JSONException] { identifier[JSONObject] identifier[o] operator[=] operator[SEP] identifier[JSONObject] operator[SEP] identifier[expected] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[candidate] operator[:] identifier[getKeys] operator[SEP] identifier[o] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isUsableAsUniqueKey] operator[SEP] identifier[candidate] , identifier[expected] operator[SEP] operator[SEP] Keyword[return] identifier[candidate] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public Optional<Nengo> findPrevious() { if (this.court == COURT_NORTHERN) { if (this.index == 0) { return Optional.of(OFFICIAL_NENGOS[NENGO_KENMU.index - 1]); } else { return Optional.of(NORTHERN_NENGOS[this.index - 1]); } } else if (this.index == 0) { return Optional.empty(); } else { return Optional.of(OFFICIAL_NENGOS[this.index - 1]); } }
class class_name[name] begin[{] method[findPrevious, return_type[type[Optional]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.court]], ==, member[.COURT_NORTHERN]]] begin[{] if[binary_operation[THIS[member[None.index]], ==, literal[0]]] begin[{] return[call[Optional.of, parameter[member[.OFFICIAL_NENGOS]]]] else begin[{] return[call[Optional.of, parameter[member[.NORTHERN_NENGOS]]]] end[}] else begin[{] if[binary_operation[THIS[member[None.index]], ==, literal[0]]] begin[{] return[call[Optional.empty, parameter[]]] else begin[{] return[call[Optional.of, parameter[member[.OFFICIAL_NENGOS]]]] end[}] end[}] end[}] END[}]
Keyword[public] identifier[Optional] operator[<] identifier[Nengo] operator[>] identifier[findPrevious] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[court] operator[==] identifier[COURT_NORTHERN] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[OFFICIAL_NENGOS] operator[SEP] identifier[NENGO_KENMU] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[NORTHERN_NENGOS] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[OFFICIAL_NENGOS] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } }
public void caretUpdate(CaretEvent e) { try { int testValue = Integer.valueOf(textField.getText()).intValue(); if ((testValue >= min) && (testValue <= max)) { textField.setForeground(darkGreen); setValue(testValue, false, true); } else { textField.setForeground(Color.red); } } catch (Exception ex) { if (ex instanceof NumberFormatException) { textField.setForeground(Color.red); } // Ignore all other exceptions, e.g. illegal state exception } textField.repaint(); }
class class_name[name] begin[{] method[caretUpdate, return_type[void], modifier[public], parameter[e]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=textField, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[MethodInvocation(arguments=[], member=intValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=testValue)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=testValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=testValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=red, postfix_operators=[], prefix_operators=[], qualifier=Color, selectors=[])], member=setForeground, postfix_operators=[], prefix_operators=[], qualifier=textField, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=darkGreen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setForeground, postfix_operators=[], prefix_operators=[], qualifier=textField, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=testValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=NumberFormatException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=red, postfix_operators=[], prefix_operators=[], qualifier=Color, selectors=[])], member=setForeground, postfix_operators=[], prefix_operators=[], qualifier=textField, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) call[textField.repaint, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[caretUpdate] operator[SEP] identifier[CaretEvent] identifier[e] operator[SEP] { Keyword[try] { Keyword[int] identifier[testValue] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[textField] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[testValue] operator[>=] identifier[min] operator[SEP] operator[&&] operator[SEP] identifier[testValue] operator[<=] identifier[max] operator[SEP] operator[SEP] { identifier[textField] operator[SEP] identifier[setForeground] operator[SEP] identifier[darkGreen] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] identifier[testValue] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[textField] operator[SEP] identifier[setForeground] operator[SEP] identifier[Color] operator[SEP] identifier[red] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[ex] Keyword[instanceof] identifier[NumberFormatException] operator[SEP] { identifier[textField] operator[SEP] identifier[setForeground] operator[SEP] identifier[Color] operator[SEP] identifier[red] operator[SEP] operator[SEP] } } identifier[textField] operator[SEP] identifier[repaint] operator[SEP] operator[SEP] operator[SEP] }
private static ReportLayout getReportLayoutForHeaderFunctions(ReportLayout layout) { ReportLayout convertedLayout = ObjectCloner.silenceDeepCopy(layout); List<FunctionBandElement> headerFunc = getHeaderFunctions(convertedLayout); Band footerBand = convertedLayout.getFooterBand(); insertFunctionsInFooterBands(headerFunc, footerBand, convertedLayout.getColumnCount()); List<ReportGroup> groups = convertedLayout.getGroups(); for (ReportGroup rg : groups) { List<FunctionBandElement> groupHeaderFunc = getGroupHeaderFunctions(convertedLayout, rg.getName()); Band gBand = convertedLayout.getBand(ReportLayout.GROUP_FOOTER_BAND_NAME_PREFIX + rg.getName()); insertFunctionsInFooterBands(groupHeaderFunc, gBand, convertedLayout.getColumnCount()); } return convertedLayout; }
class class_name[name] begin[{] method[getReportLayoutForHeaderFunctions, return_type[type[ReportLayout]], modifier[private static], parameter[layout]] begin[{] local_variable[type[ReportLayout], convertedLayout] local_variable[type[List], headerFunc] local_variable[type[Band], footerBand] call[.insertFunctionsInFooterBands, parameter[member[.headerFunc], member[.footerBand], call[convertedLayout.getColumnCount, parameter[]]]] local_variable[type[List], groups] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=convertedLayout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=rg, selectors=[], type_arguments=None)], member=getGroupHeaderFunctions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=groupHeaderFunc)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FunctionBandElement, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=GROUP_FOOTER_BAND_NAME_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=ReportLayout, selectors=[]), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=rg, selectors=[], type_arguments=None), operator=+)], member=getBand, postfix_operators=[], prefix_operators=[], qualifier=convertedLayout, selectors=[], type_arguments=None), name=gBand)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Band, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=groupHeaderFunc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gBand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getColumnCount, postfix_operators=[], prefix_operators=[], qualifier=convertedLayout, selectors=[], type_arguments=None)], member=insertFunctionsInFooterBands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=rg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ReportGroup, sub_type=None))), label=None) return[member[.convertedLayout]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ReportLayout] identifier[getReportLayoutForHeaderFunctions] operator[SEP] identifier[ReportLayout] identifier[layout] operator[SEP] { identifier[ReportLayout] identifier[convertedLayout] operator[=] identifier[ObjectCloner] operator[SEP] identifier[silenceDeepCopy] operator[SEP] identifier[layout] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[FunctionBandElement] operator[>] identifier[headerFunc] operator[=] identifier[getHeaderFunctions] operator[SEP] identifier[convertedLayout] operator[SEP] operator[SEP] identifier[Band] identifier[footerBand] operator[=] identifier[convertedLayout] operator[SEP] identifier[getFooterBand] operator[SEP] operator[SEP] operator[SEP] identifier[insertFunctionsInFooterBands] operator[SEP] identifier[headerFunc] , identifier[footerBand] , identifier[convertedLayout] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ReportGroup] operator[>] identifier[groups] operator[=] identifier[convertedLayout] operator[SEP] identifier[getGroups] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ReportGroup] identifier[rg] operator[:] identifier[groups] operator[SEP] { identifier[List] operator[<] identifier[FunctionBandElement] operator[>] identifier[groupHeaderFunc] operator[=] identifier[getGroupHeaderFunctions] operator[SEP] identifier[convertedLayout] , identifier[rg] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Band] identifier[gBand] operator[=] identifier[convertedLayout] operator[SEP] identifier[getBand] operator[SEP] identifier[ReportLayout] operator[SEP] identifier[GROUP_FOOTER_BAND_NAME_PREFIX] operator[+] identifier[rg] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[insertFunctionsInFooterBands] operator[SEP] identifier[groupHeaderFunc] , identifier[gBand] , identifier[convertedLayout] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[convertedLayout] operator[SEP] }
@Override public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException { return cliService.getSchemas(sessionHandle, catalogName, schemaName); }
class class_name[name] begin[{] method[getSchemas, return_type[type[OperationHandle]], modifier[public], parameter[sessionHandle, catalogName, schemaName]] begin[{] return[call[cliService.getSchemas, parameter[member[.sessionHandle], member[.catalogName], member[.schemaName]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[OperationHandle] identifier[getSchemas] operator[SEP] identifier[SessionHandle] identifier[sessionHandle] , identifier[String] identifier[catalogName] , identifier[String] identifier[schemaName] operator[SEP] Keyword[throws] identifier[HiveSQLException] { Keyword[return] identifier[cliService] operator[SEP] identifier[getSchemas] operator[SEP] identifier[sessionHandle] , identifier[catalogName] , identifier[schemaName] operator[SEP] operator[SEP] }
public ServiceFuture<List<ManagedInstanceKeyInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName, final String filter, final ListOperationCallback<ManagedInstanceKeyInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), new Func1<String, Observable<ServiceResponse<Page<ManagedInstanceKeyInner>>>>() { @Override public Observable<ServiceResponse<Page<ManagedInstanceKeyInner>>> call(String nextPageLink) { return listByInstanceNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
class class_name[name] begin[{] method[listByInstanceAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, managedInstanceName, filter, serviceCallback]] begin[{] return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listByInstanceSinglePageAsync, parameter[member[.resourceGroupName], member[.managedInstanceName], member[.filter]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=nextPageLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listByInstanceNextSinglePageAsync, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=call, parameters=[FormalParameter(annotations=[], modifiers=set(), name=nextPageLink, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ManagedInstanceKeyInner, sub_type=None))], dimensions=[], name=Page, sub_type=None))], dimensions=[], name=ServiceResponse, sub_type=None))], dimensions=[], name=Observable, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ManagedInstanceKeyInner, sub_type=None))], dimensions=[], name=Page, sub_type=None))], dimensions=[], name=ServiceResponse, sub_type=None))], dimensions=[], name=Observable, sub_type=None))], dimensions=None, name=Func1, sub_type=None)), member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[ManagedInstanceKeyInner] operator[>] operator[>] identifier[listByInstanceAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[managedInstanceName] , Keyword[final] identifier[String] identifier[filter] , Keyword[final] identifier[ListOperationCallback] operator[<] identifier[ManagedInstanceKeyInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[AzureServiceFuture] operator[SEP] identifier[fromPageResponse] operator[SEP] identifier[listByInstanceSinglePageAsync] operator[SEP] identifier[resourceGroupName] , identifier[managedInstanceName] , identifier[filter] operator[SEP] , Keyword[new] identifier[Func1] operator[<] identifier[String] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceKeyInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceKeyInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByInstanceNextSinglePageAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] } } , identifier[serviceCallback] operator[SEP] operator[SEP] }
public void marshall(BusinessReportContentRange businessReportContentRange, ProtocolMarshaller protocolMarshaller) { if (businessReportContentRange == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(businessReportContentRange.getInterval(), INTERVAL_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[businessReportContentRange, protocolMarshaller]] begin[{] if[binary_operation[member[.businessReportContentRange], ==, 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=getInterval, postfix_operators=[], prefix_operators=[], qualifier=businessReportContentRange, selectors=[], type_arguments=None), MemberReference(member=INTERVAL_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[BusinessReportContentRange] identifier[businessReportContentRange] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[businessReportContentRange] 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[businessReportContentRange] operator[SEP] identifier[getInterval] operator[SEP] operator[SEP] , identifier[INTERVAL_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] } }
@Override public BlockChannelWriter<MemorySegment> createBlockChannelWriter(FileIOChannel.ID channelID, LinkedBlockingQueue<MemorySegment> returnQueue) throws IOException { checkState(!isShutdown.get(), "I/O-Manager is shut down."); return new AsynchronousBlockWriter(channelID, this.writers[channelID.getThreadNum()].requestQueue, returnQueue); }
class class_name[name] begin[{] method[createBlockChannelWriter, return_type[type[BlockChannelWriter]], modifier[public], parameter[channelID, returnQueue]] begin[{] call[.checkState, parameter[call[isShutdown.get, parameter[]], literal["I/O-Manager is shut down."]]] return[ClassCreator(arguments=[MemberReference(member=channelID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=writers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MethodInvocation(arguments=[], member=getThreadNum, postfix_operators=[], prefix_operators=[], qualifier=channelID, selectors=[], type_arguments=None)), MemberReference(member=requestQueue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=returnQueue, 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=AsynchronousBlockWriter, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[BlockChannelWriter] operator[<] identifier[MemorySegment] operator[>] identifier[createBlockChannelWriter] operator[SEP] identifier[FileIOChannel] operator[SEP] identifier[ID] identifier[channelID] , identifier[LinkedBlockingQueue] operator[<] identifier[MemorySegment] operator[>] identifier[returnQueue] operator[SEP] Keyword[throws] identifier[IOException] { identifier[checkState] operator[SEP] operator[!] identifier[isShutdown] operator[SEP] identifier[get] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[AsynchronousBlockWriter] operator[SEP] identifier[channelID] , Keyword[this] operator[SEP] identifier[writers] operator[SEP] identifier[channelID] operator[SEP] identifier[getThreadNum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[requestQueue] , identifier[returnQueue] operator[SEP] operator[SEP] }
protected void setAttributeSmart(Element element, String attr, String value) { if (value == null) { element.removeAttribute(attr); } else { element.setAttribute(attr, value); } }
class class_name[name] begin[{] method[setAttributeSmart, return_type[void], modifier[protected], parameter[element, attr, value]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] call[element.removeAttribute, parameter[member[.attr]]] else begin[{] call[element.setAttribute, parameter[member[.attr], member[.value]]] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[setAttributeSmart] operator[SEP] identifier[Element] identifier[element] , identifier[String] identifier[attr] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[element] operator[SEP] identifier[removeAttribute] operator[SEP] identifier[attr] operator[SEP] operator[SEP] } Keyword[else] { identifier[element] operator[SEP] identifier[setAttribute] operator[SEP] identifier[attr] , identifier[value] operator[SEP] operator[SEP] } }
private void handlePartitioningTurnedOffOrOn( SortedSetMultimap<TableContext, TableRuntimeContext> reconstructedPartitions ) { for (TableContext tableContext : reconstructedPartitions.keySet()) { final SortedSet<TableRuntimeContext> partitions = reconstructedPartitions.get(tableContext); final TableRuntimeContext lastPartition = partitions.last(); final TableContext sourceTableContext = lastPartition.getSourceTableContext(); Utils.checkState( sourceTableContext.equals(tableContext), String.format( "Source table context for %s should match TableContext map key of %s", lastPartition.getDescription(), tableContext.getQualifiedName() ) ); final boolean partitioningTurnedOff = lastPartition.isPartitioned() && sourceTableContext.getPartitioningMode() == PartitioningMode.DISABLED; final boolean partitioningTurnedOn = !lastPartition.isPartitioned() && sourceTableContext.isPartitionable() && sourceTableContext.getPartitioningMode() != PartitioningMode.DISABLED; if (!partitioningTurnedOff && !partitioningTurnedOn) { continue; } final Map<String, String> nextStartingOffsets = new HashMap<>(); final Map<String, String> nextMaxOffsets = new HashMap<>(); final int newPartitionSequence = lastPartition.getPartitionSequence() > 0 ? lastPartition.getPartitionSequence() + 1 : 1; if (partitioningTurnedOff) { LOG.info( "Table {} has switched from partitioned to non-partitioned; partition sequence {} will be the last (with" + " no max offsets)", sourceTableContext.getQualifiedName(), newPartitionSequence ); lastPartition.getStartingPartitionOffsets().forEach( (col, off) -> { String basedOnStartOffset = lastPartition.generateNextPartitionOffset(col, off); nextStartingOffsets.put(col, basedOnStartOffset); } ); } else if (partitioningTurnedOn) { lastPartition.getStartingPartitionOffsets().forEach( (col, off) -> { String basedOnStoredOffset = lastPartition.getInitialStoredOffsets().get(col); nextStartingOffsets.put(col, basedOnStoredOffset); } ); nextStartingOffsets.forEach( (col, off) -> nextMaxOffsets.put(col, lastPartition.generateNextPartitionOffset(col, off)) ); if (!reconstructedPartitions.remove(sourceTableContext, lastPartition)) { throw new IllegalStateException(String.format( "Failed to remove partition %s for table %s in switching partitioning from off to on", lastPartition.getDescription(), sourceTableContext.getQualifiedName() )); } LOG.info( "Table {} has switched from non-partitioned to partitioned; using last stored offsets as the starting" + " offsets for the new partition {}", sourceTableContext.getQualifiedName(), newPartitionSequence ); } final TableRuntimeContext nextPartition = new TableRuntimeContext( sourceTableContext, lastPartition.isUsingNonIncrementalLoad(), (lastPartition.isPartitioned() && !partitioningTurnedOff) || partitioningTurnedOn, newPartitionSequence, nextStartingOffsets, nextMaxOffsets ); reconstructedPartitions.put(sourceTableContext, nextPartition); } }
class class_name[name] begin[{] method[handlePartitioningTurnedOffOrOn, return_type[void], modifier[private], parameter[reconstructedPartitions]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=reconstructedPartitions, selectors=[], type_arguments=None), name=partitions)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TableRuntimeContext, sub_type=None))], dimensions=[], name=SortedSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=last, postfix_operators=[], prefix_operators=[], qualifier=partitions, selectors=[], type_arguments=None), name=lastPartition)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TableRuntimeContext, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSourceTableContext, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), name=sourceTableContext)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TableContext, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=tableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Source table context for %s should match TableContext map key of %s"), MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=tableContext, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=checkState, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isPartitioned, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPartitioningMode, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), operandr=MemberReference(member=DISABLED, postfix_operators=[], prefix_operators=[], qualifier=PartitioningMode, selectors=[]), operator===), operator=&&), name=partitioningTurnedOff)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isPartitioned, postfix_operators=[], prefix_operators=['!'], qualifier=lastPartition, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isPartitionable, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPartitioningMode, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), operandr=MemberReference(member=DISABLED, postfix_operators=[], prefix_operators=[], qualifier=PartitioningMode, selectors=[]), operator=!=), operator=&&), name=partitioningTurnedOn)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=partitioningTurnedOff, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=partitioningTurnedOn, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=nextStartingOffsets)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=nextMaxOffsets)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPartitionSequence, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), if_true=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPartitionSequence, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), name=newPartitionSequence)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=MemberReference(member=partitioningTurnedOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=IfStatement(condition=MemberReference(member=partitioningTurnedOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getStartingPartitionOffsets, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[MethodInvocation(arguments=[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInitialStoredOffsets, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=basedOnStoredOffset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=basedOnStoredOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=nextStartingOffsets, selectors=[], type_arguments=None), label=None)], parameters=[InferredFormalParameter(name=col), InferredFormalParameter(name=off)])], member=forEach, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateNextPartitionOffset, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=nextMaxOffsets, selectors=[], type_arguments=None), parameters=[InferredFormalParameter(name=col), InferredFormalParameter(name=off)])], member=forEach, postfix_operators=[], prefix_operators=[], qualifier=nextStartingOffsets, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=sourceTableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastPartition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=['!'], qualifier=reconstructedPartitions, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to remove partition %s for table %s in switching partitioning from off to on"), MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Table {} has switched from non-partitioned to partitioned; using last stored offsets as the starting"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" offsets for the new partition {}"), operator=+), MethodInvocation(arguments=[], member=getQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), MemberReference(member=newPartitionSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Table {} has switched from partitioned to non-partitioned; partition sequence {} will be the last (with"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" no max offsets)"), operator=+), MethodInvocation(arguments=[], member=getQualifiedName, postfix_operators=[], prefix_operators=[], qualifier=sourceTableContext, selectors=[], type_arguments=None), MemberReference(member=newPartitionSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getStartingPartitionOffsets, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[MethodInvocation(arguments=[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateNextPartitionOffset, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), name=basedOnStartOffset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=basedOnStartOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=nextStartingOffsets, selectors=[], type_arguments=None), label=None)], parameters=[InferredFormalParameter(name=col), InferredFormalParameter(name=off)])], member=forEach, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=sourceTableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=isUsingNonIncrementalLoad, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isPartitioned, postfix_operators=[], prefix_operators=[], qualifier=lastPartition, selectors=[], type_arguments=None), operandr=MemberReference(member=partitioningTurnedOff, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=partitioningTurnedOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), MemberReference(member=newPartitionSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextStartingOffsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextMaxOffsets, 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=TableRuntimeContext, sub_type=None)), name=nextPartition)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TableRuntimeContext, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceTableContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextPartition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=reconstructedPartitions, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=reconstructedPartitions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tableContext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TableContext, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[handlePartitioningTurnedOffOrOn] operator[SEP] identifier[SortedSetMultimap] operator[<] identifier[TableContext] , identifier[TableRuntimeContext] operator[>] identifier[reconstructedPartitions] operator[SEP] { Keyword[for] operator[SEP] identifier[TableContext] identifier[tableContext] operator[:] identifier[reconstructedPartitions] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[SortedSet] operator[<] identifier[TableRuntimeContext] operator[>] identifier[partitions] operator[=] identifier[reconstructedPartitions] operator[SEP] identifier[get] operator[SEP] identifier[tableContext] operator[SEP] operator[SEP] Keyword[final] identifier[TableRuntimeContext] identifier[lastPartition] operator[=] identifier[partitions] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[TableContext] identifier[sourceTableContext] operator[=] identifier[lastPartition] operator[SEP] identifier[getSourceTableContext] operator[SEP] operator[SEP] operator[SEP] identifier[Utils] operator[SEP] identifier[checkState] operator[SEP] identifier[sourceTableContext] operator[SEP] identifier[equals] operator[SEP] identifier[tableContext] operator[SEP] , identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[lastPartition] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[tableContext] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[partitioningTurnedOff] operator[=] identifier[lastPartition] operator[SEP] identifier[isPartitioned] operator[SEP] operator[SEP] operator[&&] identifier[sourceTableContext] operator[SEP] identifier[getPartitioningMode] operator[SEP] operator[SEP] operator[==] identifier[PartitioningMode] operator[SEP] identifier[DISABLED] operator[SEP] Keyword[final] Keyword[boolean] identifier[partitioningTurnedOn] operator[=] operator[!] identifier[lastPartition] operator[SEP] identifier[isPartitioned] operator[SEP] operator[SEP] operator[&&] identifier[sourceTableContext] operator[SEP] identifier[isPartitionable] operator[SEP] operator[SEP] operator[&&] identifier[sourceTableContext] operator[SEP] identifier[getPartitioningMode] operator[SEP] operator[SEP] operator[!=] identifier[PartitioningMode] operator[SEP] identifier[DISABLED] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[partitioningTurnedOff] operator[&&] operator[!] identifier[partitioningTurnedOn] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[nextStartingOffsets] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[nextMaxOffsets] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[newPartitionSequence] operator[=] identifier[lastPartition] operator[SEP] identifier[getPartitionSequence] operator[SEP] operator[SEP] operator[>] Other[0] operator[?] identifier[lastPartition] operator[SEP] identifier[getPartitionSequence] operator[SEP] operator[SEP] operator[+] Other[1] operator[:] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[partitioningTurnedOff] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] literal[String] , identifier[sourceTableContext] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] , identifier[newPartitionSequence] operator[SEP] operator[SEP] identifier[lastPartition] operator[SEP] identifier[getStartingPartitionOffsets] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] operator[SEP] identifier[col] , identifier[off] operator[SEP] operator[->] { identifier[String] identifier[basedOnStartOffset] operator[=] identifier[lastPartition] operator[SEP] identifier[generateNextPartitionOffset] operator[SEP] identifier[col] , identifier[off] operator[SEP] operator[SEP] identifier[nextStartingOffsets] operator[SEP] identifier[put] operator[SEP] identifier[col] , identifier[basedOnStartOffset] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[partitioningTurnedOn] operator[SEP] { identifier[lastPartition] operator[SEP] identifier[getStartingPartitionOffsets] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] operator[SEP] identifier[col] , identifier[off] operator[SEP] operator[->] { identifier[String] identifier[basedOnStoredOffset] operator[=] identifier[lastPartition] operator[SEP] identifier[getInitialStoredOffsets] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[col] operator[SEP] operator[SEP] identifier[nextStartingOffsets] operator[SEP] identifier[put] operator[SEP] identifier[col] , identifier[basedOnStoredOffset] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[nextStartingOffsets] operator[SEP] identifier[forEach] operator[SEP] operator[SEP] identifier[col] , identifier[off] operator[SEP] operator[->] identifier[nextMaxOffsets] operator[SEP] identifier[put] operator[SEP] identifier[col] , identifier[lastPartition] operator[SEP] identifier[generateNextPartitionOffset] operator[SEP] identifier[col] , identifier[off] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[reconstructedPartitions] operator[SEP] identifier[remove] operator[SEP] identifier[sourceTableContext] , identifier[lastPartition] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[lastPartition] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[sourceTableContext] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] literal[String] , identifier[sourceTableContext] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] , identifier[newPartitionSequence] operator[SEP] operator[SEP] } Keyword[final] identifier[TableRuntimeContext] identifier[nextPartition] operator[=] Keyword[new] identifier[TableRuntimeContext] operator[SEP] identifier[sourceTableContext] , identifier[lastPartition] operator[SEP] identifier[isUsingNonIncrementalLoad] operator[SEP] operator[SEP] , operator[SEP] identifier[lastPartition] operator[SEP] identifier[isPartitioned] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[partitioningTurnedOff] operator[SEP] operator[||] identifier[partitioningTurnedOn] , identifier[newPartitionSequence] , identifier[nextStartingOffsets] , identifier[nextMaxOffsets] operator[SEP] operator[SEP] identifier[reconstructedPartitions] operator[SEP] identifier[put] operator[SEP] identifier[sourceTableContext] , identifier[nextPartition] operator[SEP] operator[SEP] } }
protected boolean isDirectory(String remoteFilePath) throws IOException { if (!ftpClient.changeWorkingDirectory(remoteFilePath)) { // not a directory or not accessible switch (ftpClient.listFiles(remoteFilePath).length) { case 0: throw new CitrusRuntimeException("Remote file path does not exist or is not accessible: " + remoteFilePath); case 1: return false; default: throw new CitrusRuntimeException("Unexpected file type result for file path: " + remoteFilePath); } } else { return true; } }
class class_name[name] begin[{] method[isDirectory, return_type[type[boolean]], modifier[protected], parameter[remoteFilePath]] begin[{] if[call[ftpClient.changeWorkingDirectory, parameter[member[.remoteFilePath]]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Remote file path does not exist or is not accessible: "), operandr=MemberReference(member=remoteFilePath, 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=CitrusRuntimeException, sub_type=None)), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected file type result for file path: "), operandr=MemberReference(member=remoteFilePath, 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=CitrusRuntimeException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[MemberReference(member=remoteFilePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listFiles, postfix_operators=[], prefix_operators=[], qualifier=ftpClient, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), label=None) else begin[{] return[literal[true]] end[}] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isDirectory] operator[SEP] identifier[String] identifier[remoteFilePath] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[ftpClient] operator[SEP] identifier[changeWorkingDirectory] operator[SEP] identifier[remoteFilePath] operator[SEP] operator[SEP] { Keyword[switch] operator[SEP] identifier[ftpClient] operator[SEP] identifier[listFiles] operator[SEP] identifier[remoteFilePath] operator[SEP] operator[SEP] identifier[length] operator[SEP] { Keyword[case] Other[0] operator[:] Keyword[throw] Keyword[new] identifier[CitrusRuntimeException] operator[SEP] literal[String] operator[+] identifier[remoteFilePath] operator[SEP] operator[SEP] Keyword[case] Other[1] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[CitrusRuntimeException] operator[SEP] literal[String] operator[+] identifier[remoteFilePath] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public static <K, V> Map<K, V> toMap(Iterator<K> keys, Iterator<V> values) { return toMap(keys, values, false); }
class class_name[name] begin[{] method[toMap, return_type[type[Map]], modifier[public static], parameter[keys, values]] begin[{] return[call[.toMap, parameter[member[.keys], member[.values], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[toMap] operator[SEP] identifier[Iterator] operator[<] identifier[K] operator[>] identifier[keys] , identifier[Iterator] operator[<] identifier[V] operator[>] identifier[values] operator[SEP] { Keyword[return] identifier[toMap] operator[SEP] identifier[keys] , identifier[values] , literal[boolean] operator[SEP] operator[SEP] }
public static base_response update(nitro_service client, policyexpression resource) throws Exception { policyexpression updateresource = new policyexpression(); updateresource.name = resource.name; updateresource.value = resource.value; updateresource.description = resource.description; updateresource.comment = resource.comment; updateresource.clientsecuritymessage = resource.clientsecuritymessage; return updateresource.update_resource(client); }
class class_name[name] begin[{] method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[policyexpression], updateresource] assign[member[updateresource.name], member[resource.name]] assign[member[updateresource.value], member[resource.value]] assign[member[updateresource.description], member[resource.description]] assign[member[updateresource.comment], member[resource.comment]] assign[member[updateresource.clientsecuritymessage], member[resource.clientsecuritymessage]] return[call[updateresource.update_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[policyexpression] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[policyexpression] identifier[updateresource] operator[=] Keyword[new] identifier[policyexpression] operator[SEP] operator[SEP] operator[SEP] identifier[updateresource] operator[SEP] identifier[name] operator[=] identifier[resource] operator[SEP] identifier[name] operator[SEP] identifier[updateresource] operator[SEP] identifier[value] operator[=] identifier[resource] operator[SEP] identifier[value] operator[SEP] identifier[updateresource] operator[SEP] identifier[description] operator[=] identifier[resource] operator[SEP] identifier[description] operator[SEP] identifier[updateresource] operator[SEP] identifier[comment] operator[=] identifier[resource] operator[SEP] identifier[comment] operator[SEP] identifier[updateresource] operator[SEP] identifier[clientsecuritymessage] operator[=] identifier[resource] operator[SEP] identifier[clientsecuritymessage] operator[SEP] Keyword[return] identifier[updateresource] operator[SEP] identifier[update_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }