code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static <T> String toJsonQuietly(final T object) { try { return ObjectToJsonExtensions.toJson(object); } catch (final JsonProcessingException e) { log.log(Level.SEVERE, "An error occured when converting object to String.\nGiven object:" + object.toString() + "\n", e); } return null; }
class class_name[name] begin[{] method[toJsonQuietly, return_type[type[String]], modifier[public static], parameter[object]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toJson, postfix_operators=[], prefix_operators=[], qualifier=ObjectToJsonExtensions, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An error occured when converting object to String.\nGiven object:"), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonProcessingException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[toJsonQuietly] operator[SEP] Keyword[final] identifier[T] identifier[object] operator[SEP] { Keyword[try] { Keyword[return] identifier[ObjectToJsonExtensions] operator[SEP] identifier[toJson] operator[SEP] identifier[object] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[JsonProcessingException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] operator[+] identifier[object] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public Attributes getMainAttributes() throws IOException { Manifest man = getManifest(); return man != null ? man.getMainAttributes() : null; }
class class_name[name] begin[{] method[getMainAttributes, return_type[type[Attributes]], modifier[public], parameter[]] begin[{] local_variable[type[Manifest], man] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=man, 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=getMainAttributes, postfix_operators=[], prefix_operators=[], qualifier=man, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[Attributes] identifier[getMainAttributes] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Manifest] identifier[man] operator[=] identifier[getManifest] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[man] operator[!=] Other[null] operator[?] identifier[man] operator[SEP] identifier[getMainAttributes] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] }
private void removePool(IThriftPool pool) { Pelops.removePool(PelopsUtils.getPoolName(pool)); Node[] nodes = ((CommonsBackedPool) pool).getCluster().getNodes(); logger.warn("{} :{} host appears to be down, trying for next ", nodes, ((CommonsBackedPool) pool).getCluster() .getConnectionConfig().getThriftPort()); CassandraHost cassandraHost = ((CassandraHostConfiguration) configuration).getCassandraHost( nodes[0].getAddress(), ((CommonsBackedPool) pool).getCluster().getConnectionConfig().getThriftPort()); hostPools.remove(cassandraHost); }
class class_name[name] begin[{] method[removePool, return_type[void], modifier[private], parameter[pool]] begin[{] call[Pelops.removePool, parameter[call[PelopsUtils.getPoolName, parameter[member[.pool]]]]] local_variable[type[Node], nodes] call[logger.warn, parameter[literal["{} :{} host appears to be down, trying for next "], member[.nodes], Cast(expression=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CommonsBackedPool, sub_type=None))]] local_variable[type[CassandraHost], cassandraHost] call[hostPools.remove, parameter[member[.cassandraHost]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[removePool] operator[SEP] identifier[IThriftPool] identifier[pool] operator[SEP] { identifier[Pelops] operator[SEP] identifier[removePool] operator[SEP] identifier[PelopsUtils] operator[SEP] identifier[getPoolName] operator[SEP] identifier[pool] operator[SEP] operator[SEP] operator[SEP] identifier[Node] operator[SEP] operator[SEP] identifier[nodes] operator[=] operator[SEP] operator[SEP] identifier[CommonsBackedPool] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[getCluster] operator[SEP] operator[SEP] operator[SEP] identifier[getNodes] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[nodes] , operator[SEP] operator[SEP] identifier[CommonsBackedPool] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[getCluster] operator[SEP] operator[SEP] operator[SEP] identifier[getConnectionConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getThriftPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CassandraHost] identifier[cassandraHost] operator[=] operator[SEP] operator[SEP] identifier[CassandraHostConfiguration] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] identifier[getCassandraHost] operator[SEP] identifier[nodes] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] , operator[SEP] operator[SEP] identifier[CommonsBackedPool] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[getCluster] operator[SEP] operator[SEP] operator[SEP] identifier[getConnectionConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getThriftPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hostPools] operator[SEP] identifier[remove] operator[SEP] identifier[cassandraHost] operator[SEP] operator[SEP] }
@BetaApi public final Operation removeRuleSecurityPolicy(Integer priority, String securityPolicy) { RemoveRuleSecurityPolicyHttpRequest request = RemoveRuleSecurityPolicyHttpRequest.newBuilder() .setPriority(priority) .setSecurityPolicy(securityPolicy) .build(); return removeRuleSecurityPolicy(request); }
class class_name[name] begin[{] method[removeRuleSecurityPolicy, return_type[type[Operation]], modifier[final public], parameter[priority, securityPolicy]] begin[{] local_variable[type[RemoveRuleSecurityPolicyHttpRequest], request] return[call[.removeRuleSecurityPolicy, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[removeRuleSecurityPolicy] operator[SEP] identifier[Integer] identifier[priority] , identifier[String] identifier[securityPolicy] operator[SEP] { identifier[RemoveRuleSecurityPolicyHttpRequest] identifier[request] operator[=] identifier[RemoveRuleSecurityPolicyHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setPriority] operator[SEP] identifier[priority] operator[SEP] operator[SEP] identifier[setSecurityPolicy] operator[SEP] identifier[securityPolicy] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[removeRuleSecurityPolicy] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Promise<Void> createDirectories(Executor executor, Path dir, FileAttribute... attrs) { return ofBlockingRunnable(executor, () -> { try { Files.createDirectories(dir, attrs); } catch (IOException e) { throw new UncheckedException(e); } }); }
class class_name[name] begin[{] method[createDirectories, return_type[type[Promise]], modifier[public static], parameter[executor, dir, attrs]] begin[{] return[call[.ofBlockingRunnable, parameter[member[.executor], LambdaExpression(body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createDirectories, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UncheckedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)], parameters=[])]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[createDirectories] operator[SEP] identifier[Executor] identifier[executor] , identifier[Path] identifier[dir] , identifier[FileAttribute] operator[...] identifier[attrs] operator[SEP] { Keyword[return] identifier[ofBlockingRunnable] operator[SEP] identifier[executor] , operator[SEP] operator[SEP] operator[->] { Keyword[try] { identifier[Files] operator[SEP] identifier[createDirectories] operator[SEP] identifier[dir] , identifier[attrs] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UncheckedException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void addJavaLibraries() { Vector packages = JavaEnvUtils.getJrePackages(); Enumeration e = packages.elements(); while (e.hasMoreElements()) { String packageName = (String) e.nextElement(); addSystemPackageRoot(packageName); } }
class class_name[name] begin[{] method[addJavaLibraries, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Vector], packages] local_variable[type[Enumeration], e] while[call[e.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], packageName] call[.addSystemPackageRoot, parameter[member[.packageName]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addJavaLibraries] operator[SEP] operator[SEP] { identifier[Vector] identifier[packages] operator[=] identifier[JavaEnvUtils] operator[SEP] identifier[getJrePackages] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[e] operator[=] identifier[packages] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[e] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[packageName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[e] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[addSystemPackageRoot] operator[SEP] identifier[packageName] operator[SEP] operator[SEP] } }
public static int[] trim(TIntFloatHashMap data, float v) { int[][] idx = getTop(data, v); setZero(data, idx[1]); return idx[0]; }
class class_name[name] begin[{] method[trim, return_type[type[int]], modifier[public static], parameter[data, v]] begin[{] local_variable[type[int], idx] call[.setZero, parameter[member[.data], member[.idx]]] return[member[.idx]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[trim] operator[SEP] identifier[TIntFloatHashMap] identifier[data] , Keyword[float] identifier[v] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[idx] operator[=] identifier[getTop] operator[SEP] identifier[data] , identifier[v] operator[SEP] operator[SEP] identifier[setZero] operator[SEP] identifier[data] , identifier[idx] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[idx] operator[SEP] Other[0] operator[SEP] operator[SEP] }
final SupportedResourceType getSupportedResourceTypeForProcessor(final Object processor) { SupportedResourceType supportedType = processor.getClass().getAnnotation(SupportedResourceType.class); /** * This is a special case for processors which implement {@link SupportedResourceTypeProvider} interface. This is * useful for decorator processors which needs to "inherit" the {@link SupportedResourceType} of the decorated * processor. */ if (processor instanceof SupportedResourceTypeAware) { supportedType = ((SupportedResourceTypeAware) processor).getSupportedResourceType(); } return supportedType; }
class class_name[name] begin[{] method[getSupportedResourceTypeForProcessor, return_type[type[SupportedResourceType]], modifier[final], parameter[processor]] begin[{] local_variable[type[SupportedResourceType], supportedType] if[binary_operation[member[.processor], instanceof, type[SupportedResourceTypeAware]]] begin[{] assign[member[.supportedType], Cast(expression=MemberReference(member=processor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SupportedResourceTypeAware, sub_type=None))] else begin[{] None end[}] return[member[.supportedType]] end[}] END[}]
Keyword[final] identifier[SupportedResourceType] identifier[getSupportedResourceTypeForProcessor] operator[SEP] Keyword[final] identifier[Object] identifier[processor] operator[SEP] { identifier[SupportedResourceType] identifier[supportedType] operator[=] identifier[processor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[SupportedResourceType] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[processor] Keyword[instanceof] identifier[SupportedResourceTypeAware] operator[SEP] { identifier[supportedType] operator[=] operator[SEP] operator[SEP] identifier[SupportedResourceTypeAware] operator[SEP] identifier[processor] operator[SEP] operator[SEP] identifier[getSupportedResourceType] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[supportedType] operator[SEP] }
public String normalizeCAP(String input,boolean b) { char[] c = input.toCharArray(); normalise(c); for (int i = 0; i< c.length; i++) { if(b){ if(c[i] > 96 && c[i] < 123){ c[i] -= 32; } } else{ if(c[i] > 64 && c[i] < 91){ c[i] += 32; } } } return new String(c); }
class class_name[name] begin[{] method[normalizeCAP, return_type[type[String]], modifier[public], parameter[input, b]] begin[{] local_variable[type[char], c] call[.normalise, parameter[member[.c]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=91), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=96), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=123), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=-=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32)), 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=c, 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[ClassCreator(arguments=[MemberReference(member=c, 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=String, sub_type=None))] end[}] END[}]
Keyword[public] identifier[String] identifier[normalizeCAP] operator[SEP] identifier[String] identifier[input] , Keyword[boolean] identifier[b] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[input] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] identifier[normalise] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[c] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[i] operator[SEP] operator[>] Other[96] operator[&&] identifier[c] operator[SEP] identifier[i] operator[SEP] operator[<] Other[123] operator[SEP] { identifier[c] operator[SEP] identifier[i] operator[SEP] operator[-=] Other[32] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[i] operator[SEP] operator[>] Other[64] operator[&&] identifier[c] operator[SEP] identifier[i] operator[SEP] operator[<] Other[91] operator[SEP] { identifier[c] operator[SEP] identifier[i] operator[SEP] operator[+=] Other[32] operator[SEP] } } } Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[c] operator[SEP] operator[SEP] }
private void initXSSFChartsMap(final XSSFWorkbook wb, final ChartsData chartsData) { initAnchorsMap(wb, chartsData); Map<String, ClientAnchor> anchorMap = chartsData .getChartAnchorsMap(); Map<String, BufferedImage> chartMap = chartsData.getChartsMap(); Map<String, ChartData> chartDataMap = chartsData.getChartDataMap(); chartMap.clear(); chartDataMap.clear(); for (int i = 0; i < wb.getNumberOfSheets(); i++) { XSSFSheet sheet = wb.getSheetAt(i); XSSFDrawing drawing = sheet.createDrawingPatriarch(); List<XSSFChart> charts = drawing.getCharts(); if ((charts != null) && (!charts.isEmpty())) { for (XSSFChart chart : charts) { generateSingleXSSFChart(chart, getChartIdFromParent(chart, sheet.getSheetName()), sheet, anchorMap, chartMap, chartDataMap); } } } }
class class_name[name] begin[{] method[initXSSFChartsMap, return_type[void], modifier[private], parameter[wb, chartsData]] begin[{] call[.initAnchorsMap, parameter[member[.wb], member[.chartsData]]] local_variable[type[Map], anchorMap] local_variable[type[Map], chartMap] local_variable[type[Map], chartDataMap] call[chartMap.clear, parameter[]] call[chartDataMap.clear, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSheetAt, postfix_operators=[], prefix_operators=[], qualifier=wb, selectors=[], type_arguments=None), name=sheet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XSSFSheet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=createDrawingPatriarch, postfix_operators=[], prefix_operators=[], qualifier=sheet, selectors=[], type_arguments=None), name=drawing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XSSFDrawing, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCharts, postfix_operators=[], prefix_operators=[], qualifier=drawing, selectors=[], type_arguments=None), name=charts)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=XSSFChart, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=charts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=charts, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=chart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSheetName, postfix_operators=[], prefix_operators=[], qualifier=sheet, selectors=[], type_arguments=None)], member=getChartIdFromParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=anchorMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chartMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chartDataMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateSingleXSSFChart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=charts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=chart)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XSSFChart, sub_type=None))), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumberOfSheets, postfix_operators=[], prefix_operators=[], qualifier=wb, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[initXSSFChartsMap] operator[SEP] Keyword[final] identifier[XSSFWorkbook] identifier[wb] , Keyword[final] identifier[ChartsData] identifier[chartsData] operator[SEP] { identifier[initAnchorsMap] operator[SEP] identifier[wb] , identifier[chartsData] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[ClientAnchor] operator[>] identifier[anchorMap] operator[=] identifier[chartsData] operator[SEP] identifier[getChartAnchorsMap] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[BufferedImage] operator[>] identifier[chartMap] operator[=] identifier[chartsData] operator[SEP] identifier[getChartsMap] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[ChartData] operator[>] identifier[chartDataMap] operator[=] identifier[chartsData] operator[SEP] identifier[getChartDataMap] operator[SEP] operator[SEP] operator[SEP] identifier[chartMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[chartDataMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[wb] operator[SEP] identifier[getNumberOfSheets] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[XSSFSheet] identifier[sheet] operator[=] identifier[wb] operator[SEP] identifier[getSheetAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[XSSFDrawing] identifier[drawing] operator[=] identifier[sheet] operator[SEP] identifier[createDrawingPatriarch] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[XSSFChart] operator[>] identifier[charts] operator[=] identifier[drawing] operator[SEP] identifier[getCharts] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[charts] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] operator[!] identifier[charts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[XSSFChart] identifier[chart] operator[:] identifier[charts] operator[SEP] { identifier[generateSingleXSSFChart] operator[SEP] identifier[chart] , identifier[getChartIdFromParent] operator[SEP] identifier[chart] , identifier[sheet] operator[SEP] identifier[getSheetName] operator[SEP] operator[SEP] operator[SEP] , identifier[sheet] , identifier[anchorMap] , identifier[chartMap] , identifier[chartDataMap] operator[SEP] operator[SEP] } } } }
public final EObject ruleRichStringLiteral() throws RecognitionException { EObject current = null; Token lv_value_1_0=null; enterRule(); try { // InternalSARL.g:10827:2: ( ( () ( (lv_value_1_0= RULE_RICH_TEXT ) ) ) ) // InternalSARL.g:10828:2: ( () ( (lv_value_1_0= RULE_RICH_TEXT ) ) ) { // InternalSARL.g:10828:2: ( () ( (lv_value_1_0= RULE_RICH_TEXT ) ) ) // InternalSARL.g:10829:3: () ( (lv_value_1_0= RULE_RICH_TEXT ) ) { // InternalSARL.g:10829:3: () // InternalSARL.g:10830:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getRichStringLiteralAccess().getRichStringLiteralAction_0(), current); } } // InternalSARL.g:10836:3: ( (lv_value_1_0= RULE_RICH_TEXT ) ) // InternalSARL.g:10837:4: (lv_value_1_0= RULE_RICH_TEXT ) { // InternalSARL.g:10837:4: (lv_value_1_0= RULE_RICH_TEXT ) // InternalSARL.g:10838:5: lv_value_1_0= RULE_RICH_TEXT { lv_value_1_0=(Token)match(input,RULE_RICH_TEXT,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(lv_value_1_0, grammarAccess.getRichStringLiteralAccess().getValueRICH_TEXTTerminalRuleCall_1_0()); } if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getRichStringLiteralRule()); } setWithLastConsumed( current, "value", lv_value_1_0, "org.eclipse.xtend.core.Xtend.RICH_TEXT"); } } } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleRichStringLiteral, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[Token], lv_value_1_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRichStringLiteralAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getRichStringLiteralAction_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_value_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RULE_RICH_TEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lv_value_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRichStringLiteralAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getValueRICH_TEXTTerminalRuleCall_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRichStringLiteralRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value"), MemberReference(member=lv_value_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtend.core.Xtend.RICH_TEXT")], member=setWithLastConsumed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])])]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleRichStringLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[lv_value_1_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRichStringLiteralAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getRichStringLiteralAction_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } { { identifier[lv_value_1_0] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[RULE_RICH_TEXT] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[lv_value_1_0] , identifier[grammarAccess] operator[SEP] identifier[getRichStringLiteralAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getValueRICH_TEXTTerminalRuleCall_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRichStringLiteralRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setWithLastConsumed] operator[SEP] identifier[current] , literal[String] , identifier[lv_value_1_0] , literal[String] operator[SEP] operator[SEP] } } } } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public final EObject ruleXTryCatchFinallyExpression() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_4=null; Token otherlv_6=null; EObject lv_expression_2_0 = null; EObject lv_catchClauses_3_0 = null; EObject lv_finallyExpression_5_0 = null; EObject lv_finallyExpression_7_0 = null; enterRule(); try { // InternalXbase.g:5008:2: ( ( () otherlv_1= 'try' ( (lv_expression_2_0= ruleXExpression ) ) ( ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) | (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) ) ) ) // InternalXbase.g:5009:2: ( () otherlv_1= 'try' ( (lv_expression_2_0= ruleXExpression ) ) ( ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) | (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) ) ) { // InternalXbase.g:5009:2: ( () otherlv_1= 'try' ( (lv_expression_2_0= ruleXExpression ) ) ( ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) | (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) ) ) // InternalXbase.g:5010:3: () otherlv_1= 'try' ( (lv_expression_2_0= ruleXExpression ) ) ( ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) | (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) ) { // InternalXbase.g:5010:3: () // InternalXbase.g:5011:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXTryCatchFinallyExpressionAccess().getXTryCatchFinallyExpressionAction_0(), current); } } otherlv_1=(Token)match(input,81,FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_1, grammarAccess.getXTryCatchFinallyExpressionAccess().getTryKeyword_1()); } // InternalXbase.g:5021:3: ( (lv_expression_2_0= ruleXExpression ) ) // InternalXbase.g:5022:4: (lv_expression_2_0= ruleXExpression ) { // InternalXbase.g:5022:4: (lv_expression_2_0= ruleXExpression ) // InternalXbase.g:5023:5: lv_expression_2_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); } pushFollow(FOLLOW_68); lv_expression_2_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXTryCatchFinallyExpressionRule()); } set( current, "expression", lv_expression_2_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); afterParserOrEnumRuleCall(); } } } // InternalXbase.g:5040:3: ( ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) | (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) ) int alt86=2; int LA86_0 = input.LA(1); if ( (LA86_0==84) ) { alt86=1; } else if ( (LA86_0==82) ) { alt86=2; } else { if (state.backtracking>0) {state.failed=true; return current;} NoViableAltException nvae = new NoViableAltException("", 86, 0, input); throw nvae; } switch (alt86) { case 1 : // InternalXbase.g:5041:4: ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) { // InternalXbase.g:5041:4: ( ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? ) // InternalXbase.g:5042:5: ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? { // InternalXbase.g:5042:5: ( ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) )+ int cnt84=0; loop84: do { int alt84=2; int LA84_0 = input.LA(1); if ( (LA84_0==84) ) { int LA84_2 = input.LA(2); if ( (synpred38_InternalXbase()) ) { alt84=1; } } switch (alt84) { case 1 : // InternalXbase.g:5043:6: ( 'catch' )=> (lv_catchClauses_3_0= ruleXCatchClause ) { // InternalXbase.g:5044:6: (lv_catchClauses_3_0= ruleXCatchClause ) // InternalXbase.g:5045:7: lv_catchClauses_3_0= ruleXCatchClause { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXTryCatchFinallyExpressionAccess().getCatchClausesXCatchClauseParserRuleCall_3_0_0_0()); } pushFollow(FOLLOW_69); lv_catchClauses_3_0=ruleXCatchClause(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXTryCatchFinallyExpressionRule()); } add( current, "catchClauses", lv_catchClauses_3_0, "org.eclipse.xtext.xbase.Xbase.XCatchClause"); afterParserOrEnumRuleCall(); } } } break; default : if ( cnt84 >= 1 ) break loop84; if (state.backtracking>0) {state.failed=true; return current;} EarlyExitException eee = new EarlyExitException(84, input); throw eee; } cnt84++; } while (true); // InternalXbase.g:5062:5: ( ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) )? int alt85=2; int LA85_0 = input.LA(1); if ( (LA85_0==82) ) { int LA85_1 = input.LA(2); if ( (synpred39_InternalXbase()) ) { alt85=1; } } switch (alt85) { case 1 : // InternalXbase.g:5063:6: ( ( 'finally' )=>otherlv_4= 'finally' ) ( (lv_finallyExpression_5_0= ruleXExpression ) ) { // InternalXbase.g:5063:6: ( ( 'finally' )=>otherlv_4= 'finally' ) // InternalXbase.g:5064:7: ( 'finally' )=>otherlv_4= 'finally' { otherlv_4=(Token)match(input,82,FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_4, grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyKeyword_3_0_1_0()); } } // InternalXbase.g:5070:6: ( (lv_finallyExpression_5_0= ruleXExpression ) ) // InternalXbase.g:5071:7: (lv_finallyExpression_5_0= ruleXExpression ) { // InternalXbase.g:5071:7: (lv_finallyExpression_5_0= ruleXExpression ) // InternalXbase.g:5072:8: lv_finallyExpression_5_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_0_1_1_0()); } pushFollow(FOLLOW_2); lv_finallyExpression_5_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXTryCatchFinallyExpressionRule()); } set( current, "finallyExpression", lv_finallyExpression_5_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); afterParserOrEnumRuleCall(); } } } } break; } } } break; case 2 : // InternalXbase.g:5092:4: (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) { // InternalXbase.g:5092:4: (otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) ) // InternalXbase.g:5093:5: otherlv_6= 'finally' ( (lv_finallyExpression_7_0= ruleXExpression ) ) { otherlv_6=(Token)match(input,82,FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_6, grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyKeyword_3_1_0()); } // InternalXbase.g:5097:5: ( (lv_finallyExpression_7_0= ruleXExpression ) ) // InternalXbase.g:5098:6: (lv_finallyExpression_7_0= ruleXExpression ) { // InternalXbase.g:5098:6: (lv_finallyExpression_7_0= ruleXExpression ) // InternalXbase.g:5099:7: lv_finallyExpression_7_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_1_1_0()); } pushFollow(FOLLOW_2); lv_finallyExpression_7_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXTryCatchFinallyExpressionRule()); } set( current, "finallyExpression", lv_finallyExpression_7_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); afterParserOrEnumRuleCall(); } } } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleXTryCatchFinallyExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[Token], otherlv_1] local_variable[type[Token], otherlv_4] local_variable[type[Token], otherlv_6] local_variable[type[EObject], lv_expression_2_0] local_variable[type[EObject], lv_catchClauses_3_0] local_variable[type[EObject], lv_finallyExpression_5_0] local_variable[type[EObject], lv_finallyExpression_7_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAction_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=81), MemberReference(member=FOLLOW_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getTryKeyword_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getExpressionXExpressionParserRuleCall_2_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_68, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_expression_2_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="expression"), MemberReference(member=lv_expression_2_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.Xbase.XExpression")], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt86)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA86_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA86_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=84), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA86_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=86), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt86, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt86, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt84)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt84)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA84_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA84_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=84), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA84_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred38_InternalXbase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt84, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getCatchClausesXCatchClauseParserRuleCall_3_0_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_69, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_catchClauses_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXCatchClause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="catchClauses"), MemberReference(member=lv_catchClauses_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.Xbase.XCatchClause")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt84, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=loop84, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=84), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt84, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt84, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop84), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt85)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA85_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA85_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA85_1)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred39_InternalXbase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt85, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), MemberReference(member=FOLLOW_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFinallyKeyword_3_0_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFinallyExpressionXExpressionParserRuleCall_3_0_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_finallyExpression_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="finallyExpression"), MemberReference(member=lv_finallyExpression_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.Xbase.XExpression")], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt85, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), MemberReference(member=FOLLOW_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFinallyKeyword_3_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFinallyExpressionXExpressionParserRuleCall_3_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_finallyExpression_7_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXTryCatchFinallyExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="finallyExpression"), MemberReference(member=lv_finallyExpression_7_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.Xbase.XExpression")], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])])]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt86, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXTryCatchFinallyExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_1] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_4] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_6] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_expression_2_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_catchClauses_3_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_finallyExpression_5_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_finallyExpression_7_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXTryCatchFinallyExpressionAction_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } identifier[otherlv_1] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[81] , identifier[FOLLOW_4] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_1] , identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getTryKeyword_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getExpressionXExpressionParserRuleCall_2_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_68] operator[SEP] operator[SEP] identifier[lv_expression_2_0] operator[=] identifier[ruleXExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_expression_2_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[int] identifier[alt86] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA86_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA86_0] operator[==] Other[84] operator[SEP] operator[SEP] { identifier[alt86] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[LA86_0] operator[==] Other[82] operator[SEP] operator[SEP] { identifier[alt86] operator[=] Other[2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[86] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt86] operator[SEP] { Keyword[case] Other[1] operator[:] { { Keyword[int] identifier[cnt84] operator[=] Other[0] operator[SEP] identifier[loop84] operator[:] Keyword[do] { Keyword[int] identifier[alt84] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA84_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA84_0] operator[==] Other[84] operator[SEP] operator[SEP] { Keyword[int] identifier[LA84_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred38_InternalXbase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt84] operator[=] Other[1] operator[SEP] } } Keyword[switch] operator[SEP] identifier[alt84] operator[SEP] { Keyword[case] Other[1] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getCatchClausesXCatchClauseParserRuleCall_3_0_0_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_69] operator[SEP] operator[SEP] identifier[lv_catchClauses_3_0] operator[=] identifier[ruleXCatchClause] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_catchClauses_3_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt84] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop84] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[84] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP] } identifier[cnt84] operator[++] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[int] identifier[alt85] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA85_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA85_0] operator[==] Other[82] operator[SEP] operator[SEP] { Keyword[int] identifier[LA85_1] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred39_InternalXbase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt85] operator[=] Other[1] operator[SEP] } } Keyword[switch] operator[SEP] identifier[alt85] operator[SEP] { Keyword[case] Other[1] operator[:] { { identifier[otherlv_4] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[82] , identifier[FOLLOW_4] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_4] , identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFinallyKeyword_3_0_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFinallyExpressionXExpressionParserRuleCall_3_0_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[lv_finallyExpression_5_0] operator[=] identifier[ruleXExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_finallyExpression_5_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { { identifier[otherlv_6] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[82] , identifier[FOLLOW_4] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_6] , identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFinallyKeyword_3_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFinallyExpressionXExpressionParserRuleCall_3_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[lv_finallyExpression_7_0] operator[=] identifier[ruleXExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXTryCatchFinallyExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_finallyExpression_7_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } } Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public static void handle(final Throwable t, final boolean throwRuntimeException) { final JKExceptionHandlerFactory factory = JKExceptionHandlerFactory.getInstance(); final JKExceptionHandlerInfo info = factory.getHandler(t); if (info != null) { info.getHandler().handle(info.getException(), throwRuntimeException); } else { factory.getDefaultHandler().handle(t, throwRuntimeException); } }
class class_name[name] begin[{] method[handle, return_type[void], modifier[public static], parameter[t, throwRuntimeException]] begin[{] local_variable[type[JKExceptionHandlerFactory], factory] local_variable[type[JKExceptionHandlerInfo], info] if[binary_operation[member[.info], !=, literal[null]]] begin[{] call[info.getHandler, parameter[]] else begin[{] call[factory.getDefaultHandler, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[handle] operator[SEP] Keyword[final] identifier[Throwable] identifier[t] , Keyword[final] Keyword[boolean] identifier[throwRuntimeException] operator[SEP] { Keyword[final] identifier[JKExceptionHandlerFactory] identifier[factory] operator[=] identifier[JKExceptionHandlerFactory] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JKExceptionHandlerInfo] identifier[info] operator[=] identifier[factory] operator[SEP] identifier[getHandler] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[info] operator[!=] Other[null] operator[SEP] { identifier[info] operator[SEP] identifier[getHandler] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[SEP] identifier[info] operator[SEP] identifier[getException] operator[SEP] operator[SEP] , identifier[throwRuntimeException] operator[SEP] operator[SEP] } Keyword[else] { identifier[factory] operator[SEP] identifier[getDefaultHandler] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[SEP] identifier[t] , identifier[throwRuntimeException] operator[SEP] operator[SEP] } }
public static void extract(final File aJarFile, final String aFilePath, final File aDestDir) throws IOException { extract(new JarFile(aJarFile), aFilePath, aDestDir); }
class class_name[name] begin[{] method[extract, return_type[void], modifier[public static], parameter[aJarFile, aFilePath, aDestDir]] begin[{] call[.extract, parameter[ClassCreator(arguments=[MemberReference(member=aJarFile, 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=JarFile, sub_type=None)), member[.aFilePath], member[.aDestDir]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[extract] operator[SEP] Keyword[final] identifier[File] identifier[aJarFile] , Keyword[final] identifier[String] identifier[aFilePath] , Keyword[final] identifier[File] identifier[aDestDir] operator[SEP] Keyword[throws] identifier[IOException] { identifier[extract] operator[SEP] Keyword[new] identifier[JarFile] operator[SEP] identifier[aJarFile] operator[SEP] , identifier[aFilePath] , identifier[aDestDir] operator[SEP] operator[SEP] }
@Override public R visitSince(SinceTree node, P p) { return defaultAction(node, p); }
class class_name[name] begin[{] method[visitSince, return_type[type[R]], modifier[public], parameter[node, p]] begin[{] return[call[.defaultAction, parameter[member[.node], member[.p]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[visitSince] operator[SEP] identifier[SinceTree] identifier[node] , identifier[P] identifier[p] operator[SEP] { Keyword[return] identifier[defaultAction] operator[SEP] identifier[node] , identifier[p] operator[SEP] operator[SEP] }
public boolean validateHexColor(String hexColor, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = validateHexColor_Pattern(hexColor, diagnostics, context); return result; }
class class_name[name] begin[{] method[validateHexColor, return_type[type[boolean]], modifier[public], parameter[hexColor, diagnostics, context]] begin[{] local_variable[type[boolean], result] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[validateHexColor] operator[SEP] identifier[String] identifier[hexColor] , identifier[DiagnosticChain] identifier[diagnostics] , identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] operator[SEP] { Keyword[boolean] identifier[result] operator[=] identifier[validateHexColor_Pattern] operator[SEP] identifier[hexColor] , identifier[diagnostics] , identifier[context] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException { if (stamper.isAppend()) throw new DocumentException("Append mode does not support changing the encryption status."); if (stamper.isContentWritten()) throw new DocumentException("Content was already written to the output."); stamper.setEncryption(certs, permissions, encryptionType); }
class class_name[name] begin[{] method[setEncryption, return_type[void], modifier[public], parameter[certs, permissions, encryptionType]] begin[{] if[call[stamper.isAppend, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Append mode does not support changing the encryption status.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DocumentException, sub_type=None)), label=None) else begin[{] None end[}] if[call[stamper.isContentWritten, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Content was already written to the output.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DocumentException, sub_type=None)), label=None) else begin[{] None end[}] call[stamper.setEncryption, parameter[member[.certs], member[.permissions], member[.encryptionType]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEncryption] operator[SEP] identifier[Certificate] operator[SEP] operator[SEP] identifier[certs] , Keyword[int] operator[SEP] operator[SEP] identifier[permissions] , Keyword[int] identifier[encryptionType] operator[SEP] Keyword[throws] identifier[DocumentException] { Keyword[if] operator[SEP] identifier[stamper] operator[SEP] identifier[isAppend] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DocumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stamper] operator[SEP] identifier[isContentWritten] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DocumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[stamper] operator[SEP] identifier[setEncryption] operator[SEP] identifier[certs] , identifier[permissions] , identifier[encryptionType] operator[SEP] operator[SEP] }
public static void deleteSchema(GeoPackageCore geoPackage, String table) { DataColumnsDao dataColumnsDao = geoPackage.getDataColumnsDao(); try { if (dataColumnsDao.isTableExists()) { dataColumnsDao.deleteByTableName(table); } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Schema extension. GeoPackage: " + geoPackage.getName() + ", Table: " + table, e); } }
class class_name[name] begin[{] method[deleteSchema, return_type[void], modifier[public static], parameter[geoPackage, table]] begin[{] local_variable[type[DataColumnsDao], dataColumnsDao] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isTableExists, postfix_operators=[], prefix_operators=[], qualifier=dataColumnsDao, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteByTableName, postfix_operators=[], prefix_operators=[], qualifier=dataColumnsDao, 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="Failed to delete Schema extension. GeoPackage: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", Table: "), operator=+), operandr=MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeoPackageException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[deleteSchema] operator[SEP] identifier[GeoPackageCore] identifier[geoPackage] , identifier[String] identifier[table] operator[SEP] { identifier[DataColumnsDao] identifier[dataColumnsDao] operator[=] identifier[geoPackage] operator[SEP] identifier[getDataColumnsDao] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[dataColumnsDao] operator[SEP] identifier[isTableExists] operator[SEP] operator[SEP] operator[SEP] { identifier[dataColumnsDao] operator[SEP] identifier[deleteByTableName] operator[SEP] identifier[table] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[+] identifier[geoPackage] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[table] , identifier[e] operator[SEP] operator[SEP] } }
Rule IfieldArea() { return Sequence(String("[A:"), ZeroOrMore(WSP()).suppressNode(), TexTextIfield(), String("]")) .label(IfieldArea); }
class class_name[name] begin[{] method[IfieldArea, return_type[type[Rule]], modifier[default], parameter[]] begin[{] return[call[.Sequence, parameter[call[.String, parameter[literal["[A:"]]], call[.ZeroOrMore, parameter[call[.WSP, parameter[]]]], call[.TexTextIfield, parameter[]], call[.String, parameter[literal["]"]]]]]] end[}] END[}]
identifier[Rule] identifier[IfieldArea] operator[SEP] operator[SEP] { Keyword[return] identifier[Sequence] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[ZeroOrMore] operator[SEP] identifier[WSP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[suppressNode] operator[SEP] operator[SEP] , identifier[TexTextIfield] operator[SEP] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[IfieldArea] operator[SEP] operator[SEP] }
public List<Path> getDefaultUserRulesDirectories() { List<Path> paths = getOptionValue(DEFAULT_USER_RULES_DIRECTORIES_OPTION); if (paths == null) { return Collections.emptyList(); } return Collections.unmodifiableList(paths); }
class class_name[name] begin[{] method[getDefaultUserRulesDirectories, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], paths] if[binary_operation[member[.paths], ==, literal[null]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] return[call[Collections.unmodifiableList, parameter[member[.paths]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Path] operator[>] identifier[getDefaultUserRulesDirectories] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Path] operator[>] identifier[paths] operator[=] identifier[getOptionValue] operator[SEP] identifier[DEFAULT_USER_RULES_DIRECTORIES_OPTION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[paths] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[paths] operator[SEP] operator[SEP] }
private void notifyListenersIfUninhibited(R oldValue, R newValue) { if (inhibited) { inhibitCount++; lastInhibitedValue = newValue; } else { lastInhibitedValue = newValue; // Just in case, even though not really necessary lastNonInhibitedValue = newValue; doNotifyListeners(oldValue, newValue); } }
class class_name[name] begin[{] method[notifyListenersIfUninhibited, return_type[void], modifier[private], parameter[oldValue, newValue]] begin[{] if[member[.inhibited]] begin[{] member[.inhibitCount] assign[member[.lastInhibitedValue], member[.newValue]] else begin[{] assign[member[.lastInhibitedValue], member[.newValue]] assign[member[.lastNonInhibitedValue], member[.newValue]] call[.doNotifyListeners, parameter[member[.oldValue], member[.newValue]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[notifyListenersIfUninhibited] operator[SEP] identifier[R] identifier[oldValue] , identifier[R] identifier[newValue] operator[SEP] { Keyword[if] operator[SEP] identifier[inhibited] operator[SEP] { identifier[inhibitCount] operator[++] operator[SEP] identifier[lastInhibitedValue] operator[=] identifier[newValue] operator[SEP] } Keyword[else] { identifier[lastInhibitedValue] operator[=] identifier[newValue] operator[SEP] identifier[lastNonInhibitedValue] operator[=] identifier[newValue] operator[SEP] identifier[doNotifyListeners] operator[SEP] identifier[oldValue] , identifier[newValue] operator[SEP] operator[SEP] } }
void sendSubscriptionEvent(String topic, int nb) { Collection<Session> sessions = getSessionsForTopic(topic); if (!sessions.isEmpty()) { MessageToClient messageToClient = new MessageToClient(); messageToClient.setId(topic); messageToClient.setType(MessageType.MESSAGE); messageToClient.setResponse(nb); // Collection<Session> sessionsClosed = new ArrayList<>(); // throws java.lang.StackOverflowError for (Session session : sessions) { if (session.isOpen()) { session.getAsyncRemote().sendObject(messageToClient); // } else { // sessionsClosed.add(session); } } // removeSessionsToTopic(sessionsClosed); } }
class class_name[name] begin[{] method[sendSubscriptionEvent, return_type[void], modifier[default], parameter[topic, nb]] begin[{] local_variable[type[Collection], sessions] if[call[sessions.isEmpty, parameter[]]] begin[{] local_variable[type[MessageToClient], messageToClient] call[messageToClient.setId, parameter[member[.topic]]] call[messageToClient.setType, parameter[member[MessageType.MESSAGE]]] call[messageToClient.setResponse, parameter[member[.nb]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isOpen, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getAsyncRemote, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[MethodInvocation(arguments=[MemberReference(member=messageToClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendObject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sessions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=session)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Session, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[sendSubscriptionEvent] operator[SEP] identifier[String] identifier[topic] , Keyword[int] identifier[nb] operator[SEP] { identifier[Collection] operator[<] identifier[Session] operator[>] identifier[sessions] operator[=] identifier[getSessionsForTopic] operator[SEP] identifier[topic] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[sessions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[MessageToClient] identifier[messageToClient] operator[=] Keyword[new] identifier[MessageToClient] operator[SEP] operator[SEP] operator[SEP] identifier[messageToClient] operator[SEP] identifier[setId] operator[SEP] identifier[topic] operator[SEP] operator[SEP] identifier[messageToClient] operator[SEP] identifier[setType] operator[SEP] identifier[MessageType] operator[SEP] identifier[MESSAGE] operator[SEP] operator[SEP] identifier[messageToClient] operator[SEP] identifier[setResponse] operator[SEP] identifier[nb] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Session] identifier[session] operator[:] identifier[sessions] operator[SEP] { Keyword[if] operator[SEP] identifier[session] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP] operator[SEP] { identifier[session] operator[SEP] identifier[getAsyncRemote] operator[SEP] operator[SEP] operator[SEP] identifier[sendObject] operator[SEP] identifier[messageToClient] operator[SEP] operator[SEP] } } } }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.BRG__RGRP_NAME: return RGRP_NAME_EDEFAULT == null ? rGrpName != null : !RGRP_NAME_EDEFAULT.equals(rGrpName); case AfplibPackage.BRG__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BRG__RGRP_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=RGRP_NAME_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=rGrpName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=RGRP_NAME_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=rGrpName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)]), SwitchStatementCase(case=[MemberReference(member=BRG__TRIPLETS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=triplets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=triplets, selectors=[], type_arguments=None), operator=&&), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[BRG__RGRP_NAME] operator[:] Keyword[return] identifier[RGRP_NAME_EDEFAULT] operator[==] Other[null] operator[?] identifier[rGrpName] operator[!=] Other[null] operator[:] operator[!] identifier[RGRP_NAME_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[rGrpName] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[BRG__TRIPLETS] operator[:] Keyword[return] identifier[triplets] operator[!=] Other[null] operator[&&] operator[!] identifier[triplets] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public static auditnslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ auditnslogpolicy_authenticationvserver_binding obj = new auditnslogpolicy_authenticationvserver_binding(); obj.set_name(name); auditnslogpolicy_authenticationvserver_binding response[] = (auditnslogpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[auditnslogpolicy_authenticationvserver_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[auditnslogpolicy_authenticationvserver_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[auditnslogpolicy_authenticationvserver_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[auditnslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[auditnslogpolicy_authenticationvserver_binding] identifier[obj] operator[=] Keyword[new] identifier[auditnslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[auditnslogpolicy_authenticationvserver_binding] identifier[response] operator[SEP] operator[SEP] operator[=] operator[SEP] identifier[auditnslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
@Override public CWFAuthenticationDetails buildDetails(HttpServletRequest request) { log.trace("Building details"); CWFAuthenticationDetails details = new CWFAuthenticationDetails(request); return details; }
class class_name[name] begin[{] method[buildDetails, return_type[type[CWFAuthenticationDetails]], modifier[public], parameter[request]] begin[{] call[log.trace, parameter[literal["Building details"]]] local_variable[type[CWFAuthenticationDetails], details] return[member[.details]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CWFAuthenticationDetails] identifier[buildDetails] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[CWFAuthenticationDetails] identifier[details] operator[=] Keyword[new] identifier[CWFAuthenticationDetails] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[details] operator[SEP] }
public float angleCos(Vector3fc v) { double length1Squared = x * x + y * y + z * z; double length2Squared = v.x() * v.x() + v.y() * v.y() + v.z() * v.z(); double dot = x * v.x() + y * v.y() + z * v.z(); return (float) (dot / (Math.sqrt(length1Squared * length2Squared))); }
class class_name[name] begin[{] method[angleCos, return_type[type[float]], modifier[public], parameter[v]] begin[{] local_variable[type[double], length1Squared] local_variable[type[double], length2Squared] local_variable[type[double], dot] return[Cast(expression=BinaryOperation(operandl=MemberReference(member=dot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=length1Squared, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length2Squared, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), type=BasicType(dimensions=[], name=float))] end[}] END[}]
Keyword[public] Keyword[float] identifier[angleCos] operator[SEP] identifier[Vector3fc] identifier[v] operator[SEP] { Keyword[double] identifier[length1Squared] operator[=] identifier[x] operator[*] identifier[x] operator[+] identifier[y] operator[*] identifier[y] operator[+] identifier[z] operator[*] identifier[z] operator[SEP] Keyword[double] identifier[length2Squared] operator[=] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[*] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[+] identifier[v] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[*] identifier[v] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[+] identifier[v] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[*] identifier[v] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[dot] operator[=] identifier[x] operator[*] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[+] identifier[y] operator[*] identifier[v] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[+] identifier[z] operator[*] identifier[v] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[dot] operator[/] operator[SEP] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[length1Squared] operator[*] identifier[length2Squared] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void computeCostEstimates(long childOutputTupleCountEstimate, DatabaseEstimates estimates, ScalarValueHints[] paramHints) { m_estimatedOutputTupleCount = childOutputTupleCountEstimate; m_estimatedProcessedTupleCount = childOutputTupleCountEstimate; }
class class_name[name] begin[{] method[computeCostEstimates, return_type[void], modifier[protected], parameter[childOutputTupleCountEstimate, estimates, paramHints]] begin[{] assign[member[.m_estimatedOutputTupleCount], member[.childOutputTupleCountEstimate]] assign[member[.m_estimatedProcessedTupleCount], member[.childOutputTupleCountEstimate]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[computeCostEstimates] operator[SEP] Keyword[long] identifier[childOutputTupleCountEstimate] , identifier[DatabaseEstimates] identifier[estimates] , identifier[ScalarValueHints] operator[SEP] operator[SEP] identifier[paramHints] operator[SEP] { identifier[m_estimatedOutputTupleCount] operator[=] identifier[childOutputTupleCountEstimate] operator[SEP] identifier[m_estimatedProcessedTupleCount] operator[=] identifier[childOutputTupleCountEstimate] operator[SEP] }
private void readProjectProperties(Gantt gantt) { Gantt.File file = gantt.getFile(); ProjectProperties props = m_projectFile.getProjectProperties(); props.setLastSaved(file.getSaved()); props.setCreationDate(file.getCreated()); props.setName(file.getName()); }
class class_name[name] begin[{] method[readProjectProperties, return_type[void], modifier[private], parameter[gantt]] begin[{] local_variable[type[Gantt], file] local_variable[type[ProjectProperties], props] call[props.setLastSaved, parameter[call[file.getSaved, parameter[]]]] call[props.setCreationDate, parameter[call[file.getCreated, parameter[]]]] call[props.setName, parameter[call[file.getName, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[readProjectProperties] operator[SEP] identifier[Gantt] identifier[gantt] operator[SEP] { identifier[Gantt] operator[SEP] identifier[File] identifier[file] operator[=] identifier[gantt] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] identifier[ProjectProperties] identifier[props] operator[=] identifier[m_projectFile] operator[SEP] identifier[getProjectProperties] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setLastSaved] operator[SEP] identifier[file] operator[SEP] identifier[getSaved] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setCreationDate] operator[SEP] identifier[file] operator[SEP] identifier[getCreated] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setName] operator[SEP] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static Class<?>[] convertArgumentTypesToPrimitive(Class<?>[] paramTypes, Object[] arguments) { Class<?>[] types = new Class<?>[arguments.length]; for (int i = 0; i < arguments.length; i++) { Class<?> argumentType = null; if (arguments[i] == null) { argumentType = paramTypes[i]; } else { argumentType = getType(arguments[i]); } Class<?> primitiveWrapperType = PrimitiveWrapper.getPrimitiveFromWrapperType(argumentType); if (primitiveWrapperType == null) { types[i] = argumentType; } else { types[i] = primitiveWrapperType; } } return types; }
class class_name[name] begin[{] method[convertArgumentTypesToPrimitive, return_type[type[Class]], modifier[private static], parameter[paramTypes, arguments]] begin[{] local_variable[type[Class], types] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=argumentType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=argumentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=argumentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=paramTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=argumentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPrimitiveFromWrapperType, postfix_operators=[], prefix_operators=[], qualifier=PrimitiveWrapper, selectors=[], type_arguments=None), name=primitiveWrapperType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=primitiveWrapperType, 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=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=primitiveWrapperType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=argumentType, 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=arguments, 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[.types]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[convertArgumentTypesToPrimitive] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[paramTypes] , identifier[Object] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[types] operator[=] Keyword[new] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] identifier[arguments] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[arguments] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[argumentType] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[arguments] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[argumentType] operator[=] identifier[paramTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[else] { identifier[argumentType] operator[=] identifier[getType] operator[SEP] identifier[arguments] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[Class] operator[<] operator[?] operator[>] identifier[primitiveWrapperType] operator[=] identifier[PrimitiveWrapper] operator[SEP] identifier[getPrimitiveFromWrapperType] operator[SEP] identifier[argumentType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[primitiveWrapperType] operator[==] Other[null] operator[SEP] { identifier[types] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[argumentType] operator[SEP] } Keyword[else] { identifier[types] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[primitiveWrapperType] operator[SEP] } } Keyword[return] identifier[types] operator[SEP] }
protected void bindBlobLiteral(int index, byte[] value) { if (blobLiterals == null) { blobLiterals = new LinkedHashMap<>(); } blobLiterals.put(index, value); }
class class_name[name] begin[{] method[bindBlobLiteral, return_type[void], modifier[protected], parameter[index, value]] begin[{] if[binary_operation[member[.blobLiterals], ==, literal[null]]] begin[{] assign[member[.blobLiterals], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=LinkedHashMap, sub_type=None))] else begin[{] None end[}] call[blobLiterals.put, parameter[member[.index], member[.value]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[bindBlobLiteral] operator[SEP] Keyword[int] identifier[index] , Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[blobLiterals] operator[==] Other[null] operator[SEP] { identifier[blobLiterals] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[blobLiterals] operator[SEP] identifier[put] operator[SEP] identifier[index] , identifier[value] operator[SEP] operator[SEP] }
@JsonCreator public static Partitioning jsonCreate( @JsonProperty("handle") PartitioningHandle handle, @JsonProperty("arguments") List<ArgumentBinding> arguments) { return new Partitioning(handle, arguments); }
class class_name[name] begin[{] method[jsonCreate, return_type[type[Partitioning]], modifier[public static], parameter[handle, arguments]] begin[{] return[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, 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=Partitioning, sub_type=None))] end[}] END[}]
annotation[@] identifier[JsonCreator] Keyword[public] Keyword[static] identifier[Partitioning] identifier[jsonCreate] operator[SEP] annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] identifier[PartitioningHandle] identifier[handle] , annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[ArgumentBinding] operator[>] identifier[arguments] operator[SEP] { Keyword[return] Keyword[new] identifier[Partitioning] operator[SEP] identifier[handle] , identifier[arguments] operator[SEP] operator[SEP] }
public boolean process(ContentEvent event) { InstanceContentEvent inEvent = (InstanceContentEvent) event; //((s4Event) event).getContentEvent(); //InstanceEvent inEvent = (InstanceEvent) event; if (inEvent.getInstanceIndex() < 0) { // End learning predictionStream.put(event); return false; } if (inEvent.isTesting()){ Instance trainInst = inEvent.getInstance(); for (int i = 0; i < sizeEnsemble; i++) { Instance weightedInst = trainInst.copy(); //weightedInst.setWeight(trainInst.weight() * k); InstanceContentEvent instanceContentEvent = new InstanceContentEvent( inEvent.getInstanceIndex(), weightedInst, false, true); instanceContentEvent.setClassifierIndex(i); instanceContentEvent.setEvaluationIndex(inEvent.getEvaluationIndex()); predictionStream.put(instanceContentEvent); } } /* Estimate model parameters using the training data. */ if (inEvent.isTraining()) { train(inEvent); } return false; }
class class_name[name] begin[{] method[process, return_type[type[boolean]], modifier[public], parameter[event]] begin[{] local_variable[type[InstanceContentEvent], inEvent] if[binary_operation[call[inEvent.getInstanceIndex, parameter[]], <, literal[0]]] begin[{] call[predictionStream.put, parameter[member[.event]]] return[literal[false]] else begin[{] None end[}] if[call[inEvent.isTesting, parameter[]]] begin[{] local_variable[type[Instance], trainInst] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=copy, postfix_operators=[], prefix_operators=[], qualifier=trainInst, selectors=[], type_arguments=None), name=weightedInst)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Instance, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInstanceIndex, postfix_operators=[], prefix_operators=[], qualifier=inEvent, selectors=[], type_arguments=None), MemberReference(member=weightedInst, 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)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InstanceContentEvent, sub_type=None)), name=instanceContentEvent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InstanceContentEvent, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setClassifierIndex, postfix_operators=[], prefix_operators=[], qualifier=instanceContentEvent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEvaluationIndex, postfix_operators=[], prefix_operators=[], qualifier=inEvent, selectors=[], type_arguments=None)], member=setEvaluationIndex, postfix_operators=[], prefix_operators=[], qualifier=instanceContentEvent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instanceContentEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=predictionStream, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sizeEnsemble, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] if[call[inEvent.isTraining, parameter[]]] begin[{] call[.train, parameter[member[.inEvent]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[process] operator[SEP] identifier[ContentEvent] identifier[event] operator[SEP] { identifier[InstanceContentEvent] identifier[inEvent] operator[=] operator[SEP] identifier[InstanceContentEvent] operator[SEP] identifier[event] operator[SEP] Keyword[if] operator[SEP] identifier[inEvent] operator[SEP] identifier[getInstanceIndex] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[predictionStream] operator[SEP] identifier[put] operator[SEP] identifier[event] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[inEvent] operator[SEP] identifier[isTesting] operator[SEP] operator[SEP] operator[SEP] { identifier[Instance] identifier[trainInst] operator[=] identifier[inEvent] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[sizeEnsemble] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Instance] identifier[weightedInst] operator[=] identifier[trainInst] operator[SEP] identifier[copy] operator[SEP] operator[SEP] operator[SEP] identifier[InstanceContentEvent] identifier[instanceContentEvent] operator[=] Keyword[new] identifier[InstanceContentEvent] operator[SEP] identifier[inEvent] operator[SEP] identifier[getInstanceIndex] operator[SEP] operator[SEP] , identifier[weightedInst] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[instanceContentEvent] operator[SEP] identifier[setClassifierIndex] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[instanceContentEvent] operator[SEP] identifier[setEvaluationIndex] operator[SEP] identifier[inEvent] operator[SEP] identifier[getEvaluationIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[predictionStream] operator[SEP] identifier[put] operator[SEP] identifier[instanceContentEvent] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[inEvent] operator[SEP] identifier[isTraining] operator[SEP] operator[SEP] operator[SEP] { identifier[train] operator[SEP] identifier[inEvent] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public StringIndex getNameIndex() { try { if (nameIndex == null) { FileSystemResource res = new FileSystemResource(context.getFileSystem(), RES_NAME_INDEX); if (res.exists()) { nameIndex = super.getNameIndex(); } else { // create db nameindex nameIndex = createDbNameIndex(); } } return nameIndex; } catch (Exception e) { IllegalStateException exception = new IllegalStateException("Unable to create nsIndex"); exception.initCause(e); throw exception; } }
class class_name[name] begin[{] method[getNameIndex, return_type[type[StringIndex]], modifier[public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nameIndex, 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=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFileSystem, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), MemberReference(member=RES_NAME_INDEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileSystemResource, sub_type=None)), name=res)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileSystemResource, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nameIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createDbNameIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nameIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=SuperMethodInvocation(arguments=[], member=getNameIndex, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)), label=None)]))])), ReturnStatement(expression=MemberReference(member=nameIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to create nsIndex")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), name=exception)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IllegalStateException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCause, postfix_operators=[], prefix_operators=[], qualifier=exception, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[StringIndex] identifier[getNameIndex] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[nameIndex] operator[==] Other[null] operator[SEP] { identifier[FileSystemResource] identifier[res] operator[=] Keyword[new] identifier[FileSystemResource] operator[SEP] identifier[context] operator[SEP] identifier[getFileSystem] operator[SEP] operator[SEP] , identifier[RES_NAME_INDEX] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[res] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[nameIndex] operator[=] Keyword[super] operator[SEP] identifier[getNameIndex] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[nameIndex] operator[=] identifier[createDbNameIndex] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[nameIndex] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[IllegalStateException] identifier[exception] operator[=] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[exception] operator[SEP] identifier[initCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[exception] operator[SEP] } }
public static BufferedImage loadPGM( String fileName , BufferedImage storage ) throws IOException { return loadPGM(new FileInputStream(fileName), storage); }
class class_name[name] begin[{] method[loadPGM, return_type[type[BufferedImage]], modifier[public static], parameter[fileName, storage]] begin[{] return[call[.loadPGM, parameter[ClassCreator(arguments=[MemberReference(member=fileName, 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=FileInputStream, sub_type=None)), member[.storage]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BufferedImage] identifier[loadPGM] operator[SEP] identifier[String] identifier[fileName] , identifier[BufferedImage] identifier[storage] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[loadPGM] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[fileName] operator[SEP] , identifier[storage] operator[SEP] operator[SEP] }
public List<T> pollN(int n) { if (n >= size) { return pollAll(); } List<T> retList = new ArrayList<T>(n); if (n == 0) { return retList; } boolean done = false; int currentBucketIndex = 0; while (!done) { LinkedElement<T> current = entries[currentBucketIndex]; while (current != null) { retList.add(current.element); current = current.next; entries[currentBucketIndex] = current; size--; modification++; if (--n == 0) { done = true; break; } } currentBucketIndex++; } shrinkIfNecessary(); return retList; }
class class_name[name] begin[{] method[pollN, return_type[type[List]], modifier[public], parameter[n]] begin[{] if[binary_operation[member[.n], >=, member[.size]]] begin[{] return[call[.pollAll, parameter[]]] else begin[{] None end[}] local_variable[type[List], retList] if[binary_operation[member[.n], ==, literal[0]]] begin[{] return[member[.retList]] else begin[{] None end[}] local_variable[type[boolean], done] local_variable[type[int], currentBucketIndex] while[member[.done]] begin[{] local_variable[type[LinkedElement], current] while[binary_operation[member[.current], !=, literal[null]]] begin[{] call[retList.add, parameter[member[current.element]]] assign[member[.current], member[current.next]] assign[member[.entries], member[.current]] member[.size] member[.modification] if[binary_operation[member[.n], ==, literal[0]]] begin[{] assign[member[.done], literal[true]] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] member[.currentBucketIndex] end[}] call[.shrinkIfNecessary, parameter[]] return[member[.retList]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[T] operator[>] identifier[pollN] operator[SEP] Keyword[int] identifier[n] operator[SEP] { Keyword[if] operator[SEP] identifier[n] operator[>=] identifier[size] operator[SEP] { Keyword[return] identifier[pollAll] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[T] operator[>] identifier[retList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[retList] operator[SEP] } Keyword[boolean] identifier[done] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[currentBucketIndex] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[done] operator[SEP] { identifier[LinkedElement] operator[<] identifier[T] operator[>] identifier[current] operator[=] identifier[entries] operator[SEP] identifier[currentBucketIndex] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[current] operator[!=] Other[null] operator[SEP] { identifier[retList] operator[SEP] identifier[add] operator[SEP] identifier[current] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[current] operator[=] identifier[current] operator[SEP] identifier[next] operator[SEP] identifier[entries] operator[SEP] identifier[currentBucketIndex] operator[SEP] operator[=] identifier[current] operator[SEP] identifier[size] operator[--] operator[SEP] identifier[modification] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[--] identifier[n] operator[==] Other[0] operator[SEP] { identifier[done] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } identifier[currentBucketIndex] operator[++] operator[SEP] } identifier[shrinkIfNecessary] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[retList] operator[SEP] }
public void stopChecking() { // synchronize with other attempts to update the running task synchronized(runningTaskLock){ if(runningTask != null) { // cancel task (let it complete its current run if running) runningTaskFuture.cancel(false); // log LOGGER.debug("Stop criterion checker for search {} deactivated", search); // discard task runningTask = null; runningTaskFuture = null; } } }
class class_name[name] begin[{] method[stopChecking, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.runningTaskLock]] BEGIN[{] if[binary_operation[member[.runningTask], !=, literal[null]]] begin[{] call[runningTaskFuture.cancel, parameter[literal[false]]] call[LOGGER.debug, parameter[literal["Stop criterion checker for search {} deactivated"], member[.search]]] assign[member[.runningTask], literal[null]] assign[member[.runningTaskFuture], literal[null]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopChecking] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[runningTaskLock] operator[SEP] { Keyword[if] operator[SEP] identifier[runningTask] operator[!=] Other[null] operator[SEP] { identifier[runningTaskFuture] operator[SEP] identifier[cancel] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[search] operator[SEP] operator[SEP] identifier[runningTask] operator[=] Other[null] operator[SEP] identifier[runningTaskFuture] operator[=] Other[null] operator[SEP] } } }
static public String getSFTimeAsString( SFTime sft, int scale, SnowflakeDateTimeFormat timeFormatter) { return timeFormatter.format(sft, scale); }
class class_name[name] begin[{] method[getSFTimeAsString, return_type[type[String]], modifier[public static], parameter[sft, scale, timeFormatter]] begin[{] return[call[timeFormatter.format, parameter[member[.sft], member[.scale]]]] end[}] END[}]
Keyword[static] Keyword[public] identifier[String] identifier[getSFTimeAsString] operator[SEP] identifier[SFTime] identifier[sft] , Keyword[int] identifier[scale] , identifier[SnowflakeDateTimeFormat] identifier[timeFormatter] operator[SEP] { Keyword[return] identifier[timeFormatter] operator[SEP] identifier[format] operator[SEP] identifier[sft] , identifier[scale] operator[SEP] operator[SEP] }
public static <T> T[] append(T[] array1, T[] array2) { T[] dst = (T[]) Array.newInstance(array1.getClass().getComponentType(), array1.length + array2.length); System.arraycopy(array1, 0, dst, 0, array1.length); System.arraycopy(array2, 0, dst, array1.length, array2.length); return dst; }
class class_name[name] begin[{] method[append, return_type[type[T]], modifier[public static], parameter[array1, array2]] begin[{] local_variable[type[T], dst] call[System.arraycopy, parameter[member[.array1], literal[0], member[.dst], literal[0], member[array1.length]]] call[System.arraycopy, parameter[member[.array2], literal[0], member[.dst], member[array1.length], member[array2.length]]] return[member[.dst]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[array1] , identifier[T] operator[SEP] operator[SEP] identifier[array2] operator[SEP] { identifier[T] operator[SEP] operator[SEP] identifier[dst] operator[=] operator[SEP] identifier[T] operator[SEP] operator[SEP] operator[SEP] identifier[Array] operator[SEP] identifier[newInstance] operator[SEP] identifier[array1] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getComponentType] operator[SEP] operator[SEP] , identifier[array1] operator[SEP] identifier[length] operator[+] identifier[array2] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[array1] , Other[0] , identifier[dst] , Other[0] , identifier[array1] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[array2] , Other[0] , identifier[dst] , identifier[array1] operator[SEP] identifier[length] , identifier[array2] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[dst] operator[SEP] }
public Pair<IntDiGraph, IntObjectBimap<DiEdge>> edgeGraph(boolean selfAvoiding) { IntDiGraph g = new IntDiGraph(); IntObjectBimap<DiEdge> edgeToNodeMap = new IntObjectBimap<>(g.edges.size()); edgeToNodeMap.startGrowth(); for (DiEdge e : edges) { g.addNode(edgeToNodeMap.lookupIndex(e)); } edgeToNodeMap.stopGrowth(); // loop over edges for (Indexed<DiEdge> e : enumerate(edges)) { int newS = e.index(); int oldS = e.get().get1(); int oldT = e.get().get2(); // loop over successors for (int oldV : successors.get(oldT)) { // skip if self avoiding and s == v if (selfAvoiding && oldS == oldV) { continue; } int newT = edgeToNodeMap.lookupIndex(edge(oldT, oldV)); g.addEdge(newS, newT); } } return new Pair<>(g, edgeToNodeMap); }
class class_name[name] begin[{] method[edgeGraph, return_type[type[Pair]], modifier[public], parameter[selfAvoiding]] begin[{] local_variable[type[IntDiGraph], g] local_variable[type[IntObjectBimap], edgeToNodeMap] call[edgeToNodeMap.startGrowth, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lookupIndex, postfix_operators=[], prefix_operators=[], qualifier=edgeToNodeMap, selectors=[], type_arguments=None)], member=addNode, postfix_operators=[], prefix_operators=[], qualifier=g, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=edges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DiEdge, sub_type=None))), label=None) call[edgeToNodeMap.stopGrowth, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=index, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=newS)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=get1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=oldS)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=get2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=oldT)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=selfAvoiding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=oldS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=oldV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=oldT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oldV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=edge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=lookupIndex, postfix_operators=[], prefix_operators=[], qualifier=edgeToNodeMap, selectors=[], type_arguments=None), name=newT)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addEdge, postfix_operators=[], prefix_operators=[], qualifier=g, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=oldT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=successors, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=oldV)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=edges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enumerate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=DiEdge, sub_type=None))], dimensions=[], name=Indexed, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=edgeToNodeMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Pair, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Pair] operator[<] identifier[IntDiGraph] , identifier[IntObjectBimap] operator[<] identifier[DiEdge] operator[>] operator[>] identifier[edgeGraph] operator[SEP] Keyword[boolean] identifier[selfAvoiding] operator[SEP] { identifier[IntDiGraph] identifier[g] operator[=] Keyword[new] identifier[IntDiGraph] operator[SEP] operator[SEP] operator[SEP] identifier[IntObjectBimap] operator[<] identifier[DiEdge] operator[>] identifier[edgeToNodeMap] operator[=] Keyword[new] identifier[IntObjectBimap] operator[<] operator[>] operator[SEP] identifier[g] operator[SEP] identifier[edges] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[edgeToNodeMap] operator[SEP] identifier[startGrowth] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DiEdge] identifier[e] operator[:] identifier[edges] operator[SEP] { identifier[g] operator[SEP] identifier[addNode] operator[SEP] identifier[edgeToNodeMap] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] } identifier[edgeToNodeMap] operator[SEP] identifier[stopGrowth] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Indexed] operator[<] identifier[DiEdge] operator[>] identifier[e] operator[:] identifier[enumerate] operator[SEP] identifier[edges] operator[SEP] operator[SEP] { Keyword[int] identifier[newS] operator[=] identifier[e] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[oldS] operator[=] identifier[e] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[get1] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[oldT] operator[=] identifier[e] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[get2] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[oldV] operator[:] identifier[successors] operator[SEP] identifier[get] operator[SEP] identifier[oldT] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[selfAvoiding] operator[&&] identifier[oldS] operator[==] identifier[oldV] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[int] identifier[newT] operator[=] identifier[edgeToNodeMap] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[edge] operator[SEP] identifier[oldT] , identifier[oldV] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[addEdge] operator[SEP] identifier[newS] , identifier[newT] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Pair] operator[<] operator[>] operator[SEP] identifier[g] , identifier[edgeToNodeMap] operator[SEP] operator[SEP] }
public String invokeUpdateHandler(String updateHandlerUri, String docId, Params params) { assertNotEmpty(updateHandlerUri, "uri"); final String[] v = updateHandlerUri.split("/"); final InputStream response; final URI uri; DatabaseURIHelper uriHelper = new DatabaseURIHelper(dbUri).path("_design").path(v[0]) .path("_update").path(v[1]).query(params); if (docId != null && !docId.isEmpty()) { //Create PUT request using doc Id uri = uriHelper.path(docId).build(); response = couchDbClient.put(uri); } else { //If no doc Id, create POST request uri = uriHelper.build(); response = couchDbClient.post(uri, null); } return streamToString(response); }
class class_name[name] begin[{] method[invokeUpdateHandler, return_type[type[String]], modifier[public], parameter[updateHandlerUri, docId, params]] begin[{] call[.assertNotEmpty, parameter[member[.updateHandlerUri], literal["uri"]]] local_variable[type[String], v] local_variable[type[InputStream], response] local_variable[type[URI], uri] local_variable[type[DatabaseURIHelper], uriHelper] if[binary_operation[binary_operation[member[.docId], !=, literal[null]], &&, call[docId.isEmpty, parameter[]]]] begin[{] assign[member[.uri], call[uriHelper.path, parameter[member[.docId]]]] assign[member[.response], call[couchDbClient.put, parameter[member[.uri]]]] else begin[{] assign[member[.uri], call[uriHelper.build, parameter[]]] assign[member[.response], call[couchDbClient.post, parameter[member[.uri], literal[null]]]] end[}] return[call[.streamToString, parameter[member[.response]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[invokeUpdateHandler] operator[SEP] identifier[String] identifier[updateHandlerUri] , identifier[String] identifier[docId] , identifier[Params] identifier[params] operator[SEP] { identifier[assertNotEmpty] operator[SEP] identifier[updateHandlerUri] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[updateHandlerUri] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[InputStream] identifier[response] operator[SEP] Keyword[final] identifier[URI] identifier[uri] operator[SEP] identifier[DatabaseURIHelper] identifier[uriHelper] operator[=] Keyword[new] identifier[DatabaseURIHelper] operator[SEP] identifier[dbUri] operator[SEP] operator[SEP] identifier[path] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[v] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[v] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[params] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[docId] operator[!=] Other[null] operator[&&] operator[!] identifier[docId] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[uri] operator[=] identifier[uriHelper] operator[SEP] identifier[path] operator[SEP] identifier[docId] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[=] identifier[couchDbClient] operator[SEP] identifier[put] operator[SEP] identifier[uri] operator[SEP] operator[SEP] } Keyword[else] { identifier[uri] operator[=] identifier[uriHelper] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[=] identifier[couchDbClient] operator[SEP] identifier[post] operator[SEP] identifier[uri] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[streamToString] operator[SEP] identifier[response] operator[SEP] operator[SEP] }
public void setGregorianChange(Date date) { gregorianCutover = date.getTime(); // If the cutover has an extreme value, then create a pure // Gregorian or pure Julian calendar by giving the cutover year and // JD extreme values. if (gregorianCutover <= MIN_MILLIS) { gregorianCutoverYear = cutoverJulianDay = Integer.MIN_VALUE; } else if (gregorianCutover >= MAX_MILLIS) { gregorianCutoverYear = cutoverJulianDay = Integer.MAX_VALUE; } else { // Precompute two internal variables which we use to do the actual // cutover computations. These are the Julian day of the cutover // and the cutover year. cutoverJulianDay = (int) floorDivide(gregorianCutover, ONE_DAY); // Convert cutover millis to extended year GregorianCalendar cal = new GregorianCalendar(getTimeZone()); cal.setTime(date); gregorianCutoverYear = cal.get(EXTENDED_YEAR); } }
class class_name[name] begin[{] method[setGregorianChange, return_type[void], modifier[public], parameter[date]] begin[{] assign[member[.gregorianCutover], call[date.getTime, parameter[]]] if[binary_operation[member[.gregorianCutover], <=, member[.MIN_MILLIS]]] begin[{] assign[member[.gregorianCutoverYear], assign[member[.cutoverJulianDay], member[Integer.MIN_VALUE]]] else begin[{] if[binary_operation[member[.gregorianCutover], >=, member[.MAX_MILLIS]]] begin[{] assign[member[.gregorianCutoverYear], assign[member[.cutoverJulianDay], member[Integer.MAX_VALUE]]] else begin[{] assign[member[.cutoverJulianDay], Cast(expression=MethodInvocation(arguments=[MemberReference(member=gregorianCutover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ONE_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=floorDivide, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] local_variable[type[GregorianCalendar], cal] call[cal.setTime, parameter[member[.date]]] assign[member[.gregorianCutoverYear], call[cal.get, parameter[member[.EXTENDED_YEAR]]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setGregorianChange] operator[SEP] identifier[Date] identifier[date] operator[SEP] { identifier[gregorianCutover] operator[=] identifier[date] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gregorianCutover] operator[<=] identifier[MIN_MILLIS] operator[SEP] { identifier[gregorianCutoverYear] operator[=] identifier[cutoverJulianDay] operator[=] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[gregorianCutover] operator[>=] identifier[MAX_MILLIS] operator[SEP] { identifier[gregorianCutoverYear] operator[=] identifier[cutoverJulianDay] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] } Keyword[else] { identifier[cutoverJulianDay] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[floorDivide] operator[SEP] identifier[gregorianCutover] , identifier[ONE_DAY] operator[SEP] operator[SEP] identifier[GregorianCalendar] identifier[cal] operator[=] Keyword[new] identifier[GregorianCalendar] operator[SEP] identifier[getTimeZone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[setTime] operator[SEP] identifier[date] operator[SEP] operator[SEP] identifier[gregorianCutoverYear] operator[=] identifier[cal] operator[SEP] identifier[get] operator[SEP] identifier[EXTENDED_YEAR] operator[SEP] operator[SEP] } }
public static int Minimum(ImageSource fastBitmap, int startX, int startY, int width, int height) { int min = 255; if (fastBitmap.isGrayscale()) { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { int gray = fastBitmap.getRGB(j, i); if (gray < min) { min = gray; } } } } else { for (int i = startX; i < height; i++) { for (int j = startY; j < width; j++) { int gray = fastBitmap.getG(j, i); if (gray < min) { min = gray; } } } } return min; }
class class_name[name] begin[{] method[Minimum, return_type[type[int]], modifier[public static], parameter[fastBitmap, startX, startY, width, height]] begin[{] local_variable[type[int], min] if[call[fastBitmap.isGrayscale, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRGB, postfix_operators=[], prefix_operators=[], qualifier=fastBitmap, selectors=[], type_arguments=None), name=gray)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=gray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=gray, 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=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getG, postfix_operators=[], prefix_operators=[], qualifier=fastBitmap, selectors=[], type_arguments=None), name=gray)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=gray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=gray, 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=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] return[member[.min]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[Minimum] operator[SEP] identifier[ImageSource] identifier[fastBitmap] , Keyword[int] identifier[startX] , Keyword[int] identifier[startY] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { Keyword[int] identifier[min] operator[=] Other[255] operator[SEP] Keyword[if] operator[SEP] identifier[fastBitmap] operator[SEP] identifier[isGrayscale] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startX] operator[SEP] identifier[i] operator[<] identifier[height] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[startY] operator[SEP] identifier[j] operator[<] identifier[width] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[int] identifier[gray] operator[=] identifier[fastBitmap] operator[SEP] identifier[getRGB] operator[SEP] identifier[j] , identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gray] operator[<] identifier[min] operator[SEP] { identifier[min] operator[=] identifier[gray] operator[SEP] } } } } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startX] operator[SEP] identifier[i] operator[<] identifier[height] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[startY] operator[SEP] identifier[j] operator[<] identifier[width] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[int] identifier[gray] operator[=] identifier[fastBitmap] operator[SEP] identifier[getG] operator[SEP] identifier[j] , identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gray] operator[<] identifier[min] operator[SEP] { identifier[min] operator[=] identifier[gray] operator[SEP] } } } } Keyword[return] identifier[min] operator[SEP] }
public CreateProvisioningArtifactResult withInfo(java.util.Map<String, String> info) { setInfo(info); return this; }
class class_name[name] begin[{] method[withInfo, return_type[type[CreateProvisioningArtifactResult]], modifier[public], parameter[info]] begin[{] call[.setInfo, parameter[member[.info]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CreateProvisioningArtifactResult] identifier[withInfo] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[info] operator[SEP] { identifier[setInfo] operator[SEP] identifier[info] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static base_response save(nitro_service client, cachecontentgroup resource) throws Exception { cachecontentgroup saveresource = new cachecontentgroup(); saveresource.name = resource.name; return saveresource.perform_operation(client,"save"); }
class class_name[name] begin[{] method[save, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[cachecontentgroup], saveresource] assign[member[saveresource.name], member[resource.name]] return[call[saveresource.perform_operation, parameter[member[.client], literal["save"]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[save] operator[SEP] identifier[nitro_service] identifier[client] , identifier[cachecontentgroup] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[cachecontentgroup] identifier[saveresource] operator[=] Keyword[new] identifier[cachecontentgroup] operator[SEP] operator[SEP] operator[SEP] identifier[saveresource] operator[SEP] identifier[name] operator[=] identifier[resource] operator[SEP] identifier[name] operator[SEP] Keyword[return] identifier[saveresource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] }
public boolean reportChecksumFailure(Path f, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos) { LocatedBlock lblocks[] = new LocatedBlock[2]; // Find block in data stream. DFSClient.DFSDataInputStream dfsIn = (DFSClient.DFSDataInputStream) in; Block dataBlock = dfsIn.getCurrentBlock(); if (dataBlock == null) { LOG.error("Error: Current block in data stream is null! "); return false; } DatanodeInfo[] dataNode = {dfsIn.getCurrentDatanode()}; lblocks[0] = new LocatedBlock(dataBlock, dataNode); LOG.info("Found checksum error in data stream at block=" + dataBlock + " on datanode=" + dataNode[0].getName()); // Find block in checksum stream DFSClient.DFSDataInputStream dfsSums = (DFSClient.DFSDataInputStream) sums; Block sumsBlock = dfsSums.getCurrentBlock(); if (sumsBlock == null) { LOG.error("Error: Current block in checksum stream is null! "); return false; } DatanodeInfo[] sumsNode = {dfsSums.getCurrentDatanode()}; lblocks[1] = new LocatedBlock(sumsBlock, sumsNode); LOG.info("Found checksum error in checksum stream at block=" + sumsBlock + " on datanode=" + sumsNode[0].getName()); // Ask client to delete blocks. dfs.reportChecksumFailure(f.toString(), lblocks); return true; }
class class_name[name] begin[{] method[reportChecksumFailure, return_type[type[boolean]], modifier[public], parameter[f, in, inPos, sums, sumsPos]] begin[{] local_variable[type[LocatedBlock], lblocks] local_variable[type[DFSClient], dfsIn] local_variable[type[Block], dataBlock] if[binary_operation[member[.dataBlock], ==, literal[null]]] begin[{] call[LOG.error, parameter[literal["Error: Current block in data stream is null! "]]] return[literal[false]] else begin[{] None end[}] local_variable[type[DatanodeInfo], dataNode] assign[member[.lblocks], ClassCreator(arguments=[MemberReference(member=dataBlock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataNode, 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=LocatedBlock, sub_type=None))] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[literal["Found checksum error in data stream at block="], +, member[.dataBlock]], +, literal[" on datanode="]], +, member[.dataNode]]]] local_variable[type[DFSClient], dfsSums] local_variable[type[Block], sumsBlock] if[binary_operation[member[.sumsBlock], ==, literal[null]]] begin[{] call[LOG.error, parameter[literal["Error: Current block in checksum stream is null! "]]] return[literal[false]] else begin[{] None end[}] local_variable[type[DatanodeInfo], sumsNode] assign[member[.lblocks], ClassCreator(arguments=[MemberReference(member=sumsBlock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sumsNode, 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=LocatedBlock, sub_type=None))] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[literal["Found checksum error in checksum stream at block="], +, member[.sumsBlock]], +, literal[" on datanode="]], +, member[.sumsNode]]]] call[dfs.reportChecksumFailure, parameter[call[f.toString, parameter[]], member[.lblocks]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[reportChecksumFailure] operator[SEP] identifier[Path] identifier[f] , identifier[FSDataInputStream] identifier[in] , Keyword[long] identifier[inPos] , identifier[FSDataInputStream] identifier[sums] , Keyword[long] identifier[sumsPos] operator[SEP] { identifier[LocatedBlock] identifier[lblocks] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[LocatedBlock] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[DFSClient] operator[SEP] identifier[DFSDataInputStream] identifier[dfsIn] operator[=] operator[SEP] identifier[DFSClient] operator[SEP] identifier[DFSDataInputStream] operator[SEP] identifier[in] operator[SEP] identifier[Block] identifier[dataBlock] operator[=] identifier[dfsIn] operator[SEP] identifier[getCurrentBlock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataBlock] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[DatanodeInfo] operator[SEP] operator[SEP] identifier[dataNode] operator[=] { identifier[dfsIn] operator[SEP] identifier[getCurrentDatanode] operator[SEP] operator[SEP] } operator[SEP] identifier[lblocks] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[LocatedBlock] operator[SEP] identifier[dataBlock] , identifier[dataNode] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[dataBlock] operator[+] literal[String] operator[+] identifier[dataNode] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DFSClient] operator[SEP] identifier[DFSDataInputStream] identifier[dfsSums] operator[=] operator[SEP] identifier[DFSClient] operator[SEP] identifier[DFSDataInputStream] operator[SEP] identifier[sums] operator[SEP] identifier[Block] identifier[sumsBlock] operator[=] identifier[dfsSums] operator[SEP] identifier[getCurrentBlock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sumsBlock] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[DatanodeInfo] operator[SEP] operator[SEP] identifier[sumsNode] operator[=] { identifier[dfsSums] operator[SEP] identifier[getCurrentDatanode] operator[SEP] operator[SEP] } operator[SEP] identifier[lblocks] operator[SEP] Other[1] operator[SEP] operator[=] Keyword[new] identifier[LocatedBlock] operator[SEP] identifier[sumsBlock] , identifier[sumsNode] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[sumsBlock] operator[+] literal[String] operator[+] identifier[sumsNode] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dfs] operator[SEP] identifier[reportChecksumFailure] operator[SEP] identifier[f] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[lblocks] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private static int writeUncompressedLength(byte[] compressed, int compressedOffset, int uncompressedLength) { int highBitMask = 0x80; if (uncompressedLength < (1 << 7) && uncompressedLength >= 0) { compressed[compressedOffset++] = (byte) (uncompressedLength); } else if (uncompressedLength < (1 << 14) && uncompressedLength > 0) { compressed[compressedOffset++] = (byte) (uncompressedLength | highBitMask); compressed[compressedOffset++] = (byte) (uncompressedLength >>> 7); } else if (uncompressedLength < (1 << 21) && uncompressedLength > 0) { compressed[compressedOffset++] = (byte) (uncompressedLength | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 7) | highBitMask); compressed[compressedOffset++] = (byte) (uncompressedLength >>> 14); } else if (uncompressedLength < (1 << 28) && uncompressedLength > 0) { compressed[compressedOffset++] = (byte) (uncompressedLength | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 7) | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 14) | highBitMask); compressed[compressedOffset++] = (byte) (uncompressedLength >>> 21); } else { compressed[compressedOffset++] = (byte) (uncompressedLength | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 7) | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 14) | highBitMask); compressed[compressedOffset++] = (byte) ((uncompressedLength >>> 21) | highBitMask); compressed[compressedOffset++] = (byte) (uncompressedLength >>> 28); } return compressedOffset; }
class class_name[name] begin[{] method[writeUncompressedLength, return_type[type[int]], modifier[private static], parameter[compressed, compressedOffset, uncompressedLength]] begin[{] local_variable[type[int], highBitMask] if[binary_operation[binary_operation[member[.uncompressedLength], <, binary_operation[literal[1], <<, literal[7]]], &&, binary_operation[member[.uncompressedLength], >=, literal[0]]]] begin[{] assign[member[.compressed], Cast(expression=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] else begin[{] if[binary_operation[binary_operation[member[.uncompressedLength], <, binary_operation[literal[1], <<, literal[14]]], &&, binary_operation[member[.uncompressedLength], >, literal[0]]]] begin[{] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>>>), type=BasicType(dimensions=[], name=byte))] else begin[{] if[binary_operation[binary_operation[member[.uncompressedLength], <, binary_operation[literal[1], <<, literal[21]]], &&, binary_operation[member[.uncompressedLength], >, literal[0]]]] begin[{] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), operator=>>>), type=BasicType(dimensions=[], name=byte))] else begin[{] if[binary_operation[binary_operation[member[.uncompressedLength], <, binary_operation[literal[1], <<, literal[28]]], &&, binary_operation[member[.uncompressedLength], >, literal[0]]]] begin[{] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21), operator=>>>), type=BasicType(dimensions=[], name=byte))] else begin[{] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21), operator=>>>), operandr=MemberReference(member=highBitMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.compressed], Cast(expression=BinaryOperation(operandl=MemberReference(member=uncompressedLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=>>>), type=BasicType(dimensions=[], name=byte))] end[}] end[}] end[}] end[}] return[member[.compressedOffset]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[writeUncompressedLength] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[compressed] , Keyword[int] identifier[compressedOffset] , Keyword[int] identifier[uncompressedLength] operator[SEP] { Keyword[int] identifier[highBitMask] operator[=] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifier[uncompressedLength] operator[<] operator[SEP] Other[1] operator[<<] Other[7] operator[SEP] operator[&&] identifier[uncompressedLength] operator[>=] Other[0] operator[SEP] { identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[uncompressedLength] operator[<] operator[SEP] Other[1] operator[<<] Other[14] operator[SEP] operator[&&] identifier[uncompressedLength] operator[>] Other[0] operator[SEP] { identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[7] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[uncompressedLength] operator[<] operator[SEP] Other[1] operator[<<] Other[21] operator[SEP] operator[&&] identifier[uncompressedLength] operator[>] Other[0] operator[SEP] { identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[7] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[14] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[uncompressedLength] operator[<] operator[SEP] Other[1] operator[<<] Other[28] operator[SEP] operator[&&] identifier[uncompressedLength] operator[>] Other[0] operator[SEP] { identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[7] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[14] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[21] operator[SEP] operator[SEP] } Keyword[else] { identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[7] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[14] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[21] operator[SEP] operator[|] identifier[highBitMask] operator[SEP] operator[SEP] identifier[compressed] operator[SEP] identifier[compressedOffset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[uncompressedLength] operator[>] operator[>] operator[>] Other[28] operator[SEP] operator[SEP] } Keyword[return] identifier[compressedOffset] operator[SEP] }
@Deprecated public static <T> Collection<T> concat(Collection<? extends T> left, Collection<? extends T> right) { return new ConcattedCollectionView<T>(left, right); }
class class_name[name] begin[{] method[concat, return_type[type[Collection]], modifier[public static], parameter[left, right]] begin[{] return[ClassCreator(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ConcattedCollectionView, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Collection] operator[<] identifier[T] operator[>] identifier[concat] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[left] , identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[right] operator[SEP] { Keyword[return] Keyword[new] identifier[ConcattedCollectionView] operator[<] identifier[T] operator[>] operator[SEP] identifier[left] , identifier[right] operator[SEP] operator[SEP] }
private static String toJson(Object x) { try { if (x == null || x instanceof String || x instanceof Number || x instanceof Character || x.getClass().isArray() || x instanceof Iterable<?>) { return new JSONObject().put("JSON", x).toString(2); } else if (x instanceof Map<?, ?>) { return (new JSONObject((Map<?, ?>) x)).toString(2); } else if (x instanceof JSONObject) { return ((JSONObject) x).toString(2); } else { return (new JSONObject(x)).toString(2); } } catch (Exception e) { throw new RuntimeException("x=" + x, e); } }
class class_name[name] begin[{] method[toJson, return_type[type[String]], modifier[private static], parameter[x]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None), operator=instanceof), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Character, sub_type=None), operator=instanceof), operator=||), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[MethodInvocation(arguments=[], member=isArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Iterable, sub_type=None), operator=instanceof), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Map, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Cast(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[Cast(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Map, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JSON"), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="x="), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[toJson] operator[SEP] identifier[Object] identifier[x] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[x] operator[==] Other[null] operator[||] identifier[x] Keyword[instanceof] identifier[String] operator[||] identifier[x] Keyword[instanceof] identifier[Number] operator[||] identifier[x] Keyword[instanceof] identifier[Character] operator[||] identifier[x] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[||] identifier[x] Keyword[instanceof] identifier[Iterable] operator[<] operator[?] operator[>] operator[SEP] { Keyword[return] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[x] operator[SEP] operator[SEP] identifier[toString] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[x] Keyword[instanceof] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[SEP] { Keyword[return] operator[SEP] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[x] Keyword[instanceof] identifier[JSONObject] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[JSONObject] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[toString] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] Keyword[new] identifier[JSONObject] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] Other[2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[x] , identifier[e] operator[SEP] operator[SEP] } }
public List<Object> parseArray() throws IOException { Type t = lexer.readNextToken(); if (t != Type.START_ARRAY) { throw new IOException("Unexpected token: " + t); } return parseArrayInternal(); }
class class_name[name] begin[{] method[parseArray, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[Type], t] if[binary_operation[member[.t], !=, member[Type.START_ARRAY]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected token: "), operandr=MemberReference(member=t, 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[}] return[call[.parseArrayInternal, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Object] operator[>] identifier[parseArray] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Type] identifier[t] operator[=] identifier[lexer] operator[SEP] identifier[readNextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[!=] identifier[Type] operator[SEP] identifier[START_ARRAY] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[t] operator[SEP] operator[SEP] } Keyword[return] identifier[parseArrayInternal] operator[SEP] operator[SEP] operator[SEP] }
protected LightweightTypeReference getFirstArgumentType() { if (!isExtension()) return null; LightweightTypeReference result = getImplicitFirstArgumentType(); if (result != null) return result; return getSyntacticReceiverType(); }
class class_name[name] begin[{] method[getFirstArgumentType, return_type[type[LightweightTypeReference]], modifier[protected], parameter[]] begin[{] if[call[.isExtension, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[LightweightTypeReference], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] return[member[.result]] else begin[{] None end[}] return[call[.getSyntacticReceiverType, parameter[]]] end[}] END[}]
Keyword[protected] identifier[LightweightTypeReference] identifier[getFirstArgumentType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isExtension] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[LightweightTypeReference] identifier[result] operator[=] identifier[getImplicitFirstArgumentType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[result] operator[SEP] Keyword[return] identifier[getSyntacticReceiverType] operator[SEP] operator[SEP] operator[SEP] }
public void setHSV(int hue, int sat, int val) throws Exception { if ((hue < 0) || (hue > 360)) { throw new Exception(); } if ((sat < 0) || (sat > 100)) { throw new Exception(); } if ((val < 0) || (val > 100)) { throw new Exception(); } m_hue = hue; m_sat = (float)sat / 100; m_bri = (float)val / 100; HSVtoRGB(m_hue, m_sat, m_bri); setHex(); }
class class_name[name] begin[{] method[setHSV, return_type[void], modifier[public], parameter[hue, sat, val]] begin[{] if[binary_operation[binary_operation[member[.hue], <, literal[0]], ||, binary_operation[member[.hue], >, literal[360]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.sat], <, literal[0]], ||, binary_operation[member[.sat], >, literal[100]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.val], <, literal[0]], ||, binary_operation[member[.val], >, literal[100]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.m_hue], member[.hue]] assign[member[.m_sat], binary_operation[Cast(expression=MemberReference(member=sat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=float)), /, literal[100]]] assign[member[.m_bri], binary_operation[Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=float)), /, literal[100]]] call[.HSVtoRGB, parameter[member[.m_hue], member[.m_sat], member[.m_bri]]] call[.setHex, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setHSV] operator[SEP] Keyword[int] identifier[hue] , Keyword[int] identifier[sat] , Keyword[int] identifier[val] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] operator[SEP] identifier[hue] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[hue] operator[>] Other[360] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[sat] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[sat] operator[>] Other[100] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[val] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[val] operator[>] Other[100] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] } identifier[m_hue] operator[=] identifier[hue] operator[SEP] identifier[m_sat] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[sat] operator[/] Other[100] operator[SEP] identifier[m_bri] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[val] operator[/] Other[100] operator[SEP] identifier[HSVtoRGB] operator[SEP] identifier[m_hue] , identifier[m_sat] , identifier[m_bri] operator[SEP] operator[SEP] identifier[setHex] operator[SEP] operator[SEP] operator[SEP] }
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception { return getAccumulators(jobID, ClassLoader.getSystemClassLoader()); }
class class_name[name] begin[{] method[getAccumulators, return_type[type[Map]], modifier[public], parameter[jobID]] begin[{] return[call[.getAccumulators, parameter[member[.jobID], call[ClassLoader.getSystemClassLoader, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] identifier[getAccumulators] operator[SEP] identifier[JobID] identifier[jobID] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[getAccumulators] operator[SEP] identifier[jobID] , identifier[ClassLoader] operator[SEP] identifier[getSystemClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Pure public int getPointIndex(int groupIndex, int position) { final int groupMemberCount = getPointCountInGroup(groupIndex); final int pos; if (position < 0) { pos = 0; } else if (position >= groupMemberCount) { pos = groupMemberCount - 1; } else { pos = position; } // Move the start/end indexes to corresponds to the bounds of the new points return (firstInGroup(groupIndex) + pos * 2) / 2; }
class class_name[name] begin[{] method[getPointIndex, return_type[type[int]], modifier[public], parameter[groupIndex, position]] begin[{] local_variable[type[int], groupMemberCount] local_variable[type[int], pos] if[binary_operation[member[.position], <, literal[0]]] begin[{] assign[member[.pos], literal[0]] else begin[{] if[binary_operation[member[.position], >=, member[.groupMemberCount]]] begin[{] assign[member[.pos], binary_operation[member[.groupMemberCount], -, literal[1]]] else begin[{] assign[member[.pos], member[.position]] end[}] end[}] return[binary_operation[binary_operation[call[.firstInGroup, parameter[member[.groupIndex]]], +, binary_operation[member[.pos], *, literal[2]]], /, literal[2]]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[int] identifier[getPointIndex] operator[SEP] Keyword[int] identifier[groupIndex] , Keyword[int] identifier[position] operator[SEP] { Keyword[final] Keyword[int] identifier[groupMemberCount] operator[=] identifier[getPointCountInGroup] operator[SEP] identifier[groupIndex] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[pos] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[<] Other[0] operator[SEP] { identifier[pos] operator[=] Other[0] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[position] operator[>=] identifier[groupMemberCount] operator[SEP] { identifier[pos] operator[=] identifier[groupMemberCount] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[pos] operator[=] identifier[position] operator[SEP] } Keyword[return] operator[SEP] identifier[firstInGroup] operator[SEP] identifier[groupIndex] operator[SEP] operator[+] identifier[pos] operator[*] Other[2] operator[SEP] operator[/] Other[2] operator[SEP] }
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) throws InvalidWorkerStateException { long oldSize = tempBlockMeta.getBlockSize(); if (newSize > oldSize) { reserveSpace(newSize - oldSize, false); tempBlockMeta.setBlockSize(newSize); } else if (newSize < oldSize) { throw new InvalidWorkerStateException("Shrinking block, not supported!"); } }
class class_name[name] begin[{] method[resizeTempBlockMeta, return_type[void], modifier[public], parameter[tempBlockMeta, newSize]] begin[{] local_variable[type[long], oldSize] if[binary_operation[member[.newSize], >, member[.oldSize]]] begin[{] call[.reserveSpace, parameter[binary_operation[member[.newSize], -, member[.oldSize]], literal[false]]] call[tempBlockMeta.setBlockSize, parameter[member[.newSize]]] else begin[{] if[binary_operation[member[.newSize], <, member[.oldSize]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Shrinking block, not supported!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidWorkerStateException, sub_type=None)), label=None) else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[resizeTempBlockMeta] operator[SEP] identifier[TempBlockMeta] identifier[tempBlockMeta] , Keyword[long] identifier[newSize] operator[SEP] Keyword[throws] identifier[InvalidWorkerStateException] { Keyword[long] identifier[oldSize] operator[=] identifier[tempBlockMeta] operator[SEP] identifier[getBlockSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newSize] operator[>] identifier[oldSize] operator[SEP] { identifier[reserveSpace] operator[SEP] identifier[newSize] operator[-] identifier[oldSize] , literal[boolean] operator[SEP] operator[SEP] identifier[tempBlockMeta] operator[SEP] identifier[setBlockSize] operator[SEP] identifier[newSize] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[newSize] operator[<] identifier[oldSize] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidWorkerStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public char getChar(String key) { try { String str = this.getStringImpl(key); if (str.length() > 0) { return str.charAt(0); } } catch (Exception e) { // Not defined } return '\u0000'; }
class class_name[name] begin[{] method[getChar, return_type[type[char]], modifier[public], parameter[key]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStringImpl, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal['']] end[}] END[}]
Keyword[public] Keyword[char] identifier[getChar] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[try] { identifier[String] identifier[str] operator[=] Keyword[this] operator[SEP] identifier[getStringImpl] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] identifier[str] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[return] literal[String] operator[SEP] }
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq) { unionAll = true; return innerUnion(sq); }
class class_name[name] begin[{] method[unionAll, return_type[type[Union]], modifier[public], parameter[sq]] begin[{] assign[member[.unionAll], literal[true]] return[call[.innerUnion, parameter[member[.sq]]]] end[}] END[}]
Keyword[public] operator[<] identifier[RT] operator[>] identifier[Union] operator[<] identifier[RT] operator[>] identifier[unionAll] operator[SEP] identifier[SubQueryExpression] operator[<] identifier[RT] operator[>] operator[...] identifier[sq] operator[SEP] { identifier[unionAll] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[innerUnion] operator[SEP] identifier[sq] operator[SEP] operator[SEP] }
@TargetApi(18) public void notifyScannedDevice(BluetoothDevice device, BluetoothAdapter.LeScanCallback scanner) { int oldSize, newSize; oldSize = distinctBluetoothAddresses.size(); synchronized(distinctBluetoothAddresses) { distinctBluetoothAddresses.add(device.getAddress()); } newSize = distinctBluetoothAddresses.size(); if (oldSize != newSize && newSize % 100 == 0) { LogManager.d(TAG, "Distinct Bluetooth devices seen: %s", distinctBluetoothAddresses.size()); } if (distinctBluetoothAddresses.size() > getCrashRiskDeviceCount()) { if (PREEMPTIVE_ACTION_ENABLED && !recoveryInProgress) { LogManager.w(TAG, "Large number of Bluetooth devices detected: %s Proactively " + "attempting to clear out address list to prevent a crash", distinctBluetoothAddresses.size()); LogManager.w(TAG, "Stopping LE Scan"); BluetoothAdapter.getDefaultAdapter().stopLeScan(scanner); startRecovery(); processStateChange(); } } }
class class_name[name] begin[{] method[notifyScannedDevice, return_type[void], modifier[public], parameter[device, scanner]] begin[{] local_variable[type[int], oldSize] assign[member[.oldSize], call[distinctBluetoothAddresses.size, parameter[]]] SYNCHRONIZED[member[.distinctBluetoothAddresses]] BEGIN[{] call[distinctBluetoothAddresses.add, parameter[call[device.getAddress, parameter[]]]] END[}] assign[member[.newSize], call[distinctBluetoothAddresses.size, parameter[]]] if[binary_operation[binary_operation[member[.oldSize], !=, member[.newSize]], &&, binary_operation[binary_operation[member[.newSize], %, literal[100]], ==, literal[0]]]] begin[{] call[LogManager.d, parameter[member[.TAG], literal["Distinct Bluetooth devices seen: %s"], call[distinctBluetoothAddresses.size, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[distinctBluetoothAddresses.size, parameter[]], >, call[.getCrashRiskDeviceCount, parameter[]]]] begin[{] if[binary_operation[member[.PREEMPTIVE_ACTION_ENABLED], &&, member[.recoveryInProgress]]] begin[{] call[LogManager.w, parameter[member[.TAG], binary_operation[literal["Large number of Bluetooth devices detected: %s Proactively "], +, literal["attempting to clear out address list to prevent a crash"]], call[distinctBluetoothAddresses.size, parameter[]]]] call[LogManager.w, parameter[member[.TAG], literal["Stopping LE Scan"]]] call[BluetoothAdapter.getDefaultAdapter, parameter[]] call[.startRecovery, parameter[]] call[.processStateChange, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] Other[18] operator[SEP] Keyword[public] Keyword[void] identifier[notifyScannedDevice] operator[SEP] identifier[BluetoothDevice] identifier[device] , identifier[BluetoothAdapter] operator[SEP] identifier[LeScanCallback] identifier[scanner] operator[SEP] { Keyword[int] identifier[oldSize] , identifier[newSize] operator[SEP] identifier[oldSize] operator[=] identifier[distinctBluetoothAddresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[distinctBluetoothAddresses] operator[SEP] { identifier[distinctBluetoothAddresses] operator[SEP] identifier[add] operator[SEP] identifier[device] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[newSize] operator[=] identifier[distinctBluetoothAddresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldSize] operator[!=] identifier[newSize] operator[&&] identifier[newSize] operator[%] Other[100] operator[==] Other[0] operator[SEP] { identifier[LogManager] operator[SEP] identifier[d] operator[SEP] identifier[TAG] , literal[String] , identifier[distinctBluetoothAddresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[distinctBluetoothAddresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[getCrashRiskDeviceCount] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[PREEMPTIVE_ACTION_ENABLED] operator[&&] operator[!] identifier[recoveryInProgress] operator[SEP] { identifier[LogManager] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[+] literal[String] , identifier[distinctBluetoothAddresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LogManager] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] identifier[BluetoothAdapter] operator[SEP] identifier[getDefaultAdapter] operator[SEP] operator[SEP] operator[SEP] identifier[stopLeScan] operator[SEP] identifier[scanner] operator[SEP] operator[SEP] identifier[startRecovery] operator[SEP] operator[SEP] operator[SEP] identifier[processStateChange] operator[SEP] operator[SEP] operator[SEP] } } }
public static void delete(FileSystem fs, String name) throws IOException { Path dir = new Path(name); Path data = new Path(dir, DATA_FILE_NAME); Path index = new Path(dir, INDEX_FILE_NAME); fs.delete(data, true); fs.delete(index, true); fs.delete(dir, true); }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public static], parameter[fs, name]] begin[{] local_variable[type[Path], dir] local_variable[type[Path], data] local_variable[type[Path], index] call[fs.delete, parameter[member[.data], literal[true]]] call[fs.delete, parameter[member[.index], literal[true]]] call[fs.delete, parameter[member[.dir], literal[true]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[delete] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Path] identifier[dir] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[Path] identifier[data] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[dir] , identifier[DATA_FILE_NAME] operator[SEP] operator[SEP] identifier[Path] identifier[index] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[dir] , identifier[INDEX_FILE_NAME] operator[SEP] operator[SEP] identifier[fs] operator[SEP] identifier[delete] operator[SEP] identifier[data] , literal[boolean] operator[SEP] operator[SEP] identifier[fs] operator[SEP] identifier[delete] operator[SEP] identifier[index] , literal[boolean] operator[SEP] operator[SEP] identifier[fs] operator[SEP] identifier[delete] operator[SEP] identifier[dir] , literal[boolean] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = GetContentStream.class) public JAXBElement<CmisExtensionType> createGetContentStreamExtension( CmisExtensionType value) { return new JAXBElement<CmisExtensionType>( _GetPropertiesExtension_QNAME, CmisExtensionType.class, GetContentStream.class, value); }
class class_name[name] begin[{] method[createGetContentStreamExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisExtensionType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetContentStream, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmisExtensionType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetContentStream] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] identifier[createGetContentStreamExtension] operator[SEP] identifier[CmisExtensionType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] operator[SEP] identifier[_GetPropertiesExtension_QNAME] , identifier[CmisExtensionType] operator[SEP] Keyword[class] , identifier[GetContentStream] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public OvhHostProfile location_pccZone_hostProfile_id_GET(String pccZone, Long id) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/hostProfile/{id}"; StringBuilder sb = path(qPath, pccZone, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhHostProfile.class); }
class class_name[name] begin[{] method[location_pccZone_hostProfile_id_GET, return_type[type[OvhHostProfile]], modifier[public], parameter[pccZone, id]] 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=OvhHostProfile, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhHostProfile] identifier[location_pccZone_hostProfile_id_GET] operator[SEP] identifier[String] identifier[pccZone] , identifier[Long] identifier[id] 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[pccZone] , identifier[id] 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[OvhHostProfile] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private static <T extends Comparable<T>> List<T> lcs(List<T> arg0, List<T> arg1, int i, int j) { if (arg0.size() == i || arg1.size() == j) { return new ArrayList<>(Math.min(arg0.size(), arg1.size())); } if (arg0.get(i) != null && arg1.get(j) != null && arg0.get(i).compareTo(arg1.get(j)) == 0) { T t = arg0.get(i); List<T> list = lcs(arg0, arg1, i + 1, j + 1); list.add(t); return list; } else { List<T> l1 = lcs(arg0, arg1, i + 1, j); List<T> l2 = lcs(arg0, arg1, i, j + 1); return l1.size() > l2.size() ? l1 : l2; } }
class class_name[name] begin[{] method[lcs, return_type[type[List]], modifier[private static], parameter[arg0, arg1, i, j]] begin[{] if[binary_operation[binary_operation[call[arg0.size, parameter[]], ==, member[.i]], ||, binary_operation[call[arg1.size, parameter[]], ==, member[.j]]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=arg0, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=arg1, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[arg0.get, parameter[member[.i]]], !=, literal[null]], &&, binary_operation[call[arg1.get, parameter[member[.j]]], !=, literal[null]]], &&, binary_operation[call[arg0.get, parameter[member[.i]]], ==, literal[0]]]] begin[{] local_variable[type[T], t] local_variable[type[List], list] call[list.add, parameter[member[.t]]] return[member[.list]] else begin[{] local_variable[type[List], l1] local_variable[type[List], l2] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=l1, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=l2, selectors=[], type_arguments=None), operator=>), if_false=MemberReference(member=l2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=l1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[lcs] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[arg0] , identifier[List] operator[<] identifier[T] operator[>] identifier[arg1] , Keyword[int] identifier[i] , Keyword[int] identifier[j] operator[SEP] { Keyword[if] operator[SEP] identifier[arg0] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[i] operator[||] identifier[arg1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[j] operator[SEP] { Keyword[return] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[arg0] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[arg1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[arg0] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[&&] identifier[arg1] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[!=] Other[null] operator[&&] identifier[arg0] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[arg1] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[T] identifier[t] operator[=] identifier[arg0] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[=] identifier[lcs] operator[SEP] identifier[arg0] , identifier[arg1] , identifier[i] operator[+] Other[1] , identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] } Keyword[else] { identifier[List] operator[<] identifier[T] operator[>] identifier[l1] operator[=] identifier[lcs] operator[SEP] identifier[arg0] , identifier[arg1] , identifier[i] operator[+] Other[1] , identifier[j] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[l2] operator[=] identifier[lcs] operator[SEP] identifier[arg0] , identifier[arg1] , identifier[i] , identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[l1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[l2] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[?] identifier[l1] operator[:] identifier[l2] operator[SEP] } }
public String rate(RateCondition condition) { String description; if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION) != null) { description = condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION); } else { description = condition.getDataId(); } switch (condition.getDirection()) { case DECREASING: description += " decreasing "; break; case INCREASING: description += " increasing "; break; case NA: break; default: throw new IllegalArgumentException(condition.getDirection().name()); } switch (condition.getOperator()) { case GT: description += " greater than "; break; case GTE: description += " greater or equal than "; break; case LT: description += " less than "; break; case LTE: description += " less or equal than "; break; default: throw new IllegalArgumentException(condition.getOperator().name()); } description += decimalFormat.format(condition.getThreshold()); if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_UNIT) != null) { description += " " + condition.getContext().get(CONTEXT_PROPERTY_UNIT); } switch (condition.getPeriod()) { case DAY: description = " per day "; break; case HOUR: description = " per hour "; break; case MINUTE: description = " per minute "; break; case SECOND: description = " per second "; break; case WEEK: description = " per week "; break; default: throw new IllegalArgumentException(condition.getOperator().name()); } return description; }
class class_name[name] begin[{] method[rate, return_type[type[String]], modifier[public], parameter[condition]] begin[{] local_variable[type[String], description] if[binary_operation[binary_operation[call[condition.getContext, parameter[]], !=, literal[null]], &&, binary_operation[call[condition.getContext, parameter[]], !=, literal[null]]]] begin[{] assign[member[.description], call[condition.getContext, parameter[]]] else begin[{] assign[member[.description], call[condition.getDataId, parameter[]]] end[}] SwitchStatement(cases=[SwitchStatementCase(case=['DECREASING'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" decreasing ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['INCREASING'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" increasing ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NA'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDirection, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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)])], expression=MethodInvocation(arguments=[], member=getDirection, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[], type_arguments=None), label=None) SwitchStatement(cases=[SwitchStatementCase(case=['GT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" greater than ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['GTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" greater or equal than ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" less than ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" less or equal than ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOperator, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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)])], expression=MethodInvocation(arguments=[], member=getOperator, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[], type_arguments=None), label=None) assign[member[.description], call[decimalFormat.format, parameter[call[condition.getThreshold, parameter[]]]]] if[binary_operation[binary_operation[call[condition.getContext, parameter[]], !=, literal[null]], &&, binary_operation[call[condition.getContext, parameter[]], !=, literal[null]]]] begin[{] assign[member[.description], binary_operation[literal[" "], +, call[condition.getContext, parameter[]]]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['DAY'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" per day ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['HOUR'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" per hour ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MINUTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" per minute ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SECOND'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" per second ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['WEEK'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" per week ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOperator, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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)])], expression=MethodInvocation(arguments=[], member=getPeriod, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[], type_arguments=None), label=None) return[member[.description]] end[}] END[}]
Keyword[public] identifier[String] identifier[rate] operator[SEP] identifier[RateCondition] identifier[condition] operator[SEP] { identifier[String] identifier[description] operator[SEP] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CONTEXT_PROPERTY_DESCRIPTION] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[description] operator[=] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CONTEXT_PROPERTY_DESCRIPTION] operator[SEP] operator[SEP] } Keyword[else] { identifier[description] operator[=] identifier[condition] operator[SEP] identifier[getDataId] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[condition] operator[SEP] identifier[getDirection] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[DECREASING] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[INCREASING] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NA] operator[:] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[condition] operator[SEP] identifier[getDirection] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[condition] operator[SEP] identifier[getOperator] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[GT] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[GTE] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[LT] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[LTE] operator[:] identifier[description] operator[+=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[condition] operator[SEP] identifier[getOperator] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[description] operator[+=] identifier[decimalFormat] operator[SEP] identifier[format] operator[SEP] identifier[condition] operator[SEP] identifier[getThreshold] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CONTEXT_PROPERTY_UNIT] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[description] operator[+=] literal[String] operator[+] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CONTEXT_PROPERTY_UNIT] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[condition] operator[SEP] identifier[getPeriod] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[DAY] operator[:] identifier[description] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[HOUR] operator[:] identifier[description] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MINUTE] operator[:] identifier[description] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SECOND] operator[:] identifier[description] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[WEEK] operator[:] identifier[description] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[condition] operator[SEP] identifier[getOperator] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[description] operator[SEP] }
protected DateFormat getDateTimeFormat( final Locale browserLocale ) { return SimpleDateFormat.getDateTimeInstance( SimpleDateFormat.SHORT, SimpleDateFormat.MEDIUM, browserLocale ); }
class class_name[name] begin[{] method[getDateTimeFormat, return_type[type[DateFormat]], modifier[protected], parameter[browserLocale]] begin[{] return[call[SimpleDateFormat.getDateTimeInstance, parameter[member[SimpleDateFormat.SHORT], member[SimpleDateFormat.MEDIUM], member[.browserLocale]]]] end[}] END[}]
Keyword[protected] identifier[DateFormat] identifier[getDateTimeFormat] operator[SEP] Keyword[final] identifier[Locale] identifier[browserLocale] operator[SEP] { Keyword[return] identifier[SimpleDateFormat] operator[SEP] identifier[getDateTimeInstance] operator[SEP] identifier[SimpleDateFormat] operator[SEP] identifier[SHORT] , identifier[SimpleDateFormat] operator[SEP] identifier[MEDIUM] , identifier[browserLocale] operator[SEP] operator[SEP] }
public void validate(String currentTestAction, Object contentToValidate) throws Exception { if (!isExpectationForAction(currentTestAction)) { return; } Log.info(thisClass, "validate", "Checking " + this); validate(contentToValidate); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[public], parameter[currentTestAction, contentToValidate]] begin[{] if[call[.isExpectationForAction, parameter[member[.currentTestAction]]]] begin[{] return[None] else begin[{] None end[}] call[Log.info, parameter[member[.thisClass], literal["validate"], binary_operation[literal["Checking "], +, THIS[]]]] call[.validate, parameter[member[.contentToValidate]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[currentTestAction] , identifier[Object] identifier[contentToValidate] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] operator[!] identifier[isExpectationForAction] operator[SEP] identifier[currentTestAction] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[Log] operator[SEP] identifier[info] operator[SEP] identifier[thisClass] , literal[String] , literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] identifier[validate] operator[SEP] identifier[contentToValidate] operator[SEP] operator[SEP] }
@Override public final void close(CloseReason status) throws IOException { checkNativeSessionInitialized(); if (logger.isDebugEnabled()) { logger.debug("Closing " + this); } closeInternal(status); }
class class_name[name] begin[{] method[close, return_type[void], modifier[final public], parameter[status]] begin[{] call[.checkNativeSessionInitialized, parameter[]] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[literal["Closing "], +, THIS[]]]] else begin[{] None end[}] call[.closeInternal, parameter[member[.status]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[close] operator[SEP] identifier[CloseReason] identifier[status] operator[SEP] Keyword[throws] identifier[IOException] { identifier[checkNativeSessionInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] } identifier[closeInternal] operator[SEP] identifier[status] operator[SEP] operator[SEP] }
private Object manageListIfNecessary(List<Object> value) { boolean containsRuntimeRefs = false; for (ListIterator<Object> i = value.listIterator(); i.hasNext();) { Object e = i.next(); if(e instanceof RuntimeBeanReference) { containsRuntimeRefs = true; } if (e instanceof BeanConfiguration) { BeanConfiguration c = (BeanConfiguration) e; i.set(c.getBeanDefinition()); containsRuntimeRefs = true; } } if(containsRuntimeRefs) { List tmp = new ManagedList(); tmp.addAll(value); value = tmp; } return value; }
class class_name[name] begin[{] method[manageListIfNecessary, return_type[type[Object]], modifier[private], parameter[value]] begin[{] local_variable[type[boolean], containsRuntimeRefs] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=RuntimeBeanReference, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=containsRuntimeRefs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BeanConfiguration, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BeanConfiguration, sub_type=None)), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BeanConfiguration, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBeanDefinition, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=containsRuntimeRefs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=listIterator, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=ListIterator, sub_type=None)), update=None), label=None) if[member[.containsRuntimeRefs]] begin[{] local_variable[type[List], tmp] call[tmp.addAll, parameter[member[.value]]] assign[member[.value], member[.tmp]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[private] identifier[Object] identifier[manageListIfNecessary] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[value] operator[SEP] { Keyword[boolean] identifier[containsRuntimeRefs] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[ListIterator] operator[<] identifier[Object] operator[>] identifier[i] operator[=] identifier[value] operator[SEP] identifier[listIterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[e] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[RuntimeBeanReference] operator[SEP] { identifier[containsRuntimeRefs] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[BeanConfiguration] operator[SEP] { identifier[BeanConfiguration] identifier[c] operator[=] operator[SEP] identifier[BeanConfiguration] operator[SEP] identifier[e] operator[SEP] identifier[i] operator[SEP] identifier[set] operator[SEP] identifier[c] operator[SEP] identifier[getBeanDefinition] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[containsRuntimeRefs] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[containsRuntimeRefs] operator[SEP] { identifier[List] identifier[tmp] operator[=] Keyword[new] identifier[ManagedList] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[addAll] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[tmp] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public static CommerceAddress remove(long commerceAddressId) throws com.liferay.commerce.exception.NoSuchAddressException { return getPersistence().remove(commerceAddressId); }
class class_name[name] begin[{] method[remove, return_type[type[CommerceAddress]], modifier[public static], parameter[commerceAddressId]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceAddress] identifier[remove] operator[SEP] Keyword[long] identifier[commerceAddressId] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchAddressException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[commerceAddressId] operator[SEP] operator[SEP] }
public Router options(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) { addRegEx("OPTIONS", regex, handlers, optionsBindings); return this; }
class class_name[name] begin[{] method[options, return_type[type[Router]], modifier[public], parameter[regex, handlers]] begin[{] call[.addRegEx, parameter[literal["OPTIONS"], member[.regex], member[.handlers], member[.optionsBindings]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Router] identifier[options] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Pattern] identifier[regex] , annotation[@] identifier[NotNull] Keyword[final] identifier[IMiddleware] operator[...] identifier[handlers] operator[SEP] { identifier[addRegEx] operator[SEP] literal[String] , identifier[regex] , identifier[handlers] , identifier[optionsBindings] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void visit(final Attribute attribute) { for (final GedObject gob : attribute.getAttributes()) { gob.accept(this); } }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[attribute]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=gob, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=gob)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=GedObject, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Attribute] identifier[attribute] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[GedObject] identifier[gob] operator[:] identifier[attribute] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] { identifier[gob] operator[SEP] identifier[accept] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } }
private List<WComponent> getComponentsForTerm(final String term) { List<WComponent> childList = content.getComponentModel().getChildren(); List<WComponent> result = new ArrayList<>(); if (childList != null) { for (int i = 0; i < childList.size(); i++) { WComponent child = childList.get(i); if (term.equals(child.getTag())) { result.add(child); } } } return result; }
class class_name[name] begin[{] method[getComponentsForTerm, return_type[type[List]], modifier[private], parameter[term]] begin[{] local_variable[type[List], childList] local_variable[type[List], result] if[binary_operation[member[.childList], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=childList, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WComponent, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTag, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=term, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=childList, 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[member[.result]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[WComponent] operator[>] identifier[getComponentsForTerm] operator[SEP] Keyword[final] identifier[String] identifier[term] operator[SEP] { identifier[List] operator[<] identifier[WComponent] operator[>] identifier[childList] operator[=] identifier[content] operator[SEP] identifier[getComponentModel] operator[SEP] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[WComponent] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[childList] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[childList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[WComponent] identifier[child] operator[=] identifier[childList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[term] operator[SEP] identifier[equals] operator[SEP] identifier[child] operator[SEP] identifier[getTag] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } } Keyword[return] identifier[result] operator[SEP] }
public static boolean isRectValue (@Nullable final String sCSSValue) { final String sRealValue = StringHelper.trim (sCSSValue); if (StringHelper.hasText (sRealValue)) { // Current syntax: rect(a,b,c,d) if (RegExHelper.stringMatchesPattern (PATTERN_CURRENT_SYNTAX, sRealValue)) return true; // Backward compatible syntax: rect(a b c d) if (RegExHelper.stringMatchesPattern (PATTERN_OLD_SYNTAX, sRealValue)) return true; } return false; }
class class_name[name] begin[{] method[isRectValue, return_type[type[boolean]], modifier[public static], parameter[sCSSValue]] begin[{] local_variable[type[String], sRealValue] if[call[StringHelper.hasText, parameter[member[.sRealValue]]]] begin[{] if[call[RegExHelper.stringMatchesPattern, parameter[member[.PATTERN_CURRENT_SYNTAX], member[.sRealValue]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[RegExHelper.stringMatchesPattern, parameter[member[.PATTERN_OLD_SYNTAX], member[.sRealValue]]]] begin[{] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isRectValue] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sCSSValue] operator[SEP] { Keyword[final] identifier[String] identifier[sRealValue] operator[=] identifier[StringHelper] operator[SEP] identifier[trim] operator[SEP] identifier[sCSSValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringHelper] operator[SEP] identifier[hasText] operator[SEP] identifier[sRealValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[RegExHelper] operator[SEP] identifier[stringMatchesPattern] operator[SEP] identifier[PATTERN_CURRENT_SYNTAX] , identifier[sRealValue] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[RegExHelper] operator[SEP] identifier[stringMatchesPattern] operator[SEP] identifier[PATTERN_OLD_SYNTAX] , identifier[sRealValue] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public ServiceFuture<DeploymentExtendedInner> createOrUpdateAsync(String resourceGroupName, String deploymentName, DeploymentProperties properties, final ServiceCallback<DeploymentExtendedInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, properties), serviceCallback); }
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, deploymentName, properties, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.deploymentName], member[.properties]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[DeploymentExtendedInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[deploymentName] , identifier[DeploymentProperties] identifier[properties] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[DeploymentExtendedInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[deploymentName] , identifier[properties] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public String match(String text){ if(null == text){ return null; } List<String> matchAll = matchAll(text, 1); if(CollectionUtil.isNotEmpty(matchAll)){ return matchAll.get(0); } return null; }
class class_name[name] begin[{] method[match, return_type[type[String]], modifier[public], parameter[text]] begin[{] if[binary_operation[literal[null], ==, member[.text]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], matchAll] if[call[CollectionUtil.isNotEmpty, parameter[member[.matchAll]]]] begin[{] return[call[matchAll.get, parameter[literal[0]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[String] identifier[match] operator[SEP] identifier[String] identifier[text] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[text] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[matchAll] operator[=] identifier[matchAll] operator[SEP] identifier[text] , Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CollectionUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[matchAll] operator[SEP] operator[SEP] { Keyword[return] identifier[matchAll] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "INDICATOR_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "INDICATOR_ID")) }) public Indicator getIndicator() { return indicator; }
class class_name[name] begin[{] method[getIndicator, return_type[type[Indicator]], modifier[public], parameter[]] begin[{] return[member[.indicator]] end[}] END[}]
annotation[@] identifier[Embedded] annotation[@] identifier[AttributeOverrides] operator[SEP] { annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] literal[String] operator[SEP] operator[SEP] , annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] literal[String] operator[SEP] operator[SEP] } operator[SEP] Keyword[public] identifier[Indicator] identifier[getIndicator] operator[SEP] operator[SEP] { Keyword[return] identifier[indicator] operator[SEP] }
private void enabledSslCipherSuites(SSLSocket sslSocket) throws SQLException { if (options.enabledSslCipherSuites != null) { List<String> possibleCiphers = Arrays.asList(sslSocket.getSupportedCipherSuites()); String[] ciphers = options.enabledSslCipherSuites.split("[,;\\s]+"); for (String cipher : ciphers) { if (!possibleCiphers.contains(cipher)) { throw new SQLException("Unsupported SSL cipher '" + cipher + "'. Supported ciphers : " + possibleCiphers.toString().replace("[", "").replace("]", "")); } } sslSocket.setEnabledCipherSuites(ciphers); } }
class class_name[name] begin[{] method[enabledSslCipherSuites, return_type[void], modifier[private], parameter[sslSocket]] begin[{] if[binary_operation[member[options.enabledSslCipherSuites], !=, literal[null]]] begin[{] local_variable[type[List], possibleCiphers] local_variable[type[String], ciphers] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=cipher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=possibleCiphers, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported SSL cipher '"), operandr=MemberReference(member=cipher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'. Supported ciphers : "), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=possibleCiphers, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="["), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=ciphers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cipher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[sslSocket.setEnabledCipherSuites, parameter[member[.ciphers]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[enabledSslCipherSuites] operator[SEP] identifier[SSLSocket] identifier[sslSocket] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[enabledSslCipherSuites] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[possibleCiphers] operator[=] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[sslSocket] operator[SEP] identifier[getSupportedCipherSuites] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[ciphers] operator[=] identifier[options] operator[SEP] identifier[enabledSslCipherSuites] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[cipher] operator[:] identifier[ciphers] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[possibleCiphers] operator[SEP] identifier[contains] operator[SEP] identifier[cipher] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[SQLException] operator[SEP] literal[String] operator[+] identifier[cipher] operator[+] literal[String] operator[+] identifier[possibleCiphers] operator[SEP] identifier[toString] operator[SEP] 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] operator[SEP] } } identifier[sslSocket] operator[SEP] identifier[setEnabledCipherSuites] operator[SEP] identifier[ciphers] operator[SEP] operator[SEP] } }
public FessMessages addErrorsFailedToStartJob(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_failed_to_start_job, arg0)); return this; }
class class_name[name] begin[{] method[addErrorsFailedToStartJob, return_type[type[FessMessages]], modifier[public], parameter[property, arg0]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[MemberReference(member=ERRORS_failed_to_start_job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arg0, 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=UserMessage, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FessMessages] identifier[addErrorsFailedToStartJob] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[arg0] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[property] , Keyword[new] identifier[UserMessage] operator[SEP] identifier[ERRORS_failed_to_start_job] , identifier[arg0] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void marshall(GetUpgradeStatusRequest getUpgradeStatusRequest, ProtocolMarshaller protocolMarshaller) { if (getUpgradeStatusRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getUpgradeStatusRequest.getDomainName(), DOMAINNAME_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[getUpgradeStatusRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getUpgradeStatusRequest], ==, 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=getDomainName, postfix_operators=[], prefix_operators=[], qualifier=getUpgradeStatusRequest, selectors=[], type_arguments=None), MemberReference(member=DOMAINNAME_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[GetUpgradeStatusRequest] identifier[getUpgradeStatusRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getUpgradeStatusRequest] 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[getUpgradeStatusRequest] operator[SEP] identifier[getDomainName] operator[SEP] operator[SEP] , identifier[DOMAINNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private static void deleteEveryIn(DirectoryStream<Path> caches) { for (Path notActualCache : caches) { LOGGER.debug("Deleting redundant cache dir {}", notActualCache); try { FileUtils.deleteDirectory(notActualCache.toFile()); } catch (IOException e) { LOGGER.error("Can't delete cache dir <{}>", notActualCache, e); } } }
class class_name[name] begin[{] method[deleteEveryIn, return_type[void], modifier[private static], parameter[caches]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Deleting redundant cache dir {}"), MemberReference(member=notActualCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toFile, postfix_operators=[], prefix_operators=[], qualifier=notActualCache, selectors=[], type_arguments=None)], member=deleteDirectory, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't delete cache dir <{}>"), MemberReference(member=notActualCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=caches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=notActualCache)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[deleteEveryIn] operator[SEP] identifier[DirectoryStream] operator[<] identifier[Path] operator[>] identifier[caches] operator[SEP] { Keyword[for] operator[SEP] identifier[Path] identifier[notActualCache] operator[:] identifier[caches] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[notActualCache] operator[SEP] operator[SEP] Keyword[try] { identifier[FileUtils] operator[SEP] identifier[deleteDirectory] operator[SEP] identifier[notActualCache] operator[SEP] identifier[toFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[notActualCache] , identifier[e] operator[SEP] operator[SEP] } } }
@Pure public static int compareAttrs(Attribute arg0, Attribute arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return 1; } if (arg1 == null) { return -1; } final String n0 = arg0.getName(); final String n1 = arg1.getName(); final int cmp = compareAttrNames(n0, n1); if (cmp == 0) { return compareValues(arg0, arg1); } return cmp; }
class class_name[name] begin[{] method[compareAttrs, return_type[type[int]], modifier[public static], parameter[arg0, arg1]] begin[{] if[binary_operation[member[.arg0], ==, member[.arg1]]] begin[{] return[literal[0]] else begin[{] None end[}] if[binary_operation[member[.arg0], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[.arg1], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[String], n0] local_variable[type[String], n1] local_variable[type[int], cmp] if[binary_operation[member[.cmp], ==, literal[0]]] begin[{] return[call[.compareValues, parameter[member[.arg0], member[.arg1]]]] else begin[{] None end[}] return[member[.cmp]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[int] identifier[compareAttrs] operator[SEP] identifier[Attribute] identifier[arg0] , identifier[Attribute] identifier[arg1] operator[SEP] { Keyword[if] operator[SEP] identifier[arg0] operator[==] identifier[arg1] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[arg0] operator[==] Other[null] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[arg1] operator[==] Other[null] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[final] identifier[String] identifier[n0] operator[=] identifier[arg0] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[n1] operator[=] identifier[arg1] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[cmp] operator[=] identifier[compareAttrNames] operator[SEP] identifier[n0] , identifier[n1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmp] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[compareValues] operator[SEP] identifier[arg0] , identifier[arg1] operator[SEP] operator[SEP] } Keyword[return] identifier[cmp] operator[SEP] }
public void populateSMMetadata(final SoftwareModule swModule) { removeAllItems(); if (null == swModule) { return; } selectedSWModuleId = swModule.getId(); final List<SoftwareModuleMetadata> swMetadataList = softwareModuleManagement .findMetaDataBySoftwareModuleId(PageRequest.of(0, MAX_METADATA_QUERY), selectedSWModuleId).getContent(); if (!CollectionUtils.isEmpty(swMetadataList)) { swMetadataList.forEach(this::setMetadataProperties); } }
class class_name[name] begin[{] method[populateSMMetadata, return_type[void], modifier[public], parameter[swModule]] begin[{] call[.removeAllItems, parameter[]] if[binary_operation[literal[null], ==, member[.swModule]]] begin[{] return[None] else begin[{] None end[}] assign[member[.selectedSWModuleId], call[swModule.getId, parameter[]]] local_variable[type[List], swMetadataList] if[call[CollectionUtils.isEmpty, parameter[member[.swMetadataList]]]] begin[{] call[swMetadataList.forEach, parameter[MethodReference(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), method=MemberReference(member=setMetadataProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[populateSMMetadata] operator[SEP] Keyword[final] identifier[SoftwareModule] identifier[swModule] operator[SEP] { identifier[removeAllItems] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[swModule] operator[SEP] { Keyword[return] operator[SEP] } identifier[selectedSWModuleId] operator[=] identifier[swModule] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[SoftwareModuleMetadata] operator[>] identifier[swMetadataList] operator[=] identifier[softwareModuleManagement] operator[SEP] identifier[findMetaDataBySoftwareModuleId] operator[SEP] identifier[PageRequest] operator[SEP] identifier[of] operator[SEP] Other[0] , identifier[MAX_METADATA_QUERY] operator[SEP] , identifier[selectedSWModuleId] operator[SEP] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[swMetadataList] operator[SEP] operator[SEP] { identifier[swMetadataList] operator[SEP] identifier[forEach] operator[SEP] Keyword[this] operator[::] identifier[setMetadataProperties] operator[SEP] operator[SEP] } }
@Nonnull public IFileItemIterator getItemIterator (@Nonnull final HttpServletRequest aHttpRequest) throws FileUploadException, IOException { return super.getItemIterator (new ServletRequestContext (aHttpRequest)); }
class class_name[name] begin[{] method[getItemIterator, return_type[type[IFileItemIterator]], modifier[public], parameter[aHttpRequest]] begin[{] return[SuperMethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=aHttpRequest, 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=ServletRequestContext, sub_type=None))], member=getItemIterator, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[IFileItemIterator] identifier[getItemIterator] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[HttpServletRequest] identifier[aHttpRequest] operator[SEP] Keyword[throws] identifier[FileUploadException] , identifier[IOException] { Keyword[return] Keyword[super] operator[SEP] identifier[getItemIterator] operator[SEP] Keyword[new] identifier[ServletRequestContext] operator[SEP] identifier[aHttpRequest] operator[SEP] operator[SEP] operator[SEP] }
public static JsExpr concatJsExprs(List<? extends JsExpr> jsExprs) { if (jsExprs.isEmpty()) { return EMPTY_STRING; } if (jsExprs.size() == 1) { return jsExprs.get(0); } int plusOpPrec = Operator.PLUS.getPrecedence(); StringBuilder resultSb = new StringBuilder(); boolean isFirst = true; for (JsExpr jsExpr : jsExprs) { // The first operand needs protection only if it's strictly lower precedence. The non-first // operands need protection when they're lower or equal precedence. (This is true for all // left-associative operators.) boolean needsProtection = isFirst ? jsExpr.getPrecedence() < plusOpPrec : jsExpr.getPrecedence() <= plusOpPrec; if (isFirst) { isFirst = false; } else { resultSb.append(" + "); } if (needsProtection) { resultSb.append('(').append(jsExpr.getText()).append(')'); } else { resultSb.append(jsExpr.getText()); } } return new JsExpr(resultSb.toString(), plusOpPrec); }
class class_name[name] begin[{] method[concatJsExprs, return_type[type[JsExpr]], modifier[public static], parameter[jsExprs]] begin[{] if[call[jsExprs.isEmpty, parameter[]]] begin[{] return[member[.EMPTY_STRING]] else begin[{] None end[}] if[binary_operation[call[jsExprs.size, parameter[]], ==, literal[1]]] begin[{] return[call[jsExprs.get, parameter[literal[0]]]] else begin[{] None end[}] local_variable[type[int], plusOpPrec] local_variable[type[StringBuilder], resultSb] local_variable[type[boolean], isFirst] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=isFirst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPrecedence, postfix_operators=[], prefix_operators=[], qualifier=jsExpr, selectors=[], type_arguments=None), operandr=MemberReference(member=plusOpPrec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), if_true=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPrecedence, postfix_operators=[], prefix_operators=[], qualifier=jsExpr, selectors=[], type_arguments=None), operandr=MemberReference(member=plusOpPrec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<)), name=needsProtection)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=isFirst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" + ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=resultSb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isFirst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), IfStatement(condition=MemberReference(member=needsProtection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=jsExpr, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=resultSb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='(')], member=append, postfix_operators=[], prefix_operators=[], qualifier=resultSb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=jsExpr, 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=')')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=jsExprs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=jsExpr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsExpr, sub_type=None))), label=None) return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=resultSb, selectors=[], type_arguments=None), MemberReference(member=plusOpPrec, 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=JsExpr, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[JsExpr] identifier[concatJsExprs] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[JsExpr] operator[>] identifier[jsExprs] operator[SEP] { Keyword[if] operator[SEP] identifier[jsExprs] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[EMPTY_STRING] operator[SEP] } Keyword[if] operator[SEP] identifier[jsExprs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[jsExprs] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[int] identifier[plusOpPrec] operator[=] identifier[Operator] operator[SEP] identifier[PLUS] operator[SEP] identifier[getPrecedence] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[resultSb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[isFirst] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[JsExpr] identifier[jsExpr] operator[:] identifier[jsExprs] operator[SEP] { Keyword[boolean] identifier[needsProtection] operator[=] identifier[isFirst] operator[?] identifier[jsExpr] operator[SEP] identifier[getPrecedence] operator[SEP] operator[SEP] operator[<] identifier[plusOpPrec] operator[:] identifier[jsExpr] operator[SEP] identifier[getPrecedence] operator[SEP] operator[SEP] operator[<=] identifier[plusOpPrec] operator[SEP] Keyword[if] operator[SEP] identifier[isFirst] operator[SEP] { identifier[isFirst] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[resultSb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[needsProtection] operator[SEP] { identifier[resultSb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[jsExpr] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[resultSb] operator[SEP] identifier[append] operator[SEP] identifier[jsExpr] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[JsExpr] operator[SEP] identifier[resultSb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[plusOpPrec] operator[SEP] operator[SEP] }
public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, ServerAzureADAdministratorInner properties) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().last().body(); }
class class_name[name] begin[{] method[createOrUpdate, return_type[type[ServerAzureADAdministratorInner]], modifier[public], parameter[resourceGroupName, serverName, properties]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.properties]]]] end[}] END[}]
Keyword[public] identifier[ServerAzureADAdministratorInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[ServerAzureADAdministratorInner] identifier[properties] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serverName] , identifier[properties] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
@Override public void write(Iterable<QueryResult> results) { logger.debug("Export to '{}', proxy {} metrics {}", url, proxy, results); List<QueryResult> counters = new ArrayList<QueryResult>(); List<QueryResult> gauges = new ArrayList<QueryResult>(); for (QueryResult result : results) { if (METRIC_TYPE_GAUGE.equals(result.getType())) { gauges.add(result); } else if (METRIC_TYPE_COUNTER.equals(result.getType())) { counters.add(result); } else if (null == result.getType()) { logger.info("Unspecified type for result {}, export it as counter"); counters.add(result); } else { logger.info("Unsupported metric type '{}' for result {}, export it as counter", result.getType(), result); counters.add(result); } } HttpURLConnection urlConnection = null; try { if (proxy == null) { urlConnection = (HttpURLConnection) url.openConnection(); } else { urlConnection = (HttpURLConnection) url.openConnection(proxy); } urlConnection.setRequestMethod("POST"); urlConnection.setDoInput(true); urlConnection.setDoOutput(true); urlConnection.setReadTimeout(libratoApiTimeoutInMillis); urlConnection.setRequestProperty("content-type", "application/json; charset=utf-8"); urlConnection.setRequestProperty("Authorization", "Basic " + basicAuthentication); urlConnection.setRequestProperty("User-Agent", httpUserAgent); serialize(counters, gauges, urlConnection.getOutputStream()); int responseCode = urlConnection.getResponseCode(); if (responseCode != 200) { exceptionCounter.incrementAndGet(); logger.warn("Failure {}:'{}' to send result to Librato server '{}' with proxy {}, user {}", responseCode, urlConnection.getResponseMessage(), url, proxy, user); } if (logger.isTraceEnabled()) { IoUtils2.copy(urlConnection.getInputStream(), System.out); } } catch (Exception e) { exceptionCounter.incrementAndGet(); logger.warn("Failure to send result to Librato server '{}' with proxy {}, user {}", url, proxy, user, e); } finally { if (urlConnection != null) { try { InputStream in = urlConnection.getInputStream(); IoUtils2.copy(in, IoUtils2.nullOutputStream()); IoUtils2.closeQuietly(in); InputStream err = urlConnection.getErrorStream(); if (err != null) { IoUtils2.copy(err, IoUtils2.nullOutputStream()); IoUtils2.closeQuietly(err); } } catch (IOException e) { logger.warn("Exception flushing http connection", e); } } } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[results]] begin[{] call[logger.debug, parameter[literal["Export to '{}', proxy {} metrics {}"], member[.url], member[.proxy], member[.results]]] local_variable[type[List], counters] local_variable[type[List], gauges] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=METRIC_TYPE_GAUGE, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=METRIC_TYPE_COUNTER, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported metric type '{}' for result {}, export it as counter"), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=counters, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unspecified type for result {}, export it as counter")], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=counters, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=counters, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=gauges, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None))), label=None) local_variable[type[HttpURLConnection], urlConnection] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=proxy, 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=urlConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=proxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=openConnection, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=urlConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=openConnection, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=HttpURLConnection, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="POST")], member=setRequestMethod, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setDoInput, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setDoOutput, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=libratoApiTimeoutInMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setReadTimeout, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="content-type"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="application/json; charset=utf-8")], member=setRequestProperty, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Authorization"), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Basic "), operandr=MemberReference(member=basicAuthentication, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=setRequestProperty, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="User-Agent"), MemberReference(member=httpUserAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRequestProperty, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=counters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gauges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None)], member=serialize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getResponseCode, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), name=responseCode)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=responseCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=200), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=incrementAndGet, postfix_operators=[], prefix_operators=[], qualifier=exceptionCounter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure {}:'{}' to send result to Librato server '{}' with proxy {}, user {}"), MemberReference(member=responseCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getResponseMessage, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=proxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=incrementAndGet, postfix_operators=[], prefix_operators=[], qualifier=exceptionCounter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure to send result to Librato server '{}' with proxy {}, user {}"), MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=proxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=urlConnection, 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=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=nullOutputStream, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None)], member=copy, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getErrorStream, postfix_operators=[], prefix_operators=[], qualifier=urlConnection, selectors=[], type_arguments=None), name=err)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=err, 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=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=nullOutputStream, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None)], member=copy, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IoUtils2, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception flushing http connection"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Iterable] operator[<] identifier[QueryResult] operator[>] identifier[results] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[url] , identifier[proxy] , identifier[results] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[QueryResult] operator[>] identifier[counters] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[QueryResult] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[QueryResult] operator[>] identifier[gauges] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[QueryResult] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[QueryResult] identifier[result] operator[:] identifier[results] operator[SEP] { Keyword[if] operator[SEP] identifier[METRIC_TYPE_GAUGE] operator[SEP] identifier[equals] operator[SEP] identifier[result] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[gauges] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[METRIC_TYPE_COUNTER] operator[SEP] identifier[equals] operator[SEP] identifier[result] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[counters] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Other[null] operator[==] identifier[result] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[counters] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[result] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[result] operator[SEP] operator[SEP] identifier[counters] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] operator[SEP] } } identifier[HttpURLConnection] identifier[urlConnection] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[proxy] operator[==] Other[null] operator[SEP] { identifier[urlConnection] operator[=] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[url] operator[SEP] identifier[openConnection] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[urlConnection] operator[=] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[url] operator[SEP] identifier[openConnection] operator[SEP] identifier[proxy] operator[SEP] operator[SEP] } identifier[urlConnection] operator[SEP] identifier[setRequestMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setDoInput] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setDoOutput] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setReadTimeout] operator[SEP] identifier[libratoApiTimeoutInMillis] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setRequestProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setRequestProperty] operator[SEP] literal[String] , literal[String] operator[+] identifier[basicAuthentication] operator[SEP] operator[SEP] identifier[urlConnection] operator[SEP] identifier[setRequestProperty] operator[SEP] literal[String] , identifier[httpUserAgent] operator[SEP] operator[SEP] identifier[serialize] operator[SEP] identifier[counters] , identifier[gauges] , identifier[urlConnection] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[responseCode] operator[=] identifier[urlConnection] operator[SEP] identifier[getResponseCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[responseCode] operator[!=] Other[200] operator[SEP] { identifier[exceptionCounter] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[responseCode] , identifier[urlConnection] operator[SEP] identifier[getResponseMessage] operator[SEP] operator[SEP] , identifier[url] , identifier[proxy] , identifier[user] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[IoUtils2] operator[SEP] identifier[copy] operator[SEP] identifier[urlConnection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[exceptionCounter] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[url] , identifier[proxy] , identifier[user] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[urlConnection] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[InputStream] identifier[in] operator[=] identifier[urlConnection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[IoUtils2] operator[SEP] identifier[copy] operator[SEP] identifier[in] , identifier[IoUtils2] operator[SEP] identifier[nullOutputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IoUtils2] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[InputStream] identifier[err] operator[=] identifier[urlConnection] operator[SEP] identifier[getErrorStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[err] operator[!=] Other[null] operator[SEP] { identifier[IoUtils2] operator[SEP] identifier[copy] operator[SEP] identifier[err] , identifier[IoUtils2] operator[SEP] identifier[nullOutputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IoUtils2] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[err] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } }
public Observable<Page<DscCompilationJobInner>> listByAutomationAccountNextAsync(final String nextPageLink) { return listByAutomationAccountNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<DscCompilationJobInner>>, Page<DscCompilationJobInner>>() { @Override public Page<DscCompilationJobInner> call(ServiceResponse<Page<DscCompilationJobInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listByAutomationAccountNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listByAutomationAccountNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] operator[>] identifier[listByAutomationAccountNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByAutomationAccountNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
protected ORole createRole(final ODocument roleDoc) { ORole role = null; // If databaseName is set, then only allow roles with the same databaseName. if (databaseName != null && !databaseName.isEmpty()) { if (roleDoc != null && roleDoc.containsField(OSystemRole.DB_FILTER) && roleDoc.fieldType(OSystemRole.DB_FILTER) == OType.EMBEDDEDLIST) { List<String> dbNames = roleDoc.field(OSystemRole.DB_FILTER, OType.EMBEDDEDLIST); for (String dbName : dbNames) { if (dbName != null && !dbName.isEmpty() && (dbName.equalsIgnoreCase(databaseName) || dbName.equals("*"))) { role = new OSystemRole(roleDoc); break; } } } } // If databaseName is not set, only return roles without a OSystemRole.DB_FILTER property or if set to "*". else { if (roleDoc != null) { if (!roleDoc.containsField(OSystemRole.DB_FILTER)) { role = new OSystemRole(roleDoc); } else { // It does use the dbFilter property. if(roleDoc.fieldType(OSystemRole.DB_FILTER) == OType.EMBEDDEDLIST) { List<String> dbNames = roleDoc.field(OSystemRole.DB_FILTER, OType.EMBEDDEDLIST); for (String dbName : dbNames) { if (dbName != null && !dbName.isEmpty() && dbName.equals("*")) { role = new OSystemRole(roleDoc); break; } } } } } } return role; }
class class_name[name] begin[{] method[createRole, return_type[type[ORole]], modifier[protected], parameter[roleDoc]] begin[{] local_variable[type[ORole], role] if[binary_operation[binary_operation[member[.databaseName], !=, literal[null]], &&, call[databaseName.isEmpty, parameter[]]]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.roleDoc], !=, literal[null]], &&, call[roleDoc.containsField, parameter[member[OSystemRole.DB_FILTER]]]], &&, binary_operation[call[roleDoc.fieldType, parameter[member[OSystemRole.DB_FILTER]]], ==, member[OType.EMBEDDEDLIST]]]] begin[{] local_variable[type[List], dbNames] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dbName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=dbName, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=databaseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=dbName, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=dbName, selectors=[], type_arguments=None), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=role, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=roleDoc, 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=OSystemRole, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=dbNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dbName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.roleDoc], !=, literal[null]]] begin[{] if[call[roleDoc.containsField, parameter[member[OSystemRole.DB_FILTER]]]] begin[{] assign[member[.role], ClassCreator(arguments=[MemberReference(member=roleDoc, 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=OSystemRole, sub_type=None))] else begin[{] if[binary_operation[call[roleDoc.fieldType, parameter[member[OSystemRole.DB_FILTER]]], ==, member[OType.EMBEDDEDLIST]]] begin[{] local_variable[type[List], dbNames] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dbName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=dbName, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=dbName, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=role, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=roleDoc, 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=OSystemRole, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=dbNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dbName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] return[member[.role]] end[}] END[}]
Keyword[protected] identifier[ORole] identifier[createRole] operator[SEP] Keyword[final] identifier[ODocument] identifier[roleDoc] operator[SEP] { identifier[ORole] identifier[role] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[databaseName] operator[!=] Other[null] operator[&&] operator[!] identifier[databaseName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[roleDoc] operator[!=] Other[null] operator[&&] identifier[roleDoc] operator[SEP] identifier[containsField] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] operator[SEP] operator[&&] identifier[roleDoc] operator[SEP] identifier[fieldType] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] operator[SEP] operator[==] identifier[OType] operator[SEP] identifier[EMBEDDEDLIST] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[dbNames] operator[=] identifier[roleDoc] operator[SEP] identifier[field] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] , identifier[OType] operator[SEP] identifier[EMBEDDEDLIST] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[dbName] operator[:] identifier[dbNames] operator[SEP] { Keyword[if] operator[SEP] identifier[dbName] operator[!=] Other[null] operator[&&] operator[!] identifier[dbName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[dbName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[databaseName] operator[SEP] operator[||] identifier[dbName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[role] operator[=] Keyword[new] identifier[OSystemRole] operator[SEP] identifier[roleDoc] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } } Keyword[else] { Keyword[if] operator[SEP] identifier[roleDoc] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[roleDoc] operator[SEP] identifier[containsField] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] operator[SEP] operator[SEP] { identifier[role] operator[=] Keyword[new] identifier[OSystemRole] operator[SEP] identifier[roleDoc] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[roleDoc] operator[SEP] identifier[fieldType] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] operator[SEP] operator[==] identifier[OType] operator[SEP] identifier[EMBEDDEDLIST] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[dbNames] operator[=] identifier[roleDoc] operator[SEP] identifier[field] operator[SEP] identifier[OSystemRole] operator[SEP] identifier[DB_FILTER] , identifier[OType] operator[SEP] identifier[EMBEDDEDLIST] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[dbName] operator[:] identifier[dbNames] operator[SEP] { Keyword[if] operator[SEP] identifier[dbName] operator[!=] Other[null] operator[&&] operator[!] identifier[dbName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[dbName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[role] operator[=] Keyword[new] identifier[OSystemRole] operator[SEP] identifier[roleDoc] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } } } } Keyword[return] identifier[role] operator[SEP] }
public static int andNotCardinality(final ImmutableRoaringBitmap x1, final ImmutableRoaringBitmap x2) { return x1.getCardinality() - andCardinality(x1, x2); }
class class_name[name] begin[{] method[andNotCardinality, return_type[type[int]], modifier[public static], parameter[x1, x2]] begin[{] return[binary_operation[call[x1.getCardinality, parameter[]], -, call[.andCardinality, parameter[member[.x1], member[.x2]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[andNotCardinality] operator[SEP] Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x1] , Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x2] operator[SEP] { Keyword[return] identifier[x1] operator[SEP] identifier[getCardinality] operator[SEP] operator[SEP] operator[-] identifier[andCardinality] operator[SEP] identifier[x1] , identifier[x2] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static List<Boolean> getAt(boolean[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
class class_name[name] begin[{] method[getAt, return_type[type[List]], modifier[public static], parameter[array, range]] begin[{] return[call[.primitiveArrayGet, parameter[member[.array], member[.range]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Boolean] operator[>] identifier[getAt] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[array] , identifier[ObjectRange] identifier[range] operator[SEP] { Keyword[return] identifier[primitiveArrayGet] operator[SEP] identifier[array] , identifier[range] operator[SEP] operator[SEP] }
@Override public boolean put(K key, V value) throws Exception { if(key == null) { throw new NullPointerException("key"); } if(value == null) { return _store.delete(_keySerializer.serialize(key)); } else { return _store.put(_keySerializer.serialize(key), _valSerializer.serialize(value)); } }
class class_name[name] begin[{] method[put, return_type[type[boolean]], modifier[public], parameter[key, value]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[call[_store.delete, parameter[call[_keySerializer.serialize, parameter[member[.key]]]]]] else begin[{] return[call[_store.put, parameter[call[_keySerializer.serialize, parameter[member[.key]]], call[_valSerializer.serialize, parameter[member[.value]]]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[_store] operator[SEP] identifier[delete] operator[SEP] identifier[_keySerializer] operator[SEP] identifier[serialize] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[_store] operator[SEP] identifier[put] operator[SEP] identifier[_keySerializer] operator[SEP] identifier[serialize] operator[SEP] identifier[key] operator[SEP] , identifier[_valSerializer] operator[SEP] identifier[serialize] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } }
public void editable(boolean isEditable, String filename) throws JspException { if (isEditable) { CmsJspTagEditable.editableTagAction( getJspContext(), CmsDirectEditJspIncludeProvider.class.getName(), CmsDirectEditMode.AUTO, filename); } }
class class_name[name] begin[{] method[editable, return_type[void], modifier[public], parameter[isEditable, filename]] begin[{] if[member[.isEditable]] begin[{] call[CmsJspTagEditable.editableTagAction, parameter[call[.getJspContext, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CmsDirectEditJspIncludeProvider, sub_type=None)), member[CmsDirectEditMode.AUTO], member[.filename]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[editable] operator[SEP] Keyword[boolean] identifier[isEditable] , identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[JspException] { Keyword[if] operator[SEP] identifier[isEditable] operator[SEP] { identifier[CmsJspTagEditable] operator[SEP] identifier[editableTagAction] operator[SEP] identifier[getJspContext] operator[SEP] operator[SEP] , identifier[CmsDirectEditJspIncludeProvider] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[CmsDirectEditMode] operator[SEP] identifier[AUTO] , identifier[filename] operator[SEP] operator[SEP] } }
private void terminateSubscriptions(IoSession session, Subscription.CloseReason reason) { Multiset<String> heapsForThisClient; try { subTermLock.lock(); heapsForThisClient = heapsByClient.remove(session); } finally { subTermLock.unlock(); } if (heapsForThisClient != null) { for (String s : heapsForThisClient.keySet()) { terminateSubscriptions(session, s, reason); } } }
class class_name[name] begin[{] method[terminateSubscriptions, return_type[void], modifier[private], parameter[session, reason]] begin[{] local_variable[type[Multiset], heapsForThisClient] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=subTermLock, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=heapsForThisClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=heapsByClient, selectors=[], type_arguments=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=subTermLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) if[binary_operation[member[.heapsForThisClient], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=terminateSubscriptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=heapsForThisClient, selectors=[], type_arguments=None), 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[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[terminateSubscriptions] operator[SEP] identifier[IoSession] identifier[session] , identifier[Subscription] operator[SEP] identifier[CloseReason] identifier[reason] operator[SEP] { identifier[Multiset] operator[<] identifier[String] operator[>] identifier[heapsForThisClient] operator[SEP] Keyword[try] { identifier[subTermLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[heapsForThisClient] operator[=] identifier[heapsByClient] operator[SEP] identifier[remove] operator[SEP] identifier[session] operator[SEP] operator[SEP] } Keyword[finally] { identifier[subTermLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[heapsForThisClient] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[heapsForThisClient] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[terminateSubscriptions] operator[SEP] identifier[session] , identifier[s] , identifier[reason] operator[SEP] operator[SEP] } } }
private int bufferCrypt(ByteBuffer input, ByteBuffer output, boolean isUpdate) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException { if ((input == null) || (output == null)) { throw new NullPointerException ("Input and output buffers must not be null"); } int inPos = input.position(); int inLimit = input.limit(); int inLen = inLimit - inPos; if (isUpdate && (inLen == 0)) { return 0; } int outLenNeeded = engineGetOutputSize(inLen); if (output.remaining() < outLenNeeded) { throw new ShortBufferException("Need at least " + outLenNeeded + " bytes of space in output buffer"); } boolean a1 = input.hasArray(); boolean a2 = output.hasArray(); if (a1 && a2) { byte[] inArray = input.array(); int inOfs = input.arrayOffset() + inPos; byte[] outArray = output.array(); int outPos = output.position(); int outOfs = output.arrayOffset() + outPos; int n; if (isUpdate) { n = engineUpdate(inArray, inOfs, inLen, outArray, outOfs); } else { n = engineDoFinal(inArray, inOfs, inLen, outArray, outOfs); } input.position(inLimit); output.position(outPos + n); return n; } else if (!a1 && a2) { int outPos = output.position(); byte[] outArray = output.array(); int outOfs = output.arrayOffset() + outPos; byte[] inArray = new byte[getTempArraySize(inLen)]; int total = 0; do { int chunk = Math.min(inLen, inArray.length); if (chunk > 0) { input.get(inArray, 0, chunk); } int n; if (isUpdate || (inLen != chunk)) { n = engineUpdate(inArray, 0, chunk, outArray, outOfs); } else { n = engineDoFinal(inArray, 0, chunk, outArray, outOfs); } total += n; outOfs += n; inLen -= chunk; } while (inLen > 0); output.position(outPos + total); return total; } else { // output is not backed by an accessible byte[] byte[] inArray; int inOfs; if (a1) { inArray = input.array(); inOfs = input.arrayOffset() + inPos; } else { inArray = new byte[getTempArraySize(inLen)]; inOfs = 0; } byte[] outArray = new byte[getTempArraySize(outLenNeeded)]; int outSize = outArray.length; int total = 0; boolean resized = false; do { int chunk = Math.min(inLen, (outSize == 0? inArray.length : outSize)); if (!a1 && !resized && chunk > 0) { input.get(inArray, 0, chunk); inOfs = 0; } try { int n; if (isUpdate || (inLen != chunk)) { n = engineUpdate(inArray, inOfs, chunk, outArray, 0); } else { n = engineDoFinal(inArray, inOfs, chunk, outArray, 0); } resized = false; inOfs += chunk; inLen -= chunk; if (n > 0) { output.put(outArray, 0, n); total += n; } } catch (ShortBufferException e) { if (resized) { // we just resized the output buffer, but it still // did not work. Bug in the provider, abort throw (ProviderException)new ProviderException ("Could not determine buffer size").initCause(e); } // output buffer is too small, realloc and try again resized = true; outSize = engineGetOutputSize(chunk); outArray = new byte[outSize]; } } while (inLen > 0); if (a1) { input.position(inLimit); } return total; } }
class class_name[name] begin[{] method[bufferCrypt, return_type[type[int]], modifier[private], parameter[input, output, isUpdate]] begin[{] if[binary_operation[binary_operation[member[.input], ==, literal[null]], ||, binary_operation[member[.output], ==, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Input and output buffers must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], inPos] local_variable[type[int], inLimit] local_variable[type[int], inLen] if[binary_operation[member[.isUpdate], &&, binary_operation[member[.inLen], ==, literal[0]]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[int], outLenNeeded] if[binary_operation[call[output.remaining, parameter[]], <, member[.outLenNeeded]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Need at least "), operandr=MemberReference(member=outLenNeeded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" bytes of space in output buffer"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ShortBufferException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[boolean], a1] local_variable[type[boolean], a2] if[binary_operation[member[.a1], &&, member[.a2]]] begin[{] local_variable[type[byte], inArray] local_variable[type[int], inOfs] local_variable[type[byte], outArray] local_variable[type[int], outPos] local_variable[type[int], outOfs] local_variable[type[int], n] if[member[.isUpdate]] begin[{] assign[member[.n], call[.engineUpdate, parameter[member[.inArray], member[.inOfs], member[.inLen], member[.outArray], member[.outOfs]]]] else begin[{] assign[member[.n], call[.engineDoFinal, parameter[member[.inArray], member[.inOfs], member[.inLen], member[.outArray], member[.outOfs]]]] end[}] call[input.position, parameter[member[.inLimit]]] call[output.position, parameter[binary_operation[member[.outPos], +, member[.n]]]] return[member[.n]] else begin[{] if[binary_operation[member[.a1], &&, member[.a2]]] begin[{] local_variable[type[int], outPos] local_variable[type[byte], outArray] local_variable[type[int], outOfs] local_variable[type[byte], inArray] local_variable[type[int], total] do[binary_operation[member[.inLen], >, literal[0]]] begin[{] local_variable[type[int], chunk] if[binary_operation[member[.chunk], >, literal[0]]] begin[{] call[input.get, parameter[member[.inArray], literal[0], member[.chunk]]] else begin[{] None end[}] local_variable[type[int], n] if[binary_operation[member[.isUpdate], ||, binary_operation[member[.inLen], !=, member[.chunk]]]] begin[{] assign[member[.n], call[.engineUpdate, parameter[member[.inArray], literal[0], member[.chunk], member[.outArray], member[.outOfs]]]] else begin[{] assign[member[.n], call[.engineDoFinal, parameter[member[.inArray], literal[0], member[.chunk], member[.outArray], member[.outOfs]]]] end[}] assign[member[.total], member[.n]] assign[member[.outOfs], member[.n]] assign[member[.inLen], member[.chunk]] end[}] call[output.position, parameter[binary_operation[member[.outPos], +, member[.total]]]] return[member[.total]] else begin[{] local_variable[type[byte], inArray] local_variable[type[int], inOfs] if[member[.a1]] begin[{] assign[member[.inArray], call[input.array, parameter[]]] assign[member[.inOfs], binary_operation[call[input.arrayOffset, parameter[]], +, member[.inPos]]] else begin[{] assign[member[.inArray], ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=inLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTempArraySize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] assign[member[.inOfs], literal[0]] end[}] local_variable[type[byte], outArray] local_variable[type[int], outSize] local_variable[type[int], total] local_variable[type[boolean], resized] do[binary_operation[member[.inLen], >, literal[0]]] begin[{] local_variable[type[int], chunk] if[binary_operation[binary_operation[member[.a1], &&, member[.resized]], &&, binary_operation[member[.chunk], >, literal[0]]]] begin[{] call[input.get, parameter[member[.inArray], literal[0], member[.chunk]]] assign[member[.inOfs], literal[0]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=inLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=inArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inOfs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=engineDoFinal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=inArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inOfs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=engineUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resized, 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=inOfs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, 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=[MemberReference(member=outArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=resized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not determine buffer size")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCause, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ProviderException, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=ProviderException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=engineGetOutputSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=outSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ShortBufferException']))], finally_block=None, label=None, resources=None) end[}] if[member[.a1]] begin[{] call[input.position, parameter[member[.inLimit]]] else begin[{] None end[}] return[member[.total]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[int] identifier[bufferCrypt] operator[SEP] identifier[ByteBuffer] identifier[input] , identifier[ByteBuffer] identifier[output] , Keyword[boolean] identifier[isUpdate] operator[SEP] Keyword[throws] identifier[ShortBufferException] , identifier[IllegalBlockSizeException] , identifier[BadPaddingException] { Keyword[if] operator[SEP] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[output] operator[==] Other[null] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[inPos] operator[=] identifier[input] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[inLimit] operator[=] identifier[input] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[inLen] operator[=] identifier[inLimit] operator[-] identifier[inPos] operator[SEP] Keyword[if] operator[SEP] identifier[isUpdate] operator[&&] operator[SEP] identifier[inLen] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[int] identifier[outLenNeeded] operator[=] identifier[engineGetOutputSize] operator[SEP] identifier[inLen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[<] identifier[outLenNeeded] operator[SEP] { Keyword[throw] Keyword[new] identifier[ShortBufferException] operator[SEP] literal[String] operator[+] identifier[outLenNeeded] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[boolean] identifier[a1] operator[=] identifier[input] operator[SEP] identifier[hasArray] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[a2] operator[=] identifier[output] operator[SEP] identifier[hasArray] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[a1] operator[&&] identifier[a2] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[inArray] operator[=] identifier[input] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[inOfs] operator[=] identifier[input] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] operator[+] identifier[inPos] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outArray] operator[=] identifier[output] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outPos] operator[=] identifier[output] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outOfs] operator[=] identifier[output] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] operator[+] identifier[outPos] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[isUpdate] operator[SEP] { identifier[n] operator[=] identifier[engineUpdate] operator[SEP] identifier[inArray] , identifier[inOfs] , identifier[inLen] , identifier[outArray] , identifier[outOfs] operator[SEP] operator[SEP] } Keyword[else] { identifier[n] operator[=] identifier[engineDoFinal] operator[SEP] identifier[inArray] , identifier[inOfs] , identifier[inLen] , identifier[outArray] , identifier[outOfs] operator[SEP] operator[SEP] } identifier[input] operator[SEP] identifier[position] operator[SEP] identifier[inLimit] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[position] operator[SEP] identifier[outPos] operator[+] identifier[n] operator[SEP] operator[SEP] Keyword[return] identifier[n] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[a1] operator[&&] identifier[a2] operator[SEP] { Keyword[int] identifier[outPos] operator[=] identifier[output] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outArray] operator[=] identifier[output] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outOfs] operator[=] identifier[output] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] operator[+] identifier[outPos] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[inArray] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[getTempArraySize] operator[SEP] identifier[inLen] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[total] operator[=] Other[0] operator[SEP] Keyword[do] { Keyword[int] identifier[chunk] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[inLen] , identifier[inArray] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[chunk] operator[>] Other[0] operator[SEP] { identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[inArray] , Other[0] , identifier[chunk] operator[SEP] operator[SEP] } Keyword[int] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[isUpdate] operator[||] operator[SEP] identifier[inLen] operator[!=] identifier[chunk] operator[SEP] operator[SEP] { identifier[n] operator[=] identifier[engineUpdate] operator[SEP] identifier[inArray] , Other[0] , identifier[chunk] , identifier[outArray] , identifier[outOfs] operator[SEP] operator[SEP] } Keyword[else] { identifier[n] operator[=] identifier[engineDoFinal] operator[SEP] identifier[inArray] , Other[0] , identifier[chunk] , identifier[outArray] , identifier[outOfs] operator[SEP] operator[SEP] } identifier[total] operator[+=] identifier[n] operator[SEP] identifier[outOfs] operator[+=] identifier[n] operator[SEP] identifier[inLen] operator[-=] identifier[chunk] operator[SEP] } Keyword[while] operator[SEP] identifier[inLen] operator[>] Other[0] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[position] operator[SEP] identifier[outPos] operator[+] identifier[total] operator[SEP] operator[SEP] Keyword[return] identifier[total] operator[SEP] } Keyword[else] { Keyword[byte] operator[SEP] operator[SEP] identifier[inArray] operator[SEP] Keyword[int] identifier[inOfs] operator[SEP] Keyword[if] operator[SEP] identifier[a1] operator[SEP] { identifier[inArray] operator[=] identifier[input] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] identifier[inOfs] operator[=] identifier[input] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] operator[+] identifier[inPos] operator[SEP] } Keyword[else] { identifier[inArray] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[getTempArraySize] operator[SEP] identifier[inLen] operator[SEP] operator[SEP] operator[SEP] identifier[inOfs] operator[=] Other[0] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[outArray] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[getTempArraySize] operator[SEP] identifier[outLenNeeded] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outSize] operator[=] identifier[outArray] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[total] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[resized] operator[=] literal[boolean] operator[SEP] Keyword[do] { Keyword[int] identifier[chunk] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[inLen] , operator[SEP] identifier[outSize] operator[==] Other[0] operator[?] identifier[inArray] operator[SEP] identifier[length] operator[:] identifier[outSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[a1] operator[&&] operator[!] identifier[resized] operator[&&] identifier[chunk] operator[>] Other[0] operator[SEP] { identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[inArray] , Other[0] , identifier[chunk] operator[SEP] operator[SEP] identifier[inOfs] operator[=] Other[0] operator[SEP] } Keyword[try] { Keyword[int] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[isUpdate] operator[||] operator[SEP] identifier[inLen] operator[!=] identifier[chunk] operator[SEP] operator[SEP] { identifier[n] operator[=] identifier[engineUpdate] operator[SEP] identifier[inArray] , identifier[inOfs] , identifier[chunk] , identifier[outArray] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[n] operator[=] identifier[engineDoFinal] operator[SEP] identifier[inArray] , identifier[inOfs] , identifier[chunk] , identifier[outArray] , Other[0] operator[SEP] operator[SEP] } identifier[resized] operator[=] literal[boolean] operator[SEP] identifier[inOfs] operator[+=] identifier[chunk] operator[SEP] identifier[inLen] operator[-=] identifier[chunk] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[>] Other[0] operator[SEP] { identifier[output] operator[SEP] identifier[put] operator[SEP] identifier[outArray] , Other[0] , identifier[n] operator[SEP] operator[SEP] identifier[total] operator[+=] identifier[n] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ShortBufferException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[resized] operator[SEP] { Keyword[throw] operator[SEP] identifier[ProviderException] operator[SEP] Keyword[new] identifier[ProviderException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[initCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[resized] operator[=] literal[boolean] operator[SEP] identifier[outSize] operator[=] identifier[engineGetOutputSize] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] identifier[outArray] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[outSize] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[inLen] operator[>] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[a1] operator[SEP] { identifier[input] operator[SEP] identifier[position] operator[SEP] identifier[inLimit] operator[SEP] operator[SEP] } Keyword[return] identifier[total] operator[SEP] } }
public <T extends ChronoEntity<T>> T now(Chronology<T> chronology) { Timezone tz = (this.timezone == null) ? Timezone.ofSystem() : this.timezone; Attributes attrs = new Attributes.Builder().setTimezone(tz.getID()).build(); T result = chronology.createFrom(this.timeSource, attrs); if (result == null) { Class<?> type = chronology.getChronoType(); if (CalendarVariant.class.isAssignableFrom(type)) { throw new IllegalArgumentException("Calendar variant required: " + type.getName()); } else { throw new IllegalArgumentException("Insufficient data: " + type.getName()); } } else { return result; } }
class class_name[name] begin[{] method[now, return_type[type[T]], modifier[public], parameter[chronology]] begin[{] local_variable[type[Timezone], tz] local_variable[type[Attributes], attrs] local_variable[type[T], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] local_variable[type[Class], type] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CalendarVariant, sub_type=None))] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Calendar variant required: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Insufficient data: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] else begin[{] return[member[.result]] end[}] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[ChronoEntity] operator[<] identifier[T] operator[>] operator[>] identifier[T] identifier[now] operator[SEP] identifier[Chronology] operator[<] identifier[T] operator[>] identifier[chronology] operator[SEP] { identifier[Timezone] identifier[tz] operator[=] operator[SEP] Keyword[this] operator[SEP] identifier[timezone] operator[==] Other[null] operator[SEP] operator[?] identifier[Timezone] operator[SEP] identifier[ofSystem] operator[SEP] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[timezone] operator[SEP] identifier[Attributes] identifier[attrs] operator[=] Keyword[new] identifier[Attributes] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[setTimezone] operator[SEP] identifier[tz] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[result] operator[=] identifier[chronology] operator[SEP] identifier[createFrom] operator[SEP] Keyword[this] operator[SEP] identifier[timeSource] , identifier[attrs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[chronology] operator[SEP] identifier[getChronoType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CalendarVariant] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] identifier[result] operator[SEP] } }
@UiChild(limit = 1, tagname = "valuebox") public void setValueBox(ValueBoxBase<T> widget) { contents.add(widget); setEditor(widget.asEditor()); }
class class_name[name] begin[{] method[setValueBox, return_type[void], modifier[public], parameter[widget]] begin[{] call[contents.add, parameter[member[.widget]]] call[.setEditor, parameter[call[widget.asEditor, parameter[]]]] end[}] END[}]
annotation[@] identifier[UiChild] operator[SEP] identifier[limit] operator[=] Other[1] , identifier[tagname] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setValueBox] operator[SEP] identifier[ValueBoxBase] operator[<] identifier[T] operator[>] identifier[widget] operator[SEP] { identifier[contents] operator[SEP] identifier[add] operator[SEP] identifier[widget] operator[SEP] operator[SEP] identifier[setEditor] operator[SEP] identifier[widget] operator[SEP] identifier[asEditor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ObjectValue newInstance(SClassDefinition node, PDefinition ctorDefinition, ValueList argvals, Context ctxt) throws AnalysisException { if (node instanceof ABusClassDefinition) { return newInstance((ABusClassDefinition) node, ctorDefinition, argvals, ctxt); } else if (node instanceof AClassClassDefinition) { if (node.getIsAbstract()) { VdmRuntimeError.abort(node.getLocation(), 4000, "Cannot instantiate abstract class " + node.getName(), ctxt); } return af.createSClassDefinitionAssistant().makeNewInstance(node, ctorDefinition, argvals, ctxt, new HashMap<ILexNameToken, ObjectValue>(), false); //return af.createAClassClassDefinitionAssistant().newInstance((AClassClassDefinition) node, ctorDefinition, argvals, ctxt); } else if (node instanceof ACpuClassDefinition) { return af.createACpuClassDefinitionAssistant().newInstance((ACpuClassDefinition) node, ctorDefinition, argvals, ctxt); } else if (node instanceof ASystemClassDefinition) { VdmRuntimeError.abort(node.getLocation(), 4135, "Cannot instantiate system class " + node.getName(), ctxt); } return null; }
class class_name[name] begin[{] method[newInstance, return_type[type[ObjectValue]], modifier[public], parameter[node, ctorDefinition, argvals, ctxt]] begin[{] if[binary_operation[member[.node], instanceof, type[ABusClassDefinition]]] begin[{] return[call[.newInstance, parameter[Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ABusClassDefinition, sub_type=None)), member[.ctorDefinition], member[.argvals], member[.ctxt]]]] else begin[{] if[binary_operation[member[.node], instanceof, type[AClassClassDefinition]]] begin[{] if[call[node.getIsAbstract, parameter[]]] begin[{] call[VdmRuntimeError.abort, parameter[call[node.getLocation, parameter[]], literal[4000], binary_operation[literal["Cannot instantiate abstract class "], +, call[node.getName, parameter[]]], member[.ctxt]]] else begin[{] None end[}] return[call[af.createSClassDefinitionAssistant, parameter[]]] else begin[{] if[binary_operation[member[.node], instanceof, type[ACpuClassDefinition]]] begin[{] return[call[af.createACpuClassDefinitionAssistant, parameter[]]] else begin[{] if[binary_operation[member[.node], instanceof, type[ASystemClassDefinition]]] begin[{] call[VdmRuntimeError.abort, parameter[call[node.getLocation, parameter[]], literal[4135], binary_operation[literal["Cannot instantiate system class "], +, call[node.getName, parameter[]]], member[.ctxt]]] else begin[{] None end[}] end[}] end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[ObjectValue] identifier[newInstance] operator[SEP] identifier[SClassDefinition] identifier[node] , identifier[PDefinition] identifier[ctorDefinition] , identifier[ValueList] identifier[argvals] , identifier[Context] identifier[ctxt] operator[SEP] Keyword[throws] identifier[AnalysisException] { Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[ABusClassDefinition] operator[SEP] { Keyword[return] identifier[newInstance] operator[SEP] operator[SEP] identifier[ABusClassDefinition] operator[SEP] identifier[node] , identifier[ctorDefinition] , identifier[argvals] , identifier[ctxt] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[AClassClassDefinition] operator[SEP] { Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getIsAbstract] operator[SEP] operator[SEP] operator[SEP] { identifier[VdmRuntimeError] operator[SEP] identifier[abort] operator[SEP] identifier[node] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] , Other[4000] , literal[String] operator[+] identifier[node] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ctxt] operator[SEP] operator[SEP] } Keyword[return] identifier[af] operator[SEP] identifier[createSClassDefinitionAssistant] operator[SEP] operator[SEP] operator[SEP] identifier[makeNewInstance] operator[SEP] identifier[node] , identifier[ctorDefinition] , identifier[argvals] , identifier[ctxt] , Keyword[new] identifier[HashMap] operator[<] identifier[ILexNameToken] , identifier[ObjectValue] operator[>] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[ACpuClassDefinition] operator[SEP] { Keyword[return] identifier[af] operator[SEP] identifier[createACpuClassDefinitionAssistant] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] identifier[ACpuClassDefinition] operator[SEP] identifier[node] , identifier[ctorDefinition] , identifier[argvals] , identifier[ctxt] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[ASystemClassDefinition] operator[SEP] { identifier[VdmRuntimeError] operator[SEP] identifier[abort] operator[SEP] identifier[node] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] , Other[4135] , literal[String] operator[+] identifier[node] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ctxt] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static String toUnicodeString(String s) { if (Strings.isNullOrEmpty(s)) return ""; int length = s.length(); StringBuilder sbd = new StringBuilder(length * 6); for (int i=0; i< length; i++) { char c = s.charAt(i); int hi = c >>> 8; int lo = c & 0x0ff; sbd.append('\\').append('u').append(HEX_DIGIT[hi]).append(HEX_DIGIT[lo]); } return sbd.toString(); }
class class_name[name] begin[{] method[toUnicodeString, return_type[type[String]], modifier[public static], parameter[s]] begin[{] if[call[Strings.isNullOrEmpty, parameter[member[.s]]]] begin[{] return[literal[""]] else begin[{] None end[}] local_variable[type[int], length] local_variable[type[StringBuilder], sbd] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), name=hi)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0ff), operator=&), name=lo)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\')], member=append, postfix_operators=[], prefix_operators=[], qualifier=sbd, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='u')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=HEX_DIGIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=hi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=HEX_DIGIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=lo, 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=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sbd.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toUnicodeString] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sbd] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[length] operator[*] Other[6] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[hi] operator[=] identifier[c] operator[>] operator[>] operator[>] Other[8] operator[SEP] Keyword[int] identifier[lo] operator[=] identifier[c] operator[&] literal[Integer] operator[SEP] identifier[sbd] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[HEX_DIGIT] operator[SEP] identifier[hi] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[HEX_DIGIT] operator[SEP] identifier[lo] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sbd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public AbstractMessage copy() { ObjectMessageImpl clone = new ObjectMessageImpl(); copyCommonFields(clone); clone.body = this.body; return clone; }
class class_name[name] begin[{] method[copy, return_type[type[AbstractMessage]], modifier[public], parameter[]] begin[{] local_variable[type[ObjectMessageImpl], clone] call[.copyCommonFields, parameter[member[.clone]]] assign[member[clone.body], THIS[member[None.body]]] return[member[.clone]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AbstractMessage] identifier[copy] operator[SEP] operator[SEP] { identifier[ObjectMessageImpl] identifier[clone] operator[=] Keyword[new] identifier[ObjectMessageImpl] operator[SEP] operator[SEP] operator[SEP] identifier[copyCommonFields] operator[SEP] identifier[clone] operator[SEP] operator[SEP] identifier[clone] operator[SEP] identifier[body] operator[=] Keyword[this] operator[SEP] identifier[body] operator[SEP] Keyword[return] identifier[clone] operator[SEP] }
public com.google.protobuf.Duration getIdleTimeout() { return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; }
class class_name[name] begin[{] method[getIdleTimeout, return_type[type[com]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idleTimeout_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=idleTimeout_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getDefaultInstance, postfix_operators=[], prefix_operators=[], qualifier=com.google.protobuf.Duration, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[Duration] identifier[getIdleTimeout] operator[SEP] operator[SEP] { Keyword[return] identifier[idleTimeout_] operator[==] Other[null] operator[?] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[Duration] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[:] identifier[idleTimeout_] operator[SEP] }
@Override public HTableDescriptor[] disableTables(Pattern pattern) throws IOException { HTableDescriptor[] tableDescriptors = listTables(pattern); for (HTableDescriptor descriptor : tableDescriptors) { disableTable(descriptor.getTableName()); } return tableDescriptors; }
class class_name[name] begin[{] method[disableTables, return_type[type[HTableDescriptor]], modifier[public], parameter[pattern]] begin[{] local_variable[type[HTableDescriptor], tableDescriptors] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=descriptor, selectors=[], type_arguments=None)], member=disableTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tableDescriptors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=descriptor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HTableDescriptor, sub_type=None))), label=None) return[member[.tableDescriptors]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[HTableDescriptor] operator[SEP] operator[SEP] identifier[disableTables] operator[SEP] identifier[Pattern] identifier[pattern] operator[SEP] Keyword[throws] identifier[IOException] { identifier[HTableDescriptor] operator[SEP] operator[SEP] identifier[tableDescriptors] operator[=] identifier[listTables] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[HTableDescriptor] identifier[descriptor] operator[:] identifier[tableDescriptors] operator[SEP] { identifier[disableTable] operator[SEP] identifier[descriptor] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tableDescriptors] operator[SEP] }
@Override public ConfigurationParser get() { try { ConfigurationParser parser = parserConstructor.newInstance(); parser.setConfigurationClasses(configurationClasses); parser.setEnvironment(System.getProperty("com.meltmedia.cadmium.environment")); return parser; } catch (Exception e) { logger.error("Failed to create a new ConfigurationParser Instance.", e); throw new RuntimeException("Failed to create a new ConfigurationParser Instance."); } }
class class_name[name] begin[{] method[get, return_type[type[ConfigurationParser]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=parserConstructor, selectors=[], type_arguments=None), name=parser)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConfigurationParser, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=configurationClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setConfigurationClasses, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.meltmedia.cadmium.environment")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], member=setEnvironment, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create a new ConfigurationParser Instance."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create a new ConfigurationParser Instance.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ConfigurationParser] identifier[get] operator[SEP] operator[SEP] { Keyword[try] { identifier[ConfigurationParser] identifier[parser] operator[=] identifier[parserConstructor] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[parser] operator[SEP] identifier[setConfigurationClasses] operator[SEP] identifier[configurationClasses] operator[SEP] operator[SEP] identifier[parser] operator[SEP] identifier[setEnvironment] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[parser] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }